Content-Type: multipart/mixed; boundary="===============8979121186739551378==" 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:40:20 +0530 Message-ID: <6b23b01b522cea1612b97c3a68bed69a@mail.gmail.com> In-Reply-To: 0b6e34e40ea2638b0314dc109f03123c@mail.gmail.com List-ID: To: spdk@lists.01.org --===============8979121186739551378== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable I have ported SPDK for ARMv8. And DPDK is compiled with version: 16.11.1 And with following config My config is: defconfig_arm64-armv8a-linuxapp-gcc #include "common_linuxapp" CONFIG_RTE_MACHINE=3D"armv8a" CONFIG_RTE_ARCH=3D"arm64" CONFIG_RTE_ARCH_ARM64=3Dy CONFIG_RTE_ARCH_64=3Dy CONFIG_RTE_FORCE_INTRINSICS=3Dy CONFIG_RTE_TOOLCHAIN=3D"gcc" CONFIG_RTE_TOOLCHAIN_GCC=3Dy CONFIG_RTE_EAL_IGB_UIO=3Dn CONFIG_RTE_LIBRTE_FM10K_PMD=3Dn CONFIG_RTE_SCHED_VECTOR=3Dn CONFIG_RTE_KNI_KMOD=3Dn EXTRA_CFLAGS=3D-fPIC -----Original Message----- From: Oza Oza [mailto:oza.oza(a)broadcom.com] Sent: Sunday, April 02, 2017 11:37 AM To: 'spdk(a)lists.01.org' Subject: RE: EAL: pci_map_resource(): cannot mmap(16, 0x1080004000, 0x4000, 0x0): Invalid argument (0xffffffffffffffff) 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. --===============8979121186739551378==--