🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6266

Re: [PATCH net-next v16 4/5] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags

#6266
From: netdev-bot+sashiko
Date: Thu, 22 Oct 2026 02:11
73 lines
10416 bytes
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
Technical Details
Message-ID: <179263508556.3135.4675535380942875850@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350346-linux-kernel-netdev=dewy.ru
References: <20261020111115.3072180-5-kyle.switch@motor-comm.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350346-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <179263508556.3135.4675535380942875850@kernel.org>
References: <20261020111115.3072180-5-kyle.switch@motor-comm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="110655"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:HQ+LFnH9r6zWWtSSHVSvDX5hnkA= sha256:IJUX+Ld2iAHeKvG/0gIeBfAO8xuiKyk/NjVVDN8Igo4=
	sha1:pLby2UluCS2jlhzBRiB7LAwDp7s= sha256:LpezjXd2O/IP+mT0IE4SyYtKcjDGrxghpHY0e/GD2vQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4E6F411117E; Thu, 22 Oct 2026 05:13:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id KTA59DAeZiFh;
	Thu, 22 Oct 2026 05:13:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350346-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id B5F14111156; Thu, 22 Oct 2026 05:13:42 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 875A33572A; Thu, 22 Oct 2026 02:11:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792635088;
	b=hUZk+kQWnjddRYujoWHukJAMWZTxFzqTY6G/DLif3BrVrXWiZE5jzRY0gPIRAU5WNU5R
	 GfxDQgNlOflRCnpvUM1zRJ2Xvs1jZXQHQXEbhy+0kCqwXjrO0GFZrYSwthV31F5ej7TPa
	 H2E4784Hk+Xvv9bG1TOwrdf9vdL8TyKo/9N6GgRdmH5pMAnDUd6pzTaoAB8J7BFEF4AYe
	 qLy/U2IuwOmlNt3VPX6PJ6ahbqQQ7LylHT400W2aS794iPlYPdyqe+FSeSCeupNLDKbS1
	 AZMONNq1JJE0cI+pnL9FIPSuHjmtdrJ0JqeG74RACh8en3HIHM1fmJL/TVKF9OUxSkw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792635088;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=UhL0eGZLhzYFlt8HLWhJWkfpVMd7qMCv+gQwIzAte+0=;
	b=JiKWmgagyp0o9IqKKaRVgTVICWtRP+2wHqyOkzHXNkPZJWWQiYQ3bCXJ8KyT9khH5gFK
	 XgBDnkOB4OzeW5TnEBdPvo6hc1MHBGStmd0jUgms4Cdc7w2EEypNYifeO2Dbas2W2Obls
	 nGYVN0aepD8xh94aCon/z73j3DvLB1+H597uejS8TTJHkMKC6R81Qxq/g6OrTWUJ5a6qC
	 FNcroVh2c/C+VXLBcKIDFkjBGUyPchzE1XXWyVWjqx/40Nqdvh8axfUHfwnBWD+eXZTx0
	 ONyqPFTNMelZGnfGjH8YaWMtbqygsqOaAeAOaI3hhFISVOCtlxpS1irzpOCfvdazEuA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FbGAkh36;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E27C606A330;
	Thu, 22 Oct 2026 02:11:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FbGAkh36
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792635087;
	b=huU+JXy2iAuKhOS63fXmCBrEsJmFLjB9ZgyMYX1qjIVgQHpSwiZpVb6RED1WzsD7ICf4
	 tSTwcmauZsBREriAvGr9Ak5moFCzTWaimC3DKouZFziFX4dVdetvDKd5GPNUoDtQ0JEdO
	 NP7fmOf85iUCh4AcHd2oH9AnC3oRj9v+lROGKYpu+po9lEKngiivAo4TVT6gTs6cXHuoO
	 M+Cz3rJKMdbqoEOHsdSMvKT8lcxAfAe4YOKlonH0ZniTdqxRAhvXt6XwAYLfONFBZOolJ
	 AliuKNU9LSseO2ELHeyYBQyZAPM2PrEmWCKjEQ6ua2EE+W3L6Bgf7od4ljm8UFJHuJw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792635087;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=UhL0eGZLhzYFlt8HLWhJWkfpVMd7qMCv+gQwIzAte+0=;
	b=Ep3mjPhYqb6+OkaBUvuWC5UMlSJfDXYwz8Ecfp8wGw1QfbVVy6yiuhzdpmRFmdU2/aMA
	 GEKSTMirSCHup+6QEYppgUhWbGbBFSyDC+fNwbAZ0p5sHuxmIBxIf/xEUFLxzN5wywkXe
	 5kipZxrwftWVrkR9PPwvUeN7kCA+Wb23vqPvfVe7E6+Be2Nj2D86d+iBYn4qzAw/oYffR
	 GSeuOywdc5YsVingDYDfEhxHeAxulMKYECpt3wB1HTSugU05k457et6TuS8pbKwksZz+j
	 EXV8RNqpKsgSJQgMp5IK7n86of/HnJBjOHEx3NRVU/eoz3oTjjXmED7FyNNKgBn7Dxw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FbGAkh36;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EEAD606A31B;
	Thu, 22 Oct 2026 02:11:27 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 039791F000C3;
	Thu, 22 Oct 2026 02:11:25 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792635086;
	bh=UhL0eGZLhzYFlt8HLWhJWkfpVMd7qMCv+gQwIzAte+0=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=FbGAkh36sQJ4F8hBrZ6BiZUSTqaXeVQavbKnT1t88YHAr1yQV7F8rnz5cA0kfWLMv
	 SiztHX2dGRBQdzvHHQRuXnIifEudIGbMZTo1fiCtmsXYLQTrAZmb6eXRCWygGH/Z6n
	 +phTOylwgNnXkljA2R6pJ9ckipO0BfeYpiZuNUA8qfwh68M0mtd/PGpOSl82/5+5hf
	 DUJZPxR2x/UqDDsJKtDrb1kd3cpNOdIgbmSNOSRxZjsW3wxxeO3nbCroXZTvgsMOIy
	 hSILnF68nHPZDwFSZq9+0zQkY33VJ39PdT3o/YDw3LIpuy033XfmKxo2JGMtlPWxpI
	 EX4wFtfRjDAfw==
X-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
X-In-Reply-To: <20261020111115.3072180-5-kyle.switch@motor-comm.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list