From: Nick Allen <nick@nickallen.org>
To: users@dpdk.org
Subject: [dpdk-users] Unable to Bind Device in VirtualBox VM
Date: Wed, 10 Feb 2016 08:45:20 -0500 [thread overview]
Message-ID: <CAHSJ8Nysnza1h9cBp77C8v71TUJM_NSWYc3bFAnvFSMa8DtiWw@mail.gmail.com> (raw)
Problem: I am unable to bind a virtual NIC using DPDK 2.2.0 that I
created inside of a Ubuntu 14.04 guest running in VirtualBox 5.0.14 on
OS X 10.11.3 on a 2015 Macbook Pro. Here is the error that I am
seeing.
$ ./tools/dpdk_nic_bind.py --bind=vfio-pci 00:11.0
Error: bind failed for 0000:00:11.0 - Cannot bind to driver vfio-pci
$ dmesg | tail -1
[ 413.613076] vfio-pci: probe of 0000:00:11.0 failed with error -22
Note: Based on my research, this is most often caused by not adding
'iommu=pt intel_iommu=on' to the kernel boot options. I believe that
this is not the problem in my case.
Background: I have been trying to follow the instructions provided at
http://plvision.eu/blog/deploying-intel-dpdk-in-oracle-virtualbox/.
First, I created the VM inside of VirtualBox and created two virtual
NICs that are bridged using the 'Intel PRO/1000 MT Server (82545EM)'.
I also turned on 'Promiscuous Mode: Allow All' for each.
I then ran the following and then manually installed Ubuntu 14.04.
VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.1 1
VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.2 1
After installing all of the dependencies, I ran the following commands
to build DPDK on the VM.
curl http://dpdk.org/browse/dpdk/snapshot/dpdk-2.2.0.tar.gz | tar -xvz
cd dpdk-2.2.0
export DPDK_DIR=`pwd`
sed 's/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/'
-i config/common_linuxapp
make install T=x86_64-ivshmem-linuxapp-gcc
cd x86_64-ivshmem-linuxapp-gcc
EXTRA_CFLAGS="-g -Ofast" make -j10
I appended the following to '/etc/default/grub'. I then ran
'update-grub2 && reboot'.
GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=16
iommu=pt intel_iommu=on"
After the reboot I can see that the options took effect.
$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.19.0-25-generic
root=/dev/mapper/dpdk1--vg-root ro default_hugepagesz=1G hugepagesz=1G
hugepages=16 iommu=pt intel_iommu=on
I then using the 'tools/setup.sh' script to do the following:
[18] Insert VFIO module
[20] Setup hugepage mappings for non-NUMA systems
[25] Setup VFIO permissions
[24] Bind Ethernet device to VFIO module
I am not able to bind the interface. I get the same result when I
manually run the commands instead of using the 'tools/setup.sh'
script.
root@dpdk1:/home/vagrant/dpdk-2.2.0# ./tools/dpdk_nic_bind.py --status
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:08.0 '82545EM Gigabit Ethernet Controller (Copper)'
if=eth0 drv=e1000 unused=vfio-pci *Active*
Other network devices
=====================
0000:00:11.0 '82545EM Gigabit Ethernet Controller (Copper)' unused=vfio-pci
root@dpdk1:/home/vagrant/dpdk-2.2.0# ./tools/dpdk_nic_bind.py
--bind=vfio-pci 00:11.0
Error: bind failed for 0000:00:11.0 - Cannot bind to driver vfio-pci
root@dpdk1:/home/vagrant/dpdk-2.2.0# dmesg | tail -1
[ 2084.997657] vfio-pci: probe of 0000:00:11.0 failed with error -22
What am I doing wrong here? What else can I dig into?
next reply other threads:[~2016-02-10 13:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 13:45 Nick Allen [this message]
2016-02-10 17:12 ` Stephen Hemminger
2016-02-10 17:15 ` Nick Allen
2016-02-10 17:17 ` Stephen Hemminger
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=CAHSJ8Nysnza1h9cBp77C8v71TUJM_NSWYc3bFAnvFSMa8DtiWw@mail.gmail.com \
--to=nick@nickallen.org \
--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).