参考https://blog.csdn.net/sinat_20184565/article/details/92700223
官方文档:
http://doc.dpdk.org/dts/test_plans/kni_test_plan.html
[root@localhost dpdk-19.11]# insmod ./build/kmod/rte_kni.ko kthread_mode=multiple insmod: ERROR: could not insert module ./build/kmod/rte_kni.ko: Invalid module format [root@localhost dpdk-19.11]# insmod ./build/build/kernel/linux/kni/rte_kni.ko kthread_mode=multiple insmod: ERROR: could not insert module ./build/build/kernel/linux/kni/rte_kni.ko: Invalid module format [root@localhost dpdk-19.11]# uname -a Linux localhost.localdomain 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost dpdk-19.11]# ls /usr/src/ debug kernels [root@localhost dpdk-19.11]# ls /usr/src/kernels/ 4.18.0-193.28.1.el7.aarch64 [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# yum install "kernel-devel-uname-r == $(uname -r)" Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.worria.com * extras: mirror.worria.com * updates: mirror.worria.com file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml" Trying other mirror. Resolving Dependencies --> Running transaction check ---> Package kernel-devel.aarch64 0:4.14.0-115.el7a.0.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================================================================ Installing: kernel-devel aarch64 4.14.0-115.el7a.0.1 cdrom 11 M Transaction Summary ================================================================================================================================================================================================================================================================ Install 1 Package Total download size: 11 M Installed size: 43 M Is this ok [y/d/N]: y Downloading packages: Error downloading packages: kernel-devel-4.14.0-115.el7a.0.1.aarch64: [Errno 256] No more mirrors to try. [root@localhost dpdk-19.11]#
挂载CentOS-7-aarch64-Everything-1810.iso
[root@localhost dpdk-19.11]# vi /etc/yum yum/ yum.conf yum.repos.d/ [root@localhost dpdk-19.11]# vi /etc/yum yum/ yum.conf yum.repos.d/ [root@localhost dpdk-19.11]# vi /etc/yum.repos.d/ cdrom.repo CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo [root@localhost dpdk-19.11]# vi /etc/yum.repos.d/cdrom.repo [cdrom] name=cdrom baseurl=file:///sr0 enabled=1 gpgcheck=0
[root@localhost dpdk-19.11]# yum install "kernel-devel-uname-r == $(uname -r)" Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.worria.com * extras: mirror.worria.com * updates: mirror.worria.com cdrom | 3.6 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package kernel-devel.aarch64 0:4.14.0-115.el7a.0.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================================================================ Installing: kernel-devel aarch64 4.14.0-115.el7a.0.1 cdrom 11 M Transaction Summary ================================================================================================================================================================================================================================================================ Install 1 Package Total download size: 11 M Installed size: 43 M Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kernel-devel-4.14.0-115.el7a.0.1.aarch64 1/1 Verifying : kernel-devel-4.14.0-115.el7a.0.1.aarch64 1/1 Installed: kernel-devel.aarch64 0:4.14.0-115.el7a.0.1 Complete! [root@localhost dpdk-19.11]#
安装成功
root@localhost dpdk-19.11]# ls /usr/src/kernels/ 4.14.0-115.el7a.0.1.aarch64 4.18.0-193.28.1.el7.aarch64 [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# ln -sf /usr/src/kernels/4.14.0-115.el7a.0.1.aarch64/ /lib/modules/4.14.0-115.el7a.0.1.aarch64/build [root@localhost dpdk-19.11]# ls /lib/modules/4.14.0-115.el7a.0.1.aarch64/ -al total 1772 drwxr-xr-x. 7 root root 4096 Jun 10 02:50 . drwxr-xr-x. 3 root root 41 Jun 9 23:17 .. lrwxrwxrwx. 1 root root 45 Jun 10 02:50 build -> /usr/src/kernels/4.18.0-193.28.1.el7.aarch64/ drwxr-xr-x. 2 root root 6 Nov 25 2018 extra drwxr-xr-x. 12 root root 132 Jun 9 23:17 kernel -rw-r--r--. 1 root root 490436 Jun 9 23:18 modules.alias -rw-r--r--. 1 root root 475434 Jun 9 23:18 modules.alias.bin -rw-r--r--. 1 root root 671 Nov 25 2018 modules.block -rw-r--r--. 1 root root 6516 Nov 25 2018 modules.builtin -rw-r--r--. 1 root root 8572 Jun 9 23:18 modules.builtin.bin -rw-r--r--. 1 root root 110565 Jun 9 23:18 modules.dep -rw-r--r--. 1 root root 168102 Jun 9 23:18 modules.dep.bin -rw-r--r--. 1 root root 288 Jun 9 23:18 modules.devname -rw-r--r--. 1 root root 113 Nov 25 2018 modules.drm -rw-r--r--. 1 root root 68 Nov 25 2018 modules.modesetting -rw-r--r--. 1 root root 1091 Nov 25 2018 modules.networking -rw-r--r--. 1 root root 52153 Nov 25 2018 modules.order -rw-r--r--. 1 root root 511 Jun 9 23:18 modules.softdep -rw-r--r--. 1 root root 208659 Jun 9 23:18 modules.symbols -rw-r--r--. 1 root root 248887 Jun 9 23:18 modules.symbols.bin lrwxrwxrwx. 1 root root 5 Jun 9 23:17 source -> build drwxr-xr-x. 2 root root 6 Nov 25 2018 updates drwxr-xr-x. 2 root root 21 Jun 9 23:17 vdso drwxr-xr-x. 2 root root 6 Jun 9 23:17 weak-updates [root@localhost dpdk-19.11]# rm /lib/modules/4.14.0-115.el7a.0.1.aarch64/build rm: remove symbolic link ‘/lib/modules/4.14.0-115.el7a.0.1.aarch64/build’? y [root@localhost dpdk-19.11]# ls /lib/modules/4.14.0-115.el7a.0.1.aarch64/ -al total 1772 drwxr-xr-x. 7 root root 4096 Jun 11 03:37 . drwxr-xr-x. 3 root root 41 Jun 9 23:17 .. drwxr-xr-x. 2 root root 6 Nov 25 2018 extra drwxr-xr-x. 12 root root 132 Jun 9 23:17 kernel -rw-r--r--. 1 root root 490436 Jun 9 23:18 modules.alias -rw-r--r--. 1 root root 475434 Jun 9 23:18 modules.alias.bin -rw-r--r--. 1 root root 671 Nov 25 2018 modules.block -rw-r--r--. 1 root root 6516 Nov 25 2018 modules.builtin -rw-r--r--. 1 root root 8572 Jun 9 23:18 modules.builtin.bin -rw-r--r--. 1 root root 110565 Jun 9 23:18 modules.dep -rw-r--r--. 1 root root 168102 Jun 9 23:18 modules.dep.bin -rw-r--r--. 1 root root 288 Jun 9 23:18 modules.devname -rw-r--r--. 1 root root 113 Nov 25 2018 modules.drm -rw-r--r--. 1 root root 68 Nov 25 2018 modules.modesetting -rw-r--r--. 1 root root 1091 Nov 25 2018 modules.networking -rw-r--r--. 1 root root 52153 Nov 25 2018 modules.order -rw-r--r--. 1 root root 511 Jun 9 23:18 modules.softdep -rw-r--r--. 1 root root 208659 Jun 9 23:18 modules.symbols -rw-r--r--. 1 root root 248887 Jun 9 23:18 modules.symbols.bin lrwxrwxrwx. 1 root root 5 Jun 9 23:17 source -> build drwxr-xr-x. 2 root root 6 Nov 25 2018 updates drwxr-xr-x. 2 root root 21 Jun 9 23:17 vdso drwxr-xr-x. 2 root root 6 Jun 9 23:17 weak-updates [root@localhost dpdk-19.11]# ln -sf /usr/src/kernels/4.14.0-115.el7a.0.1.aarch64/ /lib/modules/4.14.0-115.el7a.0.1.aarch64/build [root@localhost dpdk-19.11]# ls /lib/modules/4.14.0-115.el7a.0.1.aarch64/ -al total 1772 drwxr-xr-x. 7 root root 4096 Jun 11 03:38 . drwxr-xr-x. 3 root root 41 Jun 9 23:17 .. lrwxrwxrwx. 1 root root 45 Jun 11 03:38 build -> /usr/src/kernels/4.14.0-115.el7a.0.1.aarch64/ drwxr-xr-x. 2 root root 6 Nov 25 2018 extra drwxr-xr-x. 12 root root 132 Jun 9 23:17 kernel -rw-r--r--. 1 root root 490436 Jun 9 23:18 modules.alias -rw-r--r--. 1 root root 475434 Jun 9 23:18 modules.alias.bin -rw-r--r--. 1 root root 671 Nov 25 2018 modules.block -rw-r--r--. 1 root root 6516 Nov 25 2018 modules.builtin -rw-r--r--. 1 root root 8572 Jun 9 23:18 modules.builtin.bin -rw-r--r--. 1 root root 110565 Jun 9 23:18 modules.dep -rw-r--r--. 1 root root 168102 Jun 9 23:18 modules.dep.bin -rw-r--r--. 1 root root 288 Jun 9 23:18 modules.devname -rw-r--r--. 1 root root 113 Nov 25 2018 modules.drm -rw-r--r--. 1 root root 68 Nov 25 2018 modules.modesetting -rw-r--r--. 1 root root 1091 Nov 25 2018 modules.networking -rw-r--r--. 1 root root 52153 Nov 25 2018 modules.order -rw-r--r--. 1 root root 511 Jun 9 23:18 modules.softdep -rw-r--r--. 1 root root 208659 Jun 9 23:18 modules.symbols -rw-r--r--. 1 root root 248887 Jun 9 23:18 modules.symbols.bin lrwxrwxrwx. 1 root root 5 Jun 9 23:17 source -> build drwxr-xr-x. 2 root root 6 Nov 25 2018 updates drwxr-xr-x. 2 root root 21 Jun 9 23:17 vdso drwxr-xr-x. 2 root root 6 Jun 9 23:17 weak-updates [root@localhost dpdk-19.11]#
重新编译dpdk
[root@localhost dpdk-19.11]# export EXTRA_CFLAGS="-O0 -g" [root@localhost dpdk-19.11]# export RTE_TARGET=arm64-armv8a-linuxapp-gcc [root@localhost dpdk-19.11]# xport RTE_SDK=`pwd` -bash: xport: command not found [root@localhost dpdk-19.11]# export RTE_SDK=`pwd` [root@localhost dpdk-19.11]# make install T=$RTE_TARGET -j 128
make clean -j 128
make install T=$RTE_TARGET -j 128
[root@localhost dpdk-19.11]# find ./ -name rte_kni.ko ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/kni/rte_kni.ko ./arm64-armv8a-linuxapp-gcc/kmod/rte_kni.ko [root@localhost dpdk-19.11]# insmod ./arm64-armv8a-linuxapp-gcc/kmod/rte_kni.ko
[root@localhost dpdk-19.11]# rmmod rte_kni.ko [root@localhost dpdk-19.11]# insmod arm64-armv8a-linuxapp-gcc/kmod/rte_kni.ko kthread_mode=multiple [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# insmod ./arm64-armv8a-linuxapp-gcc/kmod/igb_uio.ko insmod: ERROR: could not insert module ./arm64-armv8a-linuxapp-gcc/kmod/igb_uio.ko: Unknown symbol in module [root@localhost dpdk-19.11]# insmod ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko insmod: ERROR: could not insert module ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko: Unknown symbol in module [root@localhost dpdk-19.11]# modinfo ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko filename: /root/dpdk-19.11/./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko author: Intel Corporation license: GPL description: UIO driver for Intel IGB PCI cards rhelversion: 7.6 srcversion: 26C63DAE2104091D5DE47C6 depends: uio name: igb_uio vermagic: 4.14.0-115.el7a.0.1.aarch64 SMP mod_unload modversions aarch64 parm: intr_mode:igb_uio interrupt mode (default=msix): msix Use MSIX interrupt msi Use MSI interrupt legacy Use Legacy interrupt (charp) parm: wc_activate:Activate support for write combining (WC) (default=0) 0 - disable other - enable (int)
原来igb uio依赖uio,uio没有加载
[root@localhost dpdk-19.11]# modprobe uio [root@localhost dpdk-19.11]# modinfo ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko filename: /root/dpdk-19.11/./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko author: Intel Corporation license: GPL description: UIO driver for Intel IGB PCI cards rhelversion: 7.6 srcversion: 26C63DAE2104091D5DE47C6 depends: uio name: igb_uio vermagic: 4.14.0-115.el7a.0.1.aarch64 SMP mod_unload modversions aarch64 parm: intr_mode:igb_uio interrupt mode (default=msix): msix Use MSIX interrupt msi Use MSI interrupt legacy Use Legacy interrupt (charp) parm: wc_activate:Activate support for write combining (WC) (default=0) 0 - disable other - enable (int) [root@localhost dpdk-19.11]# modinfo ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko filename: /root/dpdk-19.11/./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko author: Intel Corporation license: GPL description: UIO driver for Intel IGB PCI cards rhelversion: 7.6 srcversion: 26C63DAE2104091D5DE47C6 depends: uio name: igb_uio vermagic: 4.14.0-115.el7a.0.1.aarch64 SMP mod_unload modversions aarch64 parm: intr_mode:igb_uio interrupt mode (default=msix): msix Use MSIX interrupt msi Use MSI interrupt legacy Use Legacy interrupt (charp) parm: wc_activate:Activate support for write combining (WC) (default=0) 0 - disable other - enable (int) [root@localhost dpdk-19.11]# insmod ./arm64-armv8a-linuxapp-gcc/build/kernel/linux/igb_uio/igb_uio.ko [root@localhost dpdk-19.11]#
DPDK KNI内核模块
KNI内核可加载模块rte_kni为DPDK应用提供内核接口。
当rte_kni模块加载时,创建/dev/kni设备节点(rte_kni模块创建kni杂项设备,文件系统节点/dev/kni需要手动或者通过udev机制创建),藉此节点,DPDK KNI应用可控制和与内核rte_kni模块交互。
在内核模块rte_kni加载时,可指定一些可选的参数以控制其行为:
-
# modinfo rte_kni.ko
-
lo_mode: KNI loopback mode (default=lo_mode_none):
-
lo_mode_none Kernel loopback disabled
-
lo_mode_fifo Enable kernel loopback with fifo
-
lo_mode_fifo_skb Enable kernel loopback with fifo and skb buffer
-
-
kthread_mode: Kernel thread mode (default=single):
-
single Single kernel thread mode enabled.
-
multiple Multiple kernel thread mode enabled.
-
-
carrier: Default carrier state for KNI interface (default=off):
-
off Interfaces will be created with carrier state set to off.
-
on Interfaces will be created with carrier state set to on.
典型的情况是,在加载rte_kni模块时不指定任何参数,DPDK应用可由内核网络协议栈获取和向其发送报文。不指定任何参数,意味着仅创建一个内核线程处理所有的KNI虚拟设备在内核侧的报文接收,并且禁用回环模式,KNI接口的默认链路状态为关闭off。
# insmod kmod/rte_kni.ko
ports cores: e.g.: --config="(0,1,2),(1,3,4)" No kernel thread specified. --config="(0,1,2,21),(1,3,4,23)" One kernel thread in use. --config="(0,1,2,21,22),(1,3,4,23,25) Two kernel threads in use.
回环模式
以测试为目的,在加载rte_kni模块式可指定lo_mode参数:
# insmod kmod/rte_kni.ko lo_mode=lo_mode_fifo
lo_mode_fifo回环模式将在内核空间中操作FIFO环队列,由函数kni_fifo_get(kni->rx_q,...)和kni_fifo_put(kni->tx_q,...)实现从rx_q接收队列读取报文,再写入发送队列tx_q来实现回环操作。
# insmod kmod/rte_kni.ko lo_mode=lo_mode_fifo_skb
lo_mode_fifo_skb回环模式在以上lo_mode_fifo的基础之上,增加了sk_buff缓存的相关拷贝操作。具体包括将rx_q接收队列的数据拷贝到分配的接收skb缓存中。以及分配发送skb缓存,将之前由rx_q队列接收数据拷贝到发送skb缓存中,使用函数kni_net_tx(skb, dev)发送skb缓存数据。最终将数据报文拷贝到mbuf结构中,使用kni_fifo_put函数加入到tx_q发送队列。可见此回环测试模式,更加接近真实的使用场景。
如果没有指定lo_mode参数,回环模式将禁用。
内核线程模式
为了提供性能的灵活性,内核模块rte_kni在加载时刻指定kthread_mode参数。rte_kni模块支持两个选项:单内核线程模式和多内核线程模式。
如下,使能单内核线程模式:
# insmod kmod/rte_kni.ko kthread_mode=single
此模式为所有的KNI虚拟接口创建唯一的内核线程在内核侧接收数据。默认情况下,此内核线程不绑定在特定的核心上,但是,用户可在创建第一个KNI虚拟接口时通过指定结构体rte_kni_conf的core_id和force_bind成员参数,设置此线程的亲核性。
为达到更高性能,内核线程绑定的核心应当与应用中DPDK的核心在同一个socket上。
KNI内核模块也可配置成为每个DPDK应用创建的KNI虚拟接口启动一个单独的内核线程。以下,使能多内核线程模式:
# insmod kmod/rte_kni.ko kthread_mode=multiple
此模式为每个KNI虚拟接口创建一个单独的内核线程在内核侧接收数据。内核线程的亲核性通过每个KNI虚拟接口创建时的结构体rte_kni_conf成员core_id和force_bind变量参数指定。
如果系统中由足够的未使用核心,多内核线程模式可提供具有扩展性的高性能。
如果kthread_mode参数未指定,使用单内核线程模式。
默认链路状态
内核模块rte_kni创建的KNI虚拟接口的链路状态,可通过模块加装时的carrier选项控制。
如果指定了carrier=off,当接口管理使能时,内核模块将接口的链路状态设置为关闭。DPDK应用可通过函数rte_kni_update_link设置KNI虚拟接口的链路状态。这对于需要KNI虚拟接口状态与对应的物理接口实际状态一致的应用是有用的。
如果指定了carrier=on,当接口管理使能时,内核模块将自动设置接口的链路状态为启用。这对于仅将KNI接口作为纯虚拟接口,而不对应任何物理硬件;或者并不想通过rte_kni_update_link函数显示设置接口链路状态的DPDK应用是有用的。对于物理口为连接任何链路而进行的回环模式测试也是有用的。
以下,设置默认的链路状态为启用:
# insmod kmod/rte_kni.ko carrier=on
以下,设置默认的链路状态为关闭:
# insmod kmod/rte_kni.ko carrier=off
如果carrier参数没有指定,KNI虚拟接口的默认链路状态为关闭。
The following kernel module options are available in case if a loopback mode is required. kthread_mode=single/multiple – number of kernel threads lo_mode=lo_mode_fifo/lo_mode_fifo_skb – loopback mode
以下命令首先以多线程模式加载rte_kni内核模块。其次,kni应用指定两个接口(-p 0x3)启动;根据--config参数可知,接口0(0,4,6,8)使用核心4运行接收任务,核心6运行发送任务,并且创建一个KNI虚拟接口vEth0_0,启动一个内核处理线程绑定在核心8上。类似的接口1(0,5,7,9)使用核心5运行接收任务,核心7运行发送任务,并且创建一个KNI虚拟接口vEth1_0,启动一个内核处理线程绑定在核心9上。 # rmmod rte_kni # insmod kmod/rte_kni.ko kthread_mode=multiple # ./build/kni -l 4-7 -n 4 -- -P -p 0x3 -m --config="(0,4,6,8),(1,5,7,9)
#/bin/sh #setup path to DPDK export RTE_SDK=/home/dpdk export RTE_TARGET=x86_64-native-linuxapp-gcc #setup 512 huge pages mkdir -p /mnt/huge umount -t hugetlbfs nodev /mnt/huge mount -t hugetlbfs nodev /mnt/huge echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages #bind eth1 and eth2 to Linux generic UIO modprobe uio_pci_generic ${RTE_SDK}/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth1 ${RTE_SDK}/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth2 #insert KNI kernel driver insmod ${RTE_SDK}/${RTE_TARGET}/kmod/rte_kni.ko #start KNI sample application export LD_LIBRARY_PATH=${RTE_SDK}/${RTE_TARGET}/lib/ ${RTE_SDK}/examples/kni/build/kni -c 0x0f -n 4 -- -P -p 0x3 --config="(0,0,1),(1,2,3)"
[root@localhost dpdk-19.11]# export RTE_SDK=`pwd` [root@localhost dpdk-19.11]# export RTE_TARGET=arm64-armv8a-linuxapp-gcc [root@localhost dpdk-19.11]# make -C examples/kni -j 8 make: Entering directory `/data1/dpdk-19.11/examples/kni' CC main.o LD kni INSTALL-APP kni INSTALL-MAP kni.map make: Leaving directory `/data1/dpdk-19.11/examples/kni' [root@localhost dpdk-19.11]# ./examples/kni/build/app/kni -c 0xFFFFF -n 4 -- -P -p 0x3 --config="(0,0,1), (1,2,3)" EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No free hugepages reported in hugepages-524288kB EAL: No free hugepages reported in hugepages-524288kB EAL: No free hugepages reported in hugepages-524288kB EAL: No free hugepages reported in hugepages-524288kB EAL: No available hugepages reported in hugepages-524288kB EAL: No available hugepages reported in hugepages-2048kB EAL: FATAL: Cannot get hugepage information. EAL: Cannot get hugepage information. EAL: Error - exiting with code: 1 Cause: Could not initialise EAL (-1) [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# cat /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages 0 [root@localhost dpdk-19.11]# echo 256 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages [root@localhost dpdk-19.11]# cat /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages 256 [root@localhost dpdk-19.11]#
运行./usertools/dpdk-setup.sh
[root@localhost dpdk-19.11]# cat /sys/devices/system/node/*/hugepages/hugepages-524288kB/nr_hugepages 64 64 64 64 [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# ./examples/kni/build/app/kni -c 0xFFFFF -n 4 -- -P -p 0x3 --config="(0,0,1), (1,2,3)" EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available hugepages reported in hugepages-2048kB EAL: Probing VFIO support... EAL: PCI device 0000:05:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic EAL: PCI device 0000:06:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic EAL: PCI device 0000:7d:00.0 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.1 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 EAL: PCI device 0000:7d:00.2 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.3 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 EAL: Error - exiting with code: 1 Cause: No supported Ethernet device found [root@localhost dpdk-19.11]#
# ls -al /dev/kni crw------- 1 root root 10, 57 Sep 26 12:15 /dev/kni # cat /proc/misc 57 kni //minor number # dmidecode -t memory | grep Size