[dpdk-dev] udp checksum

Khoussi, Siham (IntlAssoc) siham.khoussi at nist.gov
Tue Sep 24 17:11:12 CEST 2019


Dear all,

I have a question related to layer 4 checksum. I am creating a UDP packet by appending the layers in order (udp, ipv4, Eth). However, when  I run Wireshark on the receiving end I get: [UDPchecksum = missing (nor present]. Whereas, the checksum for ipv4 works fine.
Here is what I do:

.... Filling udp header
.....
Struct udp_hdr *udp=(struct udp_hdr*)rte_pktmbuf_prepend(mbuf, sizeof(*udp));
Udp->dgram_cksum=0;
Ipv4->hdr->hdr_cksum=0;
Udp->dgram_cksum= rte_ipv4_udptcp_cksum((const struct ipv4_hdr *)ipv4_hdr, (const void *)udp);
Ipv4_hdr->hdr_cksum= rte_ipv4_cksum((const struct ipv4_hdr *)ipv4_hdr);

--- continue filling ipv4 fields
...

Does anyone have an idea why rte_ipv4_udptcp_cksum() not working?

Thank you,
Siham



More information about the dev mailing list