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

Re: [Xen-devel] [libvirt] [PATCH 1/2] xenconfig: support parsing and formatting vif bandwidth



On 29.12.2015 02:09, Jim Fehlig wrote:
> Both xm and xl config have long supported specifying vif rate
> limiting, e.g.
> 
> vif = [ 'mac=00:16:3E:74:3d:76,bridge=br0,rate=10MB/s' ]
> 
> Add support for mapping rate to and from <bandwidth> in the xenconfig
> parser and formatter. rate is mapped to the required 'average' attribute
> of the <outbound> element, e.g.
> 
>   <interface type='bridge'>
>     ...
>     <bandwidth>
>       <outbound average='10240'/>
>     </bandwidth>
>   </interface>
> 
> Also add a unit test to check the conversion logic.
> 
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
> 
> I used a bit of code from libxlu_vif.c to implement xenParseVifRate()
> instead of using the libxlutil lib directly, since in theory rate limiting
> applies to the old xen driver (no libxl) as well.
> 
>  src/xenconfig/xen_common.c           | 77 
> ++++++++++++++++++++++++++++++++++++
>  tests/xlconfigdata/test-vif-rate.cfg | 26 ++++++++++++
>  tests/xlconfigdata/test-vif-rate.xml | 57 ++++++++++++++++++++++++++
>  tests/xlconfigtest.c                 |  1 +
>  4 files changed, 161 insertions(+)

ACK

Michal

_______________________________________________
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®.