dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [dpdk-dev] udp checksum
@ 2019-09-24 15:11 Khoussi, Siham (IntlAssoc)
  0 siblings, 0 replies; only message in thread
From: Khoussi, Siham (IntlAssoc) @ 2019-09-24 15:11 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-24 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 15:11 [dpdk-dev] udp checksum Khoussi, Siham (IntlAssoc)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).