On 07/25/2011 06:29 AM, Michal Privoznik wrote:
On 22.07.2011 16:07, Michal Privoznik wrote:
> This patch series add support for setting traffic shaping and policing
> on both domain's interface and network's virtual bridge. Basically,
> this is done via 'tc' from iproute2 package. For shaping is HTB used,
> for policing we need u32 match selector. Both should be available in
> RHEL-6 kernel.
>
> How this works:
> On an virtual interface which has limits defined a root qdisc are
> replaced.
> Ingress root for outbound traffic shaping and egress for inbound.
> Basically, in inbound traffic policing is applied, on outbound shaping.
> New qdiscs are set to limit the traffic to rate set in XML. For shaping
> it is possible to set the size of buffer. Accepted values for rate, peak
> and burst are integer numbers. Units are kilobytes per second for rate
> or kilobytes for size.
>
> Supported devices are VIR_DOMAIN_NET_TYPE_NETWORK,
> VIR_DOMAIN_NET_TYPE_BRIDGE
> and VIR_DOMAIN_NET_TYPE_DIRECT.
>
> diff to v3:
> -Laine's review included
>
> diff to v2:
> -Jirka's review included
>
> diff to v1:
> -rebase to current HEAD
> -add support for macvtap devices
>
>
> Michal Privoznik (7):
> bandwidth: Define schema and create documentation
> bandwidth: Declare internal structures
> bandwidth: Add parsing and free functions
> bandwidth: Create format functions
> bandwidth: Implement functions to enable and disable QoS
> bandwidth: Add test cases for network
> bandwidth: Add domain schema test suite
>
> configure.ac | 4 +
> docs/formatdomain.html.in | 34 +++
> docs/formatnetwork.html.in | 30 ++
> docs/schemas/domain.rng | 3 +
> docs/schemas/network.rng | 3 +
> docs/schemas/networkcommon.rng | 48 +++
> libvirt.spec.in | 2 +-
> src/conf/domain_conf.c | 8 +
> src/conf/domain_conf.h | 1 +
> src/conf/network_conf.c | 10 +
> src/conf/network_conf.h | 1 +
> src/libvirt_private.syms | 5 +
> src/network/bridge_driver.c | 18 ++
> src/qemu/qemu_command.c | 11 +-
> src/util/macvtap.c | 12 +-
> src/util/macvtap.h | 3 +-
> src/util/network.c | 380
> +++++++++++++++++++++++++
> src/util/network.h | 22 ++
> tests/domainschemadata/domain-bandwidth.xml | 72 +++++
> tests/networkxml2xmlin/bandwidth-network.xml | 16 +
> tests/networkxml2xmlout/bandwidth-network.xml | 16 +
> tests/networkxml2xmltest.c | 1 +
> 22 files changed, 696 insertions(+), 4 deletions(-)
> create mode 100644 tests/domainschemadata/domain-bandwidth.xml
> create mode 100644 tests/networkxml2xmlin/bandwidth-network.xml
> create mode 100644 tests/networkxml2xmlout/bandwidth-network.xml
>
Thanks for review & push.
Ah, right. I was distracted by the fact that the push went to Eric's
mirror repo and forgot to send mail saying that I'd pushed the series.