From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, ncardwell@google.com, vanj@google.com,
stephen@networkplumber.org, ycheng@google.com
Subject: Re: [PATCH] tcp: cubic: fix overflow error in bictcp_update()
Date: Wed, 07 Aug 2013 10:36:30 -0700 (PDT) [thread overview]
Message-ID: <20130807.103630.161949444720355649.davem@davemloft.net> (raw)
In-Reply-To: <1375747815.4457.59.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 05 Aug 2013 17:10:15 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> commit 17a6e9f1aa9 ("tcp_cubic: fix clock dependency") added an
> overflow error in bictcp_update() in following code :
>
> /* change the unit from HZ to bictcp_HZ */
> t = ((tcp_time_stamp + msecs_to_jiffies(ca->delay_min>>3) -
> ca->epoch_start) << BICTCP_HZ) / HZ;
>
> Because msecs_to_jiffies() being unsigned long, compiler does
> implicit type promotion.
>
> We really want to constrain (tcp_time_stamp - ca->epoch_start)
> to a signed 32bit value, or else 't' has unexpected high values.
>
> This bugs triggers an increase of retransmit rates ~24 days after
> boot [1], as the high order bit of tcp_time_stamp flips.
>
> [1] for hosts with HZ=1000
>
> Big thanks to Van Jacobson for spotting this problem.
>
> Diagnosed-by: Van Jacobson <vanj@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2013-08-07 17:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 0:10 [PATCH] tcp: cubic: fix overflow error in bictcp_update() Eric Dumazet
2013-08-06 15:12 ` Neal Cardwell
2013-08-07 17:36 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130807.103630.161949444720355649.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=vanj@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox