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  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]
Date:   Fri, 27 Dec 2019 09:46:26 -0500
From:   Neal Cardwell <ncardwell@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Soheil Hassas Yeganeh <soheil@...gle.com>,
        Yuchung Cheng <ycheng@...gle.com>,
        Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH net-next v2 3/5] tcp_cubic: switch bictcp_clock() to usec resolution

On Mon, Dec 23, 2019 at 3:28 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> Current 1ms clock feeds ca->round_start, ca->delay_min,
> ca->last_ack.
>
> This is quite problematic for data-center flows, where delay_min
> is way below 1 ms.
>
> This means Hystart Train detection triggers every time jiffies value
> is updated, since "((s32)(now - ca->round_start) > ca->delay_min >> 4)"
> expression becomes true.
>
> This kind of random behavior can be solved by reusing the existing
> usec timestamp that TCP keeps in tp->tcp_mstamp
...
> @@ -438,7 +431,7 @@ static void bictcp_acked(struct sock *sk, const struct ack_sample *sample)
>         if (ca->epoch_start && (s32)(tcp_jiffies32 - ca->epoch_start) < HZ)
>                 return;
>
> -       delay = (sample->rtt_us << 3) / USEC_PER_MSEC;
> +       delay = sample->rtt_us;

It seems there is a bug in this patch: it changes the code to not
shift the RTT samples left by 3 bits, and adjusts the
HYSTART_ACK_TRAIN code path to expect the new behavior, but does not
change the HYSTART_DELAY code path to expect the new behavior, so the
HYSTART_DELAY code path is still shifting right by 3 bits, when it
should not... the HYSTART_DELAY remains like this at the end of the
patch series:

        if (hystart_detect & HYSTART_DELAY) {
...
                        if (ca->curr_rtt > ca->delay_min +
                            HYSTART_DELAY_THRESH(ca->delay_min >> 3)) {

AFAICT the patch also should have:

-                            HYSTART_DELAY_THRESH(ca->delay_min >> 3)) {
+                           HYSTART_DELAY_THRESH(ca->delay_min)) {

Otherwise this patch looks great to me.

best,
neal

Powered by blists - more mailing lists