From: Neal Cardwell Date: Wed, 16 Nov 2011 08:58:05 +0000 (+0000) Subject: tcp: skip cwnd moderation in TCP_CA_Open in tcp_try_to_open X-Git-Tag: v3.3-rc1~182^2~463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cd6d6162d998da579d40a1ee061bf8ce1610ff8;p=profile%2Fcommon%2Fkernel-common.git tcp: skip cwnd moderation in TCP_CA_Open in tcp_try_to_open The problem: Senders were overriding cwnd values picked during an undo by calling tcp_moderate_cwnd() in tcp_try_to_open(). The fix: Don't moderate cwnd in tcp_try_to_open() if we're in TCP_CA_Open, since doing so is generally unnecessary and specifically would override a DSACK-based undo of a cwnd reduction made in fast recovery. Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a4efdd7..78dd38c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2881,7 +2881,8 @@ static void tcp_try_to_open(struct sock *sk, int flag) if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { tcp_try_keep_open(sk); - tcp_moderate_cwnd(tp); + if (inet_csk(sk)->icsk_ca_state != TCP_CA_Open) + tcp_moderate_cwnd(tp); } else { tcp_cwnd_down(sk, flag); }