[libvirt] ANNOUNCE: Libvirt TCK release v1.1.0

2018-12-24 Thread Daniel P . Berrangé
I'm pleased to announce a new release of the libvirt TCK is now available for download: https://libvirt.org/sources/tck/Sys-Virt-TCK-v1.1.0.tar.gz The GPG signature: https://libvirt.org/sources/tck/Sys-Virt-TCK-v1.1.0.tar.gz.asc Is created with my key with a fingerprint: DAF3 A6FD B26B

[libvirt] [PATCH] lxc: allow empty path in URI for historical compatibility

2018-12-24 Thread Daniel P . Berrangé
The use of 'lxc://' was mistakenly broken in: commit 4c8574c85c554e68de0d8bf9b85727954a5bea91 Author: Daniel P. Berrangé Date: Wed Mar 28 12:49:29 2018 +0100 driver: ensure NULL URI isn't passed to drivers with whitelisted URIs Allow it again for historical compatibility.

[libvirt] [PATCH 27/27] conf: switch over to use network port APIs for virt drivers

2018-12-24 Thread Daniel P . Berrangé
Change the domain conf so invoke the new network port public APIs instead of the network callbacks. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 125 ++ src/conf/domain_conf.h | 21 + src/network/bridge_driver.c | 172

[libvirt] [PATCH 26/27] network: add implementation of network port APIs

2018-12-24 Thread Daniel P . Berrangé
This initial implementation just wires up the APIs and does tracking of the port XML definitions. It is not yet integrated into the resource allocation logic. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 233 1 file changed, 233

[libvirt] [PATCH 24/27] virsh: add support for network port APIs

2018-12-24 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- tools/virsh-completer.c | 51 + tools/virsh-completer.h | 4 + tools/virsh-network.c | 399 +++- tools/virsh-network.h | 5 + 4 files changed, 458 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 25/27] conf: support recording ports against virNetworkObjPtr

2018-12-24 Thread Daniel P . Berrangé
The virNetworkObjPtr state will need to maintain a record of all virNetworkPortDefPtr objects associated with the network. Record these in a hash and add APIs for manipulating them. Signed-off-by: Daniel P. Berrangé --- src/conf/virnetworkobj.c | 303 +++

[libvirt] [PATCH 23/27] remote: add support for new network port APIs

2018-12-24 Thread Daniel P . Berrangé
Define the wire protocol for the virNetworkPort APIs and enable the client/server RPC dispatch. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 25 src/remote/remote_driver.c | 28 + src/remote/remote_protocol.x| 89

[libvirt] [PATCH 21/27] network: add public APIs for network port object

2018-12-24 Thread Daniel P . Berrangé
Introduce a new virNetworPort object that will present an attachment to a virtual network from a VM. Signed-off-by: Daniel P. Berrangé --- include/libvirt/libvirt-network.h | 49 + include/libvirt/virterror.h | 3 + src/datatypes.c | 60 + src/datatypes.h

[libvirt] [PATCH 10/27] network: stop passing virDomainNetDefPtr into bandwidth functions

2018-12-24 Thread Daniel P . Berrangé
The networkPlugBandwidth & networkUnplugBandwidth methods currently take a virDomainNetDefPtr. To remove the dependency on the domain config struct, pass individual parameters instead. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 94 -

[libvirt] [PATCH 22/27] access: add permissions for network port objects

2018-12-24 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- 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

[libvirt] [PATCH 14/27] network: convert networkAllocateActualDevice to virNetworkPortDef

2018-12-24 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkAllocateActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 222 +++- 1

[libvirt] [PATCH 18/27] network: introduce networkAllocatePort

2018-12-24 Thread Daniel P . Berrangé
Separate network port allocation code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 143 +++- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH 09/27] conf: introduce virNetworkPortDefPtr struct and XML support

2018-12-24 Thread Daniel P . Berrangé
Introduce a virNetworkPortDefPtr struct to represent the data associated with a virtual network port. Add APIs for parsing/formatting XML docs with the data. Signed-off-by: Daniel P. Berrangé --- src/conf/Makefile.inc.am | 2 + src/conf/virnetworkportdef.c

[libvirt] [PATCH 16/27] network: convert networkReleaseActualDevice to virNetworkPortDef

2018-12-24 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkReleaseActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 137 +++- 1 file

[libvirt] [PATCH 20/27] network: introduce networkReleasePort

2018-12-24 Thread Daniel P . Berrangé
Separate network port deletion code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 91 - 1 file changed, 59 insertions(+), 32 deletions(-) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH 19/27] network: introduce networkNotifyPort

2018-12-24 Thread Daniel P . Berrangé
Separate network port notification code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 159 1 file changed, 89 insertions(+), 70 deletions(-) diff --git

[libvirt] [PATCH 12/27] util: add API for copying virtual port profile data

2018-12-24 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/libvirt_private.syms | 1 + src/util/virnetdevvportprofile.c | 16 src/util/virnetdevvportprofile.h | 2 ++ 3 files changed, 19 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCH 17/27] network: convert hook script to take a network port XML

2018-12-24 Thread Daniel P . Berrangé
When (un)plugging an interface into a network, the 'plugged' and 'unplugged' operations are invoked in the hook script. The data provided to the script contains the network XML, the domain XML and the domain interface XML. When we strictly split the drivers up this will no longer be possible and

[libvirt] [PATCH 11/27] network: make networkLogAllocation independent of domain conf

2018-12-24 Thread Daniel P . Berrangé
Stop passing a virDomainNetDefPtr parameter to networkLogAllocation, instead just pass in the MAC address. The actual device type is also not required, since virNetworkForwardIfDefPtr has a type field that can be used instad. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c |

[libvirt] [PATCH 04/27] conf: simplify link from hostdev back to network device

2018-12-24 Thread Daniel P . Berrangé
hostdevs have a link back to the original network device. This is fairly generic accepting any type of device, however, we don't intend to make use of this approach in future. It can thus be specialized to network devices. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c |

[libvirt] [PATCH 15/27] network: convert networkNotifyActualDevice to virNetworkPortDef

2018-12-24 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkNotifyActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 127 +--- 1 file

[libvirt] [PATCH 03/27] network: pass a virNetworkPtr to port management APIs

2018-12-24 Thread Daniel P . Berrangé
The APIs for allocating/notifying/removing network ports just take an internal domain interface struct right now. As a step towards turning these into public facing APIs, add a virNetworkPtr argument to all of them. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 40

[libvirt] [PATCH 08/27] network: unconditionally merge port profiles

2018-12-24 Thread Daniel P . Berrangé
All but one of the network types supports port profiles. Rather than duplicating the code to merge profiles 3 times, do it once and then later report an error if used from the wrong place. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 54

[libvirt] [PATCH 13/27] conf: add APIs to convert virDomainNetDef to virNetworkPortDef

2018-12-24 Thread Daniel P . Berrangé
Helper APIs are needed to - Populate basic virNetworkPortDef from virDomainNetDef - Set a virDomainActualNetDef from virNetworkPortDef - Populate a full virNetworkPortDef from virDomainActualNetDef Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 258

[libvirt] [PATCH 06/27] network: use 'bridge' as actual type instead of 'network'

2018-12-24 Thread Daniel P . Berrangé
Ports allocated on virtual networks with type=nat|route|open all get given an actual type of 'network'. Only ports in networks with type=bridge use an actual type of 'bridge'. This distinction makes little sense since the virtualization drivers will treat both actual types in exactly the same

[libvirt] [PATCH 07/27] virt drivers: don't handle type=network after resolving actual network type

2018-12-24 Thread Daniel P . Berrangé
The call to resolve the actual network type will turn any NICs with type=network into one of the other types. Thus there should be no need to handle type=network in later switch() statements jumping off the actual type. Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_conf.c| 21

[libvirt] [PATCH 02/27] network: restrict usage of port management APIs

2018-12-24 Thread Daniel P . Berrangé
The port allocation APIs are currently called unconditionally for all types of NIC, but (mostly) only do anything for NICs with type=network. The exception is the port allocate API which does some validation even for NICs with type!=network. Relying on this validation is flawed, however, since

[libvirt] [PATCH 05/27] network: add missing bandwidth limits for bridge forward type

2018-12-24 Thread Daniel P . Berrangé
In the case of a network with forward=bridge, which has a bridge device listed, we are capable of setting bandwidth limits but fail to call the function to register them. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 17 +++-- 1 file changed, 15 insertions(+),

[libvirt] [PATCH 00/27] network: refactor to decouple virt drivers from network driver

2018-12-24 Thread Daniel P . Berrangé
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

[libvirt] [PATCH 01/27] conf: make virPCIDeviceAddressFormat void

2018-12-24 Thread Daniel P . Berrangé
Only one of the three callers of virPCIDeviceAddressFormat correctly handles an error return status. Fortunately it can't fail so can be made void. Signed-off-by: Daniel P. Berrangé --- src/conf/device_conf.c | 3 +-- src/conf/device_conf.h | 6 +++--- src/conf/domain_conf.c

[libvirt] [PATCH v3 RESEND] qemu: Process RDMA GID state change event

2018-12-24 Thread Yuval Shaia
This event is emitted on the monitor when a GID table in pvrdma device is modified and the change needs to be propagate to the backend RDMA device's GID table. The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is

[libvirt] [PATCH v2 RESEND] qemu: Process RDMA GID state change event

2018-12-24 Thread Yuval Shaia
This event is emitted on the monitor when a GID table in pvrdma device is modified and the change needs to be propagate to the backend RDMA device's GID table. The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is