[dpdk-dev] [PATCH v2 07/16] Add support for VFIO interrupts, add VFIO header

Burakov, Anatoly anatoly.burakov at intel.com
Tue May 27 16:40:04 CEST 2014


Hi Thomas,

> 2014-05-27 14:29, Burakov, Anatoly:
> > > > I don't know if there is something defined in a Linux header which
> > > > could help to check if VFIO is supported. But in general, it's
> > > > better to check for a macro belonging to the feature instead of checking
> kernel version.
> > >
> > > Not sure VFIO defines any macros anywhere, but I'll look into it, thanks.
> >
> > There probably isn't. At least I don't see anything in commit log. So
> > unless there's a way to get config options from kernel at compile-time
> > in userspace code, I don't think we can do anything else than kernel
> > version check.
> 
> Isn't it sufficient to check VFIO_API_VERSION?

I believe you have to #include <linux/vfio.h> before you can get that macro. The header file isn't present on kernels earlier than 3.6.

Best regards,
Anatoly Burakov
DPDK SW Engineer





More information about the dev mailing list