netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v13 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x
Date: Thu, 16 Oct 2025 15:38:26 -0700	[thread overview]
Message-ID: <20251016153826.70867a6e@kernel.org> (raw)
In-Reply-To: <20251014033551.200692-4-mmyangfl@gmail.com>

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

      reply	other threads:[~2025-10-16 22:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14  3:35 [PATCH net-next v13 0/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-10-14  3:35 ` [PATCH net-next v13 1/3] dt-bindings: net: dsa: yt921x: Add Motorcomm YT921x switch support David Yang
2025-10-14  3:35 ` [PATCH net-next v13 2/3] net: dsa: tag_yt921x: add support for Motorcomm YT921x tags David Yang
2025-10-14  3:35 ` [PATCH net-next v13 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-10-16 22:38   ` Jakub Kicinski [this message]

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=20251016153826.70867a6e@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mmyangfl@gmail.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;
as well as URLs for NNTP newsgroup(s).