DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: amit sehas <cun23@yahoo.com>, maxime.coquelin@redhat.com
Cc: users@dpdk.org
Subject: Re: [dpdk-users] rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD
Date: Fri, 3 Aug 2018 14:24:20 -0700	[thread overview]
Message-ID: <20180803142420.1198b64b@xeon-e3> (raw)
In-Reply-To: <1685797689.496737.1533140869394@mail.yahoo.com>

On Wed, 1 Aug 2018 16:27:49 +0000 (UTC)
amit sehas <cun23@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.

  reply	other threads:[~2018-08-03 21:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1685797689.496737.1533140869394.ref@mail.yahoo.com>
2018-08-01 16:27 ` amit sehas
2018-08-03 21:24   ` Stephen Hemminger [this message]
2018-08-03 22:20     ` amit sehas
2018-08-05 14:35       ` amit sehas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180803142420.1198b64b@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=cun23@yahoo.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).