Implement clat ebpf receive offload support for GRE & ESP
Yeah, it really is this simple.
Technically GRE is required to be at least 4 bytes in size (minimum
GRE header), and ESP is required to be at least 8 bytes in size
(SPI + Sequence number). But there's no need to check.
Actually TCP/UDP could also be this simple since we never actually
look at nor modify the TCP/UDP headers (ie. the extra if condition
check to make sure we have the full TCP/UDP header could be removed).
However that's due to TCP/UDP pseudochecksum not requiring
adjustment because of netd's use of a checksum neutral ipv6 address.
While for GRE/ESP this is just a consequence of them not having
any fields requiring any updates during translation.
Test: builds
Bug: 139499742
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I02b58701f99c52e62b567e36e68b36cf644c5f5b
1 file changed