From: Danielle Ratson <danieller@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <razor@blackwall.org>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<horms@kernel.org>, <shuah@kernel.org>,
<linux-kernel@vger.kernel.org>, <bridge@lists.linux.dev>,
<linux-kselftest@vger.kernel.org>, <idosch@nvidia.com>,
<petrm@nvidia.com>, Danielle Ratson <danieller@nvidia.com>
Subject: [PATCH net v2 0/2] bridge: Check relevant options in VLAN range grouping
Date: Wed, 25 Feb 2026 16:39:54 +0200 [thread overview]
Message-ID: <20260225143956.3995415-1-danieller@nvidia.com> (raw)
The br_vlan_opts_eq_range() function determines if consecutive VLANs can
be grouped together in a range for compact netlink notifications. It
currently checks state, tunnel info, and multicast router configuration,
but misses two categories of per-VLAN options that affect the output:
1. User-visible priv_flags (neigh_suppress, mcast_enabled)
2. Port multicast context options (mcast_max_groups, mcast_n_groups)
When VLANs have different settings for these options, they are incorrectly
grouped into ranges, causing netlink notifications to report only one
VLAN's settings for the entire range.
Fix by checking priv_flags equality, but only for flags that affect netlink
output (BR_VLFLAG_NEIGH_SUPPRESS_ENABLED and BR_VLFLAG_MCAST_ENABLED),
and comparing multicast context options (mcast_max_groups, mcast_n_groups).
Add a test with four test cases for each option, to ensure that VLANs with
different values are not grouped into ranges and VLANs with matching
values are properly grouped together.
Patchset overview:
Patch #1: fix
Patch #2: test
v2:
* Address shellcheck-reported issues.
Danielle Ratson (2):
bridge: Check relevant per-VLAN options in VLAN range grouping
selftests: net: Add bridge VLAN range grouping tests
net/bridge/br_private.h | 10 +
net/bridge/br_vlan_options.c | 26 ++-
tools/testing/selftests/net/Makefile | 1 +
.../testing/selftests/net/bridge_vlan_dump.sh | 204 ++++++++++++++++++
4 files changed, 238 insertions(+), 3 deletions(-)
create mode 100755 tools/testing/selftests/net/bridge_vlan_dump.sh
--
2.51.0
next reply other threads:[~2026-02-25 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 14:39 Danielle Ratson [this message]
2026-02-25 14:39 ` [PATCH net v2 1/2] bridge: Check relevant per-VLAN options in VLAN range grouping Danielle Ratson
2026-02-25 14:39 ` [PATCH net v2 2/2] selftests: net: Add bridge VLAN range grouping tests Danielle Ratson
2026-02-27 3:40 ` [PATCH net v2 0/2] bridge: Check relevant options in VLAN range grouping 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=20260225143956.3995415-1-danieller@nvidia.com \
--to=danieller@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=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
/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