Few questions:
1. Does the sending NIC support IP and TCP/UDP checksum offloading? I mean, if these flags set?
struct rte_eth_dev_info dev_info;
rte_eth_dev_info_get(cfg.nic_port_id_, &dev_info);
constexpr auto rxcsum = DEV_RX_OFFLOAD_CHECKSUM;
constexpr auto l3csum = DEV_TX_OFFLOAD_IPV4_CKSUM;
constexpr auto l4csum = DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM;
dev_rx_csum_ = ((dev_info.tx_offload_capa & rxcsum) == rxcsum);
dev_tx_csum_l3_ = ((dev_info.tx_offload_capa & l3csum) == l3csum);
dev_tx_csum_l4_ = ((dev_info.tx_offload_capa & l4csum) == l4csum);
2. Do you "tell" the sending NIC to do the checksum calculations before sending the packets? I mean, do you do something like this for outgoing packets?
if (offl.ip_csum) {
pkt->ol_flags |= PKT_TX_IP_CKSUM | PKT_TX_IPV4;
pkt->l2_len = RTE_ETHER_HDR_LEN;
pkt->l3_len = ih_len;
}
if (offl.tcp_csum) {
pkt->ol_flags |= PKT_TX_TCP_CKSUM;
pkt->l2_len = RTE_ETHER_HDR_LEN;
pkt->l3_len = ih_len;
}
if (offl.udp_csum) {
pkt->ol_flags |= PKT_TX_UDP_CKSUM;
pkt->l2_len = RTE_ETHER_HDR_LEN;
pkt->l3_len = ih_len;
}
3. Is the receiving side also a DPDK application? If it is, and if the NIC there supports checksum offloading you can check the flags of the received packets to see if the receiving NIC has detected checksum errors.