使用DPDK应用程序时,rte_eth_dev_count始终返回0

时间:2017-02-08 07:02:00

标签: linux sockets ethernet nic dpdk

我已将NIC卡配置如下: -

[root@localhost ethtool]# ../../tools/dpdk-devbind.py -s


Network devices using DPDK-compatible driver
============================================
0000:81:00.0 'NetXtreme BCM5722 Gigabit Ethernet PCI Express' drv=igb_uio unused=tg3

Network devices using kernel driver
===================================
0000:02:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=ens513f0 drv=ixgbe unused=igb_uio
0000:02:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=ens513f1 drv=ixgbe unused=igb_uio
0000:04:00.0 'I350 Gigabit Network Connection' if=enp4s0f0 drv=igb unused=igb_uio
0000:04:00.3 'I350 Gigabit Network Connection' if=enp4s0f3 drv=igb unused=igb_uio

Other network devices
=====================
<none>

Crypto devices using DPDK-compatible driver
===========================================
<none>

Crypto devices using kernel driver
==================================
0000:84:00.0 'DH895XCC Series QAT' drv=dh895xcc unused=qat_dh895xcc,igb_uio

Other crypto devices
====================
<none>

当我运行ethtool示例应用程序时,它将错误显示为0个NIC端口,如下所示: -

[root@localhost ethtool]# ./ethtool-app/ethtool-app/x86_64-native-    EAL: Detected 47 lcore(s)
EAL: Probing VFIO support...
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.3 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
Number of NICs: 0
EAL: Error - exiting with code: 1
Cause: No available NIC ports!

如果端口配置错误或其他原因,有人可以帮助我配置端口。

2 个答案:

答案 0 :(得分:0)

上述错误即将发生,因为不支持以下驱动程序: - 0000:81:00.0'NetXtreme BCM5722千兆以太网PCI Express'drv = igb_uio unused = tg3

所以Binding DPDK与支持的驱动程序解决了这个问题。

答案 1 :(得分:0)

dpdk-devbind.py工具在这里可能有点误导。并非所有使用DPDK兼容驱动程序的设备都支持DPDK。

以下是DPDK中支持的Broadcom网卡列表:

http://dpdk.org/doc/guides/nics/bnxt.html

看起来BCM5722不存在。

另一方面,看起来你有四个其他网卡,DPDK支持这些网卡:

EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.3 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb

所以你需要将其中一个绑定到igb_uio并尝试再次运行该示例。