DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Nagendra Prabhu A T <nagendraprabhu.a.t@gmail.com>
Cc: <anatoly.burakov@intel.com>, <sarosh.arif@emumba.com>, <dev@dpdk.org>
Subject: Re: unable to bind to vfio-pci
Date: Tue, 21 Feb 2023 14:45:23 +0000	[thread overview]
Message-ID: <Y/TZA9rFhufRop8U@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <CACG-zq-RZFN1Vh0oafSMzAt3+JXpyzBokPx7W=RYQQ_imtarCA@mail.gmail.com>

On Tue, Feb 21, 2023 at 08:05:20PM +0530, Nagendra Prabhu A T wrote:
>    Hi All,
>    I am trying to bind vfio-pci using dpdk-devbind.py, But i am seeing teh
>    following error :
>    root@nat-kvm:/usr/src/dpdk-22.11/usertools# dpdk-devbind.py
>    --bind=vfio-pci 0000:51:00.0 Error: bind failed for 0000:51:00.0 -
>    Cannot bind to driver vfio-pci: [Errno 22] Invalid argument
>    root@nat-kvm:/usr/src/dpdk-22.11/usertools#
>    I see that Sarosh has faced the same issue earlier. I saw the mail
>    thread and followed all the steps mentioned there. But it dint help.
>    Can you please help.

An error like that I would attribute to one of two possible likely causes.
[There may be other causes, but these two come to mind immediately].

1. No IOMMU available for use. In this case you need to enable no-iommu
   mode for VFIO and see if that works.
2. You have other ports on the same card bound to a kernel driver. You
   cannot use one port bound to the kernel (and therefore using IOMMU
   mappings for the kernel), while another port on the same card is bound
   to userspace vfio (and therefore looking for userspace IOMMU mappings).
   If this is the case, you need to unbind the other port from the kernel,
   and leave it unbound or else also bound to vfio. It's possible that
   no-iommu mode may help here too, but I have never tested that.

Regards,
/Bruce

  reply	other threads:[~2023-02-21 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 14:35 Nagendra Prabhu A T
2023-02-21 14:45 ` Bruce Richardson [this message]
2023-02-21 16:00   ` Nagendra Prabhu A T
2023-02-21 16:06     ` Bruce Richardson
2023-02-21 16:16       ` Nagendra Prabhu A T
2023-02-21 16:27         ` Bruce Richardson
2023-02-21 17:03           ` Stephen Hemminger
2023-02-21 17:27           ` Nagendra Prabhu A T

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=Y/TZA9rFhufRop8U@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=nagendraprabhu.a.t@gmail.com \
    --cc=sarosh.arif@emumba.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).