diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2015-01-30 01:40:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-02 02:16:34 -0500 |
commit | a16a8ee7f60327086a35b688c78b555a8b4ac363 (patch) | |
tree | 8d3ada6f1604dff4639c41c87f11513b4df2f224 | |
parent | c158cba38ccd6e7c7787a6ec904d97b9d22537f5 (diff) |
team: handle NETIF_F_HW_SWITCH_OFFLOAD flag and add ndo_bridge_setlink/dellink handlers
Currently ndo_bridge_setlink and ndo_bridge_dellink handlers point
to the default switchdev handlers
This follows my bonding driver changes.
I have only compile tested this patch. However similar
bonding code has been tested.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/team/team.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 4b2bfc52c52f..0e62274e884a 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <net/genetlink.h> | 28 | #include <net/genetlink.h> |
29 | #include <net/netlink.h> | 29 | #include <net/netlink.h> |
30 | #include <net/sch_generic.h> | 30 | #include <net/sch_generic.h> |
31 | #include <net/switchdev.h> | ||
31 | #include <generated/utsrelease.h> | 32 | #include <generated/utsrelease.h> |
32 | #include <linux/if_team.h> | 33 | #include <linux/if_team.h> |
33 | 34 | ||
@@ -1925,7 +1926,7 @@ static netdev_features_t team_fix_features(struct net_device *dev, | |||
1925 | struct team *team = netdev_priv(dev); | 1926 | struct team *team = netdev_priv(dev); |
1926 | netdev_features_t mask; | 1927 | netdev_features_t mask; |
1927 | 1928 | ||
1928 | mask = features; | 1929 | mask = features | NETIF_F_HW_SWITCH_OFFLOAD; |
1929 | features &= ~NETIF_F_ONE_FOR_ALL; | 1930 | features &= ~NETIF_F_ONE_FOR_ALL; |
1930 | features |= NETIF_F_ALL_FOR_ALL; | 1931 | features |= NETIF_F_ALL_FOR_ALL; |
1931 | 1932 | ||
@@ -1975,6 +1976,8 @@ static const struct net_device_ops team_netdev_ops = { | |||
1975 | .ndo_del_slave = team_del_slave, | 1976 | .ndo_del_slave = team_del_slave, |
1976 | .ndo_fix_features = team_fix_features, | 1977 | .ndo_fix_features = team_fix_features, |
1977 | .ndo_change_carrier = team_change_carrier, | 1978 | .ndo_change_carrier = team_change_carrier, |
1979 | .ndo_bridge_setlink = ndo_dflt_netdev_switch_port_bridge_setlink, | ||
1980 | .ndo_bridge_dellink = ndo_dflt_netdev_switch_port_bridge_dellink, | ||
1978 | }; | 1981 | }; |
1979 | 1982 | ||
1980 | /*********************** | 1983 | /*********************** |