* [PATCH net] tcp: fix cwnd undo on DSACK in F-RTO
@ 2014-05-30 22:25 Yuchung Cheng
2014-06-02 23:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Yuchung Cheng @ 2014-05-30 22:25 UTC (permalink / raw)
To: davem; +Cc: ncardwell, netdev, Yuchung Cheng
This bug is discovered by an recent F-RTO issue on tcpm list
https://www.ietf.org/mail-archive/web/tcpm/current/msg08794.html
The bug is that currently F-RTO does not use DSACK to undo cwnd in
certain cases: upon receiving an ACK after the RTO retransmission in
F-RTO, and the ACK has DSACK indicating the retransmission is spurious,
the sender only calls tcp_try_undo_loss() if some never retransmisted
data is sacked (FLAG_ORIG_DATA_SACKED).
The correct behavior is to unconditionally call tcp_try_undo_loss so
the DSACK information is used properly to undo the cwnd reduction.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
net/ipv4/tcp_input.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d6b46eb..3a26b3b 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2684,13 +2684,12 @@ static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack)
bool recovered = !before(tp->snd_una, tp->high_seq);
if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */
- if (flag & FLAG_ORIG_SACK_ACKED) {
- /* Step 3.b. A timeout is spurious if not all data are
- * lost, i.e., never-retransmitted data are (s)acked.
- */
- tcp_try_undo_loss(sk, true);
+ /* Step 3.b. A timeout is spurious if not all data are
+ * lost, i.e., never-retransmitted data are (s)acked.
+ */
+ if (tcp_try_undo_loss(sk, flag & FLAG_ORIG_SACK_ACKED))
return;
- }
+
if (after(tp->snd_nxt, tp->high_seq) &&
(flag & FLAG_DATA_SACKED || is_dupack)) {
tp->frto = 0; /* Loss was real: 2nd part of step 3.a */
--
1.9.1.423.g4596e3a
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] tcp: fix cwnd undo on DSACK in F-RTO
2014-05-30 22:25 [PATCH net] tcp: fix cwnd undo on DSACK in F-RTO Yuchung Cheng
@ 2014-06-02 23:51 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-02 23:51 UTC (permalink / raw)
To: ycheng; +Cc: ncardwell, netdev
From: Yuchung Cheng <ycheng@google.com>
Date: Fri, 30 May 2014 15:25:59 -0700
> This bug is discovered by an recent F-RTO issue on tcpm list
> https://www.ietf.org/mail-archive/web/tcpm/current/msg08794.html
>
> The bug is that currently F-RTO does not use DSACK to undo cwnd in
> certain cases: upon receiving an ACK after the RTO retransmission in
> F-RTO, and the ACK has DSACK indicating the retransmission is spurious,
> the sender only calls tcp_try_undo_loss() if some never retransmisted
> data is sacked (FLAG_ORIG_DATA_SACKED).
>
> The correct behavior is to unconditionally call tcp_try_undo_loss so
> the DSACK information is used properly to undo the cwnd reduction.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-02 23:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 22:25 [PATCH net] tcp: fix cwnd undo on DSACK in F-RTO Yuchung Cheng
2014-06-02 23:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).