[ipxe-devel] Fwd: [PATCH] iavf/intelxf restore initial queue count after use

Michael Brown mcb30 at ipxe.org
Wed Oct 14 12:54:31 UTC 2026


On 09/10/2026 17:20, Geert Stappers via ipxe-devel wrote:
> ----- Forwarded message -----
> Date: Fri, 9 Oct 2026 16:13:20 +0200 (CEST)
> From: L. Blote
> To: "ipxe-devel at lists.ipxe.org" <ipxe-devel at lists.ipxe.org>
> Cc: Stappers <stappers at stappers.it>
> Subject: [PATCH] iavf/intelxf restore initial queue count after use
>
 > <snip>>
> Therefore, this Patch proposes 3 changes to iPXE:
> 1) Move the Queue Request from intelxlvf_probe() to intelxlvf_open() to leave unused VF NICs unaffected. This causes the netdev to be registered with all queues still allocated. But since there will be no traffic until the device is open()ed, this should be safe.
> 2) Extend the intelxl struct and store the initially allocated queue count during device probe (see patched intelxlvf_admin_get_resources()) as intelxl->vinitial_queues. This might break binary compatibility, but in our tests even chainloading an unmodified iPXE ontop of our patched uEFI ROM/Driver works well. Since only the private device struct (netdev->priv) is modified,  a major incompatibility seems unlikely.
> 2.1) There is one additional guard block in the patched intelxlvf_admin_get_resources(): When the VM is killed/stopped during netboot without closing the device (see point 3 below), it will be downgraded to 1 queue forever. To recover from this condition, the MSI-X vector count is used as a fallback to determine the desired/maximum possible amount of allocateable queues.
> 3) During device close, (re-)allocate the queues. On a physical PC this would not be needed since the next power cycle or device driver initialization would restore the original state, but not on KVM+QEMU resp. with iavf.

NACK.

This is attempting to fix the kernel bug in the wrong place.  iPXE 
cannot possibly guarantee that it will be able to restore the queue 
count.  For example, the VM may be reset while iPXE is running and that 
VF may then be reassigned to a separate VM that never attempts an iPXE 
boot and so never runs any iPXE code.

The only sensible options for a fix are:

- the PF driver should reset the number of queues when the VF is reset, or

- the kernel VF drivers should request the number of queues that they 
want to use.

Please create a fix in the PF and/or VF kernel drivers instead.

Thanks,

Michael



More information about the ipxe-devel mailing list