From: Jakub Kicinski <kuba@kernel.org>
To: daniel@makrotopia.org
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net,
conor+dt@kernel.org, krzk+dt@kernel.org, chad@monroe.io,
devicetree@vger.kernel.org, lxu@maxlinear.com, frankwu@gmx.de,
linux@armlinux.org.uk, john@phrozen.org, robh@kernel.org,
cezary.wilmanski@adtran.com, hkallweit1@gmail.com,
horms@kernel.org, edumazet@google.com,
linux-kernel@vger.kernel.org, pabeni@redhat.com,
olteanv@gmail.com
Subject: Re: [net-next,v13,2/4] net: dsa: add tag format for MxL862xx switches
Date: Thu, 5 Feb 2026 18:21:34 -0800 [thread overview]
Message-ID: <20260206022134.3185316-1-kuba@kernel.org> (raw)
In-Reply-To: <82706bbd489b5c68699060630ec6577f9aefb849.1770211259.git.daniel@makrotopia.org>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net: dsa: add tag format for MxL862xx switches
This patch adds a DSA tag driver for MaxLinear MxL862xx switches. The
tag format uses an 8-byte header with an ethertype marker that is shared
with GSW1xx switches, though the format itself differs.
> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
> --- a/net/dsa/Kconfig
> +++ b/net/dsa/Kconfig
> @@ -104,6 +104,13 @@
[ ... ]
> +config NET_DSA_TAG_MXL_862XX
> + tristate "Tag driver for MxL862xx switches"
> + help
> + Say Y or M if you want to enable support for tagging frames for the
> + Maxlinear MxL86252 and MxL86282 switches using their native 8-byte
^^^^^^^^^
This isn't a bug, but there's inconsistent capitalization here. The help
text uses "Maxlinear" while the adjacent NET_DSA_TAG_MXL_GSW1XX entry uses
"MaxLinear" (with capital L). The MODULE_DESCRIPTION in tag_mxl862xx.c also
uses "MaxLinear".
> + tagging protocol.
> diff --git a/net/dsa/tag_mxl862xx.c b/net/dsa/tag_mxl862xx.c
> --- /dev/null
> +++ b/net/dsa/tag_mxl862xx.c
> @@ -0,0 +1,110 @@
[ ... ]
> +static struct sk_buff *mxl862_tag_xmit(struct sk_buff *skb,
> + struct net_device *dev)
> +{
> + struct dsa_port *dp = dsa_user_to_port(dev);
> + struct dsa_port *cpu_dp = dp->cpu_dp;
> + unsigned int cpu_port, sub_interface;
> + __be16 *mxl862_tag;
> +
> + cpu_port = cpu_dp->index;
> +
> + /* target port sub-interface ID relative to the CPU port */
> + sub_interface = dp->index + 16 - cpu_port;
^^^^^^^^^^^^^^^^^^^^^^^^
Can sub_interface overflow the 5-bit MXL862_SUBIF_ID field here? With
dp->index = 16 and cpu_port = 0, the calculation would yield 32 which
exceeds the valid range (0-31) for GENMASK(4, 0). FIELD_PREP would silently
truncate this to 0 via masking. Is there a constraint on port configurations
that prevents this from occurring?
> +
> + /* provide additional space 'MXL862_HEADER_LEN' bytes */
> + skb_push(skb, MXL862_HEADER_LEN);
[ ... ]
> + dsa_alloc_etype_header(skb, MXL862_HEADER_LEN);
> +
> + /* special tag ingress */
^^^^^^^
This comment says "ingress" but mxl862_tag_xmit() is the TX/egress path.
Should this say "egress" instead?
> + mxl862_tag = dsa_etype_header_pos_tx(skb);
--
pw-bot: cr
next prev parent reply other threads:[~2026-02-06 2:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 13:32 [PATCH net-next v13 0/4] net: dsa: initial support for MaxLinear MxL862xx switches Daniel Golle
2026-02-04 13:32 ` [PATCH net-next v13 1/4] dt-bindings: net: dsa: add MaxLinear MxL862xx Daniel Golle
2026-02-04 13:33 ` [PATCH net-next v13 2/4] net: dsa: add tag format for MxL862xx switches Daniel Golle
2026-02-06 2:21 ` Jakub Kicinski [this message]
2026-02-06 3:30 ` [net-next,v13,2/4] " Daniel Golle
2026-02-07 2:46 ` Jakub Kicinski
2026-02-04 13:33 ` [PATCH net-next v13 3/4] net: mdio: add unlocked mdiodev C45 bus accessors Daniel Golle
2026-02-04 13:33 ` [PATCH net-next v13 4/4] net: dsa: add basic initial driver for MxL862xx switches Daniel Golle
2026-02-06 2:21 ` Jakub Kicinski
2026-02-06 3:14 ` Daniel Golle
2026-02-06 13:34 ` Vladimir Oltean
2026-02-06 16:43 ` Daniel Golle
2026-02-07 22:14 ` Vladimir Oltean
2026-02-07 2:52 ` 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=20260206022134.3185316-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=cezary.wilmanski@adtran.com \
--cc=chad@monroe.io \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=frankwu@gmx.de \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=john@phrozen.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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