Content-Type: multipart/mixed; boundary="===============7827698055299544454==" MIME-Version: 1.0 From: Oza Oza Subject: Re: [SPDK] EAL: pci_map_resource(): cannot mmap(16, 0x1080004000, 0x4000, 0x0): Invalid argument (0xffffffffffffffff) Date: Sun, 02 Apr 2017 11:37:05 +0530 Message-ID: <0b6e34e40ea2638b0314dc109f03123c@mail.gmail.com> In-Reply-To: 29d4775a5648a19cc264c3866fcf51df@mail.gmail.com List-ID: To: spdk@lists.01.org --===============7827698055299544454== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi All, I am using SPDK and DPDK. I have single intel nvme SSD connected to x4 pci slot. Setup.sh runs fine, and able to unbind kernel driver okay. But when I run fio benchmark : as follows: fio --randrepeat=3D1 --ioengine=3D/home/oza/SPDK/spdk/examples/nvme/fio_plugin/fio_plugin --direct=3D1 --numjobs=3D1 --gtod_reduce=3D1 --name=3Dreadtest --filename=3D0000.01.00.00/1 --bs=3D4096=C2=A0=C2=A0 --iodepth=3D128 --size= =3D4G --readwrite=3Dread I get pci_map_resource failed. I have debugged this to an extent where: I figure that pci_map_resource trying to map msi-x memory and vfio is denying it. I see there is a call in pci_vfio_map_resource which asks for pci_vfio_get_msix_bar. But following log suggests that pci_vfio_map_resource is being called twice which is strange. On top of that, I am getting different value for msix_bar second time, which is causing the failure. So first time bar0 as msi-x which seems okay with respect to kernel vfio (msix-bar) But second time DPDK says msix_bar is 1, but kernel vfio still says it is 0, and denies to map msi-x memory to user space. EAL: Detected 8 lcore(s) EAL: Auto-detected process type: PRIMARY EAL: Probing VFIO support... EAL: VFIO support initialized EAL: cannot open /proc/self/numa_maps, consider that all memory is in socket_id 0 EAL: PCI device 0000:01:00.0 on NUMA socket 0 EAL:=C2=A0=C2=A0 probe driver: 8086:953 spdk_nvme EAL:=C2=A0=C2=A0 using IOMMU type 1 (Type 1) EAL: the msi-x bar number is 0 EAL: Hotplug doesn't support vfio yet EAL: PCI device 0000:01:00.0 on NUMA socket 0 EAL:=C2=A0=C2=A0 probe driver: 8086:953 spdk_nvme EAL: the msi-x bar number is 1 EAL: pci_map_resource(): cannot mmap(16, 0x1080004000, 0x4000, 0x0): Invalid argument (0xffffffffffffffff) EAL:=C2=A0=C2=A0 0000:01:00.0 mapping BAR0 failed: Invalid argument EAL: Error - exiting with code: 1 Regards, Oza. --===============7827698055299544454==--