From: Yuchung Cheng <ycheng@google.com>
To: davem@davemloft.net, ncardwell@google.com, edumazet@google.com,
nanditad@google.com
Cc: aterzis@google.com, netdev@vger.kernel.org,
Yuchung Cheng <ycheng@google.com>
Subject: [PATCH 4/4 net-next] tcp: undo on DSACK during recovery
Date: Wed, 29 May 2013 17:20:14 -0700 [thread overview]
Message-ID: <1369873214-29502-4-git-send-email-ycheng@google.com> (raw)
In-Reply-To: <1369873214-29502-1-git-send-email-ycheng@google.com>
If the receiver supports DSACK, sender can detect false recoveries and
revert cwnd reductions triggered by either severe network reordering or
concurrent reordering and loss event.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
net/ipv4/tcp_input.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c35b227..907311c 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2315,7 +2315,7 @@ static bool tcp_try_undo_recovery(struct sock *sk)
}
/* Try to undo cwnd reduction, because D-SACKs acked all retransmitted data */
-static void tcp_try_undo_dsack(struct sock *sk)
+static bool tcp_try_undo_dsack(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
@@ -2323,7 +2323,9 @@ static void tcp_try_undo_dsack(struct sock *sk)
DBGUNDO(sk, "D-SACK");
tcp_undo_cwnd_reduction(sk, false);
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPDSACKUNDO);
+ return true;
}
+ return false;
}
/* We can clear retrans_stamp when there are no retransmissions in the
@@ -2751,6 +2753,10 @@ static void tcp_fastretrans_alert(struct sock *sk, const int acked,
do_lost = tcp_is_reno(tp) ||
tcp_fackets_out(tp) > tp->reordering;
}
+ if (tcp_try_undo_dsack(sk)) {
+ tcp_try_keep_open(sk);
+ return;
+ }
break;
case TCP_CA_Loss:
tcp_process_loss(sk, flag, is_dupack);
--
1.8.2.1
next prev parent reply other threads:[~2013-05-30 0:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 0:20 [PATCH 1/4 net-next] tcp: consolidate PRR packet accounting Yuchung Cheng
2013-05-30 0:20 ` [PATCH 2/4 net-next] tcp: refactor undo functions Yuchung Cheng
2013-05-30 0:44 ` Neal Cardwell
2013-05-31 1:07 ` David Miller
2013-05-30 0:20 ` [PATCH 3/4 net-next] tcp: fix undo on partial ack in recovery Yuchung Cheng
2013-05-30 0:49 ` Neal Cardwell
2013-05-31 1:07 ` David Miller
2013-05-30 0:20 ` Yuchung Cheng [this message]
2013-05-30 0:50 ` [PATCH 4/4 net-next] tcp: undo on DSACK during recovery Neal Cardwell
2013-05-31 1:07 ` David Miller
2013-05-30 0:41 ` [PATCH 1/4 net-next] tcp: consolidate PRR packet accounting Neal Cardwell
2013-05-31 1:06 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369873214-29502-4-git-send-email-ycheng@google.com \
--to=ycheng@google.com \
--cc=aterzis@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=nanditad@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.