Skip to content

bridge: vlan: add global multicast options

Nikolay Aleksandrov netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest19 patches 2 repliesIn review
  2. v117 patches 9 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19ip: bridge: add support for mcast_vlan_snoopingip/iplink_bridge.c man/man8/ip-link.8.in+37 -00 replies
2/19bridge: vlan: factor out vlan option printingbridge/vlan.c+58 -520 replies
3/19bridge: vlan: skip unknown attributes when printing optionsbridge/vlan.c+14 -10 replies
4/19bridge: vlan: add support to show global vlan optionsbridge/br_common.h bridge/monitor.c bridge/vlan.c +1 more+130 -60 replies
5/19bridge: vlan: add support for vlan filtering when dumping optionsbridge/vlan.c+30 -130 replies
6/19bridge: vlan: add support to set global vlan optionsbridge/vlan.c man/man8/bridge.8+100 -00 replies
7/19bridge: vlan: add global mcast_snooping optionbridge/vlan.c man/man8/bridge.8+27 -22 replies
8/19bridge: vlan: add global mcast_igmp_version optionbridge/vlan.c man/man8/bridge.8+19 -10 replies
9/19bridge: vlan: add global mcast_mld_version optionbridge/vlan.c man/man8/bridge.8+19 -10 replies
10/19bridge: vlan: add global mcast_last_member_count optionbridge/vlan.c man/man8/bridge.8+24 -10 replies
11/19bridge: vlan: add global mcast_startup_query_count optionbridge/vlan.c man/man8/bridge.8+22 -10 replies
12/19bridge: vlan: add global mcast_last_member_interval optionbridge/vlan.c man/man8/bridge.8+23 -00 replies
13/19bridge: vlan: add global mcast_membership_interval optionbridge/vlan.c man/man8/bridge.8+23 -10 replies
14/19bridge: vlan: add global mcast_querier_interval optionbridge/vlan.c man/man8/bridge.8+26 -10 replies
15/19bridge: vlan: add global mcast_query_interval optionbridge/vlan.c man/man8/bridge.8+23 -10 replies
16/19bridge: vlan: add global mcast_query_response_interval optionbridge/vlan.c man/man8/bridge.8+23 -10 replies
17/19bridge: vlan: add global mcast_startup_query_interval optionbridge/vlan.c man/man8/bridge.8+21 -00 replies
18/19bridge: vlan: add global mcast_querier optionbridge/vlan.c man/man8/bridge.8+22 -00 replies
19/19bridge: vlan: add support for dumping router portsbridge/br_common.h bridge/mdb.c bridge/vlan.c+38 -30 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH iproute2-next v2 00/19] bridge: vlan: add global multicast options

From: Nikolay Aleksandrov <[email protected]>

Hi all,
This set adds support for vlan multicast options. The feature is globally controlled by a new bridge option called mcast_vlan_snooping which is added by patch 01. Then patches 2-5 add support for dumping global vlan options and filtering on vlan id. Patch 06 adds support for setting global vlan options and then patches 07-18 add all the new global vlan options, finally patch 19 adds support for dumping vlan multicast router ports. These options are identical in meaning, names and functionality as the bridge-wide ones.

All the new vlan global commands are under the global keyword:

 $ bridge vlan global show [ vid VID dev DEVICE ]
 $ bridge vlan global set vid VID dev DEVICE ...

I've added command examples in each commit message. The patch-set is a bit bigger but the global options follow the same pattern so I don't see a point in breaking them. All man page descriptions have been taken from the same current bridge-wide mcast options. The only additional iproute2 change which is left to do is the per-vlan mcast router control which I'll send separately. Note to properly use this set you'll need the updated kernel headers where mcast router was moved from a global option to per-vlan/per-device one (changed uapi enum which was in net-next).

Example:

 # enable vlan mcast snooping globally
 $ ip link set dev bridge type bridge mcast_vlan_snooping 1
 # enable mcast querier on vlan 100
 $ bridge vlan global set dev bridge vid 100 mcast_querier 1
 # show vlan 100's global options
 $ bridge -s vlan global show vid 100
port              vlan-id
bridge            100
                    mcast_snooping 1 mcast_querier 1 mcast_igmp_version 2 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000

A following kernel patch-set will add selftests which use these commands.

v2: all patches use strcmp instead of matches
patches 02, 03 which prepare print_vlan_rtm for global show are new previous patch 02 is split in patches 02, 03 and 04 patches 07-18 have their help msg alignment adjusted to fit in 100 characters

Thanks,
Nik

Nikolay Aleksandrov (19):
ip: bridge: add support for mcast_vlan_snooping
bridge: vlan: factor out vlan option printing
bridge: vlan: skip unknown attributes when printing options
bridge: vlan: add support to show global vlan options
bridge: vlan: add support for vlan filtering when dumping options
bridge: vlan: add support to set global vlan options
bridge: vlan: add global mcast_snooping option
bridge: vlan: add global mcast_igmp_version option
bridge: vlan: add global mcast_mld_version option
bridge: vlan: add global mcast_last_member_count option
bridge: vlan: add global mcast_startup_query_count option
bridge: vlan: add global mcast_last_member_interval option
bridge: vlan: add global mcast_membership_interval option
bridge: vlan: add global mcast_querier_interval option
bridge: vlan: add global mcast_query_interval option
bridge: vlan: add global mcast_query_response_interval option
bridge: vlan: add global mcast_startup_query_interval option
bridge: vlan: add global mcast_querier option
bridge: vlan: add support for dumping router ports

 bridge/br_common.h    |   4 +-
 bridge/mdb.c          |   6 +-
 bridge/monitor.c      |   2 +-
 bridge/vlan.c         | 547 +++++++++++++++++++++++++++++++++++++-----
 ip/iplink_bridge.c    |  29 +++
 man/man8/bridge.8     | 130 ++++++++++
 man/man8/ip-link.8.in |   8 +
 7 files changed, 660 insertions(+), 66 deletions(-)
Signature · 1 line
2.31.1