[dpdk-dev] [PATCH] vfio: don't silently drop VFIO support

Burakov, Anatoly anatoly.burakov at intel.com
Wed Apr 22 10:59:51 CEST 2015


Hi Stephen,

> > Hi Stephen,
> >
> > > The VFIO_PRESENT #define was a landmine and we hit it.
> > > The DPDK has a config system and it should be used rather than
> > > silently dropping a feature during build only to have it fail at run time.
> > >
> > > If VFIO is configured, and the kernel headers are not present the
> > > build should fail. Rather than leaving developers puzzling why the
> > > build system (with old kernel headers) produced non functioning DPDK
> > > and their system (with new kernel headers) produced correctly working
> DPDK.
> > >
> > > As a matter of policy, really no code should be looking at
> > > <linux/version.h> except for kernel drivers with compat files.
> >
> > In theory, I agree with you. In practice however, this change will
> unconditionally break builds on pre-VFIO kernels (<3.6).
> 
> If someone is building with an older kernel, then they should change the
> config.
> 

Well, it's not like this is immediately obvious to anyone building DPDK. With your patch, the "out-of-the-box" experience is no longer there, since one now has to figure out why it's not building, go edit config files, et al, which is easy for you and me, but may not be easy for someone dealing with DPDK for the first time.

I agree that both situations aren't ideal, it just seems to me that not building VFIO by default is better in that sense (EAL will show a warning message saying that VFIO isn't enabled, but the code will actually compile). Of course, the best of both worlds would be something like a configure script.

Thanks,
Anatoly


More information about the dev mailing list