Thread (9 messages) flat view 9 messages, 2 authors, 2021-10-28
STALE1754d

[PATCH net-next 4/7] tcp: no longer set skb->reserved_tailroom

From: Eric Dumazet <hidden>
Date: 2021-10-27 20:19:35
Subsystem: networking [general], networking [mptcp], networking [tcp], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthieu Baerts, Mat Martineau, Neal Cardwell, Linus Torvalds

From: Eric Dumazet <edumazet@google.com>

TCP/MPTCP sendmsg() no longer puts payload in skb->head,
we can remove not needed code.

Signed-off-by: Eric Dumazet <edumazet@google.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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help