]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/tcp-add-one-more-quick-ack-after-after-ecn-events.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / tcp-add-one-more-quick-ack-after-after-ecn-events.patch
1 From foo@baz Wed Aug 1 08:19:32 CEST 2018
2 From: Eric Dumazet <edumazet@google.com>
3 Date: Wed, 27 Jun 2018 08:47:21 -0700
4 Subject: tcp: add one more quick ack after after ECN events
5
6 From: Eric Dumazet <edumazet@google.com>
7
8 [ Upstream commit 15ecbe94a45ef88491ca459b26efdd02f91edb6d ]
9
10 Larry Brakmo proposal ( https://patchwork.ozlabs.org/patch/935233/
11 tcp: force cwnd at least 2 in tcp_cwnd_reduction) made us rethink
12 about our recent patch removing ~16 quick acks after ECN events.
13
14 tcp_enter_quickack_mode(sk, 1) makes sure one immediate ack is sent,
15 but in the case the sender cwnd was lowered to 1, we do not want
16 to have a delayed ack for the next packet we will receive.
17
18 Fixes: 522040ea5fdd ("tcp: do not aggressively quick ack after ECN events")
19 Signed-off-by: Eric Dumazet <edumazet@google.com>
20 Reported-by: Neal Cardwell <ncardwell@google.com>
21 Cc: Lawrence Brakmo <brakmo@fb.com>
22 Acked-by: Neal Cardwell <ncardwell@google.com>
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 net/ipv4/tcp_input.c | 4 ++--
27 1 file changed, 2 insertions(+), 2 deletions(-)
28
29 --- a/net/ipv4/tcp_input.c
30 +++ b/net/ipv4/tcp_input.c
31 @@ -261,7 +261,7 @@ static void __tcp_ecn_check_ce(struct so
32 * it is probably a retransmit.
33 */
34 if (tp->ecn_flags & TCP_ECN_SEEN)
35 - tcp_enter_quickack_mode(sk, 1);
36 + tcp_enter_quickack_mode(sk, 2);
37 break;
38 case INET_ECN_CE:
39 if (tcp_ca_needs_ecn(sk))
40 @@ -269,7 +269,7 @@ static void __tcp_ecn_check_ce(struct so
41
42 if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
43 /* Better not delay acks, sender can have a very low cwnd */
44 - tcp_enter_quickack_mode(sk, 1);
45 + tcp_enter_quickack_mode(sk, 2);
46 tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
47 }
48 tp->ecn_flags |= TCP_ECN_SEEN;