]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: Notify on bridge device mrouter state changes
authorYotam Gigi <yotamg@mellanox.com>
Mon, 9 Oct 2017 09:15:31 +0000 (11:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Oct 2017 17:18:11 +0000 (10:18 -0700)
commit0fcf6568e0311616e23657a57e04f1ec34a72971
tree0e9bd734a4283bed3155151882b5bdb4f45fa376
parentee890a8f3d8e455da36b1ab606cbdcfe204c2994
net: bridge: Notify on bridge device mrouter state changes

Add the SWITCHDEV_ATTR_ID_BRIDGE_MROUTER switchdev notification type, used
to indicate whether the bridge is or isn't mrouter. Notify when the bridge
changes its state, similarly to the already existing bridged port mrouter
notifications.

The notification uses the switchdev_attr.u.mrouter boolean flag to indicate
the current bridge mrouter status. Thus, it only indicates whether the
bridge is currently used as an mrouter or not, and does not indicate the
exact mrouter state of the bridge (learning, permanent, etc.).

Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h
net/bridge/br_multicast.c