DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>
Cc: David Marchand <david.marchand@redhat.com>
Subject: [dpdk-dev] cannot use virtio-user pmd in IOVA=PA mode anymore
Date: Fri, 24 Sep 2021 10:21:37 +0200	[thread overview]
Message-ID: <YU2KkXoPkZa2QrCe@platinum> (raw)

Hello,

I recently tested a use-case with our application using the main
branch of dpdk.org.

- the application runs inside a standard x86 VM (no IOMMU)
- there are emulated physical NICs inside the VM
- we use virtio-user pmds connected to tap interfaces through the
  vhost-net backend for exception path

This use-case works with the the stable 20.11 branch, but not with the
current main dpdk.org branch. The virtio-user driver refuses to start in
IOVA=PA mode:

  vdev_probe_all_drivers(): virtio_user0 requires VA IOVA mode but current mode is PA, not initializing
  EAL: Driver cannot attach the device (virtio_user0)

This is likely due to these commits:

  8d935fff5546 ("bus/vdev: add driver IOVA VA mode requirement")
  17043a2909bb ("net/virtio: force IOVA as VA mode for virtio-user")

We didn't see this problem before because we are only testing dpdk.org
main branch on physical machines that have an IOMMU.

I'm not sure to understand the reasons for which the ability to run a
virtio-user pmd in IOVA=PA mode was removed.

The commitlog of 17043a2909bb says:

  At least Vhost-user backend of Virtio-user PMD requires
  IOVA as VA mode. Until now, it was implemented as a hack
  by forcing to use mbuf's buf_addr field instead of buf_iova.

I don't get why vhost-user backend would require IOVA=VA. Note that we
also have a use-case where a virtio-user pmd is connected to our
pmd-vhost in another application, which was working with 20.11.

If there is a constraint with vhost-user backend, what about vhost-net
backend?

Would it make sense to re-allow this feature by somehow reverting
17043a2909bb with some additional cleanup?

I am aware that a solution can be to configure qemu to enable a vIOMMU,
but it is not my preferred solution yet, as it would impact our users
that do not do this currently.

Thanks!
Olivier

             reply	other threads:[~2021-09-24  8:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  8:21 Olivier Matz [this message]
2021-09-29  9:27 ` Maxime Coquelin

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=YU2KkXoPkZa2QrCe@platinum \
    --to=olivier.matz@6wind.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    /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).