diff options
author | Ido Schimmel <idosch@mellanox.com> | 2015-12-15 10:03:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 11:58:20 -0500 |
commit | 9d547833f02fb8b52ab824adae8f850f3c22fd4f (patch) | |
tree | 9d0e5195728668b230c60e9d843336425b26eb4c /net/8021q | |
parent | 335b320940ef938c39e68eb363d26096c260057e (diff) |
switchdev: vlan: Use switchdev_port* in vlan_netdev_ops
We need to be able to propagate static FDB entries and certain bridge
port attributes (e.g. learning, flooding) down to the port netdev
driver when bridge port is a VLAN interface.
Achieve that by setting ndo_bridge* and ndo_fdb* in vlan_netdev_ops to
the corresponding switchdev_port* functions. This is consistent with
team and bond devices.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan_dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index fded86508117..9f4bd137e045 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/ethtool.h> | 31 | #include <linux/ethtool.h> |
32 | #include <net/arp.h> | 32 | #include <net/arp.h> |
33 | #include <net/switchdev.h> | ||
33 | 34 | ||
34 | #include "vlan.h" | 35 | #include "vlan.h" |
35 | #include "vlanproc.h" | 36 | #include "vlanproc.h" |
@@ -774,6 +775,12 @@ static const struct net_device_ops vlan_netdev_ops = { | |||
774 | .ndo_netpoll_cleanup = vlan_dev_netpoll_cleanup, | 775 | .ndo_netpoll_cleanup = vlan_dev_netpoll_cleanup, |
775 | #endif | 776 | #endif |
776 | .ndo_fix_features = vlan_dev_fix_features, | 777 | .ndo_fix_features = vlan_dev_fix_features, |
778 | .ndo_fdb_add = switchdev_port_fdb_add, | ||
779 | .ndo_fdb_del = switchdev_port_fdb_del, | ||
780 | .ndo_fdb_dump = switchdev_port_fdb_dump, | ||
781 | .ndo_bridge_setlink = switchdev_port_bridge_setlink, | ||
782 | .ndo_bridge_getlink = switchdev_port_bridge_getlink, | ||
783 | .ndo_bridge_dellink = switchdev_port_bridge_dellink, | ||
777 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, | 784 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, |
778 | .ndo_get_iflink = vlan_dev_get_iflink, | 785 | .ndo_get_iflink = vlan_dev_get_iflink, |
779 | }; | 786 | }; |