public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dimon Zhao <dimon.zhao@nebula-matrix.com>
Cc: dev@dpdk.org, Kyo Liu <kyo.liu@nebula-matrix.com>,
	Leon Yu <leon.yu@nebula-matrix.com>,
	Sam Chen <sam.chen@nebula-matrix.com>
Subject: Re: [PATCH v2 1/1] net/nbl: add igb uio support for NBL VF devices
Date: Fri, 13 Feb 2026 11:59:43 -0800	[thread overview]
Message-ID: <20260213115943.6ae598f8@phoenix.local> (raw)
In-Reply-To: <20260213112130.49185-2-dimon.zhao@nebula-matrix.com>

On Fri, 13 Feb 2026 03:21:30 -0800
Dimon Zhao <dimon.zhao@nebula-matrix.com> wrote:

> Due to a chip design limitation, only the VF
> supports the igb_uio driver. The PF does not.
> 
> The igb_uio driver requires allocating interrupts and configuring the
> PCIe MSI-X table before the driver's probe function is called.
> This pre-probe configuration is only possible on the VF due to the
> hardware limitation; the PF can only configure the MSI-X table during
> its probe process.
> 
> Therefore, using igb_uio on the PF will fail.
> This commit clarifies this restriction.
> 
> Signed-off-by: Dimon Zhao <dimon.zhao@nebula-matrix.com>
> ---

This looks much better, but  AI still found some issues:


First, there are some correctness concerns:

In nbl_disp_chan_get_global_vector_req(), result.vector_id is copied to
the output regardless of whether send_msg succeeded. If the send fails,
the caller silently gets vector_id 0 which could be a valid ID. Please
guard the assignment with a check on ret.

In nbl_dev_common_start(), the return value of
get_msix_irq_enable_info() is stored in irq_enable_base and immediately
passed to rte_write32() without a NULL check. If it returns NULL,
that's a NULL pointer dereference.

Also in nbl_dev_common_start(), when enable_mailbox_irq fails in the
non-VFIO path, net_msix_mask_en remains true and irq_enable_base
remains set. The interrupt handler could use these in an inconsistent
state. The error path also doesn't undo
get_global_vector/get_msix_irq_enable_info for the igb_uio case, only
calling destroy_msix_map for VFIO.

In nbl_disp_get_global_vector(), ret is declared as u16 but the
function returns int. Negative error codes will be truncated to
unsigned, turning errors into positive values.

Some smaller items:

- NBL_PCOMPLETER_MSIX_NOTIRY_OFFSET has a typo — should be NOTIFY.
- The memcpy from a bitfield struct into a u32 in
nbl_phy_get_msix_irq_enable_info is fragile since bitfield layout is
compiler-dependent. Consider explicit shifts and masks.
- The u8* declarations in the header files should be u8 * per DPDK
style.
- Double space before NBL_DEVICE_ID_M18100_VF in two places.
- The is_vf assignment can be simplified to: common->is_vf =
(pci_dev->id.device_id == NBL_DEVICE_ID_M18100_VF);
- In nbl.rst, "not supported on both PF and VF" is ambiguous — suggest
"not supported on either PF or VF devices" instead.

I can send full long form of report if you want.
The AI review can have false positives. If so, let me know always
trying to fix the prompts to avoid them.

  reply	other threads:[~2026-02-13 19:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11  2:40 [PATCH v1 0/1] support igb uio driver for VF devices Dimon Zhao
2026-02-11  2:40 ` [PATCH v1 1/1] net/nbl: add igb_uio support for NBL " Dimon Zhao
2026-02-11 17:13   ` Stephen Hemminger
2026-02-13 14:54     ` 回复:[PATCH " Dimon
2026-02-13 11:21 ` [PATCH v2 0/1] support igb uio driver for " Dimon Zhao
2026-02-13 11:21   ` [PATCH v2 1/1] net/nbl: add igb uio support for NBL " Dimon Zhao
2026-02-13 19:59     ` Stephen Hemminger [this message]
2026-02-25  3:39 ` [PATCH v3 0/1] support igb uio driver for " Dimon Zhao
2026-02-25  3:39   ` [PATCH v3 1/1] net/nbl: add igb uio support for NBL " Dimon Zhao
2026-02-25 16:50     ` Stephen Hemminger
2026-02-27  1:45       ` 回复:[PATCH " Dimon
2026-02-26 20:14     ` [PATCH " Stephen Hemminger
2026-02-27  2:57 ` [PATCH v4 0/1] NBL add probe checks for unsupported UIO drivers Dimon Zhao
2026-02-27  2:57   ` [PATCH v4 1/1] net/nbl: " Dimon Zhao

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=20260213115943.6ae598f8@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=dimon.zhao@nebula-matrix.com \
    --cc=kyo.liu@nebula-matrix.com \
    --cc=leon.yu@nebula-matrix.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