Hi, I'm trying to figure out how to get the TX UDP checksum offloading
working on my i40e by using the only example I can find in the csumonly.c
file from testpmd. I have a ethernet + vlan header, followed by 20 bytes of
IP, then UDP + 1000 bytes of my payload. The IP HCS is calculating
correctly using rte_ipv4_cksum(). Here is what I'm currently doing while
setting up the mbuf:

pkt->l2_len = 18;
pkt->l3_len = 20;
pkt->ol_flags = (PKT_TX_UDP_CKSUM);
customMsg *msg = rte_pktmbuf_mtod(pkt, customMsg *);
... Fill in IP headers and all UDP headers
msg->udp.dgram_cksum = 0;
msg->udp.dgram_cksum = rte_ipv4_phdr_cksum(&msg->ip, pkt->ol_flags);

The UDP checksum reported by wireshark is incorrect. Am I on the right
track for offloading this or is there something I'm missing? I'd ideally
like to offload IP onto the card as well, but that was failing too. I was
setting IP in the ol_flags and setting the checksum to 0 as per the example.

Reply via email to