Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 iproute2] get_rate: detect 32bit overflows
Date: Mon, 3 Jun 2013 17:31:49 +0100	[thread overview]
Message-ID: <1370277109.1918.21.camel@bwh-desktop.uk.level5networks.com> (raw)
In-Reply-To: <1370274693.24311.154.camel@edumazet-glaptop>

On Mon, 2013-06-03 at 08:51 -0700, Eric Dumazet wrote:
> On Mon, 2013-06-03 at 16:36 +0100, Ben Hutchings wrote:
> 
> > Oops, I read this as being strtol() currently, not strtod().  Currently
> > '1.5gbit' will work, but this change will break that.  So I think you
> > need to keep bps as a double.
> 
> Arg
> 
> > Then here I think the check should be *rate != floor(bps), i.e. accept
> > rounding down of a non-integer number of bytes but any other change is
> > assumed to be overflow.
> 
> Thanks Ben, here is v4 then ;)
> 
> [PATCH v4] get_rate: detect 32bit overflows
> 
> Current rate limit is 34.359.738.360 bit per second, and
> unfortunately 40Gbps links are above it.
> 
> overflows in get_rate() are currently not detected, and some
> users are confused. Let's detect this and complain.
> 
> Note that some qdisc are ready to get extended range, but this will
> need additional attributes and new iproute2
> 
> With help from Ben Hutchings
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
[...]

Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2013-06-03 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 18:51 [PATCH iproute2] get_rate: detect 32bit overflows Eric Dumazet
2013-06-02 21:30 ` Eric Dumazet
2013-06-02 21:36 ` [PATCH v2 " Eric Dumazet
2013-06-03 14:37   ` Ben Hutchings
2013-06-03 15:19     ` Eric Dumazet
2013-06-03 15:36       ` Ben Hutchings
2013-06-03 15:51         ` Eric Dumazet
2013-06-03 16:31           ` Ben Hutchings [this message]
2013-06-07 16:25   ` Stephen Hemminger

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=1370277109.1918.21.camel@bwh-desktop.uk.level5networks.com \
    --to=bhutchings@solarflare.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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