From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>,
mfd@lists.linux.dev, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH net-next v22 6/9] net: dsa: tag_mtk: add Airoha variant usage of this TAG
Date: Fri, 30 Oct 2026 04:54:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-190514@kernel.org> (raw)
In-Reply-To: <20260915123812.14747-7-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] net: dsa: missing DSA_TAG_PROTO_AIROHA in eth drivers breaks offloads
--
commit aaecc61a677f69e71544a1c2a64947df3cc03f58
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 7507d632e7c6d..c5659e9ab6d35 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -75,6 +76,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 break hardware offloads in the ethernet MAC
drivers?
The Mediatek and Airoha ethernet drivers explicitly check for
DSA_TAG_PROTO_MTK to enable hardware DSA tag extraction and PPE offloading.
For example, in airoha_get_dsa_tag() in
drivers/net/ethernet/airoha/airoha_eth.c:
if (dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
return 0;
Because DSA_TAG_PROTO_AIROHA is not matched, the MAC drivers will skip DSA
tag extraction, leaving the tag in the payload. Will this cause the hardware
to miscalculate IP header offsets and break checksum offloads?
Similar checks exist in mtk_uses_dsa() in
drivers/net/ethernet/mediatek/mtk_eth_soc.c:
return netdev_uses_dsa(dev) &&
dev->dsa_ptr->tag_ops->proto == DSA_TAG_PROTO_MTK;
And in mtk_foe_entry_commit_subflow() in
drivers/net/ethernet/mediatek/mtk_ppe.c:
if (!netdev_uses_dsa(skb->dev) ||
skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
goto out;
This could entirely disable PPE hardware offloading for the new Airoha switch
protocol. Should these drivers be updated to also match DSA_TAG_PROTO_AIROHA?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915123812.14747-1-ansuelsmth@gmail.com?part=6
next prev parent reply other threads:[~2026-10-30 4:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 12:37 [PATCH net-next v22 0/9] net: dsa: Add Airoha AN8855 support Christian Marangi
2026-09-15 12:37 ` [PATCH net-next v22 1/9] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2026-10-30 4:54 ` sashiko-bot
2026-09-15 12:37 ` [PATCH net-next v22 2/9] dt-bindings: net: Document support for AN8855 Switch Internal PHY Christian Marangi
2026-10-30 4:54 ` sashiko-bot
2026-09-15 12:38 ` [PATCH net-next v22 3/9] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2026-09-24 15:28 ` Rob Herring (Arm)
2026-10-30 4:54 ` sashiko-bot
2026-09-15 12:38 ` [PATCH net-next v22 4/9] mfd: an8855: Add support for Airoha AN8855 Switch Christian Marangi
2026-09-21 20:44 ` Jakub Kicinski
2026-09-22 10:14 ` Christian Marangi (Ansuel)
2026-09-23 0:21 ` Jakub Kicinski
2026-10-30 4:54 ` sashiko-bot
2026-09-15 12:38 ` [PATCH net-next v22 5/9] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2026-10-30 4:54 ` sashiko-bot
2026-09-15 12:38 ` [PATCH net-next v22 6/9] net: dsa: tag_mtk: add Airoha variant usage of this TAG Christian Marangi
2026-10-30 4:54 ` sashiko-bot [this message]
2026-09-15 12:38 ` [PATCH net-next v22 7/9] MAINTAINERS: add myself as maintainer for Airoha AN8855 Switch Christian Marangi
2026-09-15 12:38 ` [PATCH net-next v22 8/9] net: dsa: mt7530: generalize and move common function to lib module Christian Marangi
2026-09-15 12:38 ` [PATCH net-next v22 9/9] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2026-10-30 4:54 ` sashiko-bot
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=sashiko-outbox-190514@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 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).