From: "A. Sverdlin" <alexander.sverdlin@siemens.com>
To: netdev@vger.kernel.org
Cc: Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Roger Quadros <rogerq@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Karl Mehltretter <kmehltretter@gmail.com>,
Kevin Hao <haokexin@gmail.com>,
Guangshuo Li <lgs201920130244@gmail.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Murali Karicheri <m-karicheri2@ti.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Mugunthan V N <mugunthanvnm@ti.com>,
linux-omap@vger.kernel.org,
Lukas Stockmann <lukas.stockmann@siemens.com>
Subject: [PATCH net-next 3/3] net: ethernet: ti: cpsw: don't untag frames on DSA conduit
Date: Thu, 3 Dec 2026 09:05:11 +0100 [thread overview]
Message-ID: <20261203080514.577407-4-alexander.sverdlin@siemens.com> (raw)
In-Reply-To: <20261203080514.577407-1-alexander.sverdlin@siemens.com>
From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
cpsw_rx_vlan_encap() strips the VLAN tag of received frames and passes it
as hwaccel tag, unless the host port is in the force untagged egress mask
of the VLAN. In the latter case the tag is lost. In dual-MAC mode this is
the case for the port VLANs, which default to VID 1 and 2 if not
configured in DT.
DSA tagging protocols which carry information in the VLAN tag, like
LAN9303, which encodes the source port in the VID, then interpret the
payload as the tag. Frames from LAN9303 port 1 are dropped with "Dropping
packet due to invalid source port".
Hand the frames to DSA as received if the netdev is a DSA conduit.
Fixes: 4b41d3436796 ("net: ethernet: ti: cpsw: allow untagged traffic on host port")
Tested-by: Lukas Stockmann <lukas.stockmann@siemens.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
---
drivers/net/ethernet/ti/cpsw_priv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c
index 0580a7885d339..60f9db93ba735 100644
--- a/drivers/net/ethernet/ti/cpsw_priv.c
+++ b/drivers/net/ethernet/ti/cpsw_priv.c
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/skbuff.h>
+#include <net/dsa.h>
#include <net/page_pool/helpers.h>
#include <net/pkt_cls.h>
#include <net/pkt_sched.h>
@@ -248,6 +249,10 @@ void cpsw_rx_vlan_encap(struct sk_buff *skb)
/* Remove VLAN header encapsulation word */
skb_pull(skb, CPSW_RX_VLAN_ENCAP_HDR_SIZE);
+ /* VLAN tag may carry DSA tagging information, keep it intact */
+ if (netdev_uses_dsa(skb->dev))
+ return;
+
pkt_type = (rx_vlan_encap_hdr >>
CPSW_RX_VLAN_ENCAP_HDR_PKT_TYPE_SHIFT) &
CPSW_RX_VLAN_ENCAP_HDR_PKT_TYPE_MSK;
--
2.56.1
prev parent reply other threads:[~2026-12-03 8:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 8:05 [PATCH net-next 0/3] net: ethernet: ti: cpsw: Support cascaded switches A. Sverdlin
2026-12-03 8:05 ` [PATCH net-next 1/3] net: ethernet: ti: cpsw_new: bypass ALE in promiscuous mode A. Sverdlin
2026-12-03 8:05 ` [PATCH net-next 2/3] net: ethernet: ti: cpsw: forward unknown VLANs in promiscuous switch mode A. Sverdlin
2026-12-03 8:05 ` A. Sverdlin [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=20261203080514.577407-4-alexander.sverdlin@siemens.com \
--to=alexander.sverdlin@siemens.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=haokexin@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kmehltretter@gmail.com \
--cc=kuba@kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=lukas.stockmann@siemens.com \
--cc=m-karicheri2@ti.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.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