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, andrew+netdev@lunn.ch, pabeni@redhat.com,
edumazet@google.com, horms@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v33 net-next 7/8] net/nebula-matrix: add common/ctrl dev init/remove operation
Date: Tue, 10 Nov 2026 14:51:47 +0000 [thread overview]
Message-ID: <179432230770.994134.2864379401996403810@kernel.org> (raw)
In-Reply-To: <20261106045631.2224-8-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 comment in nbl_dev_init_msix_cnt()
(drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dev.c) says the…
- [Low] nbl_dev_setup_common_dev() (nbl_dev.c) explains why VSI/ETH
identity is not fetched at init: "the control PF's responder may still…
- [Low] This patch adds the first caller of cfg_chan_qinfo_map_table
(nbl_dev_setup_chan_qinfo()) and puts the responder-teardown…
--
net/nebula-matrix: add common/ctrl dev init/remove operation
This commit adds nbl_dev.c with nbl_dev_init() and nbl_dev_remove(). These
set up the mailbox clean work and the mailbox channel queue. On the control
PF they also program the mailbox QINFO routing and run init_module. The new
entry points are called from nbl_core_init() and nbl_core_remove().
> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dev.c b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dev.c
> new file mode 100644
> index 0000000000000..01287c39a9655
> --- /dev/null
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dev.c
> @@ -0,0 +1,303 @@
[ ... ]
> +static void nbl_dev_init_msix_cnt(struct nbl_dev_mgt *dev_mgt)
> +{
> + struct nbl_dev_common *dev_common = dev_mgt->common_dev;
> + struct nbl_msix_info *msix_info = &dev_common->msix_info;
> +
> + /* Reserve one MSI-X vector for the mailbox. Nothing here
> + * allocates or requests it: vectors are allocated and the handler
> + * attached when the device is started, after probe, from this
> + * count.
> + */
[Severity: Low]
This isn't a bug, but is "after probe" accurate here?
nbl_dev_start() arrives later in the series, in "net/nebula-matrix: add
common dev start/stop operation". By the end of the series it is called
from inside nbl_probe():
nbl_probe() {
...
pci_set_master(pdev);
pci_set_drvdata(pdev, adapter);
err = nbl_core_start(adapter);
if (err) {
nbl_core_remove(adapter);
pci_clear_master(pdev);
}
return err;
}
So if start fails, the probe fails. The comment above
nbl_hw_clear_stale_status() in nbl_hw_leonis.c agrees: it says sibling
PFs' RPCs "time out in nbl_dev_start() and their probes fail".
The "after probe" wording is still there at the end of the series. Should
it say the vectors are allocated in the start path, during probe?
> + msix_info->serv_info[NBL_MSIX_MAILBOX_TYPE].num = 1;
> +}
> +
> +/* ---------- Channel config ---------- */
> +static void nbl_dev_setup_chan_qinfo(struct nbl_dev_mgt *dev_mgt, u8 chan_type)
> +{
[ ... ]
> + chan_ops->cfg_chan_qinfo_map_table(priv, common->hw_bus, common->devid);
> +}
[Severity: Low]
This isn't a bug, but this patch adds the first caller of
cfg_chan_qinfo_map_table, and that makes a few existing comments wrong.
All three are unchanged at the end of the series.
nbl_chan_cfg_qinfo_map_table() in nbl_channel.c still says:
* 0xfe/0xfc/0xf0. Nothing enforces that here: the resource layer
* that validates the mask, and every caller of this op, arrive in
* later patches of this series.
But nbl_res_init_pf_num() already rejects non-contiguous masks and any
pf_num outside {1, 2, 4}, and this patch adds the caller.
nbl_res_init_pf_num() in nbl_resource_leonis.c says:
* this running first: resource init completes before the channel
* layer is set up.
nbl_core_init() actually calls nbl_chan_init_common() before
nbl_res_init_leonis(). The dependency only holds because the QINFO
programming happens here in nbl_dev_init(), which runs after resource
init.
The kernel-doc for struct nbl_dispatch_ops in nbl_def_dispatch.h says the
teardown order "is documented with the code that performs it, in the next
patch in this series". This is that patch, and the text went into
nbl_disp_remove(), which does no teardown itself.
Could these three comments be updated? Could the "next patch in this
series" reference also be removed before the code is merged?
> +/* ---------- Dev init process ---------- */
> +static int nbl_dev_setup_common_dev(struct nbl_adapter *adapter)
> +{
[ ... ]
> + nbl_dev_register_chan_task(dev_mgt, NBL_CHAN_TYPE_MAILBOX,
> + &common_dev->clean_mbx_task);
> + /*
> + * VSI/ETH identity is deliberately not fetched here: it is only
> + * known to the control PF, so it has to come from a mailbox RPC,
> + * and the control PF's responder may still be probing while this
> + * function runs. The fetch is therefore left to the start path.
> + */
[Severity: Low]
Can the control PF's responder still be probing when a sibling PF reaches
this point?
nbl_probe() calls nbl_probe_chip_deps() before nbl_core_init(). For a
non-control PF, nbl_probe_chip_deps() holds func 0's device lock and
defers the probe:
nbl_probe_chip_deps() {
...
if (mgt->dev.driver != pdev->dev.driver ||
mgt->dev.links.status != DL_DEV_DRIVER_BOUND) {
device_unlock(&mgt->dev);
pci_dev_put(mgt);
return -EPROBE_DEFER;
}
...
}
driver_bound() only sets DL_DEV_DRIVER_BOUND after func 0's entire
->probe() has returned, and that includes nbl_dev_init() and init_module.
The header comment for nbl_dev_remove_ctrl_dev() in this same file says the
opposite:
* between. A sibling therefore cannot
* reach its mailbox setup before the control PF is fully probed, nor
The commit message of the last patch in the series says the same thing.
Should this comment give a different reason for deferring the fetch? It is
still present at the end of the series.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261106045631.2224-1-illusion.wang%40nebula-matrix.com
next prev parent reply other threads:[~2026-11-10 14:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 4:56 [PATCH v33 net-next 0/8] nbl driver for Nebulamatrix NICs illusion.wang
2026-11-06 4:56 ` [PATCH v33 net-next 1/8] net/nebula-matrix: add channel layer illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
2026-11-06 4:56 ` [PATCH v33 net-next 2/8] net/nebula-matrix: add common resource implementation illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
2026-11-06 4:56 ` [PATCH v33 net-next 3/8] net/nebula-matrix: add intr " illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
2026-11-06 4:56 ` [PATCH v33 net-next 4/8] net/nebula-matrix: add chip-wide hardware init/deinit implementation illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
2026-11-06 4:56 ` [PATCH v33 net-next 5/8] net/nebula-matrix: dispatch: add control-level routing core infrastructure illusion.wang
2026-11-06 4:56 ` [PATCH v33 net-next 6/8] net/nebula-matrix: dispatch: implement channel RPC framework and serialize hardware ops illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
2026-11-06 4:56 ` [PATCH v33 net-next 7/8] net/nebula-matrix: add common/ctrl dev init/remove operation illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko [this message]
2026-11-06 4:56 ` [PATCH v33 net-next 8/8] net/nebula-matrix: add common dev start/stop operation illusion.wang
2026-11-10 14:51 ` netdev-bot+sashiko
-- strict thread matches above, loose matches on Subject: below --
2026-11-02 7:54 [PATCH v33 net-next 0/8] nbl driver for Nebulamatrix NICs illusion.wang
2026-11-02 7:54 ` [PATCH v33 net-next 7/8] net/nebula-matrix: add common/ctrl dev init/remove operation illusion.wang
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=179432230770.994134.2864379401996403810@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alvin.wang@nebula-matrix.com \
--cc=andrew+netdev@lunn.ch \
--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=pabeni@redhat.com \
--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®