> -----Original Message-----
> From: Burakov, Anatoly <anatoly.bura...@intel.com>
> Sent: Thursday, October 28, 2021 6:30 PM
> To: Xia, Chenbo <chenbo....@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent
> 
> Hi Chenbo,
> 
> > And do we need backport? As 'return -1' does not align with the API doxygen.
> >
> > Thanks,
> > Chenbo
> >
> Maybe it's the FreeBSD implementation that needs to be adjusted then,
> because none of those functions are valid on FreeBSD, and the
> documentation for VFIO functions explicitly mentions that on FreeBSD,
> they should return an error. I went with adjusting Linux implementation
> to minimize the amount of changes we have to make (and only change code
> path that no one uses in the first place), but maybe that was a wrong
> decision.
> 
> I'm not sure if changing the API return value to match what was
> documented counts as an API change, so maybe backport to stable is not
> advised here.

It's not a API change. My point is whether VFIO is present, users just use
the API to check if vfio support is there. In a kernel version that does not
support VFIO, he uses 'if(rte_vfio_is_enabled(XXX))' to check as the doxygen
says its return value should be 1 as true or 0 as false. He will get true (-1)
but VFIO is not there. That's why I think it's a bug and should be backported.

But I think we can first discuss if we should drop the dummy implementation
as DPDK requires Linux kernel version >= 4.4 now so VFIO is always present.
I think it depends on by saying 'DPDK requires kernel version >= 4.4'. It's
a real _requirement_ or only a recommendation? 

Ferruh, David & Thomas, What do you think?

Thanks,
Chenbo

> 
> --
> Thanks,
> Anatoly

Reply via email to