DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Khoussi, Siham (IntlAssoc)" <siham.khoussi@nist.gov>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] udp checksum
Date: Tue, 24 Sep 2019 15:11:12 +0000	[thread overview]
Message-ID: <DM6PR09MB29542C3B7A06A900AEC276A38A840@DM6PR09MB2954.namprd09.prod.outlook.com> (raw)

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


             reply	other threads:[~2019-09-24 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 15:11 Khoussi, Siham (IntlAssoc) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-06 16:05 [dpdk-dev] UDP Checksum Alex Markuze
2014-11-06 16:15 ` Olivier MATZ
2014-11-06 16:15 ` Ananyev, Konstantin
2014-11-06 16:26   ` Alex Markuze
     [not found]     ` <2601191342CEEE43887BDE71AB977258213A2EC5@IRSMSX105.ger.corp.intel.com>
2014-11-06 17:07       ` Ananyev, Konstantin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR09MB29542C3B7A06A900AEC276A38A840@DM6PR09MB2954.namprd09.prod.outlook.com \
    --to=siham.khoussi@nist.gov \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).