]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.118/tcp-do-not-aggressively-quick-ack-after-ecn-events.patch
Linux 4.14.109
[thirdparty/kernel/stable-queue.git] / releases / 3.18.118 / tcp-do-not-aggressively-quick-ack-after-ecn-events.patch
CommitLineData
dba26172
GKH
1From foo@baz Fri Aug 3 21:30:27 CEST 2018
2From: Eric Dumazet <edumazet@google.com>
3Date: Mon, 21 May 2018 15:08:57 -0700
4Subject: tcp: do not aggressively quick ack after ECN events
5
6From: Eric Dumazet <edumazet@google.com>
7
8[ Upstream commit 522040ea5fdd1c33bbf75e1d7c7c0422b96a94ef ]
9
10ECN signals currently forces TCP to enter quickack mode for
11up to 16 (TCP_MAX_QUICKACKS) following incoming packets.
12
13We believe this is not needed, and only sending one immediate ack
14for the current packet should be enough.
15
16This should reduce the extra load noticed in DCTCP environments,
17after congestion events.
18
19This is part 2 of our effort to reduce pure ACK packets.
20
21Signed-off-by: Eric Dumazet <edumazet@google.com>
22Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
23Acked-by: Yuchung Cheng <ycheng@google.com>
24Acked-by: Neal Cardwell <ncardwell@google.com>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 net/ipv4/tcp_input.c | 4 ++--
29 1 file changed, 2 insertions(+), 2 deletions(-)
30
31--- a/net/ipv4/tcp_input.c
32+++ b/net/ipv4/tcp_input.c
33@@ -230,7 +230,7 @@ static void __tcp_ecn_check_ce(struct tc
34 * it is probably a retransmit.
35 */
36 if (tp->ecn_flags & TCP_ECN_SEEN)
37- tcp_enter_quickack_mode((struct sock *)tp, TCP_MAX_QUICKACKS);
38+ tcp_enter_quickack_mode((struct sock *)tp, 1);
39 break;
40 case INET_ECN_CE:
41 if (tcp_ca_needs_ecn((struct sock *)tp))
42@@ -238,7 +238,7 @@ static void __tcp_ecn_check_ce(struct tc
43
44 if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
45 /* Better not delay acks, sender can have a very low cwnd */
46- tcp_enter_quickack_mode((struct sock *)tp, TCP_MAX_QUICKACKS);
47+ tcp_enter_quickack_mode((struct sock *)tp, 1);
48 tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
49 }
50 tp->ecn_flags |= TCP_ECN_SEEN;