]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: remove the virDomainNetBandwidthChangeAllowed callback
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 26 Feb 2019 14:49:35 +0000 (14:49 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 17 Jun 2019 14:19:54 +0000 (15:19 +0100)
commitf02e21cb3379a41cd42f2d8116f2d10dabace83b
tree3f1917fbafd68aa6751f6af43ecfb37c852fbe8e
parent6394cf97686b1bdaae7f40bc979fc6c3f723e466
network: remove the virDomainNetBandwidthChangeAllowed callback

The current qemu driver code for changing bandwidth on a NIC first asks
the network driver if the change is supported, then changes the
bandwidth on the VIF, and then tells the network driver to update the
bandwidth on the bridge.

This is potentially racing if a parallel API call causes the network
driver to allocate bandwidth on the bridge between the check and the
update phases.

Change the code to just try to apply the network bridge update
immediately and rollback at the end if something failed.

Reviewed-by: Laine Stump <laine@laine.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/network/bridge_driver.c
src/qemu/qemu_driver.c