当前位置: 代码迷 >> 综合 >> dpdk testpmd测试硬件cksum计算工具
  详细解决方案

dpdk testpmd测试硬件cksum计算工具

热度:1   发布时间:2023-12-12 02:20:30.0

? Perfect-mac-vlan match filters. The hardware checks a match between the masked fields

of the received packets and the programmed filters. The masked fields are for MAC VLAN

flow.

? Perfect-tunnel match filters. The hardware checks a match between the masked fields of

the received packets and the programmed filters. The masked fields are for tunnel flow.

testpmd测试过程

执行./testpmd -c0xff -n4 -- -i --portmask=0x3

执行flow_director_filter 0 mode IP add flow ipv4-other src 2.2.2.3 dst 3.3.3.5 tos 20 proto 20 ttl 40 vlan 0x01 flexbytes (0x88,0x48) fwd pf queue 1 fd_id 1

show port fdir 0

testpmd测试硬件cksum计算

执行./testpmd -c0xff -n4 -- -i --portmask=0x3

cfe和legarea更改了相关的checksum计算后结果不正确,调查后原因时:

要实现硬件tx checksum offload,除了需要再pkt_mbuf中将对应的标识位置上,并准备相应的环境,还需要在网卡初始化的时候,手工将tx_flags清零。因为默认网卡是不支持硬件offload的。

rte_eth_dev_info_get(portid, &dev_info);

txconf = &dev_info.default_txconf;

txconf->txq_flags = 0;