DPDK usage discussions
 help / color / mirror / Atom feed
From: Cliff Burdick <shaklee3@gmail.com>
To: users <users@dpdk.org>
Subject: [dpdk-users] TX UDP Checksum
Date: Wed, 22 Jun 2016 16:37:18 -0700	[thread overview]
Message-ID: <CA+Gp1nbrbmFXD49mVkT6rLwzcJUWXXXrPZ0J8GPK5cc-421v-g@mail.gmail.com> (raw)

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	other threads:[~2016-06-22 23:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CA+Gp1nbrbmFXD49mVkT6rLwzcJUWXXXrPZ0J8GPK5cc-421v-g@mail.gmail.com \
    --to=shaklee3@gmail.com \
    --cc=users@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).