[dpdk-dev] question regarding rx checksum offload flags
Lance Richardson
lance.richardson at broadcom.com
Mon Aug 24 22:11:45 CEST 2020
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
More information about the dev
mailing list