This is a rework of my one year old patchset [1].
If you are brave enough and start reviewing it, you may want to read
the last patch first. The whole magic hidden behind the scene is
documented there. For now, the only supported combination where this
works is virtual interface connected to virtual network. This network
MUST have an inbound average set, at least. This tells how much
bandwidth do we have, and how much can we guarantee. If we would miss
this info, then we cannot guarantee anything. On the other hand, this
is just a very small part of whole problem. Users MUST configure all
other devices on traffic path to follow up their setting in libvirt.
But that's out of our scope.
1:
http://www.redhat.com/archives/libvir-list/2011-December/msg00486.html
diff to v1:
-Laine's suggestions worked in
Michal Privoznik (8):
bandwidth: Attach sfq to leaf node
bandwidth: add new 'floor' attribute
bandwidth: Create hierarchical shaping classes
bandwidth: Create (un)plug functions
bandwidth: Create rate update function
bandwidth: Create network bandwidth (un)plug functions
network: Create real network status files
domain: Keep assigned class_id in domstatus XML
docs/formatdomain.html.in | 23 ++-
docs/schemas/networkcommon.rng | 5 +
po/POTFILES.in | 1 +
src/Makefile.am | 7 +-
src/conf/domain_conf.c | 19 ++-
src/conf/domain_conf.h | 1 +
src/conf/netdev_bandwidth_conf.c | 67 +++++++-
src/conf/netdev_bandwidth_conf.h | 3 +-
src/conf/network_conf.c | 230 +++++++++++++++++++++-----
src/conf/network_conf.h | 6 +
src/libvirt_network.syms | 13 ++
src/libvirt_private.syms | 9 +-
src/lxc/lxc_process.c | 3 +-
src/network/bridge_driver.c | 253 +++++++++++++++++++++++++++-
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_driver.c | 2 +-
src/util/virnetdevbandwidth.c | 337 +++++++++++++++++++++++++++++++++++++-
src/util/virnetdevbandwidth.h | 24 +++-
src/util/virnetdevmacvlan.c | 2 +-
19 files changed, 920 insertions(+), 88 deletions(-)
create mode 100644 src/libvirt_network.syms
--
1.7.8.6