net: bridge: vlan: use br_rports_fill_info() to export mcast router ports
authorNikolay Aleksandrov <nikolay@nvidia.com>
Tue, 10 Aug 2021 15:29:33 +0000 (18:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Aug 2021 12:34:41 +0000 (13:34 +0100)
commitdc002875c22b56c795ec24dc987ac2dd2081588e
tree2f8754b7c61df9fa30f6ce04b33b1d8f1691818a
parente04d377ff6ce915d2d95ba13e7aff3ca64d50781
net: bridge: vlan: use br_rports_fill_info() to export mcast router ports

Embed the standard multicast router port export by br_rports_fill_info()
into a new global vlan attribute BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS.
In order to have the same format for the global bridge mcast context and
the per-vlan mcast context we need a double-nesting:
 - BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS
   - MDBA_ROUTER

Currently we don't compare router lists, if any router port exists in
the bridge mcast contexts we consider their option sets as different and
export them separately.

In addition we export the router port vlan id when dumping similar to
the router port notification format.

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_bridge.h
net/bridge/br_mdb.c
net/bridge/br_private.h
net/bridge/br_vlan_options.c