bridge.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<netdev@vger.kernel.org>
Cc: Simon Horman <horms@kernel.org>, Roopa Prabhu <roopa@nvidia.com>,
	"Nikolay Aleksandrov" <razor@blackwall.org>,
	<bridge@lists.linux.dev>, Ido Schimmel <idosch@nvidia.com>,
	Petr Machata <petrm@nvidia.com>, <mlxsw@nvidia.com>
Subject: [PATCH net-next 0/4] bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING
Date: Wed, 18 Dec 2024 18:15:55 +0100	[thread overview]
Message-ID: <cover.1734540770.git.petrm@nvidia.com> (raw)

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/cover.1660100506.git.sevinj.aghayeva@gmail.com/

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

-- 
2.47.0


             reply	other threads:[~2024-12-18 17:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 17:15 Petr Machata [this message]
2024-12-18 17:15 ` [PATCH net-next 1/4] net: bridge: Extract a helper to handle bridge_binding toggles Petr Machata
2024-12-20 12:27   ` Nikolay Aleksandrov
2024-12-18 17:15 ` [PATCH net-next 2/4] net: bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING Petr Machata
2024-12-20 12:27   ` Nikolay Aleksandrov
2024-12-18 17:15 ` [PATCH net-next 3/4] selftests: net: lib: Add a couple autodefer helpers Petr Machata
2024-12-20 12:28   ` Nikolay Aleksandrov
2024-12-18 17:15 ` [PATCH net-next 4/4] selftests: net: Add a VLAN bridge binding selftest Petr Machata
2024-12-20 12:28   ` Nikolay Aleksandrov
2024-12-20 21:30 ` [PATCH net-next 0/4] bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1734540770.git.petrm@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).