On Mon, 2011-03-28 at 15:37 +0100, Stefano Stabellini wrote:
> On Mon, 28 Mar 2011, David Scott wrote:
> > # HG changeset patch
> > # User David Scott <dave.scott@xxxxxxxxxxxxx>
> > # Date 1301314652 -3600
> > # Node ID 3aab79c907a2c78f4e81362944ee65ddf6f2cc6f
> > # Parent 45326ad6a0d396bfcd3c83d209ab7a19d6499896
> > libxl: add NIC QoS parameters
> >
> > The parameters are:
> > qos_kib_per_sec: maximum rate in KiB/sec
> > qos_timeslice_usec: time period over which the average rate is enforced in
> > usec
> >
> > One can now execute commands like
> > xl network-attach ... rate=1024,50000
> > which should impose an average limit of 1MiB/sec, over intervals of 50ms
> >
> > The "rate" key in the network backend is interpreted by netback. It wants:
> > bytes_per_interval, interval_length
> >
> > Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>
> >
>
> Thanks for the patch! Next time could you please generate the diff with
> function names (diff -p)? It would make it much easier to read...
Hint: Add to ~/.hgrc:
[diff]
showfunc = True
> > diff -r 45326ad6a0d3 -r 3aab79c907a2 tools/libxl/libxl.idl
> > --- a/tools/libxl/libxl.idl Mon Mar 28 13:17:32 2011 +0100
> > +++ b/tools/libxl/libxl.idl Mon Mar 28 13:17:32 2011 +0100
> > @@ -225,6 +225,8 @@
> > ("ifname", string),
> > ("script", string),
> > ("nictype", libxl_nic_type),
> > + ("qos_kib_per_sec", uint32),
> > + ("qos_timeslice_usec", uint32),
> > ])
>
> it is probably worth adding a comment here to explain what these
> parameters are, like you did in the commit message
Comment is the fourth element of the field tuple, the third is
const-ness so you would need e.g.
("qos_kib_per_sec", uint32, False, "maximum rate in KiB/sec")
(I really should get round to supporting named fields in the IDL...)
We don't have a strict type naming convention but elsewhere we have
max_memkb and generally *kb.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|