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)
commit77041420751fe6d4acf2103b245dcc2b4b7b8360
tree0e9bd734a4283bed3155151882b5bdb4f45fa376
parent31070e7fa0d9d2ae1d5d16a5ba980529fac7b6f9
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