On 14/04/2017 04:19, Joe Stringer wrote:
On 7 April 2017 at 06:13, Roi Dayan <r...@mellanox.com> wrote:
From: Paul Blakey <pa...@mellanox.com>
netdev vports are backed by actualy netdev at the kernel
level, so they can use the common netdev-tc offloads interface
for flow offloading (if enabled).
Signed-off-by: Paul Blakey <pa...@mellanox.com>
Signed-off-by: Simon Horman <simon.hor...@netronome.com>
Reviewed-by: Roi Dayan <r...@mellanox.com>
---
<snip>
@@ -779,11 +783,37 @@ get_stats(const struct netdev *netdev, struct
netdev_stats *stats)
return 0;
}
-
Please don't drop the ^L, they're used to separate the file into
logically separate sections.
ok.
+#ifdef __linux__
+static int
+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);
Why link directly against linux implementation, ignoring that netdev
provides netdev_get_ifindex() ?
netdev_get_ifindex() is the interface that got us into the vport_class
callback which we set for vxlan interface, netdev_vport_get_ifindex__().
by default vxlan vport class have NULL for the get_ifindex callback
and we added that if we are in Linux we call the linux implementation.
if we will call netdev_get_ifindex() here we will be in a loop.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev