[libvirt] [PATCH v2 0/7] Add support for setting QoS

Jiri Denemark jdenemar at redhat.com
Mon Jul 18 13:59:41 UTC 2011


On Tue, Jul 12, 2011 at 13:57:06 +0200, 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 have same format as 'tc' command and are documented.
> 
> Supported devices are VIR_DOMAIN_NET_TYPE_NETWORK, VIR_DOMAIN_NET_TYPE_BRIDGE
> and VIR_DOMAIN_NET_TYPE_DIRECT.

One more thing. Would it be possible to also implement new APIs to manage
network bandwidth on-the-fly? It's not for this patchset but is does sound
like a good idea to have the possibility to, for example, restrict bandwidth
of a running domain since more domains need to use the network or increase the
bandwidth because host's owner got more money from domain's owner :-)

Jirka




More information about the libvir-list mailing list