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

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



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.

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 format parsing functions
  bandwidth: Create format functions
  bandwitdh: 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                     |   32 ++
 docs/formatnetwork.html.in                    |   30 ++
 docs/schemas/domain.rng                       |   50 +++
 docs/schemas/network.rng                      |   50 +++
 src/conf/domain_conf.c                        |    6 +
 src/conf/domain_conf.h                        |    1 +
 src/conf/network_conf.c                       |    8 +
 src/conf/network_conf.h                       |    1 +
 src/libvirt_private.syms                      |    6 +
 src/network/bridge_driver.c                   |   12 +
 src/qemu/qemu_command.c                       |   10 +-
 src/util/macvtap.c                            |   12 +-
 src/util/macvtap.h                            |    5 +-
 src/util/network.c                            |  517 +++++++++++++++++++++++++
 src/util/network.h                            |   28 ++
 tests/domainschemadata/domain-bandwidth.xml   |   72 ++++
 tests/networkxml2xmlin/bandwidth-network.xml  |   16 +
 tests/networkxml2xmlout/bandwidth-network.xml |   16 +
 tests/networkxml2xmltest.c                    |    1 +
 20 files changed, 873 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

-- 
1.7.5.rc3


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