Re: 回复：[PATCH v1 0/8] Support VFIO cdev API in DPDK

Burakov, Anatoly
2025-10-29T12:04:11Z

On 10/29/2025 10:50 AM, Dimon wrote:
> Hello Anatoly,
>
> I tested this patch series and encountered the same error on both Intel
> E810 and Nebulamatrix NICs, as follows:
>
> I used GDB for tracing and debugging, and found that there might be a
> slight issue with the code of vfio_group_assign_device function? I won't
> insist.
>
> (1) vfio_device_create will alloc a vfio_device dev
>
> (2) vfio_group_setup_device_fd will set dev->fd
>
> (3) DEVICE_FOREACH_ACTIVE(cfg, idev) iterates through each idev->fd in
> cfg to check if it is the same as dev->fd, but at this point idev is
> actually dev.
>
>      So it will report the error "Device 0000:08:00.0 already assigned
> to this container".
>

Hi Dimon,

Thank you for testing it! You're correct, of course. I shall fix it in
v2, along with other planned fixes.

--
Thanks,
Anatoly