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
v4:
https://www.redhat.com/archives/libvir-list/2019-April/msg01186.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 v5:
- Separately track ports with type=network vs type=bridge to deal with
fallout after reverting patches which merged them
- Add RNG schema and XML format docs
- Change to use classID attr on <bandwidth> isntead of
of separate <class id="xx"/> element
- Drop obsolete driver deps from RPM spec
- Other misc bug fixes found during testing
Changed in v4:
- 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é (24):
conf: allow bandwidth parsing / formatting to include class ID
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
rpm: remove dependancy from qemu to network/storage drivers
docs/docs.html.in | 1 +
docs/formatdomain.html.in | 8 +
docs/formatnetworkport.html.in | 212 +++
docs/hooks.html.in | 24 +-
docs/schemas/domaincommon.rng | 5 +
docs/schemas/networkport.rng | 165 +++
include/libvirt/libvirt-network.h | 122 ++
include/libvirt/virterror.h | 3 +
libvirt.spec.in | 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 | 531 +++++++-
src/conf/domain_conf.h | 49 +-
src/conf/netdev_bandwidth_conf.c | 30 +-
src/conf/netdev_bandwidth_conf.h | 2 +
src/conf/network_conf.c | 8 +-
src/conf/virnetworkobj.c | 303 +++++
src/conf/virnetworkobj.h | 34 +
src/conf/virnetworkportdef.c | 509 +++++++
src/conf/virnetworkportdef.h | 113 ++
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_driver.c | 33 +
src/lxc/lxc_process.c | 35 +
src/network/bridge_driver.c | 1182 ++++++++++-------
src/qemu/qemu_driver.c | 8 +-
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 | 1 +
.../plug-bridge-mactbl.xml | 9 +
.../virnetworkportxml2xmldata/plug-bridge.xml | 15 +
.../virnetworkportxml2xmldata/plug-direct.xml | 12 +
.../plug-hostdev-pci.xml | 12 +
.../plug-network.xml | 16 +
tests/virnetworkportxml2xmldata/plug-none.xml | 8 +
tests/virnetworkportxml2xmltest.c | 104 ++
tests/virschematest.c | 1 +
tools/virsh-completer.c | 50 +
tools/virsh-completer.h | 4 +
tools/virsh-network.c | 399 +++++-
tools/virsh-network.h | 5 +
61 files changed, 4506 insertions(+), 661 deletions(-)
create mode 100644 docs/formatnetworkport.html.in
create mode 100644 docs/schemas/networkport.rng
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-network.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-none.xml
create mode 100644 tests/virnetworkportxml2xmltest.c
--
2.21.0