Skip to content

net: bridge: mcast: add support for port/vlan router control

Nikolay Aleksandrov bridge netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: bridge: mcast: br_multicast_set_port_router takes multicast context as argumentnet/bridge/br_multicast.c net/bridge/br_netlink.c net/bridge/br_private.h +1 more+11 -80 repliesApplied
2/2net: bridge: vlan: convert mcast router global option to per-vlan entryinclude/uapi/linux/if_bridge.h net/bridge/br_multicast.c net/bridge/br_private.h +2 more+63 -190 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] net: bridge: mcast: add support for port/vlan router control

From: Nikolay Aleksandrov <[email protected]>

Hi,
This small set adds control over port/vlan mcast router config. Initially I had added host vlan entry router control via vlan's global options but that is really unnecessary and we can use a single per-vlan option to control it both for port/vlan and host/vlan entries. Since it's all still in net-next we can convert BRIDGE_VLANDB_GOPTS_MCAST_ROUTER to BRIDGE_VLANDB_ENTRY_MCAST_ROUTER and use it for both. That makes much more sense and is easier for user-space. Patch 01 prepares the port router function to be used with port mcast context instead of port and then patch 02 converts the global vlan mcast router option to per-vlan mcast router option which directly gives us both host/vlan and port/vlan mcast router control without any additional changes.

This way we get the following coherent syntax:
[ port/vlan mcast router]

 $ bridge vlan set vid 100 dev ens20 mcast_router 2

[ bridge/vlan mcast router ]

 $ bridge vlan set vid 100 dev bridge mcast_router 2
instead of:
 $ bridge vlan set vid 100 dev bridge mcast_router 1 global

The mcast_router should not be regarded as a global option, it controls the port/vlan and bridge/vlan mcast router behaviour.

This is the last set needed for the initial per-vlan mcast support. Next patch-sets:
- iproute2 support
- selftests

Thanks,
Nik

Nikolay Aleksandrov (2):
net: bridge: mcast: br_multicast_set_port_router takes multicast
context as argument
net: bridge: vlan: convert mcast router global opt to per-vlan entry

 include/uapi/linux/if_bridge.h |  2 +-
 net/bridge/br_multicast.c      | 24 ++++++++++++----
 net/bridge/br_netlink.c        |  3 +-
 net/bridge/br_private.h        | 18 +++++++++++-
 net/bridge/br_sysfs_if.c       |  2 +-
 net/bridge/br_vlan.c           |  1 +
 net/bridge/br_vlan_options.c   | 51 ++++++++++++++++++++++------------
 7 files changed, 74 insertions(+), 27 deletions(-)
Signature · 1 line
2.31.1