WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 3 of 5] libxl: add NIC QoS parameters

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3 of 5] libxl: add NIC QoS parameters
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 29 Mar 2011 09:48:57 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Delivery-date: Tue, 29 Mar 2011 01:49:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1103281510530.5516@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1301315194@ely> <3aab79c907a2c78f4e81.1301315197@ely> <alpine.DEB.2.00.1103281510530.5516@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>