netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: Ido Schimmel <idosch@nvidia.com>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Roopa Prabhu <roopa@nvidia.com>,
	Hangbin Liu <liuhangbin@gmail.com>
Subject: [Bridge question] Issue with removing MDB entry after enabling VLAN filtering
Date: Wed, 19 Feb 2025 09:43:36 +0000	[thread overview]
Message-ID: <Z7WnyC2eSFeb8CA_@fedora> (raw)

Hi everyone,

Our QE team reported that after adding an MDB entry, enabling VLAN filtering,
and then removing the MDB entry, the removal fails. e.g.

+ ip link add dev br0 type bridge
+ ip link add dev vethin type veth peer name vethout
+ ip link add dev vethin1 type veth peer name vethout1
+ ip link set vethout up && ip link set vethout1 up && ip link set vethin up  && ip link set vethin1 up && ip link set br0 up
+ ip link set vethout master br0
+ ip link set vethout1 master br0
+ echo 1 > /sys/class/net/br0/bridge/multicast_snooping
+ echo 1 > /sys/class/net/br0/bridge/multicast_querier
+ bridge mdb add dev br0 port vethout1 grp 225.1.1.10 src 192.168.2.1
+ echo 1 > /sys/class/net/br0/bridge/vlan_filtering
+ bridge mdb del dev br0 port vethout1 grp  225.1.1.10  src 192.168.2.1
RTNETLINK answers: Invalid argument

From reviewing the code in br_mdb_del(), I noticed that it sets the VLAN tag
if VLAN filtering is enabled and the VLAN is not specified.

I'm not sure if the QE’s operation is valid under these circumstances.
Do we need to disable VLAN filtering before removing the MDB entry if
it was added without VLAN filtering?

Thanks
Hangbin

             reply	other threads:[~2025-02-19  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19  9:43 Hangbin Liu [this message]
2025-02-19  9:56 ` [Bridge question] Issue with removing MDB entry after enabling VLAN filtering Nikolay Aleksandrov
2025-02-19 12:44   ` Hangbin Liu

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=Z7WnyC2eSFeb8CA_@fedora \
    --to=liuhangbin@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --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).