DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] TX UDP Checksum
@ 2016-06-22 23:37 Cliff Burdick
  0 siblings, 0 replies; only message in thread
From: Cliff Burdick @ 2016-06-22 23:37 UTC (permalink / raw)
  To: users

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.

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

only message in thread, other threads:[~2016-06-22 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22 23:37 [dpdk-users] TX UDP Checksum Cliff Burdick

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).