From: netdev-bot+sashiko@kernel.org
To: kyle.switch@motor-comm.com
Cc: andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
mmyangfl@gmail.com, horms@kernel.org, linux@armlinux.org.uk,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com,
jianmin.wang@motor-comm.com, wei.zhang@gl-inet.com,
sijia.huang@gl-inet.com
Subject: Re: [PATCH net-next v16 4/5] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags
Date: Thu, 22 Oct 2026 02:11:25 +0000 [thread overview]
Message-ID: <179263508556.3135.4675535380942875850@kernel.org> (raw)
In-Reply-To: <20261020111115.3072180-5-kyle.switch@motor-comm.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The layout comment in net/dsa/tag_yt922x.c does not match what
yt922x_tag_xmit() puts on the wire, even though the commit message…
- [Low] Concern: yt922x_tag_rcv() never calls
dsa_default_offload_fwd_mark(), unlike yt921x_tag_rcv(), so the…
--
net: dsa: tag_yt922x: add support for Motorcomm YT922x tags
This commit adds a DSA tag driver for Motorcomm YT922x switches. They use
the same ETH_P_YT921X EtherType and 8-byte tag length as YT921x, but a
different tag layout. The commit also adds a co-maintainer and the new
file to the Motorcomm MAINTAINERS entry.
> diff --git a/net/dsa/tag_yt922x.c b/net/dsa/tag_yt922x.c
> new file mode 100644
> index 0000000000000..b6146a9af98b3
> --- /dev/null
> +++ b/net/dsa/tag_yt922x.c
> @@ -0,0 +1,122 @@
[ ... ]
> +#define YT922X_TAG_LEN 8
> +
> +/*
> + * To define the from cpu tag format 8 bytes.
> + *
> + * To-CPU (RX) tag format, 8 bytes:
> + *
> + * tag[0]: TPID (default: 0x9988)
> + * tag[1]: VID lookup
> + * tag[2]: bit 5:2 - RX source port
> + *
> + * From-CPU (TX) tag format, 8 bytes:
> + *
> + * tag[0]: TPID (default: 0x9988)
> + * tag[1]: bit 8:0 - Dst port mask
> + * tag[2]: bit 15 - Dst port 0
> + *
> + */
[Severity: Low]
This isn't a bug, but does this From-CPU layout match what
yt922x_tag_xmit() puts on the wire? The commit message says "The new
driver documents both the to-CPU and from-CPU tag layouts".
>From the comment, tag[1] bit 0 would be port 0. The code shifts the mask
by one, though:
ctrl = YT922X_TAG_PRIO(skb->priority) | YT922X_TAG_FORCE_DST |
YT922X_TAG_PORTS(ports >> 1);
So tag[1] bit n is port n+1, and port 0 goes in tag[2] bit 15.
On every frame, tag[1] also carries YT922X_TAG_FORCE_DST (bit 9),
YT922X_TAG_PRIO_M (bits 12:10) and YT922X_TAG_PRIO_EN (bit 13), and
tag[3] is written as zero. None of these are in the comment.
Could the comment describe the shifted mask and these extra fields?
Also, the block starts with "To define the from cpu tag format 8 bytes."
but then describes the To-CPU layout first.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020111115.3072180-1-kyle.switch%40motor-comm.com
next prev parent reply other threads:[~2026-10-22 2:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 11:11 [PATCH net-next v16 0/5] net: dsa: motorcomm: add support yt922x driver Kyle Switch
2026-10-20 11:11 ` [PATCH net-next v16 1/5] net: dsa: motorcomm: initialize dsa_switch based on chipid Kyle Switch
2026-10-22 2:11 ` netdev-bot+sashiko
2026-10-20 11:11 ` [PATCH net-next v16 2/5] net: dsa: motorcomm: use max_ports in series for port bounds checking Kyle Switch
2026-10-20 11:11 ` [PATCH net-next v16 3/5] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers Kyle Switch
2026-10-22 2:11 ` netdev-bot+sashiko
2026-10-20 11:11 ` [PATCH net-next v16 4/5] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags Kyle Switch
2026-10-22 2:11 ` netdev-bot+sashiko [this message]
2026-10-20 11:11 ` [PATCH net-next v16 5/5] net: dsa: motorcomm: Add support for Motorcomm YT922x Kyle Switch
2026-10-22 2:11 ` netdev-bot+sashiko
2026-10-21 1:30 ` [PATCH net-next v16 0/5] net: dsa: motorcomm: add support yt922x driver 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=179263508556.3135.4675535380942875850@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianmin.wang@motor-comm.com \
--cc=kuba@kernel.org \
--cc=kyle.switch@motor-comm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ming.xu@motor-comm.com \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=sijia.huang@gl-inet.com \
--cc=wei.zhang@gl-inet.com \
--cc=xiaolin.xu@motor-comm.com \
/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
all inboxes | Powered by JetHome®