bpf/progs/offload.c: add comment about pmtu
Bug: 263884894 Flag: EXEMPT mainline Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I34c8d033ee0da34fc6db4d6093ed6a10c57c0dc1
This commit is contained in:
parent
b33d755683
commit
f1f59d721d
1 changed files with 4 additions and 0 deletions
|
|
@ -176,6 +176,8 @@ static inline __always_inline int do_forward6(struct __sk_buff* skb,
|
|||
// Handling of IPv6 overhead for incoming LRO/GRO packets
|
||||
uint64_t packets = 1;
|
||||
uint64_t L3_bytes = skb->len - l2_header_size;
|
||||
// I don't trust v->pmtu to not be higher then it should be: it might just
|
||||
// be device (instead of path/route/ipv6) mtu and that itself might be wrong...
|
||||
if (L3_bytes > v->pmtu) {
|
||||
if (gso_hdr_size == sizeof(struct ipv6hdr)) TC_PUNT(UNKNOWN_IPV6_GSO);
|
||||
const int mss = v->pmtu - gso_hdr_size;
|
||||
|
|
@ -423,6 +425,8 @@ static inline __always_inline int do_forward4_bottom(struct __sk_buff* skb,
|
|||
// Handling of IPv4 overhead for incoming LRO/GRO packets
|
||||
uint64_t packets = 1;
|
||||
uint64_t L3_bytes = skb->len - l2_header_size;
|
||||
// I don't trust v->pmtu to not be higher then it should be: it might just
|
||||
// be device (instead of path/route) mtu and that itself might be wrong...
|
||||
if (L3_bytes > v->pmtu) {
|
||||
// we know it is IPv4 without IP options, and either TCP or UDP
|
||||
const int hdr_sz = sizeof(struct iphdr) + (is_tcp ? tcph->doff * 4 : sizeof(struct udphdr));
|
||||
|
|
|
|||
Loading…
Reference in a new issue