diff options
author | Ido Schimmel <idosch@mellanox.com> | 2015-10-28 10:16:54 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-30 12:26:38 +0900 |
commit | 741af0053b43d8b9a688a12c57ece62338616ae8 (patch) | |
tree | 2fa4b203e94bbc4ea74be2a3f417679ce6eea5df /net | |
parent | 65bdc43d2220bc97af037c87aba2407b46f13c2a (diff) | |
download | linux-741af0053b43d8b9a688a12c57ece62338616ae8.tar.bz2 |
switchdev: Add support for flood control
Allow devices supporting this feature to control the flooding of unknown
unicast traffic, by making switchdev infrastructure propagate this setting
to the switch driver.
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')
-rw-r--r-- | net/switchdev/switchdev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 1eb76956b439..8950d39af341 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -746,7 +746,7 @@ int switchdev_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, .id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, }; u16 mode = BRIDGE_MODE_UNDEF; - u32 mask = BR_LEARNING | BR_LEARNING_SYNC; + u32 mask = BR_LEARNING | BR_LEARNING_SYNC | BR_FLOOD; int err; err = switchdev_port_attr_get(dev, &attr); @@ -817,6 +817,9 @@ static int switchdev_port_br_setlink_protinfo(struct net_device *dev, err = switchdev_port_br_setflag(dev, attr, BR_LEARNING_SYNC); break; + case IFLA_BRPORT_UNICAST_FLOOD: + err = switchdev_port_br_setflag(dev, attr, BR_FLOOD); + break; default: err = -EOPNOTSUPP; break; |