JhGU's personal site

使用`dpdk-testpmd`对网卡的dpdk性能进行测试

命令

首先用dpdk-devbind.py -s查看网卡的pcie编号

$> dpdk-devbind.py -s

Network devices using kernel driver
===================================
0000:00:14.3 'CNVi: Wi-Fi 54f0' if=ap0,wlo1 drv=iwlwifi unused= *Active*
0000:01:00.0 'Ethernet Controller I226-V 125c' if=enp1s0 drv=igc unused= *Active*
0000:02:00.0 'Ethernet Controller I226-V 125c' if=enp2s0 drv=igc unused= 
0000:04:00.0 'Ethernet Controller I226-V 125c' if=enp4s0 drv=igc unused= 
0000:05:00.0 'MT27710 Family [ConnectX-4 Lx] 1015' if=enp5s0f0np0 drv=mlx5_core unused= *Active*
0000:05:00.1 'MT27710 Family [ConnectX-4 Lx] 1015' if=enp5s0f1np1 drv=mlx5_core unused= *Active*

然后执行dpdk-testpmd

sudo dpdk-testpmd -l 0-3 -n 4 -a 0000:05:00.0 -a 0000:05:00.1 -- -i --nb-ports=2 --portlist=0,1 --max-pkt-len=9000 --mbuf-size=9600 --txpkts=9000 --port-topology=loop

然后在dpdk-testpmd的界面中执行

start tx_first

启动数据传输 执行

show port stats all

查看统计