[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 4] xl: add support for vif rate limiting



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.