MoonGen 编译支持 QEDE驱动 网卡 Marvell FastLinQ 41000 Series

背景:
意外送来一张 Marvell FastLinQ 41000 Series的网卡,
驱动是 QEDE.
需要测试 40Gbit 速率下的 收包表现.

猫腻:
MoonGen 附带的DPDK, 编译完成后,
testpmd是可以探测出 QEDE 网卡.
MoonGen 启动就无法 探测出 QEDE 驱动.

MoonGen 的启动界面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@localhost MoonGen_1905]# ./build/MoonGen  ../rx-pkts.lua
[INFO] Initializing DPDK. This will take a few seconds...
EAL: Detected 48 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:60:00.0 on NUMA socket 0
EAL: probe driver: 8086:37d1 net_i40e
EAL: PCI device 0000:60:00.1 on NUMA socket 0
EAL: probe driver: 8086:37d1 net_i40e
[INFO] Found 1 usable devices:
Device 1: AC:1F:6B:3E:A6:41 (Intel Corporation Ethernet Connection X722 for 1GbE)
[INFO] Waiting for devices to come up...
[INFO] Device 1 (6C:B3:11:55:1C:71) is up: full-duplex 10000 MBit/s
[INFO] 1 devices are up.

testpmd 的启动界面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[root@localhost MoonGen_1905]# ./build/MoonGen  ../rx-pkts.lua
[INFO] Initializing DPDK. This will take a few seconds...
EAL: Detected 48 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:18:00.0 on NUMA socket 0
EAL: probe driver: 1077:8070 net_qede
EAL: PCI device 0000:18:00.1 on NUMA socket 0
EAL: probe driver: 1077:8070 net_qede
EAL: PCI device 0000:18:00.2 on NUMA socket 0
EAL: probe driver: 1077:8070 net_qede
EAL: PCI device 0000:18:00.3 on NUMA socket 0
EAL: probe driver: 1077:8070 net_qede
EAL: PCI device 0000:60:00.0 on NUMA socket 0
EAL: probe driver: 8086:37d1 net_i40e
EAL: PCI device 0000:60:00.1 on NUMA socket 0
EAL: probe driver: 8086:37d1 net_i40e
[INFO] Found 3 usable devices:
Device 0: 6C:B3:11:55:1C:70 (unknown NIC (PCI ID 1077:8070))
Device 1: 6C:B3:11:55:1C:71 (unknown NIC (PCI ID 1077:8070))
Device 2: AC:1F:6B:3E:A6:41 (Intel Corporation Ethernet Connection X722 for 1GbE)
[INFO] Waiting for devices to come up...
[INFO] Device 1 (6C:B3:11:55:1C:71) is up: full-duplex 10000 MBit/s
[INFO] Device 0 (6C:B3:11:55:1C:70) is up: full-duplex 10000 MBit/s
[INFO] 2 devices are up.
[WARN] dpdk.launchLua() is deprecated, use moongen.startTask() instead.

修改 CMakeLists.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
vim libmoon/CMakeLists.txt

在DPDK_LIBS中添加 rte_pmd_qede

SET(DPDK_LIBS
rte_net rte_ethdev rte_distributor rte_mbuf rte_pmd_bond rte_kni rte_pmd_ring rte_power
rte_acl rte_eal rte_kvargs rte_mempool rte_mempool_ring rte_pmd_e1000 rte_pmd_virtio rte_ring
rte_cfgfile rte_hash rte_lpm rte_meter rte_pmd_i40e rte_pmd_vmxnet3_uio rte_sched rte_timer
rte_cmdline rte_ip_frag rte_pipeline rte_pmd_ixgbe rte_mempool_stack rte_port rte_table rte_pmd_bnxt
rte_pmd_ena rte_pmd_nfp rte_stack rte_bus_vdev rte_bus_pci rte_pci rte_cryptodev
)


改好之后:
SET(DPDK_LIBS
rte_net rte_ethdev rte_distributor rte_mbuf rte_pmd_bond rte_kni rte_pmd_ring rte_power
rte_acl rte_eal rte_kvargs rte_mempool rte_mempool_ring rte_pmd_e1000 rte_pmd_virtio rte_ring
rte_cfgfile rte_hash rte_lpm rte_meter rte_pmd_i40e rte_pmd_vmxnet3_uio rte_sched rte_timer
rte_cmdline rte_ip_frag rte_pipeline rte_pmd_ixgbe rte_mempool_stack rte_port rte_table rte_pmd_bnxt
rte_pmd_ena rte_pmd_nfp rte_pmd_qede rte_stack rte_bus_vdev rte_bus_pci rte_pci rte_cryptodev
)

重新编译:

1
./build.sh