From f401da475f98c1840d48c9e00a6eb228237357c0 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Wed, 27 Oct 2021 13:19:20 -0700 Subject: [PATCH] tcp: no longer set skb->reserved_tailroom TCP/MPTCP sendmsg() no longer puts payload in skb->head, we can remove not needed code. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/ipv4/tcp.c | 5 ----- net/mptcp/protocol.c | 1 - 2 files changed, 6 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 68b946cfd4337..66ed0d79f4147 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -876,11 +876,6 @@ struct sk_buff *tcp_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp, } if (likely(mem_scheduled)) { skb_reserve(skb, MAX_TCP_HEADER); - /* - * Make sure that we have exactly size bytes - * available to the caller, no more, no less. - */ - skb->reserved_tailroom = skb->end - skb->tail - size; INIT_LIST_HEAD(&skb->tcp_tsorted_anchor); return skb; } diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 10b336d218656..aa96d311bea0d 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1174,7 +1174,6 @@ static struct sk_buff *__mptcp_do_alloc_tx_skb(struct sock *sk, gfp_t gfp) if (likely(skb)) { if (likely(__mptcp_add_ext(skb, gfp))) { skb_reserve(skb, MAX_TCP_HEADER); - skb->reserved_tailroom = skb->end - skb->tail; INIT_LIST_HEAD(&skb->tcp_tsorted_anchor); return skb; } -- 2.30.2