OSDN Git Service

tcp: no longer set skb->reserved_tailroom
authorEric Dumazet <edumazet@google.com>
Wed, 27 Oct 2021 20:19:20 +0000 (13:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Oct 2021 11:44:38 +0000 (12:44 +0100)
TCP/MPTCP sendmsg() no longer puts payload in skb->head,
we can remove not needed code.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c
net/mptcp/protocol.c

index 68b946c..66ed0d7 100644 (file)
@@ -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;
                }
index 10b336d..aa96d31 100644 (file)
@@ -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;
                }