我准备好了与dpdk兼容的环境,然后尝试使用dpdk发送数据包,并希望看到它在另一个服务器中被接收。我正在使用非IOMMU(不安全)模式下的vfio驱动程序.我跑了
$./dpdk-testpmd -l 11-15 -- -i它的输出就像
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
EAL: Using IOMMU type 8 (No-IOMMU)
EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:01:00.1 (socket 0)
TELEMETRY: No legacy callbacks, legacy socket not created
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_1>: n=179456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_0>: n=179456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.
Configuring Port 0 (socket 0)
Port 0: E4:43:4B:4E:82:00
Checking link statuses...
Done然后
$set nbcore 4
Number of forwarding cores set to 4
testpmd> show config fwd
txonly 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=BE:A6:27:C7:09:B4我的nbcore没有被正确设置,甚至在我设置eth对等地址之前也没有设置'txonly‘模式。但有些参数起作用了。此外,如果我不改变突发延迟,我的服务器一开始通过它传输就会崩溃,它有10G以太网端口(通过计算,可用带宽为80 80MBps)。因此,我没有通过在相应的接收接口上跟踪tcpdump在接收服务器上看到数据包。这里发生了什么,我做错了什么?
发布于 2022-12-03 06:19:59
根据评论中的问题和答案,真正的意图是send packets from DPDK testpmd using Intel Fortville (net_i40e) to the remote server。未生成通信量的真正问题不是应用程序命令行,也不是交互式选项,而是通过dpdk-testpmd.创建数据包。
为了生成数据包,testpmd中有两个选项。
这两个选项都没有被利用,因此我的建议是
--tx-first或按DPDK Testpmd命令行选项使用--forward-mode=txonlystart txfirst或set fwd txonly or set fwd flwogen参考Testpmd运行时函数使用此方法,将从testpmd生成通信量并发送到设备(远程服务器)。同样的一个快速示例是"dpdk-testpmd -file-前缀=test1 1 -a81:00.0 -l 7,8 -socket-mem=1024-burst=128-txd=8192-mbcache=8192-mbcache=512-nb-rxq=1-nb-核=2 -a --l模式=io-rss-udp-启用-rx-rss无mlockall-不-lsc-中断-启用-下拉-en-rmv中断-i“。
从上面的示例配置参数中
--burst=128设置。--rxq=1 --txq=1配置rx-tx队列的数量。--nb-cores=2设置。--forward-mode=io。因此,在注释中提到了neither set nbcore 4 or there are any configurations in testpmd args or interactive which shows the application is set for TX only。
查询的第二部分非常混乱,因为它声明
此外,如果我不改变突发延迟,我的服务器一开始通过它传输就会崩溃,它有10G以太网端口(通过计算,可用带宽为80 80MBps)。因此,我没有通过在相应的接收接口上跟踪tcpdump在接收服务器上看到数据包。这里发生了什么,我做错了什么?
假设my server是由dpdk向其发送数据包的远程服务器。因为提到了I see packets with tcpdump (因为Intel fortville在绑定UIO驱动程序时会删除内核netlink接口)。
提到80 80MBps,大约是0.08Gbps,真是奇怪。如果将远程接口设置为混杂模式,并且配置了AF_XDP应用程序或原始套接字应用程序以以线路速率(10 10Gbps)接收通信量,则可以工作。由于没有远程服务器的日志或崩溃转储,而且从testpmd生成的实际通信量非常不可能,这看起来更像是远程服务器中的配置或设置问题。
基于实时调试的编辑-1,将得到确认。
ninja isntall未安装DPDK。eno2 -不直接连接到远程服务器。eno2通过交换机连接。pgrep testpmd确认。set fwd txonly一起使用时,数据包淹没交换机,丢弃来自其他端口的SSH数据包。解决方案:请使用另一个交换机进行数据路径测试,或使用与远程服务器的直接连接。
https://stackoverflow.com/questions/74640903
复制相似问题