Re: 回复:[PATCH v2 07/19] net/nbl: do not use VFIO group bind API

Burakov, Anatoly anatoly.burakov at intel.com
Tue Nov 18 11:39:53 CET 2025


On 11/15/2025 9:31 AM, Dimon wrote:
> Hi Anatoly,
> 
> I feel there might be a point that needs attention.
> 
> The old rte_vfio_get_group_num function returns <= 0 to indicate failure,
> while the new rte_vfio_get_group_num function returns < 0 to indicate 
> failure.
> Therefore, all DPDK code that checks the return value of the 
> rte_vfio_get_group_num function should be modified.
> 
> For example, in the nbl net driver, there is the following code:
> ret = rte_vfio_get_group_num(pathname, dev_name, &common->iommu_group_num);
> if (ret <= 0) {
>      NBL_LOG(ERR, "nbl vfio group number failed");
>      return -1;
> }
> 
> It should be modified to:
> ret = rte_vfio_get_group_num(pathname, dev_name, &common->iommu_group_num);
> if (ret < 0) {
>      NBL_LOG(ERR, "nbl vfio group number failed");
>      return -1;
> }
> 

Hi,

Thanks for the review. You're right, I should be more careful with 
return values from this API, will be fixed in v3.

-- 
Thanks,
Anatoly


More information about the dev mailing list