]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
tcp: avoid resetting ACK timer in DCTCP
authorYuchung Cheng <ycheng@google.com>
Thu, 9 Aug 2018 16:38:10 +0000 (09:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 18:31:35 +0000 (11:31 -0700)
The recent fix of acking immediately in DCTCP on CE status change
has an undesirable side-effect: it also resets TCP ack timer and
disables pingpong mode (interactive session). But the CE status
change has nothing to do with them. This patch addresses that by
using the new one-time immediate ACK flag instead of calling
tcp_enter_quickack_mode().

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_dctcp.c

index 8b637f9f23a232a137f4a7f2d685a599cc063c1b..ca61e2a659e7453082affd64dcbfed53f24992a7 100644 (file)
@@ -136,7 +136,7 @@ static void dctcp_ce_state_0_to_1(struct sock *sk)
                 */
                if (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_TIMER)
                        __tcp_send_ack(sk, ca->prior_rcv_nxt);
-               tcp_enter_quickack_mode(sk, 1);
+               inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_NOW;
        }
 
        ca->prior_rcv_nxt = tp->rcv_nxt;
@@ -157,7 +157,7 @@ static void dctcp_ce_state_1_to_0(struct sock *sk)
                 */
                if (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_TIMER)
                        __tcp_send_ack(sk, ca->prior_rcv_nxt);
-               tcp_enter_quickack_mode(sk, 1);
+               inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_NOW;
        }
 
        ca->prior_rcv_nxt = tp->rcv_nxt;