From: Ido Schimmel <idosch@nvidia.com>
To: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Nikolay Aleksandrov <razor@blackwall.org>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] selftests: forwarding: Avoid false MDB delete/flush failures
Date: Thu, 19 Sep 2024 17:55:51 +0300 [thread overview]
Message-ID: <Zuw7d9eRGo4wdVP3@shredder.mtl.com> (raw)
In-Reply-To: <c92569919307749f879b9482b0f3e125b7d9d2e3.1726480066.git.jamie.bainbridge@gmail.com>
Hi,
Thanks for the patch and sorry for the late reply (was OOO).
On Mon, Sep 16, 2024 at 07:49:05PM +1000, Jamie Bainbridge wrote:
> Running this test on a small system produces different failures every
> test checking deletions, and some flushes. From different test runs:
>
> TEST: Common host entries configuration tests (L2) [FAIL]
> Failed to delete L2 host entry
>
> TEST: Common port group entries configuration tests (IPv4 (S, G)) [FAIL]
> IPv4 (S, G) entry with VLAN 10 not deleted when VLAN was not specified
>
> TEST: Common port group entries configuration tests (IPv6 (*, G)) [FAIL]
> IPv6 (*, G) entry with VLAN 10 not deleted when VLAN was not specified
>
> TEST: Flush tests [FAIL]
> Entry not flushed by specified VLAN ID
>
> TEST: Flush tests [FAIL]
> IPv6 host entry not flushed by "nopermanent" state
>
> Add a short sleep after deletion and flush to resolve this.
The port group entry is removed from MDB entry's list synchronously, but
the MDB entry itself is removed from the hash table asynchronously and
the MDB get query will only return an error if an entry was not found
there.
IOW, I think that when you do get a response after deletion, the entry
you get is empty.
Can you please test the following patch [1] (w/o yours, obviously)?
[1]
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index bc37e47ad829..1a52a0bca086 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -1674,7 +1674,7 @@ int br_mdb_get(struct net_device *dev, struct nlattr *tb[], u32 portid, u32 seq,
spin_lock_bh(&br->multicast_lock);
mp = br_mdb_ip_get(br, &group);
- if (!mp) {
+ if (!mp || (!mp->ports && !mp->host_joined)) {
NL_SET_ERR_MSG_MOD(extack, "MDB entry not found");
err = -ENOENT;
goto unlock;
next prev parent reply other threads:[~2024-09-19 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 9:49 [PATCH net v2] selftests: forwarding: Avoid false MDB delete/flush failures Jamie Bainbridge
2024-09-19 13:41 ` Simon Horman
2024-09-19 14:55 ` Ido Schimmel [this message]
2024-09-20 12:54 ` Jamie Bainbridge
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=Zuw7d9eRGo4wdVP3@shredder.mtl.com \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jamie.bainbridge@gmail.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=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;
as well as URLs for NNTP newsgroup(s).