[dpdk-users] rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD

amit sehas cun23 at yahoo.com
Sat Aug 4 00:20:12 CEST 2018


I tried my best to make iopl work but couldnt, i wrote a small 'c' program that does only iopl()  and even that does not work, neither on the host machine nor on the VM in docker ... i am wondering if this has anything to do with bios settings ...i tried it on different machines too ... root permissions, explicity setting capset ... etc .. i tried them all but still does not work ... quite frustrating how many hours i had to spent trying different things...

thanks
 

    On Friday, August 3, 2018, 2:24:28 PM PDT, Stephen Hemminger <stephen at networkplumber.org> wrote:  
 
 On Wed, 1 Aug 2018 16:27:49 +0000 (UTC)
amit sehas <cun23 at yahoo.com> wrote:

> I am trying to run a dpdk application in docker and i get the above error ... the docker instance was run as below:
> 
> docker run -dit --name <name> -v /hostlibpath:/contlibpath:ro fedora:26 bash
> 
> i am new to dpdk, as a result i am quite lost as to where to look ...
> 
> thanks

Short answer virtio requires DPDK process to be run as root.

In order for the virtio device to signal the underlying host it may need the in/out instructions.
These CPU instructions are normally privileged (only allowed in kernel) but on Linux there is
is a system call to allow a process with root (really CAP_SYS_RAWIO) to do these from userspace.
See iopl manual page.

The actual answer is more complex. Older versions of virtio (legacy) use in/out but the
current version (modern) can use memory read/write.  Ideally, the DPDK virtio would only
ask for IOPL privilege if it needed it. The problem is that may need it during the negotiation
process. Someone should look into fixing this.
  


More information about the users mailing list