Netdev List
 help / color / mirror / Atom feed
From: David Yang <mmyangfl@gmail.com>
To: netdev@vger.kernel.org
Cc: David Yang <mmyangfl@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH net-next v4 2/6] net: dsa: motorcomm: Do not block hairpins on standalone ports
Date: Fri,  4 Dec 2026 18:12:53 +0800	[thread overview]
Message-ID: <20261204101300.3680838-3-mmyangfl@gmail.com> (raw)
In-Reply-To: <20261204101300.3680838-1-mmyangfl@gmail.com>

Port isolation takes after REDIR judgment. An ACL rule redirected to
itself on a standalone port was blocked before.

Lift that block despite rare usage.

Fixes: 8eb9e7520b17 ("net: dsa: yt921x: Add ACL support")
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 drivers/net/dsa/motorcomm/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
index c96512faeca2..6e57c9262c68 100644
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@ -1261,7 +1261,7 @@ static int yt921x_userport_standalone(struct yt921x_priv *priv, int port)
 	u32 ctrl;
 	int res;
 
-	ctrl = ~dsa_cpu_ports(ds);
+	ctrl = ~(dsa_cpu_ports(ds) | BIT(port));
 	res = yt921x_reg_write(priv, YT921X_PORTn_ISOLATION(port), ctrl);
 	if (res)
 		return res;
-- 
2.53.0


  parent reply	other threads:[~2026-12-04 10:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 10:12 [PATCH net-next v4 0/6] net: dsa: motorcomm: Reject isolated redirect targets David Yang
2026-12-04 10:12 ` [PATCH net-next v4 1/6] net: dsa: motorcomm: Remove local cpu_ports_mask David Yang
2026-12-04 10:12 ` David Yang [this message]
2026-12-04 10:12 ` [PATCH net-next v4 3/6] net: dsa: motorcomm: Derive port isolation masks on the fly David Yang
2026-12-04 10:12 ` [PATCH net-next v4 4/6] net: dsa: motorcomm: Reject isolated redirect targets David Yang
2026-12-04 10:12 ` [PATCH net-next v4 5/6] net: dsa: motorcomm: Reject bridge flags that break redirect rules David Yang
2026-12-04 10:12 ` [PATCH net-next v4 6/6] net: dsa: motorcomm: Recompute redirect rules on bridge changes David Yang

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=20261204101300.3680838-3-mmyangfl@gmail.com \
    --to=mmyangfl@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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