From deaed905dac4f87a08d35c0358fcf7657d817ad5 Mon Sep 17 00:00:00 2001 From: Mathieu Gagne Date: Tue, 24 Apr 2012 17:09:22 +0100 Subject: xl: add support for vif rate limiting The `rate` keyword specifies the rate at which the outgoing traffic will be limited to. The default if this keyword is not specified is unlimited. The `rate` keyword supports an optional replenishment interval parameter for specifying the granularity of credit replenishment. It determines the frequency at which the vif transmission credit is replenished. The default interval is 50ms. For example: 'rate=10Mb/s' 'rate=250KB/s' 'rate=1MB/s@20ms' Signed-off-by: Mathieu Gagne Acked-by: Ian Campbell Committed-by: Ian Jackson --- tools/libxl/libxlutil.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/libxl/libxlutil.h') diff --git a/tools/libxl/libxlutil.h b/tools/libxl/libxlutil.h index 1b05f4c343..0333e55ba7 100644 --- a/tools/libxl/libxlutil.h +++ b/tools/libxl/libxlutil.h @@ -94,6 +94,13 @@ int xlu_disk_parse(XLU_Config *cfg, int nspecs, const char *const *specs, int xlu_pci_parse_bdf(XLU_Config *cfg, libxl_device_pci *pcidev, const char *str); +/* + * Vif rate parsing. + */ + +int xlu_vif_parse_rate(XLU_Config *cfg, const char *rate, + libxl_device_nic *nic); + #endif /* LIBXLUTIL_H */ /* -- cgit v1.2.3