[ovs-dev] [PATCH V3 2/2] netdev-vport: Always implement get_ifindex for netdev-vport
Roi Dayan
roid at mellanox.com
Tue Aug 8 14:03:12 UTC 2017
From: Paul Blakey <paulb at mellanox.com>
Always implement get_ifindex without checking if offload is
enabled or not as this should not be related. From ovs-dpctl
we cannot tell if offload is enabled or not as other_config is
not being read.
Signed-off-by: Paul Blakey <paulb at mellanox.com>
Reviewed-by: Roi Dayan <roid at mellanox.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
lib/netdev-vport.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 64a3ba3..d11c5cc 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -857,7 +857,7 @@ 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));
@@ -865,15 +865,6 @@ netdev_vport_get_ifindex__(const struct netdev *netdev_)
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__ */
--
2.8.0
More information about the dev
mailing list