From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00191d01.pphosted.com (mx0a-00191d01.pphosted.com [67.231.149.140]) by dpdk.org (Postfix) with ESMTP id D4E1D2C2A for ; Mon, 19 Jun 2017 15:37:59 +0200 (CEST) Received: from pps.filterd (m0053301.ppops.net [127.0.0.1]) by mx0a-00191d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id v5JDYmXr000755 for ; Mon, 19 Jun 2017 09:37:59 -0400 Received: from flpd657.enaf.ffdc.sbc.com (sbcsmtp9.sbc.com [144.160.128.153]) by mx0a-00191d01.pphosted.com with ESMTP id 2b6faggxn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jun 2017 09:37:58 -0400 Received: from enaf.ffdc.sbc.com (localhost [127.0.0.1]) by flpd657.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id v5JDbv5q044366 for ; Mon, 19 Jun 2017 06:37:58 -0700 Received: from flpi488.ffdc.sbc.com (flpi488.ffdc.sbc.com [130.4.162.182]) by flpd657.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id v5JDbpMt044234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 19 Jun 2017 06:37:51 -0700 Received: from tlpd252.dadc.sbc.com (tlpd252.dadc.sbc.com [135.31.184.157]) by flpi488.ffdc.sbc.com (RSA Interceptor) for ; Mon, 19 Jun 2017 13:37:37 GMT Received: from dadc.sbc.com (localhost [127.0.0.1]) by tlpd252.dadc.sbc.com (8.14.5/8.14.5) with ESMTP id v5JDbbaU002869 for ; Mon, 19 Jun 2017 08:37:37 -0500 Received: from SAUSMAILHUB.ad.tri.sbc.com (sausmailhub.ad.tri.sbc.com [144.60.55.228]) by tlpd252.dadc.sbc.com (8.14.5/8.14.5) with ESMTP id v5JDbXdH002757 for ; Mon, 19 Jun 2017 08:37:33 -0500 Received: from SAUSMAILMBX1.ad.tri.sbc.com ([144.60.55.229]) by SAUSMAILHUB.ad.tri.sbc.com ([144.60.55.228]) with mapi id 14.03.0351.000; Mon, 19 Jun 2017 08:37:33 -0500 From: "McCullough, Harrison" To: "users@dpdk.org" Thread-Topic: uio_pci_generic works but vfio-pci gives "Requested device xxx cannot be used" error Thread-Index: AdLpAKddj6DVAEpUQMGcwi5jifO/cw== Date: Mon, 19 Jun 2017 13:37:32 +0000 Message-ID: <942AD08E4186F644A54168E4F84117C9315624@SAUSMAILMBX1.ad.tri.sbc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [144.60.57.137] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-RSA-Inspected: yes X-RSA-Classifications: public X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-19_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706190229 Subject: [dpdk-users] uio_pci_generic works but vfio-pci gives "Requested device xxx cannot be used" error X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 13:38:00 -0000 I am new to the world of drivers and low-level I/O, but I'm trying to learn= how to use DPDK. I ran into this problem and was wondering if anybody has = seen it before or knows what is going on. I compiled the sample "hello world" application, and if I run it after bind= ing the uio_pci_generic driver to a couple of interfaces it works fine. How= ever, if I try running it after binding the vfio-pci driver to the same int= erfaces then I get this error: EAL: Error - exiting with code: 1 Cause: Requested device 0000:06:00.0 cannot be used This is a transcript of the commands I was running. I also included the out= put of lspci in case that helps. Thank you! transcript: $ ./tools/dpdk-devbind.py --status Network devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Network devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:05:00.0 '82576 Gigabit Network Connection' if=3Dp1p1 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic *Active* 0000:05:00.1 '82576 Gigabit Network Connection' if=3Dp1p2 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic=20 0000:06:00.0 '82576 Gigabit Network Connection' if=3Dp1p3 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic=20 0000:06:00.1 '82576 Gigabit Network Connection' if=3Dp1p4 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic=20 Other network devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Other crypto devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ sudo ./tools/dpdk-devbind.py --bind=3Dvfio-pci 06:00.0 $ sudo ./tools/dpdk-devbind.py --bind=3Dvfio-pci 06:00.1 $ ./tools/dpdk-devbind.py --status Network devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:06:00.0 '82576 Gigabit Network Connection' drv=3Dvfio-pci unused=3Duio= _pci_generic 0000:06:00.1 '82576 Gigabit Network Connection' drv=3Dvfio-pci unused=3Duio= _pci_generic Network devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:05:00.0 '82576 Gigabit Network Connection' if=3Dp1p1 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic *Active* 0000:05:00.1 '82576 Gigabit Network Connection' if=3Dp1p2 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic=20 Other network devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Other crypto devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ sudo ./examples/helloworld/build/helloworld -l 0-3 EAL: Detected 8 lcore(s) EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:05:00.0 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: PCI device 0000:05:00.1 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: PCI device 0000:06:00.0 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: 0000:06:00.0 failed to select IOMMU type EAL: Error - exiting with code: 1 Cause: Requested device 0000:06:00.0 cannot be used $ sudo ./tools/dpdk-devbind.py --bind=3Duio_pci_generic 06:00.0 $ sudo ./tools/dpdk-devbind.py --bind=3Duio_pci_generic 06:00.1 $ ./tools/dpdk-devbind.py --status Network devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:06:00.0 '82576 Gigabit Network Connection' drv=3Duio_pci_generic unuse= d=3Dvfio-pci 0000:06:00.1 '82576 Gigabit Network Connection' drv=3Duio_pci_generic unuse= d=3Dvfio-pci Network devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:05:00.0 '82576 Gigabit Network Connection' if=3Dp1p1 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic *Active* 0000:05:00.1 '82576 Gigabit Network Connection' if=3Dp1p2 drv=3Digb unused= =3Dvfio-pci,uio_pci_generic=20 Other network devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Crypto devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Other crypto devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ sudo ./examples/helloworld/build/helloworld -l 0-3 EAL: Detected 8 lcore(s) EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:05:00.0 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: PCI device 0000:05:00.1 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: PCI device 0000:06:00.0 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb EAL: PCI device 0000:06:00.1 on NUMA socket -1 EAL: probe driver: 8086:10e8 net_e1000_igb hello from core 1 hello from core 2 hello from core 3 hello from core 0 $ lspci 00:00.0 Host bridge: Intel Corporation 5500 I/O Hub to ESI Port (rev 13) 00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Roo= t Port 1 (rev 13) 00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Roo= t Port 3 (rev 13) 00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Roo= t Port 7 (rev 13) 00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System Management= Registers (rev 13) 00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and Scratch = Pad Registers (rev 13) 00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control Status an= d RAS Registers (rev 13) 00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #4 00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #5 00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI = Controller #2 00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #1 00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #2 00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #3 00:1d.3 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI C= ontroller #6 00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI = Controller #1 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90) 00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Contr= oller 00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA= IDE Controller #1 00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA= IDE Controller #2 02:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Exp= ress Fusion-MPT SAS (rev 08) 03:00.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI E= xpress Switch (rev 0e) 04:02.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI E= xpress Switch (rev 0e) 04:04.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI E= xpress Switch (rev 0e) 05:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connec= tion (rev 01) 05:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connec= tion (rev 01) 06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connec= tion (rev 01) 06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connec= tion (rev 01) 07:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200= eW WPCM450 (rev 0a) fe:00.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architec= ture Generic Non-Core Registers (rev 05) fe:00.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architec= ture System Address Decoder (rev 05) fe:02.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Link 0 (rev 05= ) fe:02.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Physical 0 (re= v 05) fe:02.4 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Link 1 (rev 05= ) fe:02.5 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Physical 1 (re= v 05) fe:03.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller (rev 05) fe:03.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Target Address Decoder (rev 05) fe:03.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller RAS Registers (rev 05) fe:03.4 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Test Registers (rev 05) fe:04.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 0 Control Registers (rev 05) fe:04.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 0 Address Registers (rev 05) fe:04.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 0 Rank Registers (rev 05) fe:04.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 0 Thermal Control Registers (rev 05) fe:05.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 1 Control Registers (rev 05) fe:05.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 1 Address Registers (rev 05) fe:05.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 1 Rank Registers (rev 05) fe:05.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 1 Thermal Control Registers (rev 05) fe:06.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 2 Control Registers (rev 05) fe:06.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 2 Address Registers (rev 05) fe:06.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 2 Rank Registers (rev 05) fe:06.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory = Controller Channel 2 Thermal Control Registers (rev 05) $ cat /proc/cmdline BOOT_IMAGE=3D/vmlinuz-4.2.0-42-generic root=3D/dev/mapper/mtznjrsv228--vg-r= oot ro default_hugepagesz=3D1G hugepagesz=3D1G hugepages=3D4 iommu=3Dpt int= el_iommu=3Don