]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tcp: do not cancel delay-AcK on DCTCP special ACK
authorYuchung Cheng <ycheng@google.com>
Wed, 18 Jul 2018 20:56:35 +0000 (13:56 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:23 +0000 (14:20 +0100)
commitdeb42350ebbf735510467b46864249b1ff728200
tree0f5dae91d329219047238ab98f5044cea97aa8ae
parent5cf68c20926f8c9b3385cd39fee50ecf8e639005
tcp: do not cancel delay-AcK on DCTCP special ACK

BugLink: http://bugs.launchpad.net/bugs/1814813
[ Upstream commit 27cde44a259c380a3c09066fc4b42de7dde9b1ad ]

Currently when a DCTCP receiver delays an ACK and receive a
data packet with a different CE mark from the previous one's, it
sends two immediate ACKs acking previous and latest sequences
respectly (for ECN accounting).

Previously sending the first ACK may mark off the delayed ACK timer
(tcp_event_ack_sent). This may subsequently prevent sending the
second ACK to acknowledge the latest sequence (tcp_ack_snd_check).
The culprit is that tcp_send_ack() assumes it always acknowleges
the latest sequence, which is not true for the first special ACK.

The fix is to not make the assumption in tcp_send_ack and check the
actual ack sequence before cancelling the delayed ACK. Further it's
safer to pass the ack sequence number as a local variable into
tcp_send_ack routine, instead of intercepting tp->rcv_nxt to avoid
future bugs like this.

Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/net/tcp.h
net/ipv4/tcp_dctcp.c
net/ipv4/tcp_output.c