From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>
Cc: devicetree@vger.kernel.org, lee@kernel.org, conor+dt@kernel.org,
mfd@lists.linux.dev, robh@kernel.org
Subject: Re: [PATCH net-next v20 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG
Date: Tue, 18 Aug 2026 09:03:24 +0000 [thread overview]
Message-ID: <20260818090325.3AA811F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817082034.20326-8-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding a new tag protocol enum for Airoha without updating the strict protocol checks in MediaTek/Airoha ethernet master drivers silently breaks hardware offloads and special tag functionality.
--
--- Patch [6]: [PATCH net-next v20 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG ---
commit 9a6d2b41d720a4ec342b1d91531294b7baced74f
Author: Christian Marangi <ansuelsmth@gmail.com>
net: dsa: tag_mtk: add Airoha variant usage of this TAG
This commit adds a variant of the MTK DSA tag for Airoha switches,
documenting differences and introducing the new DSA_TAG_PROTO_AIROHA
enum to report the Airoha name to external tools.
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index 6f7f5c17b5320..396c1e5208523 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -74,6 +75,7 @@ enum dsa_tag_protocol {
> DSA_TAG_PROTO_KSZ9893 = DSA_TAG_PROTO_KSZ9893_VALUE,
> DSA_TAG_PROTO_LAN9303 = DSA_TAG_PROTO_LAN9303_VALUE,
> DSA_TAG_PROTO_MTK = DSA_TAG_PROTO_MTK_VALUE,
> + DSA_TAG_PROTO_AIROHA = DSA_TAG_PROTO_AIROHA_VALUE,
[Severity: High]
Does adding this new protocol enum break hardware offloads and tag
processing in the ethernet master drivers?
Looking at the Mediatek and Airoha ethernet drivers, they appear to use strict
protocol checks for DSA_TAG_PROTO_MTK. For example, in
drivers/net/ethernet/airoha/airoha_eth.c:airoha_get_dsa_tag():
if (dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
return 0;
This check would fail to extract the DSA tag for the new Airoha protocol,
causing untagged packets to retain the tag in the payload which breaks
the hardware PPE module.
Similar strict checks exist in other master drivers that might bypass PPE
hardware routing logic and L2/L3 flow offloading:
drivers/net/ethernet/mediatek/mtk_eth_soc.c:mtk_uses_dsa()
dev->dsa_ptr->tag_ops->proto == DSA_TAG_PROTO_MTK;
drivers/net/ethernet/mediatek/mtk_ppe.c:__mtk_ppe_check_skb()
if (skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:mtk_flow_get_dsa_port()
if (dp->cpu_dp->tag_ops->proto != DSA_TAG_PROTO_MTK)
return -ENODEV;
Should these master drivers be updated to also accept DSA_TAG_PROTO_AIROHA
so that hardware capabilities are not disabled?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260817082034.20326-1-ansuelsmth@gmail.com?part=6
next prev parent reply other threads:[~2026-08-18 9:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 8:20 [PATCH net-next v20 00/10] net: dsa: Add Airoha AN8855 support Christian Marangi
2026-08-17 8:20 ` [PATCH net-next v20 01/10] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 02/10] dt-bindings: net: Document support for AN8855 Switch Internal PHY Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 03/10] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 04/10] mfd: an8855: Add support for Airoha AN8855 Switch MFD Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 04/10] mfd: an8855: Add support for Airoha AN8855 Switch Christian Marangi
2026-08-18 1:19 ` Wayen Yan
2026-08-17 8:20 ` [PATCH net-next v20 05/10] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG Christian Marangi
2026-08-18 9:03 ` sashiko-bot [this message]
2026-08-17 8:20 ` [PATCH net-next v20 07/10] MAINTAINERS: add myself as maintainer for Airoha AN8855 Switch Christian Marangi
2026-08-17 8:20 ` [PATCH net-next v20 08/10] net: dsa: mt7530: move MDIO bus locking into regmap Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 09/10] net: dsa: mt7530: generalize and move common function to lib module Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 8:20 ` [PATCH net-next v20 10/10] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2026-08-18 9:03 ` sashiko-bot
2026-08-17 15:38 ` [PATCH net-next v20 00/10] net: dsa: Add Airoha AN8855 support Jakub Kicinski
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=20260818090325.3AA811F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.