Re: [PATCH net-next v19 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG
[email protected] Wed, 29 Jul 2026 17:16:32 +0000
| Newsgroups | dev.linux.lists.mfd,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Introducing DSA_TAG_PROTO_AIROHA breaks DSA hardware offloading and tag processing in compatible Ethernet MAC drivers (Airoha and Mediatek). -- --- Patch [6]: [PATCH net-next v19 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG --- commit 2b8fd23ca8ea6ac3597ff1360a2ad1a9a14fa563 Author: Christian Marangi <[email protected]> net: dsa: tag_mtk: add Airoha variant usage of this TAG This commit introduces a new DSA tag protocol variant for Airoha switches, documenting differences from the Mediatek tag bitmap. It also adds a dedicated config, makefile entry, and "airoha" name for external tools like libpcap. > diff --git a/include/net/dsa.h b/include/net/dsa.h > index 8c16ef23cc102..9957443e2907f 100644 > --- a/include/net/dsa.h > +++ b/include/net/dsa.h > @@ -73,6 +74,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] Will this new tag protocol break hardware offloading and tag processing in the Ethernet MAC drivers? Looking at airoha_get_dsa_tag() in drivers/net/ethernet/airoha/airoha_eth.c, the driver requires DSA_TAG_PROTO_MTK to extract the tag into the DMA descriptor: if (dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK) return 0; For DSA_TAG_PROTO_AIROHA, this fails and leaves the tag in the packet payload, which can break the PPE module that expects untagged packets. Similarly, the Mediatek Ethernet driver checks strictly for DSA_TAG_PROTO_MTK in mtk_uses_dsa() (mtk_eth_soc.c), __mtk_ppe_check_skb() (mtk_ppe.c), and mtk_flow_get_dsa_port() (mtk_ppe_offload.c). Without DSA_TAG_PROTO_MTK, hardware DSA untagging and PPE offloading will silently fail. Do these host Ethernet drivers need to be updated to accept DSA_TAG_PROTO_AIROHA alongside DSA_TAG_PROTO_MTK? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=6