[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 2 Feb 2013 10:57:40 -0500
From: Neal Cardwell <ncardwell@...gle.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Pasi Kärkkäinen <pasik@....fi>,
David Miller <davem@...emloft.net>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Netdev <netdev@...r.kernel.org>,
Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH] tcp: tcp_process_frto() should not set snd_cwnd to 0
On Sat, Feb 2, 2013 at 10:14 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 8aca4ee..37760df 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -3506,7 +3506,7 @@ static bool tcp_process_frto(struct sock *sk, int flag)
> if (!(flag & FLAG_DATA_ACKED) && (tp->frto_counter == 1)) {
> /* Prevent sending of new data. */
> tp->snd_cwnd = min(tp->snd_cwnd,
> - tcp_packets_in_flight(tp));
> + max(tcp_packets_in_flight(tp), 1U));
> return true;
> }
This seems better than what we have now, but it seems to paper over a
significant bug somewhere in FRTO. If we are at this spot and
tcp_packets_in_flight() is zero, then this means that we have lost our
chance to disambiguate whether this loss timeout was spurious, and we
should assume it was a legit loss, so we should call:
tcp_enter_frto_loss(sk, 2, flag);
One possible approach (please excuse the formatting for this informal proposal):
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0905997..66f7c32 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3482,7 +3482,8 @@ static bool tcp_process_frto(struct sock *sk, int flag)
((tp->frto_counter >= 2) && (flag & FLAG_RETRANS_DATA_ACKED)))
tp->undo_marker = 0;
- if (!before(tp->snd_una, tp->frto_highmark)) {
+ if (!before(tp->snd_una, tp->frto_highmark) ||
+ !tcp_packets_in_flight(tp)) {
tcp_enter_frto_loss(sk, (tp->frto_counter == 1 ? 2 : 3), flag);
return true;
}
neal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists