[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211027201923.4162520-5-eric.dumazet@gmail.com>
Date: Wed, 27 Oct 2021 13:19:20 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH net-next 4/7] tcp: no longer set skb->reserved_tailroom
From: Eric Dumazet <edumazet@...gle.com>
TCP/MPTCP sendmsg() no longer puts payload in skb->head,
we can remove not needed code.
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
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 68b946cfd433720a034c2023a13c086428646c51..66ed0d79f41472f013edffe19802441e995175c9 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 ccd62a2727c36a749455d122c106b4c5f76ef2ba..22c7d10db15f8321e988602b8c97a46ffd872298 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1218,7 +1218,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.33.0.1079.g6e70778dc9-goog
Powered by blists - more mailing lists