* [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER
@ 2022-02-22 3:11 Eric Dumazet
2022-02-22 18:47 ` David Ahern
2022-02-23 1:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2022-02-22 3:11 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski; +Cc: netdev, Eric Dumazet, Eric Dumazet
From: Eric Dumazet <edumazet@google.com>
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 <edumazet@google.com>
---
net/ipv6/tcp_ipv6.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 0c648bf07f395d5e1ec0917d32fe55a46e853912..309a8a583bcac089ff93daef6da2eadebd018092 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -921,12 +921,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);
--
2.35.1.473.g83b2b277ed-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER
2022-02-22 3:11 [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER Eric Dumazet
@ 2022-02-22 18:47 ` David Ahern
2022-02-23 1:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2022-02-22 18:47 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski; +Cc: netdev, Eric Dumazet
On 2/21/22 8:11 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> 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 <edumazet@google.com>
> ---
> net/ipv6/tcp_ipv6.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER
2022-02-22 3:11 [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER Eric Dumazet
2022-02-22 18:47 ` David Ahern
@ 2022-02-23 1:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-23 1:40 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, netdev, edumazet
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 21 Feb 2022 19:11:15 -0800 you wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> 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.
>
> [...]
Here is the summary with links:
- [net-next] ipv6: tcp: consistently use MAX_TCP_HEADER
https://git.kernel.org/netdev/net-next/c/0ebea8f9b81c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-23 1:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 3:11 [PATCH net-next] ipv6: tcp: consistently use MAX_TCP_HEADER Eric Dumazet
2022-02-22 18:47 ` David Ahern
2022-02-23 1:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.