Skip to content

Commit

Permalink
Revert "netdev-vport: Always implement get_ifindex for netdev-vport"
Browse files Browse the repository at this point in the history
This reverts commit 327d98e,
which several unit tests to fail due to new warning messages in
the logs.

Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Aug 7, 2017
1 parent 90cef12 commit a59ea79
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/netdev-vport.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,14 +857,23 @@ get_pt_mode(const struct netdev *netdev)

#ifdef __linux__
static int
netdev_vport_get_ifindex(const struct netdev *netdev_)
netdev_vport_get_ifindex__(const struct netdev *netdev_)
{
char buf[NETDEV_VPORT_NAME_BUFSIZE];
const char *name = netdev_vport_get_dpif_port(netdev_, buf, sizeof(buf));

return linux_get_ifindex(name);
}

static int
netdev_vport_get_ifindex(const struct netdev *netdev_)
{
if (netdev_is_flow_api_enabled())
return netdev_vport_get_ifindex__(netdev_);
else
return -EOPNOTSUPP;
}

#define NETDEV_VPORT_GET_IFINDEX netdev_vport_get_ifindex
#define NETDEV_FLOW_OFFLOAD_API LINUX_FLOW_OFFLOAD_API
#else /* !__linux__ */
Expand Down

0 comments on commit a59ea79

Please sign in to comment.