On Fri, 13 Feb 2026 03:21:30 -0800
Dimon Zhao <[email protected]> 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 <[email protected]>
> ---

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 via email to