Subject: Re: [PATCH net-next v13 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x

From: Jakub Kicinski <[email-masked]>
Date: Thu, 16 Oct 2025 15:38:26 -0700

On Tue, 14 Oct 2025 11:35:47 +0800 David Yang wrote:
> Motorcomm YT921x is a series of ethernet switches developed by Shanghai
> Motorcomm Electronic Technology, including:

>  drivers/net/dsa/Kconfig  |    7 +
>  drivers/net/dsa/Makefile |    1 +
>  drivers/net/dsa/yt921x.c | 2898 ++++++++++++++++++++++++++++++++++++++
>  drivers/net/dsa/yt921x.h |  504 +++++++

We need a MAINTAINERS entry covering the new driver. See also:
https://docs.kernel.org/next/maintainer/feature-and-driver-maintainers.html
And: 
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#supported-status-for-drivers

> +
> +	pp->rx_frames = mib->rx_64byte + mib->rx_65_127byte +
> +			mib->rx_128_255byte + mib->rx_256_511byte +
> +			mib->rx_512_1023byte + mib->rx_1024_1518byte +
> +			mib->rx_jumbo;
> +	pp->tx_frames = mib->tx_64byte + mib->tx_65_127byte +
> +			mib->tx_128_255byte + mib->tx_256_511byte +
> +			mib->tx_512_1023byte + mib->tx_1024_1518byte +
> +			mib->tx_jumbo;
> +
> +	/* Flush all writes */
> +	smp_wmb();

Barriers don't flush anything, they order visibility of writes.
You don't have a matching smp_rmb() AFAICT so this looks unnecessary.

> +	/* other mirror tasks & different dst port -> conflict */
> +	if ((val & ~srcs & (YT921X_MIRROR_EGR_PORTS_M |
> +			    YT921X_MIRROR_IGR_PORTS_M)) != 0 &&

nit: you can delete the != 0

> +	    (val & YT921X_MIRROR_PORT_M) != dst) {
> +		NL_SET_ERR_MSG_MOD(extack,
> +				   "Sniffer port is already configured, "
> +				   "delete existing rules & retry");

please don't wrap strings, it's okay to go over 80 chars
Makes it easier to find them by grepping if they are not broken up
-- 
pw-bot: cr