mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: illusion.wang@nebula-matrix.com
Cc: dimon.zhao@nebula-matrix.com, alvin.wang@nebula-matrix.com,
	sam.chen@nebula-matrix.com, netdev@vger.kernel.org,
	kuba@kernel.org, edumazet@google.com, horms@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v31 net-next 2/8] net/nebula-matrix: add common resource implementation
Date: Sun, 11 Oct 2026 10:51:21 +0000	[thread overview]
Message-ID: <179171588171.434549.5839384783484912228@kernel.org> (raw)
In-Reply-To: <20261010095939.2230-3-illusion.wang@nebula-matrix.com>

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 `get_host_pf_mask` kernel-doc in `nbl_def_hw.h` says
  nbl_res_init_pf_num() "always runs before this op's only consumer,…

--

net/nebula-matrix: add common resource implementation

This commit adds a chip-agnostic resource layer for the Nebula Matrix
driver. On the control PF it builds the PF topology, SR-IOV BDF, Ethernet
port and VSI identity tables once at probe time. It also adds new hw ops
(flush_write, get_real_bus, get_fw_eth_map, get_board_info) and the
VSI/PF/Eth ID conversion helpers.

[ ... ]

> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h
> index 58d1b669b8cbb..4b420db91963d 100644
> --- a/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h

[ ... ]

> @@ -42,9 +55,22 @@ struct nbl_hw_ops {
>  	 * op only returns the raw register value.
>  	 */
>  	void (*get_host_pf_mask)(struct nbl_hw_mgt *hw_mgt, u32 *pf_mask);
> +	void (*get_real_bus)(struct nbl_hw_mgt *hw_mgt, u8 *bus);

[Severity: Low]
This isn't a bug, but the kernel-doc for get_host_pf_mask just above this
hunk now looks stale:

	 * The mask is validated in the resource layer:
	 * nbl_res_init_pf_num() rejects an all-zero mask and any
	 * non-contiguous layout with -EINVAL, and it always runs before
	 * this op's only consumer, nbl_chan_cfg_qinfo_map_table().  This
	 * op only returns the raw register value.

This patch adds nbl_res_init_pf_num() in nbl_resource_leonis.c, and that
function calls the op itself:

	hw_ops->get_host_pf_mask(res_mgt->hw_ops_tbl->priv, &pf_mask);

That means nbl_chan_cfg_qinfo_map_table() is no longer the only consumer.
The same is still true at the end of the series, where the op is called
from both nbl_resource_leonis.c and nbl_channel.c.

The ordering claim does hold by the end of the series. In "net/nebula-matrix:
add common/ctrl dev init/remove operation", nbl_dev_init() calls
nbl_dev_setup_chan_qinfo() only under common->has_ctrl, and it does so
after nbl_res_init_leonis().

Could the "only consumer" wording be changed to list both callers?

> 
>  	void (*cfg_mailbox_qinfo)(struct nbl_hw_mgt *hw_mgt, u16 func_id,
>  				  u8 bus, u8 devid, u8 function);

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261010095939.2230-1-illusion.wang%40nebula-matrix.com

  reply	other threads:[~2026-10-11 10:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10  9:59 [PATCH v31 net-next 0/8] nbl driver for Nebulamatrix NICs illusion.wang
2026-10-10  9:59 ` [PATCH v31 net-next 1/8] net/nebula-matrix: add channel layer illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 2/8] net/nebula-matrix: add common resource implementation illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko [this message]
2026-10-10  9:59 ` [PATCH v31 net-next 3/8] net/nebula-matrix: add intr " illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 4/8] net/nebula-matrix: add chip-wide hardware init/deinit implementation illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 5/8] net/nebula-matrix: dispatch: add control-level routing core infrastructure illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 6/8] net/nebula-matrix: dispatch: implement channel RPC framework and serialize hardware ops illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 7/8] net/nebula-matrix: add common/ctrl dev init/remove operation illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko
2026-10-10  9:59 ` [PATCH v31 net-next 8/8] net/nebula-matrix: add common dev start/stop operation illusion.wang
2026-10-11 10:51   ` netdev-bot+sashiko

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=179171588171.434549.5839384783484912228@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=alvin.wang@nebula-matrix.com \
    --cc=dimon.zhao@nebula-matrix.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=illusion.wang@nebula-matrix.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sam.chen@nebula-matrix.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

all inboxes | Powered by JetHome®