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 <jfeh...@suse.com> > --- > > 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@lists.xen.org http://lists.xen.org/xen-devel