mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 19:12:36 +00:00
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: Eric Dumazet <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
f64ae40de5
commit
0ebea8f9b8
+2
-3
@@ -925,12 +925,11 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
|
||||
}
|
||||
#endif
|
||||
|
||||
buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
|
||||
GFP_ATOMIC);
|
||||
buff = alloc_skb(MAX_TCP_HEADER, GFP_ATOMIC);
|
||||
if (!buff)
|
||||
return;
|
||||
|
||||
skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len);
|
||||
skb_reserve(buff, MAX_TCP_HEADER);
|
||||
|
||||
t1 = skb_push(buff, tot_len);
|
||||
skb_reset_transport_header(buff);
|
||||
|
||||
Reference in New Issue
Block a user