public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: illusion.wang@nebula-matrix.com
Cc: Jakub Kicinski <kuba@kernel.org>,
	sam.chen@nebula-matrix.com, lukas.bulwahn@redhat.com,
	dimon.zhao@nebula-matrix.com, netdev@vger.kernel.org,
	vadim.fedorenko@linux.dev,
	linux-kernel@vger.kernel.org (open list),
	corbet@lwn.net, lorenzo@kernel.org, alvin.wang@nebula-matrix.com,
	andrew+netdev@lunn.ch, linux-doc@vger.kernel.org,
	pabeni@redhat.com, edumazet@google.com, horms@kernel.org
Subject: Re: [v4,net-next,03/11] net/nebula-matrix: add chip related definitions
Date: Fri,  6 Feb 2026 18:24:51 -0800	[thread overview]
Message-ID: <20260207022451.4017791-1-kuba@kernel.org> (raw)
In-Reply-To: <20260206021608.85381-4-illusion.wang@nebula-matrix.com>

This is an AI-generated review of your patch. The human sending this
email says "This is an automated AI code reviewer, please treat what
it says with a grain of salt."

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net/nebula-matrix: add chip related definitions

This commit adds hardware register definitions for the Leonis chip,
including PPE, DP, and interface module base addresses, as well as
P4 configuration data used during chip initialization.

> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw.h
> new file mode 100644
> index 000000000000..f657c1e6a5ad
> --- /dev/null
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw.h
> @@ -0,0 +1,128 @@
> +/* SPDX-License-Identifier: GPL-2.0*/

This isn't a bug, but the SPDX license identifier is missing a space
before the closing comment. The kernel standard format is:

    /* SPDX-License-Identifier: GPL-2.0 */

[ ... ]

> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis.h
> index 240d356f18b0..9000650256ca 100644
> --- a/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis.h
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis.h

[ ... ]

> +#define NBL_DP_UL4S_BASE			(0x00204000)

[ ... ]

> +#define NBL_DP_DL4S_BASE			(0x00614000)

[ ... ]

> +#define NBL_DP_DL4S_BASE			(0x00614000)
> +#define NBL_DP_UL4S_BASE			(0x00204000)

NBL_DP_DL4S_BASE and NBL_DP_UL4S_BASE are defined twice in this file.
While the values are identical, would it make sense to remove the
duplicate definitions?

[ ... ]

> +/*  ----------  DSCH  ----------  */
> +/* DSCH vn_host_qid_max */
> +#define NBL_DSCH_NOTIFY_BITMAP_ARR(i) \
> +	(NBL_DP_DSCH_BASE + 0x00003000 + (i) * BYTES_PER_DWORD)
> +#define NBL_DSCH_FLY_BITMAP_ARR(i) \
> +	(NBL_DP_DSCH_BASE + 0x00004000 + (i) * BYTES_PER_DWORD)

BYTES_PER_DWORD is not defined in this driver. Will this cause
compilation errors when these macros are expanded? Consider defining
BYTES_PER_DWORD or using the already-defined NBL_BYTES_IN_REG.

> +#define NBL_DSCH_PORT_MAP_REG_ARR(i) \
> +	(NBL_DP_DSCH_BASE + 0x00005000 + (i) * sizeof(struct nbl_port_map))

struct nbl_port_map is referenced but not defined anywhere in the
nebula-matrix driver. Is this type defined elsewhere, or is a definition
missing?

[ ... ]

> +/* epro epro_kgen_ft table */
> +#define NBL_EPRO_KGEN_FT_TABLE(i)         \
> +	(NBL_PPE_EPRO_BASE + 0x00001980 + \
> +	 (i) * sizeof(struct nbl_epro_kgen_ft_tbl))

struct nbl_epro_kgen_ft_tbl is referenced but not defined in this
driver. Is a definition missing for this type?

[ ... ]

> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis_regs.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis_regs.h
> new file mode 100644
> index 000000000000..75b7dd783354
> --- /dev/null
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis_regs.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0*/

This isn't a bug, but the SPDX license identifier is missing a space
before the closing comment. The kernel standard format is:

    /* SPDX-License-Identifier: GPL-2.0 */

  reply	other threads:[~2026-02-07  2:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06  2:15 [PATCH v4 net-next 00/11] nbl driver for Nebulamatrix NICs illusion.wang
2026-02-06  2:15 ` [PATCH v4 net-next 01/11] net/nebula-matrix: add minimum nbl build framework illusion.wang
2026-02-06  3:01   ` Andrew Lunn
2026-02-07  2:24   ` [v4,net-next,01/11] " Jakub Kicinski
2026-02-06  2:15 ` [PATCH v4 net-next 02/11] net/nebula-matrix: add our driver architecture illusion.wang
2026-02-06  3:39   ` Andrew Lunn
2026-02-06  9:26     ` 回复:[PATCH " Illusion Wang
2026-02-07 17:19       ` Andrew Lunn
2026-02-07  2:24   ` [v4,net-next,02/11] " Jakub Kicinski
2026-02-06  2:15 ` [PATCH v4 net-next 03/11] net/nebula-matrix: add chip related definitions illusion.wang
2026-02-07  2:24   ` Jakub Kicinski [this message]
2026-02-06  2:15 ` [PATCH v4 net-next 04/11] net/nebula-matrix: channel msg value and msg struct illusion.wang
2026-02-06  2:15 ` [PATCH v4 net-next 05/11] net/nebula-matrix: add channel layer illusion.wang
2026-02-06  3:47   ` Andrew Lunn
2026-02-07  2:24   ` [v4,net-next,05/11] " Jakub Kicinski
2026-02-06  2:15 ` [PATCH v4 net-next 06/11] net/nebula-matrix: add common resource implementation illusion.wang
2026-02-07  2:24   ` [v4,net-next,06/11] " Jakub Kicinski
2026-02-06  2:15 ` [PATCH v4 net-next 07/11] net/nebula-matrix: add intr " illusion.wang
2026-02-07  2:24   ` [v4,net-next,07/11] " Jakub Kicinski
2026-02-06  2:16 ` [PATCH v4 net-next 08/11] net/nebula-matrix: add vsi " illusion.wang
2026-02-07  2:24   ` [v4,net-next,08/11] " Jakub Kicinski
2026-02-06  2:16 ` [PATCH v4 net-next 09/11] net/nebula-matrix: add Dispatch layer implementation illusion.wang
2026-02-06  2:16 ` [PATCH v4 net-next 10/11] net/nebula-matrix: add common/ctrl dev init/reinit operation illusion.wang
2026-02-07  2:25   ` [v4,net-next,10/11] " Jakub Kicinski
2026-02-06  2:16 ` [PATCH v4 net-next 11/11] net/nebula-matrix: add common dev start/stop operation illusion.wang
2026-02-07  2:25   ` [v4,net-next,11/11] " Jakub Kicinski
2026-02-10  2:07     ` 回复:[v4,net-next,11/11] " Illusion Wang
2026-02-10 13:42       ` Andrew Lunn

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=20260207022451.4017791-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=alvin.wang@nebula-matrix.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=dimon.zhao@nebula-matrix.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=illusion.wang@nebula-matrix.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sam.chen@nebula-matrix.com \
    --cc=vadim.fedorenko@linux.dev \
    /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