diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-02 12:07:54 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-02 12:07:54 -0400 |
commit | 5102e6b2de8e4f3b88c544a8fa2c46441dff1d8d (patch) | |
tree | 776943d06bc2ac1db31ef14852f4b580b27683ac | |
parent | dc963b63a3cdcec3a29a429e6d50573484d2c849 (diff) | |
download | longterm-queue-4.12-5102e6b2de8e4f3b88c544a8fa2c46441dff1d8d.tar.gz |
tcp: ctxt refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/queue/tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch b/queue/tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch index 8ae006c..ee5ea03 100644 --- a/queue/tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch +++ b/queue/tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch @@ -1,4 +1,4 @@ -From 72cd43ba64fc172a443410ce01645895850844c8 Mon Sep 17 00:00:00 2001 +From e639c631cd6f83b04f89f147bfee48189d56ebd4 Mon Sep 17 00:00:00 2001 From: Eric Dumazet <edumazet@google.com> Date: Mon, 23 Jul 2018 09:28:17 -0700 Subject: [PATCH] tcp: free batches of packets in tcp_prune_ofo_queue() @@ -26,12 +26,13 @@ Reported-by: Juha-Matti Tilli <juha-matti.tilli@iki.fi> Acked-by: Yuchung Cheng <ycheng@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c -index 6bade06aaf72..64e45b279431 100644 +index c37915f00a51..595fd7d11004 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4942,6 +4942,7 @@ static void tcp_collapse_ofo_queue(struct sock *sk) +@@ -4895,6 +4895,7 @@ static void tcp_collapse_ofo_queue(struct sock *sk) * 2) not add too big latencies if thousands of packets sit there. * (But if application shrinks SO_RCVBUF, we could still end up * freeing whole queue here) @@ -39,7 +40,7 @@ index 6bade06aaf72..64e45b279431 100644 * * Return true if queue has shrunk. */ -@@ -4949,20 +4950,26 @@ static bool tcp_prune_ofo_queue(struct sock *sk) +@@ -4902,20 +4903,26 @@ static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; @@ -55,7 +56,7 @@ index 6bade06aaf72..64e45b279431 100644 prev = rb_prev(node); rb_erase(node, &tp->out_of_order_queue); + goal -= rb_to_skb(node)->truesize; - tcp_drop(sk, rb_to_skb(node)); + tcp_drop(sk, rb_entry(node, struct sk_buff, rbnode)); - sk_mem_reclaim(sk); - if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf && - !tcp_under_memory_pressure(sk)) @@ -69,7 +70,7 @@ index 6bade06aaf72..64e45b279431 100644 + } node = prev; } while (node); - tp->ooo_last_skb = rb_to_skb(prev); + tp->ooo_last_skb = rb_entry(prev, struct sk_buff, rbnode); -- 2.15.0 |