OSDN Git Service

tcp: fix cwnd undo in Reno and HTCP congestion controls
authorYuchung Cheng <ycheng@google.com>
Fri, 4 Aug 2017 03:38:51 +0000 (20:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 04:25:10 +0000 (21:25 -0700)
commit4faf783998b8cb88294e9df89032f473f8771b78
tree0ad450f18cbf6c23f23e9f181a4d4ee5c6a99b7a
parent10377ba7673d19e28d92846955d51f49acd25c35
tcp: fix cwnd undo in Reno and HTCP congestion controls

Using ssthresh to revert cwnd is less reliable when ssthresh is
bounded to 2 packets. This patch uses an existing variable in TCP
"prior_cwnd" that snapshots the cwnd right before entering fast
recovery and RTO recovery in Reno.  This fixes the issue discussed
in netdev thread: "A buggy behavior for Linux TCP Reno and HTCP"
https://www.spinics.net/lists/netdev/msg444955.html

Suggested-by: Neal Cardwell <ncardwell@google.com>
Reported-by: Wei Sun <unlcsewsun@gmail.com>
Signed-off-by: Yuchung Cheng <ncardwell@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
net/ipv4/tcp_cong.c
net/ipv4/tcp_htcp.c
net/ipv4/tcp_input.c