From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Harry Coin <hcoin@quietfountain.com>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
"Kuniyuki Iwashima" <kuni1840@gmail.com>,
<netdev@vger.kernel.org>
Subject: [PATCH v1 net 4/4] Revert "bridge: Add extack warning when enabling STP in netns."
Date: Fri, 14 Jul 2023 19:13:38 -0700 [thread overview]
Message-ID: <20230715021338.34747-5-kuniyu@amazon.com> (raw)
In-Reply-To: <20230715021338.34747-1-kuniyu@amazon.com>
This reverts commit 56a16035bb6effb37177867cea94c13a8382f745.
Since the previous commit, STP works on bridge in netns.
# unshare -n
# ip link add br0 type bridge
# ip link add veth0 type veth peer name veth1
# ip link set veth0 master br0 up
[ 50.558135] br0: port 1(veth0) entered blocking state
[ 50.558366] br0: port 1(veth0) entered disabled state
[ 50.558798] veth0: entered allmulticast mode
[ 50.564401] veth0: entered promiscuous mode
# ip link set veth1 master br0 up
[ 54.215487] br0: port 2(veth1) entered blocking state
[ 54.215657] br0: port 2(veth1) entered disabled state
[ 54.215848] veth1: entered allmulticast mode
[ 54.219577] veth1: entered promiscuous mode
# ip link set br0 type bridge stp_state 1
# ip link set br0 up
[ 61.960726] br0: port 2(veth1) entered blocking state
[ 61.961097] br0: port 2(veth1) entered listening state
[ 61.961495] br0: port 1(veth0) entered blocking state
[ 61.961653] br0: port 1(veth0) entered listening state
[ 63.998835] br0: port 2(veth1) entered blocking state
[ 77.437113] br0: port 1(veth0) entered learning state
[ 86.653501] br0: received packet on veth0 with own address as source address (addr:6e:0f:e7:6f:5f:5f, vlan:0)
[ 92.797095] br0: port 1(veth0) entered forwarding state
[ 92.797398] br0: topology change detected, propagating
Let's remove the warning.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
net/bridge/br_stp_if.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index b65962682771..75204d36d7f9 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -201,9 +201,6 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned long val,
{
ASSERT_RTNL();
- if (!net_eq(dev_net(br->dev), &init_net))
- NL_SET_ERR_MSG_MOD(extack, "STP does not work in non-root netns");
-
if (br_mrp_enabled(br)) {
NL_SET_ERR_MSG_MOD(extack,
"STP can't be enabled if MRP is already enabled");
--
2.30.2
prev parent reply other threads:[~2023-07-15 2:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-15 2:13 [PATCH v1 net 0/4] net: Support STP on bridge in non-root netns Kuniyuki Iwashima
2023-07-15 2:13 ` [PATCH v1 net 1/4] llc: Check netns in llc_dgram_match() Kuniyuki Iwashima
2023-07-18 10:34 ` Paolo Abeni
2023-07-18 17:24 ` Kuniyuki Iwashima
2023-07-15 2:13 ` [PATCH v1 net 2/4] llc: Check netns in llc_estab_match() and llc_listener_match() Kuniyuki Iwashima
2023-07-18 10:38 ` Paolo Abeni
2023-07-15 2:13 ` [PATCH v1 net 3/4] llc: Don't drop packet from non-root netns Kuniyuki Iwashima
2023-07-15 2:13 ` Kuniyuki Iwashima [this message]
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=20230715021338.34747-5-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=edumazet@google.com \
--cc=hcoin@quietfountain.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.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).