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]
Date:   Fri, 29 Apr 2022 10:55:16 -0400
From:   Neal Cardwell <ncardwell@...gle.com>
To:     Pengcheng Yang <yangpc@...gsu.com>
Cc:     Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        David Ahern <dsahern@...nel.org>,
        Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK

On Fri, Apr 29, 2022 at 6:33 AM Pengcheng Yang <yangpc@...gsu.com> wrote:
>
> This patch doesn't change any functionality.
>
> Signed-off-by: Pengcheng Yang <yangpc@...gsu.com>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> ---
>  net/ipv4/tcp_recovery.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
> index fd113f6..48f30e7 100644
> --- a/net/ipv4/tcp_recovery.c
> +++ b/net/ipv4/tcp_recovery.c
> @@ -2,11 +2,6 @@
>  #include <linux/tcp.h>
>  #include <net/tcp.h>
>
> -static bool tcp_rack_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2)
> -{
> -       return t1 > t2 || (t1 == t2 && after(seq1, seq2));
> -}
> -
>  static u32 tcp_rack_reo_wnd(const struct sock *sk)
>  {
>         struct tcp_sock *tp = tcp_sk(sk);
> @@ -77,9 +72,9 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
>                     !(scb->sacked & TCPCB_SACKED_RETRANS))
>                         continue;
>
> -               if (!tcp_rack_sent_after(tp->rack.mstamp,
> -                                        tcp_skb_timestamp_us(skb),
> -                                        tp->rack.end_seq, scb->end_seq))
> +               if (!tcp_skb_sent_after(tp->rack.mstamp,
> +                                       tcp_skb_timestamp_us(skb),
> +                                       tp->rack.end_seq, scb->end_seq))
>                         break;
>
>                 /* A packet is lost if it has not been s/acked beyond
> @@ -140,8 +135,8 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
>         }
>         tp->rack.advanced = 1;
>         tp->rack.rtt_us = rtt_us;
> -       if (tcp_rack_sent_after(xmit_time, tp->rack.mstamp,
> -                               end_seq, tp->rack.end_seq)) {
> +       if (tcp_skb_sent_after(xmit_time, tp->rack.mstamp,
> +                              end_seq, tp->rack.end_seq)) {
>                 tp->rack.mstamp = xmit_time;
>                 tp->rack.end_seq = end_seq;
>         }
> --

Thanks! The patch looks good to me, and passes all our team's packetdrill tests.

Acked-by: Neal Cardwell <ncardwell@...gle.com>
Tested-by: Neal Cardwell <ncardwell@...gle.com>

thanks,
neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ