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
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 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é (36):
network: restrict usage of port management APIs
network: pass a virNetworkPtr to port management APIs
conf: simplify link from hostdev back to network device
network: add missing bandwidth limits for bridge forward type
network: use 'bridge' as actual type instead of 'network'
util: add helper method for re-attaching a tap device to a bridge
network: use virNetDevTapReattachBridge API
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
network: unconditionally merge port profiles
conf: don't pass interface type into virNetDevBandwidthParse
conf: introduce virNetworkPortDefPtr struct and XML support
network: stop passing virDomainNetDefPtr into bandwidth functions
network: make networkLogAllocation independent of domain conf
util: add API for copying virtual port profile data
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 | 557 ++++++-
src/conf/domain_conf.h | 63 +-
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 | 514 +++++++
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 | 25 +-
src/libvirt_public.syms | 12 +
src/libxl/libxl_conf.c | 21 +-
src/libxl/libxl_domain.c | 28 +-
src/libxl/libxl_driver.c | 60 +-
src/lxc/lxc_driver.c | 37 +-
src/lxc/lxc_process.c | 56 +-
src/network/bridge_driver.c | 1364 +++++++++--------
src/qemu/qemu_command.c | 11 +-
src/qemu/qemu_domain_address.c | 4 +-
src/qemu/qemu_driver.c | 10 +-
src/qemu/qemu_hotplug.c | 84 +-
src/qemu/qemu_hotplug.h | 2 +-
src/qemu/qemu_interface.c | 12 +-
src/qemu/qemu_process.c | 32 +-
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 +-
src/util/virhostdev.c | 17 +-
src/util/virnetdevtap.c | 69 +
src/util/virnetdevtap.h | 12 +
src/util/virnetdevvportprofile.c | 16 +
src/util/virnetdevvportprofile.h | 2 +
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 +
69 files changed, 4526 insertions(+), 851 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