lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVnQymufg8YFCg3cBQzTW-WbYRYpG=FVqtd-A5tLUU=Uex_eg@mail.gmail.com>
Date:	Tue, 5 Feb 2013 14:49:04 -0500
From:	Neal Cardwell <ncardwell@...gle.com>
To:	Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	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: frto should not set snd_cwnd to 0

On Mon, Feb 4, 2013 at 7:14 AM, Ilpo Järvinen <ilpo.jarvinen@...sinki.fi> wrote:
> [PATCH 1/1] tcp: fix for zero packets_in_flight was too broad
>
> There are transients during normal FRTO procedure during which
> the packets_in_flight can go to zero between write_queue state
> updates and firing the resulting segments out. As FRTO processing
> occurs during that window the check must be more precise to
> not match "spuriously" :-). More specificly, e.g., when
> packets_in_flight is zero but FLAG_DATA_ACKED is true the problematic
> branch that set cwnd into zero would not be taken and new segments
> might be sent out later.
>
> Only compile tested.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Pasi Kärkkäinen <pasik@....fi>
> ---
>  net/ipv4/tcp_input.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 680c422..500c2da 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -3484,8 +3484,7 @@ 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) ||
> -           !tcp_packets_in_flight(tp)) {
> +       if (!before(tp->snd_una, tp->frto_highmark)) {
>                 tcp_enter_frto_loss(sk, (tp->frto_counter == 1 ? 2 : 3), flag);
>                 return true;
>         }
> @@ -3505,6 +3504,11 @@ static bool tcp_process_frto(struct sock *sk, int flag)
>                 }
>         } else {
>                 if (!(flag & FLAG_DATA_ACKED) && (tp->frto_counter == 1)) {
> +                       if (!tcp_packets_in_flight(tp)) {
> +                               tcp_enter_frto_loss(sk, 2, flag);
> +                               return true;
> +                       }
> +
>                         /* Prevent sending of new data. */
>                         tp->snd_cwnd = min(tp->snd_cwnd,
>                                            tcp_packets_in_flight(tp));
> --

Acked-by: Neal Cardwell <ncardwell@...gle.com>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ