From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
andrew@lunn.ch, vivien.didelot@gmail.com, davem@davemloft.net,
kuba@kernel.org, dan.carpenter@oracle.com
Subject: [PATCH net-next 5/9] net: dsa: bcm_sf2: Disable learning for ASP port
Date: Mon, 30 Mar 2020 13:40:28 -0700 [thread overview]
Message-ID: <20200330204032.26313-6-f.fainelli@gmail.com> (raw)
In-Reply-To: <20200330204032.26313-1-f.fainelli@gmail.com>
We don't want to enable learning for the ASP port since it just received
directed traffic, this allows us to bypass ARL-driven forwarding rules
which could conflict with Broadcom tags and/or CFP forwarding.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 368ead87e07a..affa5c6e135c 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -178,9 +178,17 @@ static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
core_writel(priv, reg, CORE_DIS_LEARN);
/* Enable Broadcom tags for that port if requested */
- if (priv->brcm_tag_mask & BIT(port))
+ if (priv->brcm_tag_mask & BIT(port)) {
b53_brcm_hdr_setup(ds, port);
+ /* Disable learning on ASP port */
+ if (port == 7) {
+ reg = core_readl(priv, CORE_DIS_LEARN);
+ reg |= BIT(port);
+ core_writel(priv, reg, CORE_DIS_LEARN);
+ }
+ }
+
/* Configure Traffic Class to QoS mapping, allow each priority to map
* to a different queue number
*/
--
2.17.1
next prev parent reply other threads:[~2020-03-30 20:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 20:40 [PATCH net-next 0/9] net: dsa: b53 & bcm_sf2 updates for 7278 Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 1/9] net: dsa: bcm_sf2: Fix overflow checks Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 2/9] net: dsa: b53: Restore VLAN entries upon (re)configuration Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 3/9] net: dsa: b53: Prevent tagged VLAN on port 7 for 7278 Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 4/9] net: dsa: b53: Deny enslaving port 7 for 7278 into a bridge Florian Fainelli
2020-03-30 20:40 ` Florian Fainelli [this message]
2020-03-30 20:40 ` [PATCH net-next 6/9] net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 7/9] net: dsa: bcm_sf2: Move writing of CFP_DATA(5) into slicing functions Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 8/9] net: dsa: bcm_sf2: Add support for matching VLAN TCI Florian Fainelli
2020-03-30 20:40 ` [PATCH net-next 9/9] net: dsa: bcm_sf2: Support specifying VLAN tag egress rule Florian Fainelli
2020-03-30 20:53 ` [PATCH net-next 0/9] net: dsa: b53 & bcm_sf2 updates for 7278 Florian Fainelli
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=20200330204032.26313-6-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.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).