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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACSApvY8y+gE3h4wUr-T3Jb38kJMP_D4pvm3saqxHM6sfHqRYw@mail.gmail.com>
Date:   Mon, 10 Dec 2018 09:34:28 -0500
From:   Soheil Hassas Yeganeh <soheil@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Neal Cardwell <ncardwell@...gle.com>,
        Yuchung Cheng <ycheng@...gle.com>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net-next] tcp: handle EOR and FIN conditions the same in tcp_tso_should_defer()

On Mon, Dec 10, 2018 at 9:10 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> In commit f9bfe4e6a9d0 ("tcp: lack of available data can also cause
> TSO defer") we moved the test in tcp_tso_should_defer() for packets
> with a FIN flag, and we mentioned that the same would be done
> later for EOR flag.
>
> Both flags should be handled at the same time, after all other
> heuristics have been considered. They both mean that no more bytes
> can be added to this skb by an application.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>

Thank you Eric for the patch!

> ---
>  net/ipv4/tcp_output.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index c31badfee806a70d5af6dc033cf9155adb1f9375..730bc44dbad9363814705b28c2f91a2253d91207 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1947,10 +1947,6 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
>         if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len))
>                 goto send_now;
>
> -       /* If this packet won't get more data, do not wait. */
> -       if (TCP_SKB_CB(skb)->eor)
> -               goto send_now;
> -
>         win_divisor = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tso_win_divisor);
>         if (win_divisor) {
>                 u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);
> @@ -1999,7 +1995,8 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
>         }
>
>         /* If this packet won't get more data, do not wait. */
> -       if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
> +       if ((TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) ||
> +           TCP_SKB_CB(skb)->eor)
>                 goto send_now;
>
>         return true;
> --
> 2.20.0.rc2.403.gdbc3b29805-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ