> -----Original Message----- > From: Yigit, Ferruh <ferruh.yi...@intel.com> > Sent: Wednesday, September 22, 2021 5:27 PM > To: Xia, Chenbo <chenbo....@intel.com>; Burakov, Anatoly > <anatoly.bura...@intel.com>; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent > > On 9/22/2021 4:30 AM, Xia, Chenbo wrote: > > Hi Anatoly, > > > >> -----Original Message----- > >> From: dev <dev-boun...@dpdk.org> On Behalf Of Anatoly Burakov > >> Sent: Thursday, September 16, 2021 6:37 PM > >> To: dev@dpdk.org > >> Subject: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent > >> > >> Currently, when VFIO support is not compiled, FreeBSD and Linux have > >> different return values. Fix Linux implementation to follow FreeBSD one. > >> > >> Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com> > >> --- > >> > >> Notes: > >> Current minimum support Linux kernel is 4.4, and Meson build file sets > the > > > > Do you mean currently DPDK support linux >= 4.4? I am not aware of this, > could you > > show me where it is defined? > > > > https://git.dpdk.org/dpdk/tree/doc/guides/linux_gsg/sys_reqs.rst?h=v21.08#n124 > > Commit d2feae68bf30 ("doc: update minimum supported Linux kernel")
Thanks Ferruh! About removing the fallback or not, if we decide to remove, maybe for other files that check linux kernel version, we also need to change some check because we are assuming kernel version >= 4.4 here. If that's a strong requirement, I'll vote for yes... /Chenbo > > > And do we need backport? As 'return -1' does not align with the API doxygen. > > > > Thanks, > > Chenbo > > > >> RTE_EAL_VFIO config option to `true` simply because we are compiling > for > >> Linux. > >> So, it looks like VFIO support is pretty much assumed on Linux, so i > think > >> we > >> can safely drop the fallback dummy implementation from Linux > >> altogether? > >> > >> lib/eal/linux/eal_vfio.c | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c > >> index 25add2fa5d..b9e4d3ad3c 100644 > >> --- a/lib/eal/linux/eal_vfio.c > >> +++ b/lib/eal/linux/eal_vfio.c > >> @@ -2111,19 +2111,19 @@ rte_vfio_enable(__rte_unused const char *modname) > >> int > >> rte_vfio_is_enabled(__rte_unused const char *modname) > >> { > >> - return -1; > >> + return 0; > >> } > >> > >> int > >> rte_vfio_noiommu_is_enabled(void) > >> { > >> - return -1; > >> + return 0; > >> } > >> > >> int > >> rte_vfio_clear_group(__rte_unused int vfio_group_fd) > >> { > >> - return -1; > >> + return 0; > >> } > >> > >> int > >> -- > >> 2.25.1 > >