Commit 0ebea8f9 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

ipv6: tcp: consistently use MAX_TCP_HEADER

All other skbs allocated for TCP tx are using MAX_TCP_HEADER already.

MAX_HEADER can be too small for some cases (like eBPF based encapsulation),
so this can avoid extra pskb_expand_head() in lower stacks.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220222031115.4005060-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f64ae40d
...@@ -925,12 +925,11 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 ...@@ -925,12 +925,11 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
} }
#endif #endif
buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len, buff = alloc_skb(MAX_TCP_HEADER, GFP_ATOMIC);
GFP_ATOMIC);
if (!buff) if (!buff)
return; return;
skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); skb_reserve(buff, MAX_TCP_HEADER);
t1 = skb_push(buff, tot_len); t1 = skb_push(buff, tot_len);
skb_reset_transport_header(buff); skb_reset_transport_header(buff);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment