我想要实现这样一个场景:
。
我认为前进模式tx_first是我所需要的。
NIC: PMD: MLX5版本: 5.0-1.0.0.0
DPDK版本: 20.11.1
全命令行
./testpmd.sh 0 11-12 1 1 testpmd0 3b:00.0#testpmd.sh
#if [ $# -ne 6 ]
#then
# echo $0" <socket_id> <core_list> <core_num> <queue_num> <prefix>"
# exit 255
#fi
./build/app/dpdk-testpmd -l $2 -n 4 \
--socket-mem=2048,2048 \
-a $6,txq_inline=200,txq_mpw
--file-prefix=$5 \
-- \
-i \
--mbcache=512 \
--txonly-multi-flow \
--rxd=2048 --txd=2048 \
--rxq=$4 --txq=$4 \
--nb-cores=$3 \
--port-topology=loop \
--numa --socket-num=$1 --port-numa-config=0,$1 --ring-numa-config=0,3,$1但是在我设置命令行arg --port-topology=loop并尝试了start tx_first之后
溪流是:
testpmd> start tx_first
io packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP allocation mode: native
Logical Core 12 (socket 0) forwards packets on 1 streams:
RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00我拿到了数据:
testpmd> show fwd stats all
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 6 RX-dropped: 0 RX-total: 6
TX-packets: 38 TX-dropped: 0 TX-total: 38
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 6 RX-dropped: 0 RX-total: 6
TX-packets: 38 TX-dropped: 0 TX-total: 38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#32 same packets like this
restore info: - no tunnel info - no outer header - no miss group
src=04:3F:72:CB:21:46 - dst=02:00:00:00:00:00 - type=0x0800 - length=64 - nb_segs=1 - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Send queue=0x0
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWN
# discrete but same packets received
testpmd> port 0/queue 0: received 1 packets
restore info: - no tunnel info - no outer header - no miss group
src=F4:74:88:8C:11:86 - dst=01:80:C2:00:00:00 - type=0x0069 - length=119 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: sent 1 packets
restore info: - no tunnel info - no outer header - no miss group
src=F4:74:88:8C:11:86 - dst=01:80:C2:00:00:00 - type=0x0069 - length=119 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Send queue=0x0
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
restore info: - no tunnel info - no outer header - no miss group
src=F4:74:88:8C:11:86 - dst=01:80:C2:00:00:00 - type=0x0069 - length=119 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_UNKNOWNNIC没有对它发送的Tx数据包进行RX,为什么?
发布于 2021-06-14 09:52:46
为了将DPDK应用程序dpdk-tespmd设置为环回模式,需要2 DPDK ports和--port-topology=loop。
但是,如果只有一个物理NIC端口,则有几个选项可以在回送模式下设置DPDK接口。
在fabric loopback mode
MAC|PHY loopback .在上述3种模式中的任何一种模式下配置好后,运行以下命令
要在没有物理NIC测试the的情况下验证相同的./build/app/testpmd -l 2-3 --vdev=net_tap0,iface=testDpdk0 -- -i --rxq=1 --txq=1。设置RX数据包set verbose 2的详细信息
https://stackoverflow.com/questions/67957228
复制相似问题