]>
Commit | Line | Data |
---|---|---|
dba26172 GKH |
1 | From foo@baz Fri Aug 3 21:30:27 CEST 2018 |
2 | From: Eric Dumazet <edumazet@google.com> | |
3 | Date: Mon, 21 May 2018 15:08:57 -0700 | |
4 | Subject: tcp: do not aggressively quick ack after ECN events | |
5 | ||
6 | From: Eric Dumazet <edumazet@google.com> | |
7 | ||
8 | [ Upstream commit 522040ea5fdd1c33bbf75e1d7c7c0422b96a94ef ] | |
9 | ||
10 | ECN signals currently forces TCP to enter quickack mode for | |
11 | up to 16 (TCP_MAX_QUICKACKS) following incoming packets. | |
12 | ||
13 | We believe this is not needed, and only sending one immediate ack | |
14 | for the current packet should be enough. | |
15 | ||
16 | This should reduce the extra load noticed in DCTCP environments, | |
17 | after congestion events. | |
18 | ||
19 | This is part 2 of our effort to reduce pure ACK packets. | |
20 | ||
21 | Signed-off-by: Eric Dumazet <edumazet@google.com> | |
22 | Acked-by: Soheil Hassas Yeganeh <soheil@google.com> | |
23 | Acked-by: Yuchung Cheng <ycheng@google.com> | |
24 | Acked-by: Neal Cardwell <ncardwell@google.com> | |
25 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
26 | Signed-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; |