From: "Mathieu Gagné" <mgagne@iweb.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 3 of 4] xl: add support for vif rate limiting
Date: Tue, 20 Mar 2012 14:40:38 -0400 [thread overview]
Message-ID: <4F68CF26.1070701@iweb.com> (raw)
In-Reply-To: <1332242786.9223.215.camel@zakaz.uk.xensource.com>
On 3/20/12 7:26 AM, Ian Campbell wrote:
> On Tue, 2012-03-20 at 11:16 +0000, Stefano Stabellini wrote:
>>
>> wouldn't it make sense to just use a uint64_t for
>> rate_bytes_per_interval and rate_interval_usecs?
>
> It needn't be a barrier to this but FWIW Linux parses these into
> "unsigned long", but it does at least appear to do proper overflow
> checking.
Xend/xm defaults to unlimited when bytes_per_interval or interval_usecs
overflows a 32bit unsigned long.
Internally, xen-netback will parse those values into "unsigned long"
which would otherwise overflow/wrap if we used uint64_t:
http://lxr.linux.no/#linux+v3.3/drivers/net/xen-netback/common.h#L86
--
Mathieu
next prev parent reply other threads:[~2012-03-20 18:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 1:28 [PATCH 0 of 4] xl: add support for vif rate limiting Mathieu Gagné
2012-03-20 1:28 ` [PATCH 1 of 4] xl: cleanup indentation Mathieu Gagné
2012-03-20 10:58 ` Ian Campbell
2012-03-20 11:07 ` Stefano Stabellini
2012-03-20 1:28 ` [PATCH 2 of 4] xl: xl network-attach -N (dry run) option Mathieu Gagné
2012-03-20 10:58 ` Ian Campbell
2012-03-20 11:09 ` Stefano Stabellini
2012-03-20 1:28 ` [PATCH 3 of 4] xl: add support for vif rate limiting Mathieu Gagné
2012-03-20 11:16 ` Stefano Stabellini
2012-03-20 11:26 ` Ian Campbell
2012-03-20 18:40 ` Mathieu Gagné [this message]
2012-03-21 10:23 ` Ian Campbell
2012-03-20 11:21 ` Ian Campbell
2012-03-20 17:58 ` Mathieu Gagné
2012-03-21 10:04 ` Ian Campbell
2012-03-20 18:25 ` Mathieu Gagné
2012-03-21 10:12 ` Ian Campbell
2012-03-20 1:28 ` [PATCH 4 of 4] xl: add "check-xl-vif-parse" test script Mathieu Gagné
2012-03-20 11:29 ` Ian Campbell
2012-03-20 11:30 ` [PATCH 0 of 4] xl: add support for vif rate limiting Ian Campbell
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=4F68CF26.1070701@iweb.com \
--to=mgagne@iweb.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).