DPDK 运行 testpmd 失败。 EAL:no 探测到以太网设备

DPDK run testpmd failed. EAL:no probed ethernet device

我是 dpdk 的新手,在 docker 上使用 dpdk-stable-17.11.2。 OS 是 Ubuntu 14.04,内核是 3.19.0-80-generic。 我按照下面的 dpdk-setup.sh 将 igb_uio 驱动程序绑定到我的设备。

[14] x86_64-native-linuxapp-gcc
[17] Insert IGB UIO module
[18] Insert VFIO module
[19] Insert KNI module
[20] Setup hugepage mappings for non-NUMA systems
[21] Setup hugepage mappings for NUMA systems
[22] Display current Ethernet/Crypto device settings
[23] Bind Ethernet/Crypto device to IGB UIO module
[24] Bind Ethernet/Crypto device to VFIO module
[25] Setup VFIO permissions

Network devices using DPDK-compatible driver
============================================
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci

Network devices using kernel driver
===================================
0000:03:00.0 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' if=eth1 drv=bnx2x unused=igb_uio,vfio-pci *Active*
0000:04:00.0 'NetXtreme BCM5751 Gigabit Ethernet PCI Express 1677' if=eth0 drv=tg3 unused=igb_uio,vfio-pci *Active*
0000:07:00.0 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth3 drv=netxen_nic unused=igb_uio,vfio-pci
0000:07:00.1 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth4 drv=netxen_nic unused=igb_uio,vfio-pci

我在 运行 testpmd 时遇到错误。

EAL: Detected 32 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No probed ethernet devices
PANIC in main():
Empty set of forwarding logical cores - check the core mask supplied in the command parameters
5: [x86_64-native-linuxapp-gcc/app/testpmd() [0x46504f]]
4: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe9117c9f45]]
3: [x86_64-native-linuxapp-gcc/app/testpmd(main+0x8fb) [0x460aab]]
2: [x86_64-native-linuxapp-gcc/app/testpmd(__rte_panic+0xb8) [0x458a7a]]
1: [x86_64-native-linuxapp-gcc/app/testpmd(rte_dump_stack+0x1a) [0x4ea2aa]]

我错过了什么?

0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci [...] EAL: No probed ethernet devices

BCM57810似乎不受当前版本的Broadcom PMD支持: https://dpdk.org/doc/guides/nics/bnxt.html

作为解决方法,您可以尝试使用受支持的 NIC(如果可能)或虚拟设备(可能要慢得多)。

PANIC in main(): Empty set of forwarding logical cores - check the core mask supplied in the command parameters

您没有列出您的命令行选项,但您绝对应该检查它的 lcore 掩码或核心列表或核心映射。以下是 EAL 命令行选项列表: https://dpdk.org/doc/guides/testpmd_app_ug/run_app.html

我在 $RTE_SDK/config/common_base.

中将 CONFIG_RTE_LIBRTE_BNX2X_PMD=n 更改为 CONFIG_RTE_LIBRTE_BNX2X_PMD=y

0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci [...] EAL: No probed ethernet devices

此错误已解决。