Hello!
I am working for quite a long time on running dpdk-testpmd on Ten64. As far the “best” results I got after:
→ Installing Ubuntu 22.04 using baremetal-deploy ubuntu-kinetic
→ Compiling restool tag LSDK-20.04
→ Using dynamic_dpl.sh from nxp’s dpdk tag LSDK-20.04
→ Modprobing vfio_iommu_type1 and vfio_fsl_mc
→ Using DPDK from apt as well as compiled one (LSDK-20.04)
After that I still have these results (the result is the same for apt’s DPDK and compiled from LSDK):
root@ten64:~# DPRC=dprc.2 dpdk-testpmd -- -i --portmask=1
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
fslmc: Skipping invalid device (power)
EAL: Selected IOVA mode 'PA'
EAL: No available 2048 kB hugepages reported
EAL: No available 32768 kB hugepages reported
EAL: No available 64 kB hugepages reported
EAL: VFIO support initialized
fslmc: Error mapping region (errno = 22)
fslmc: Unable to map MC Portal
fslmc: Unable to setup devices -1
testpmd: No probed ethernet devices
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=203456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Done
testpmd>
I think there should not be these lines (errno 22 is EINVAL):
fslmc: Error mapping region (errno = 22)
fslmc: Unable to map MC Portal
fslmc: Unable to setup devices -1
testpmd: No probed ethernet devices
Some more details below.
How did I compile restool:
git clone -bLSDK-20.04 -- https://github.com/nxp-qoriq/restool.git
cd -- restool
git config -- user.name user
git config -- user.email user@host
git cherry-pick -- 802764f8ed76f927dff494558332b0b77de7ac65
make -j8 -- CFLAGS='-std=gnu99 -Icommon'
sudo -- make -- install
How did I compile DPDK:
git clone -bLSDK-20.04 -- https://github.com/nxp-qoriq/dpdk.git
cd -- dpdk
CC=gcc-9 meson -Denable_kmods=false --prefix="$PWD/install" -- arm64-build
ninja -j8 -Carm64-build -- install
What is the /proc/cmdline
:
default_hugepagesz=1024m hugepagesz=1024m hugepages=8 isolcpus=1-7 iommu.passthrough=1
What is the /proc/version
:
Linux version 5.19.0-46-generic (buildd@bos02-arm64-080) (aarch64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0, GNU ld (GNU Binutils for Ubuntu) 2.39) #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 13:33:58 UTC 2023
How did I dynamic_dpl.py
:
sudo -- env -- DPIO_COUNT=8 \
bash -- /home/ubuntu/dpdk/nxp/dpaa2/dynamic_dpl.sh dpmac.1
# It went without errors/warnings.
# Without DPIO_COUNT it complains "No resources".
I strace’d the source of the error to mmap
:
[pid 1947] openat(AT_FDCWD, "/dev/vfio/vfio", O_RDWR) = 42
[pid 1947] ioctl(42, VFIO_GET_API_VERSION, 0) = 0
[pid 1947] ioctl(42, VFIO_CHECK_EXTENSION, 0x1) = 1
[pid 1947] ioctl(42, VFIO_CHECK_EXTENSION, 0x7) = 0
[pid 1947] ioctl(42, VFIO_CHECK_EXTENSION, 0x8) = 0
[pid 1947] openat(AT_FDCWD, "/dev/vfio/4", O_RDWR) = 44
[pid 1947] ioctl(44, VFIO_GROUP_GET_STATUS, 0xffffc2504358) = 0
[pid 1947] ioctl(44, VFIO_GROUP_SET_CONTAINER, 0xffffa3490238) = -1 EINVAL (Invalid argument)
[pid 1947] openat(AT_FDCWD, "/dev/vfio/vfio", O_RDWR) = 45
[pid 1947] ioctl(45, VFIO_GET_API_VERSION, 0) = 0
[pid 1947] ioctl(45, VFIO_CHECK_EXTENSION, 0x1) = 1
[pid 1947] ioctl(45, VFIO_CHECK_EXTENSION, 0x7) = 0
[pid 1947] ioctl(45, VFIO_CHECK_EXTENSION, 0x8) = 0
[pid 1947] ioctl(45, VFIO_CHECK_EXTENSION, 0x1) = 1
[pid 1947] ioctl(44, VFIO_GROUP_SET_CONTAINER, 0xffffc2504340) = 0
[pid 1947] ioctl(45, VFIO_SET_IOMMU, 0x1) = 0
[pid 1947] ioctl(44, VFIO_GROUP_GET_DEVICE_FD, 0xaaab24c53310) = 46
[pid 1947] ioctl(45, VFIO_DEVICE_PCI_HOT_RESET or VFIO_IOMMU_MAP_DMA, 0xffffc25041f8) = 0
[pid 1947] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 46, 0x6030000) = -1 EINVAL (Invalid argument)
[pid 1947] readlinkat(AT_FDCWD, "/sys/bus/fsl-mc/devices/dpmcp.30/iommu_group", "../../../../../../../kernel/iomm"..., 4096) = 42
[pid 1947] openat(AT_FDCWD, "/dev/vfio/vfio", O_RDWR) = 47
[pid 1947] ioctl(47, VFIO_GET_API_VERSION, 0) = 0
[pid 1947] ioctl(47, VFIO_CHECK_EXTENSION, 0x1) = 1
[pid 1947] ioctl(47, VFIO_CHECK_EXTENSION, 0x7) = 0
[pid 1947] ioctl(47, VFIO_CHECK_EXTENSION, 0x8) = 0
[pid 1947] ioctl(44, VFIO_GROUP_GET_STATUS, 0xffffc25042a0) = 0
[pid 1947] ioctl(44, VFIO_GROUP_GET_DEVICE_FD, 0xaaab24b075e0) = 48
[pid 1947] ioctl(48, VFIO_DEVICE_GET_INFO, 0xffffc2504340) = 0
[pid 1947] ioctl(48, VFIO_DEVICE_GET_REGION_INFO, 0xffffc2504358) = 0
[pid 1947] mmap(NULL, 64, PROT_READ|PROT_WRITE, MAP_SHARED, 48, 0) = -1 EINVAL (Invalid argument)
[pid 1947] close(48) = 0
[pid 1947] write(2, "fslmc: Error mapping region (err"..., 41fslmc: Error mapping region (errno = 22)
I am a little bit tired of doing this, please support me
Regards