odp
odp copied to clipboard
[PATCH v1] api: add packet inner layer identification API and inner layer parsing, checksum generation and validation
This patchset expands pktio and packet spec to allow inner layer parsing, packet identification, checksum generation, validation. Inner layer API are needed for inner protocol identification, parsing, checksum validation and generation for tunneled packets. For example, VXLAN tunnel packets will have outer IPv4, IPv6, UDP and then Inner IPv4/IPv6, Inner TCP/UDP. Parsing and checksum generation for both the layers is a must for many usecases.
Also this patchset changes existing behavior of Tx checksum generation dependent on only L3 and L4 offsets in metadata to include L3 and L4 proto's of meta data. For platforms that doesn't support HW parsing of L3 and L4 proto in Tx, platform SW needs to parse them and it effects performance. Since L3 and L4 offsets are already allowed to be taken from pkt metadata and they are initially filled by Ingress pkt HW parsing, taking L3 and L4 proto types as well from pkt metadata is beneficial for performance as they are also filled by Ingress pkt HW parsing.
@JannePeltonen @psavol
I think the meaning of "inner header", "inner L2", "inner L3" may not be sufficiently unambiguously defined. What if there are multiple tunneling encapsulations in the same packet? What if the tunnel encapsulation is not recognized? Are there some encapsulations that will always be recognized and parsed?
VxLAN is quite a difficult case since one cannot be sure whether a packet is a VxLAN packet or some random UDP packet by just looking at the packet. The interpretation depends on the local configuration,