DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Wrong TCP Checkum computed by hardware
@ 2015-10-28  6:50 Padam Jeet Singh
  2015-10-28  6:57 ` Matthew Hall
  0 siblings, 1 reply; 9+ messages in thread
From: Padam Jeet Singh @ 2015-10-28  6:50 UTC (permalink / raw)
  To: dev

Hi,

While implementing a sample packet generation code, I am setting up the offload flags so that the hardware (82599ES in my case) computes the IP and TCP Checksums. However, it seems that only the IP checksum is computed whereas the TCP Checksum is computed, but computed wrong. Here is a snippet of what I doing:

/* First reset all offload flags */
mbuf->ol_flags = (uint16_t) (mbuf->ol_flags & (~PKT_TX_OFFLOAD_MASK));
/* Then enable IP Checksum offload */
mbuf->ol_flags |= PKT_TX_IP_CKSUM;
/* This is required to be set to 0 */
ipv4hdr->hdr_checksum = 0;
mbuf->ol_flags |= PKT_TX_TCP_CKSUM;
/* Compute the PSD header */
tcphdr->cksum = rte_ipv4_phdr_cksum(ipv4hdr);

When I replace the checksum computation from hardware-offload to a software implementation, the checksum computed is correct. I have verified both the cases with Wireshark on the system receiving the packets.

Any hint what could I be doing wrong here?

Thanks,
Padam

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-28 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28  6:50 [dpdk-dev] Wrong TCP Checkum computed by hardware Padam Jeet Singh
2015-10-28  6:57 ` Matthew Hall
2015-10-28  7:19   ` Padam Jeet Singh
2015-10-28  8:01     ` Liu, Jijiang
2015-10-28  8:12       ` Padam Jeet Singh
2015-10-28  8:16         ` Liu, Jijiang
2015-10-28  8:30           ` Padam Jeet Singh
2015-10-28  8:34             ` Liu, Jijiang
2015-10-28 11:02               ` Padam Jeet Singh

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