Skip to content

bridge: multicast: per vlan query improvement when port or vlan state changes

Petr Machata bridge netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functionsnet/bridge/br_multicast.c+69 -83 repliesApplied
2/3net: bridge: mcast: update multicast contex when vlan state is changednet/bridge/br_mst.c net/bridge/br_multicast.c net/bridge/br_private.h+38 -31 replyApplied
3/3selftests: net/bridge : add tests for per vlan snooping with stp state changestools/testing/selftests/net/forwarding/bridge_igmp.sh tools/testing/selftests/net/forwarding/bridge_mld.sh tools/testing/selftests/net/forwarding/config+154 -81 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndy RoulinIdo SchimmelNikolay Aleksandrov
1/3R-b R-b A-b
2/3R-b R-b A-b
3/3R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 0/3] bridge: multicast: per vlan query improvement when port or vlan state changes

From: Yong Wang <[email protected]>

The current implementation of br_multicast_enable_port() only operates on port's multicast context, which doesn't take into account in case of vlan snooping, one downside is the port's igmp query timer will NOT resume when port state gets changed from BR_STATE_BLOCKING to BR_STATE_FORWARDING etc.

Such code flow will briefly look like:
1.vlan snooping
--> br_multicast_port_query_expired with per vlan port_mcast_ctx --> port in BR_STATE_BLOCKING state --> then one-shot timer discontinued

The port state could be changed by STP daemon or kernel STP, taking mstpd as example:

2.mstpd --> netlink_sendmsg --> br_setlink --> br_set_port_state with non
blocking states, i.e. BR_STATE_LEARNING or BR_STATE_FORWARDING --> br_port_state_selection --> br_multicast_enable_port --> enable multicast with port's multicast_ctx

Here for per vlan snooping, the vlan context of the port should be used instead of port's multicast_ctx. The first patch corrects such behavior.

Similarly, vlan state change also impacts multicast behavior, the 2nd patch adds function to update the corresponding multicast context when vlan state changes.

The 3rd patch adds the selftests to confirm that IGMP/MLD query does happen when the STP state becomes forwarding.

Yong Wang (3):
net: bridge: mcast: re-implement br_multicast_{enable, disable}_port
functions
net: bridge: mcast: update multicast contex when vlan state is changed
selftests: net/bridge : add tests for per vlan snooping with stp state
changes

 net/bridge/br_mst.c                           |   4 +-
 net/bridge/br_multicast.c                     | 103 ++++++++++++++++--
 net/bridge/br_private.h                       |  11 +-
 .../selftests/net/forwarding/bridge_igmp.sh   |  80 +++++++++++++-
 .../selftests/net/forwarding/bridge_mld.sh    |  81 +++++++++++++-
 tools/testing/selftests/net/forwarding/config |   1 +
 6 files changed, 261 insertions(+), 19 deletions(-)
Signature · 1 line
2.49.0