Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: o.rempel@pengutronix.de
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, linusw@kernel.org,
	luizluca@gmail.com, alvin.sipraga@analog.com, andrew@lunn.ch,
	olteanv@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH net-next v2 05/10] net: dsa: realtek: rtl8365mb: describe the ports of each chip
Date: Sun, 15 Nov 2026 23:01:36 +0000	[thread overview]
Message-ID: <179478369620.3136.10648334333290440373@kernel.org> (raw)
In-Reply-To: <20261112-rtl8365mb-dcb-ingress-v2-5-f8e6fbdf8c99@pengutronix.de>

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] This patch lowers RTL8365MB_MAX_NUM_PORTS from 11 to 8.

--

net: dsa: realtek: rtl8365mb: describe the ports of each chip

This commit adds a per-chip port_mask to rtl8365mb_chip_info. It reports
fls(port_mask) to DSA as the port count and rejects devicetree ports that
the chip does not have. It also lowers RTL8365MB_MAX_NUM_PORTS from 11 to
8.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index da06f952a053d..1e6cdc61f6bd3 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
> @@ -115,7 +115,7 @@
>  #define RTL8365MB_PHYADDRMAX		7
>  #define RTL8365MB_NUM_PHYREGS		32
>  #define RTL8365MB_PHYREGMAX		(RTL8365MB_NUM_PHYREGS - 1)
> -#define RTL8365MB_MAX_NUM_PORTS		11
> +#define RTL8365MB_MAX_NUM_PORTS		8

[Severity: Low]
This isn't a bug, but is "family maximum" the right description for this
value?

The commit message says:

  Lower the family maximum to 8 to match.

The constant also still sits under this heading:

  /* Family-specific data and limits */

The file header comment still describes the family as having more ports
than that, and it lists the RTL8370MB as a member:

 * In the same family of chips, some carry up to 8 user ports and up to 2
 * extension ports. Where possible this driver tries to make things generic, but
 ...
 *  - RTL8370MB

Some of the family-generic register handling was also written for port
indexes above 7. Examples are the 11-bit RTL8365MB_PORT_MASK, the EXT bit
for the trap port in CPU_CTRL, and the L2 flush code in rtl8365mb_l2.c:

	/* Now issue the flush command and wait for its completion. There are
	 * two registers for this purpose, and which one to use depends on the
	 * port number. The _EXT register is for ports 8 or higher.
	 */
	if (port < 8) {

With this change, 8 looks like the largest port count among the chips the
driver supports, not a limit for the whole family. The BUILD_BUG_ON in
PORT_MASK() reads the same way. So does the later static_assert in this
series that ties RTL8365MB_MAX_NUM_PORTS to RTL8365MB_QOS_MAX_PORTS.

At the end of the series, the header comment and the placement of the
constant are still unchanged.

Would it be clearer to rename the constant to something that marks it as
a driver-supported maximum? Moving it out of the family-limits group and
updating the comment and commit message would also work.

>  /* Valid for the whole family except RTL8370B, which has 4160 entries.
>   * RTL8370B is mentioned in vendor code but it might not even belong
>   * to the same RTL8367C family.

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112-rtl8365mb-dcb-ingress-v2-0-f8e6fbdf8c99%40pengutronix.de

  parent reply	other threads:[~2026-11-15 23:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  8:37 [PATCH net-next v2 00/10] net: dsa: realtek: rtl8365mb: DCB ingress QoS offload Oleksij Rempel
2026-11-12  8:37 ` [PATCH net-next v2 01/10] net: ieee8021q: print traffic type and queue count with %u Oleksij Rempel
2026-11-12  8:37 ` [PATCH net-next v2 02/10] net: ieee8021q: add pcp_to_tt() Oleksij Rempel
2026-11-14 19:56   ` Luiz Angelo Daros de Luca
2026-11-12  8:37 ` [PATCH net-next v2 03/10] net: ieee8021q: clarify the tt_to_tc() traffic-class mapping Oleksij Rempel
2026-11-12  8:37 ` [PATCH net-next v2 04/10] net: ieee8021q: add tt_to_pcp() Oleksij Rempel
2026-11-14 19:59   ` Luiz Angelo Daros de Luca
2026-11-12  8:37 ` [PATCH net-next v2 05/10] net: dsa: realtek: rtl8365mb: describe the ports of each chip Oleksij Rempel
2026-11-12 15:08   ` Alvin Šipraga
2026-11-12 20:38   ` Linus Walleij
2026-11-15 23:01   ` netdev-bot+sashiko [this message]
2026-11-12  8:37 ` [PATCH net-next v2 06/10] net: dsa: realtek: rtl8365mb: store the egress queue count per chip Oleksij Rempel
2026-11-12  8:37 ` [PATCH net-next v2 07/10] net: dsa: realtek: rtl8365mb: add QoS baseline and DCB default prio Oleksij Rempel
2026-11-12 20:31   ` Linus Walleij
2026-11-14 20:15     ` Luiz Angelo Daros de Luca
2026-11-12  8:37 ` [PATCH net-next v2 08/10] net: dsa: realtek: rtl8365mb: program the PCP of untagged frames Oleksij Rempel
2026-11-12 20:33   ` Linus Walleij
2026-11-14 20:18   ` Luiz Angelo Daros de Luca
2026-11-15 23:01   ` netdev-bot+sashiko
2026-11-12  8:37 ` [PATCH net-next v2 09/10] net: dsa: realtek: rtl8365mb: offload DCB apptrust Oleksij Rempel
2026-11-12 20:35   ` Linus Walleij
2026-11-14 20:26     ` Luiz Angelo Daros de Luca
2026-11-12  8:37 ` [PATCH net-next v2 10/10] net: dsa: realtek: rtl8365mb: report the DCB DSCP-to-priority map Oleksij Rempel
2026-11-12 20:36   ` Linus Walleij
2026-11-14 20:28   ` Luiz Angelo Daros de Luca
2026-11-13 12:24 ` [PATCH net-next v2 00/10] net: dsa: realtek: rtl8365mb: DCB ingress QoS offload Alvin Šipraga
2026-11-14 20:39   ` Luiz Angelo Daros de Luca

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=179478369620.3136.10648334333290440373@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=alvin.sipraga@analog.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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