[dpdk-users] Cannot bind to driver vfio-pci
RanjithKumar
ranjithdvk at gmail.com
Wed Sep 13 08:28:04 CEST 2017
Hello All,
I have installed DPDK 2.0 on a Virtual machine which launched by using
openstack. But I could not bind the NIC to DPDK. The below are steps which
I tried
*1. **dpdk_nic_bind.py –s*
ubuntu at mysite-vpgwu-slice1-25:~/dpdk-2.0.0/tools$ ./dpdk_nic_bind.py --s
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused=
0000:00:04.0 'Virtio network device' if= drv=virtio-pci unused=
0000:00:05.0 'Virtio network device' if= drv=virtio-pci unused=
0000:00:06.0 'Virtio network device' if= drv=virtio-pci unused=
0000:00:07.0 'Virtio network device' if= drv=virtio-pci unused=
Other network devices
=====================
<none>
*2. **./setup.sh ( for loading VFIO Module)*
----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[12] Insert IGB UIO module
[13] Insert VFIO module
[14] Insert KNI module
[15] Setup hugepage mappings for non-NUMA systems
[16] Setup hugepage mappings for NUMA systems
[17] Display current Ethernet device settings
[18] Bind Ethernet device to IGB UIO module
[19] Bind Ethernet device to VFIO module
[20] Setup VFIO permissions
----------------------------------------------------------
Step 3: Run test application for linuxapp environment
----------------------------------------------------------
[21] Run test application ($RTE_TARGET/app/test)
[22] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
----------------------------------------------------------
Step 4: Other tools
----------------------------------------------------------
[23] List hugepage info from /proc/meminfo
----------------------------------------------------------
Step 5: Uninstall and system cleanup
----------------------------------------------------------
[24] Uninstall all targets
[25] Unbind NICs from IGB UIO or VFIO driver
[26] Remove IGB UIO module
[27] Remove VFIO module
[28] Remove KNI module
[29] Remove hugepage mappings
[30] Exit Script
Option: 13
Unloading any existing VFIO module
Loading VFIO module
chmod /dev/vfio
OK
3. *./setup.sh ( for setting hugepage)*
----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[12] Insert IGB UIO module
[13] Insert VFIO module
[14] Insert KNI module
[15] Setup hugepage mappings for non-NUMA systems
[16] Setup hugepage mappings for NUMA systems
[17] Display current Ethernet device settings
[18] Bind Ethernet device to IGB UIO module
[19] Bind Ethernet device to VFIO module
[20] Setup VFIO permissions
----------------------------------------------------------
Step 3: Run test application for linuxapp environment
----------------------------------------------------------
[21] Run test application ($RTE_TARGET/app/test)
[22] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
----------------------------------------------------------
Step 4: Other tools
----------------------------------------------------------
[23] List hugepage info from /proc/meminfo
----------------------------------------------------------
Step 5: Uninstall and system cleanup
----------------------------------------------------------
[24] Uninstall all targets
[25] Unbind NICs from IGB UIO or VFIO driver
[26] Remove IGB UIO module
[27] Remove VFIO module
[28] Remove KNI module
[29] Remove hugepage mappings
[30] Exit Script
Option: 15
Removing currently reserved hugepages
Unmounting /mnt/huge and removing directory
Input the number of 2MB pages
Example: to have 128MB of hugepages available, enter '64' to
reserve 64 * 2MB pages
Number of pages: 64
Reserving hugepages
Creating /mnt/huge and mounting as hugetlbfs
*4. **dpdk_nic_bind.py –s*
ubuntu at mysite-vpgwu-slice1-25:~/dpdk-2.0.0/tools$ ./dpdk_nic_bind.py --s
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:04.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:05.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:06.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:07.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
Other network devices
=====================
<none>
*5. **binding a Virtual NIC to DPDK*
----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[12] Insert IGB UIO module
[13] Insert VFIO module
[14] Insert KNI module
[15] Setup hugepage mappings for non-NUMA systems
[16] Setup hugepage mappings for NUMA systems
[17] Display current Ethernet device settings
[18] Bind Ethernet device to IGB UIO module
[19] Bind Ethernet device to VFIO module
[20] Setup VFIO permissions
----------------------------------------------------------
Step 3: Run test application for linuxapp environment
----------------------------------------------------------
[21] Run test application ($RTE_TARGET/app/test)
[22] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
----------------------------------------------------------
Step 4: Other tools
----------------------------------------------------------
[23] List hugepage info from /proc/meminfo
----------------------------------------------------------
Step 5: Uninstall and system cleanup
----------------------------------------------------------
[24] Uninstall all targets
[25] Unbind NICs from IGB UIO or VFIO driver
[26] Remove IGB UIO module
[27] Remove VFIO module
[28] Remove KNI module
[29] Remove hugepage mappings
[30] Exit Script
Option: 19
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:04.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:05.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:06.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
0000:00:07.0 'Virtio network device' if= drv=virtio-pci unused=vfio-pci
Other network devices
=====================
<none>
Enter PCI address of device to bind to VFIO driver: 0000:00:03.0
Error: bind failed for 0000:00:03.0 - Cannot bind to driver vfio-pci
Error: unbind failed for 0000:00:03.0 - Cannot open
/sys/bus/pci/drivers//unbind
Any inputs to resolve this issue.
Regards,
Ranjith
More information about the users
mailing list