[dpdk-dev] [PATCH] vfio: make container open error non-fatal

Burakov, Anatoly anatoly.burakov at intel.com
Tue Jun 17 10:56:02 CEST 2014


Hi Bruce,

> Hi Bruce,
> 
> > The below patch is the quickest fix I found to make my applications
> > work again, but I'm not sure it's the best solution. Can anyone else
> > offer other suggestions to improve this?
> 
> Are you running things as root? If not, I suggest to try and use the setup.sh
> script to correct permissions on the VFIO container and see if it works.
> 
> The inability of opening a container is likely a problem with permissions on
> the container, and thus should be considered fatal as far as VFIO is
> concerned. However, given that we try to use VFIO unconditionally, I think
> your suggestion is a good solution to the problem, however I would also
> close the group fd's that were already opened before returning 1.

On a second thought, I think this may be better solved by checking access() on the container. Right now I think PCI init checks for access on /dev/vfio (the VFIO dir) but not /dev/vfio/vfio (the container). I will prepare a patch shortly, so I would appreciate if you self-NAKed yours :-)

Best regards,
Anatoly Burakov
DPDK SW Engineer





More information about the dev mailing list