Skip to content

bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING

Petr Machata bridge linux-kselftest 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 Latest4 patches 4 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: bridge: Extract a helper to handle bridge_binding togglesnet/bridge/br_vlan.c+14 -61 replyApplied
2/4net: bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDINGnet/bridge/br.c net/bridge/br_private.h net/bridge/br_vlan.c+40 -01 replyApplied
3/4selftests: net: lib: Add a couple autodefer helperstools/testing/selftests/net/lib.sh+29 -21 replyApplied
4/4selftests: net: Add a VLAN bridge binding selftesttools/testing/selftests/net/Makefile tools/testing/selftests/net/vlan_bridge_binding.sh+257 -01 replyApplied

Reviews trailers per patch

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

PatchIdo SchimmelNikolay Aleksandrov
1/4R-b A-b
2/4R-b A-b
3/4R-b A-b
4/4R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/4] bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING

When bridge binding is enabled on a VLAN netdevice, its link state should track bridge ports that are members of the corresponding VLAN. This works for a newly-added netdevices. However toggling the option does not have the effect of enabling or disabling the behavior as appropriate.

In this patchset, have bridge react to bridge_binding toggles on VLAN uppers.

There has been another attempt at supporting this behavior in 2022 by Sevinj Aghayeva [0]. A discussion ensued that informed how this new patchset is constructed, namely that the logic is in the bridge as opposed to the 8021q driver, and the bridge reacts to NETDEV_CHANGE events on the 8021q upper.

Patches #1 and #2 contain the implementation, patches #3 and #4 a selftest.

[0] https://lore.kernel.org/netdev/[email protected]/

Petr Machata (4):
net: bridge: Extract a helper to handle bridge_binding toggles
net: bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING
selftests: net: lib: Add a couple autodefer helpers
selftests: net: Add a VLAN bridge binding selftest

 net/bridge/br.c                               |   7 +
 net/bridge/br_private.h                       |   9 +
 net/bridge/br_vlan.c                          |  44 ++-
 tools/testing/selftests/net/Makefile          |   1 +
 tools/testing/selftests/net/lib.sh            |  31 ++-
 .../selftests/net/vlan_bridge_binding.sh      | 256 ++++++++++++++++++
 6 files changed, 340 insertions(+), 8 deletions(-)
 create mode 100755 tools/testing/selftests/net/vlan_bridge_binding.sh
Signature · 1 line
2.47.0