From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>
Cc: conor+dt@kernel.org, lee@kernel.org, robh@kernel.org,
devicetree@vger.kernel.org, mfd@lists.linux.dev
Subject: Re: [PATCH net-next v24 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG
Date: Tue, 29 Sep 2026 19:52:34 +0000 [thread overview]
Message-ID: <20260929195234.DC95C1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260928194511.41878-7-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] net: dsa: MAC driver offloads fail for new Airoha tag protocol
--
commit 8cdc1e6c2d15d8ca09e78024f7070167218dff24
Author: Christian Marangi <ansuelsmth@gmail.com>
net: dsa: tag_mtk: add Airoha variant usage of this TAG
Add variant of the MTK TAG for Airoha Switch and comments about difference
between Airoha AN8855 and Mediatek tag bitmap.
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index 5d12191b6f6f5..9824c63ad50b3 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -76,6 +77,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 this new protocol ID break hardware offloading and DMA descriptor
construction in existing drivers?
Several MAC drivers currently hardcode checks for DSA_TAG_PROTO_MTK and will
silently fail or reject this new protocol.
In the Airoha Ethernet driver, returning 0 breaks DMA descriptor construction:
drivers/net/ethernet/airoha/airoha_eth.c:airoha_get_dsa_tag() {
if (dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
return 0;
}
In the Mediatek Ethernet driver, metadata allocation for hardware forwarding
fails because mtk_uses_dsa() returns false:
drivers/net/ethernet/mediatek/mtk_eth_soc.c:mtk_uses_dsa() {
return netdev_uses_dsa(dev) &&
dev->dsa_ptr->tag_ops->proto == DSA_TAG_PROTO_MTK;
}
PPE hardware offloading silently aborts instead of forwarding:
drivers/net/ethernet/mediatek/mtk_ppe.c:mtk_foe_entry_prepare() {
if (!netdev_uses_dsa(skb->dev) ||
skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
goto out;
}
And flow offloading completely fails:
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;
}
Do these drivers need to be updated to also accept DSA_TAG_PROTO_AIROHA?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928194511.41878-1-ansuelsmth@gmail.com?part=6
next prev parent reply other threads:[~2026-09-29 19:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 19:44 [PATCH net-next v24 00/10] net: dsa: Add Airoha AN8855 support Christian Marangi
2026-09-28 19:45 ` [PATCH net-next v24 01/10] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 02/10] dt-bindings: net: Document support for AN8855 Switch Internal PHY Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 03/10] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 04/10] mfd: an8855: Add support for Airoha AN8855 Switch Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 05/10] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG Christian Marangi
2026-09-29 19:52 ` sashiko-bot [this message]
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 07/10] MAINTAINERS: add myself as maintainer for Airoha AN8855 Switch Christian Marangi
2026-09-28 19:45 ` [PATCH net-next v24 08/10] net: dsa: move mediatek DSA driver in dedicated directory Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-09-28 19:45 ` [PATCH net-next v24 09/10] net: dsa: mt7530: generalize and move common function to lib module Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
2026-09-28 19:45 ` [PATCH net-next v24 10/10] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2026-09-29 19:52 ` sashiko-bot
2026-10-01 4:45 ` netdev-bot+sashiko
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=20260929195234.DC95C1F00893@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.