DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] question regarding rx checksum offload flags
@ 2020-08-24 20:11 Lance Richardson
  2020-08-25 14:39 ` Lance Richardson
  2020-09-17 14:05 ` Olivier Matz
  0 siblings, 2 replies; 7+ messages in thread
From: Lance Richardson @ 2020-08-24 20:11 UTC (permalink / raw)
  To: dev

I was looking for some clarification regarding how rx checksum
flags should be set for tunnel packets having both inner and outer
IP/L4 headers.

Based on comments in rte_mbuf_core.h, it seems to me. that the
inner (encapsulated) IP header checksum status should determine
which of these goes into ol_flags:
    PKT_RX_IP_CKSUM_UNKNOWN
    PKT_RX_IP_CKSUM_BAD
    PKT_RX_IP_CKSUM_GOOD
    PKT_RX_IP_CKSUM_NONE

Similarly, the L4 checksum status should determine which of these
goes into ol_flags:
   PKT_RX_L4_CKSUM_UNKNOWN
   PKT_RX_L4_CKSUM_BAD
   PKT_RX_L4_CKSUM_GOOD
   PKT_RX_L4_CKSUM_NONE

The IP header checksum status for the outer IP header should determine
whether this flag is set in ol_flags:
    PKT_RX_EIP_CKSUM_BAD

And for UDP-based tunnel encapsulations, the outer L4 checksum status
should determine which of these goes into ol_flags:
    PKT_RX_OUTER_L4_CKSUM_UNKNOWN
    PKT_RX_OUTER_L4_CKSUM_BAD
    PKT_RX_OUTER_L4_CKSUM_GOOD
    PKT_RX_OUTER_L4_CKSUM_INVALID

Finally, the checksum status of inner headers should have no influence
on PKT_RX_EIP_CKSUM_BAD or PKT_RX_OUTER_L4_CKSUM_*, and
likewise the checksum status of outer headers should have no influence
on PKT_RX_L4_CKSUM_* or PKT_RX_IP_CKSUM_*.

Is this correct? Apologies for such a basic question, but I'm having trouble
correlating the above with implementations.

Thanks and regards,
    Lance

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

end of thread, other threads:[~2020-12-18  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 20:11 [dpdk-dev] question regarding rx checksum offload flags Lance Richardson
2020-08-25 14:39 ` Lance Richardson
2020-08-26 13:39   ` Lance Richardson
2020-09-17 14:05 ` Olivier Matz
2020-12-14 17:41   ` Lance Richardson
2020-12-15 22:05     ` Lance Richardson
2020-12-18  9:27     ` Olivier Matz

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