An update to
v1:
https://www.redhat.com/archives/libvir-list/2018-December/msg00681.html
v2:
https://www.redhat.com/archives/libvir-list/2019-February/msg01581.html
v3:
https://www.redhat.com/archives/libvir-list/2019-March/msg01259.html
Currently the network driver registers a set of callbacks with the virt
driver in order to handle allocating/releasing network ports associated
with guest NICs.
This series introduces a virNetworkPortPtr object and associated XML
that describes a network port. The virt drivers now call public APIs
associated with this new object to create/delete ports for guest NICs.
Changed in 4:
- Merged the ACKd patches which didn't depend on other un-acked
parts
- Improve bandwidth error messages
- Ensure we set floor sum to zero when starting network
- Misc fixes for previous review comments
NB, I have not added missing docs for the new XML doc format
yet. This is work in progress.
Changed in v3:
- Remove unused API symbol
- Fix dist of test data files
Changed in v2:
- Fix many bugs related to upgrades with running VMs
- Convert over bandwidth controls to the new APIs
- Handle reconnecting VIFs to bridges during startup
- Much much more that I can't remember
Daniel P. Berrangé (29):
network: ensure floor sum is reset to zero when starting networks
network: explain reason for bandwidth floor rejection
conf: don't pass interface type into virNetDevBandwidthParse
network: use 'bridge' as actual type instead of 'network'
virt drivers: don't handle type=network after resolving actual network
type
network: move re-attach of bridge device out of network driver
network: move fixup for domain actual net def out of network driver
conf: introduce virNetworkPortDefPtr struct and XML support
network: make networkLogAllocation independent of domain conf
conf: add APIs to convert virDomainNetDef to virNetworkPortDef
network: convert networkAllocateActualDevice to virNetworkPortDef
network: convert networkNotifyActualDevice to virNetworkPortDef
network: convert networkReleaseActualDevice to virNetworkPortDef
network: convert hook script to take a network port XML
network: remove the virDomainNetBandwidthChangeAllowed callback
network: introduce networkAllocatePort
network: introduce networkNotifyPort
network: introduce networkReleasePort
network: introduce networkUpdatePortBandwidth
network: add public APIs for network port object
access: add permissions for network port objects
remote: add support for new network port APIs
virsh: add support for network port APIs
conf: support recording ports against virNetworkObjPtr
network: add implementation of network port APIs
lxc, libxl: notify network driver of NICs during reconnect
lxc, libxl: save domain status after reconnect
conf: record a portid against the domain conf
conf: switch over to use network port APIs for virt drivers
docs/formatdomain.html.in | 8 +
docs/hooks.html.in | 24 +-
docs/schemas/domaincommon.rng | 5 +
include/libvirt/libvirt-network.h | 122 ++
include/libvirt/virterror.h | 3 +
src/access/genpolkit.pl | 2 +-
src/access/viraccessdriver.h | 6 +
src/access/viraccessdrivernop.c | 11 +
src/access/viraccessdriverpolkit.c | 26 +
src/access/viraccessdriverstack.c | 25 +
src/access/viraccessmanager.c | 16 +
src/access/viraccessmanager.h | 6 +
src/access/viraccessperm.c | 6 +
src/access/viraccessperm.h | 44 +
src/conf/Makefile.inc.am | 2 +
src/conf/domain_conf.c | 549 +++++++-
src/conf/domain_conf.h | 49 +-
src/conf/netdev_bandwidth_conf.c | 22 +-
src/conf/netdev_bandwidth_conf.h | 2 +-
src/conf/network_conf.c | 4 +-
src/conf/virnetworkobj.c | 303 ++++
src/conf/virnetworkobj.h | 34 +
src/conf/virnetworkportdef.c | 515 +++++++
src/conf/virnetworkportdef.h | 112 ++
src/datatypes.c | 60 +
src/datatypes.h | 41 +
src/driver-network.h | 41 +
src/libvirt-network.c | 444 ++++++
src/libvirt_private.syms | 23 +-
src/libvirt_public.syms | 15 +
src/libxl/libxl_conf.c | 21 +-
src/libxl/libxl_driver.c | 33 +
src/lxc/lxc_driver.c | 15 +-
src/lxc/lxc_process.c | 35 +
src/network/bridge_driver.c | 1219 +++++++++--------
src/qemu/qemu_command.c | 8 +-
src/qemu/qemu_driver.c | 10 +-
src/qemu/qemu_hotplug.c | 13 +-
src/qemu/qemu_interface.c | 12 +-
src/qemu/qemu_process.c | 5 +-
src/remote/remote_daemon_dispatch.c | 73 +
src/remote/remote_driver.c | 69 +
src/remote/remote_protocol.x | 124 +-
src/remote_protocol-structs | 69 +
src/rpc/gendispatch.pl | 18 +-
src/util/virerror.c | 9 +
src/util/virhook.c | 4 +-
src/util/virhook.h | 4 +-
tests/Makefile.am | 7 +
.../net-virtio-network-portgroup.xml | 6 +-
tests/virnetdevbandwidthtest.c | 2 +-
.../plug-bridge-mactbl.xml | 9 +
.../virnetworkportxml2xmldata/plug-bridge.xml | 12 +
.../virnetworkportxml2xmldata/plug-direct.xml | 12 +
.../plug-hostdev-pci.xml | 12 +
tests/virnetworkportxml2xmldata/plug-none.xml | 8 +
tests/virnetworkportxml2xmltest.c | 104 ++
tools/virsh-completer.c | 50 +
tools/virsh-completer.h | 4 +
tools/virsh-network.c | 399 +++++-
tools/virsh-network.h | 5 +
61 files changed, 4171 insertions(+), 720 deletions(-)
create mode 100644 src/conf/virnetworkportdef.c
create mode 100644 src/conf/virnetworkportdef.h
create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge-mactbl.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-direct.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-hostdev-pci.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-none.xml
create mode 100644 tests/virnetworkportxml2xmltest.c
--
2.20.1