Re: [libvirt] [PATCH v3 13/36] conf: introduce virNetworkPortDefPtr struct and XML support

2019-03-22 Thread Laine Stump
On 3/22/19 11:43 AM, Daniel P. Berrangé wrote: On Fri, Mar 22, 2019 at 11:28:17AM -0400, Laine Stump wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: Introduce a virNetworkPortDefPtr struct to represent the data associated with a virtual network port. Add APIs for parsing/formatting XML

Re: [libvirt] [PATCH v3 16/36] util: add API for copying virtual port profile data

2019-03-22 Thread Laine Stump
; +} + +if (VIR_ALLOC(*dst) < 0) +return -1; + +memcpy(*dst, src, sizeof(*src)); Kind of surprising that the entire thing has no pointers to anything else, but it doesn't! Reviewed-by: Laine Stump +return 0; +} + + /* virNetDevVPortProfileCheckComplete() checks that

Re: [libvirt] [PATCH v3 15/36] network: make networkLogAllocation independent of domain conf

2019-03-22 Thread Laine Stump
. Berrangé Reviewed-by: Laine Stump --- src/network/bridge_driver.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index d4ca2930cc..9eda1c62b0 100644 --- a/src/network/bridge_driver.c

Re: [libvirt] [PATCH v3 14/36] network: stop passing virDomainNetDefPtr into bandwidth functions

2019-03-22 Thread Laine Stump
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: 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é Reviewed-by: Laine S

Re: [libvirt] [PATCH v3 13/36] conf: introduce virNetworkPortDefPtr struct and XML support

2019-03-22 Thread Laine Stump
VIR_AUTOFREE() to further the world conquest of that stuff. (I still haven't decided if I'm really a fan of it, but it does seem to be taking over the source). There's one or two comments below this, but only for comic relief, nothing of substance. Reviewed-by: Laine Stump (I'm assuming the XML doc

Re: [libvirt] [PATCH v3 12/36] conf: don't pass interface type into virNetDevBandwidthParse

2019-03-22 Thread Laine Stump
On 3/22/19 11:11 AM, Daniel P. Berrangé wrote: On Fri, Mar 22, 2019 at 11:03:59AM -0400, Laine Stump wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: The virNetDevBandwidthParse method uses the interface type to decide whether to allow use of the "floor" parameter. Using the inte

Re: [libvirt] [PATCH v3 11/36] network: unconditionally merge port profiles

2019-03-22 Thread Laine Stump
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: 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é Reviewed-by: Laine

Re: [libvirt] [PATCH v3 12/36] conf: don't pass interface type into virNetDevBandwidthParse

2019-03-22 Thread Laine Stump
;floor". Switch to an explicit boolean to control its usage. Signed-off-by: Daniel P. Berrangé Or we could just always look for floor and parse it, and decide whether or not it's valid somewhere later in validation. But this definitely doesn't harm anything, so Reviewed-by: Laine Stum

Re: [libvirt] [PATCH 20/21] qemu_hotplug: consolidate all common detach code in qemuDomainDetachDeviceLive

2019-03-22 Thread Laine Stump
On 3/22/19 10:14 AM, Peter Krempa wrote: On Fri, Mar 22, 2019 at 10:08:17 -0400, Laine Stump wrote: On 3/22/19 8:32 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:29:00 -0400, Laine Stump wrote: Now that all the qemuDomainDetachPrep*() functions look nearly identical at the end, we can

Re: [libvirt] [PATCH 21/21] qemu_hotplug: delay sending DEVICE_REMOVED event until after *all* teardown

2019-03-22 Thread Laine Stump
On 3/22/19 8:51 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:29:01 -0400, Laine Stump wrote: The VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event is sent after qemu has responded to a device_del command with a DEVICE_DELETED event. Before queuing the event, *some* of the final teardown

Re: [libvirt] [PATCH 20/21] qemu_hotplug: consolidate all common detach code in qemuDomainDetachDeviceLive

2019-03-22 Thread Laine Stump
On 3/22/19 8:32 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:29:00 -0400, Laine Stump wrote: Now that all the qemuDomainDetachPrep*() functions look nearly identical at the end, we can put one copy of that identical code in qemuDomainDetachDeviceLive() at the point after the individual

Re: [libvirt] [PATCH 19/21] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-22 Thread Laine Stump
On 3/22/19 8:24 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:59 -0400, Laine Stump wrote: This function can be called with a virDomainDevicePtr and whether or not the removal was successful, and it will call the appropriate virDomainAudit*() function with the appropriate args

Re: [libvirt] [PATCH 18/21] qemu_hotplug: standardize the names/args/calling of qemuDomainDetach*()

2019-03-22 Thread Laine Stump
On 3/22/19 8:10 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:58 -0400, Laine Stump wrote: Most of these functions will soon contain only some setup for detaching the device, not the detach code proper (since that code is identical for these devices). Their device specific functions

Re: [libvirt] [PATCH 17/21] qemu_hotplug: rename dev to match in qemuDomainDetachDeviceLive

2019-03-22 Thread Laine Stump
On 3/22/19 7:50 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:57 -0400, Laine Stump wrote: I'm about to add a second virDomainDeviceDef to this function that will point to the actual device in the domain object. while this is just a partially filled-in example of what to look

Re: [libvirt] [PATCH 15/21] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive

2019-03-22 Thread Laine Stump
On 3/22/19 7:41 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:55 -0400, Laine Stump wrote: qemuDomainDetachDeviceLive() is called from two places in qemu_driver.c. Move the call to qemuDomainUpdateDeviceList() from the end of that function, which is now in qemu_hotplug.c, to the two

Re: [libvirt] [PATCH 14/21] qemu_hotplug: remove extra function in middle of DetachController call chain

2019-03-22 Thread Laine Stump
On 3/22/19 7:39 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:54 -0400, Laine Stump wrote: qemuDomainDetachDeviceControllerLive() just checks if the controller type is SCSI, and then either returns failure, or calls qemuDomainDetachControllerDevice(). Instead, lets just check for type

Re: [libvirt] [PATCH 13/21] qemu_hotplug: move qemuDomainDetachDeviceLive() to qemu_hotplug.c

2019-03-22 Thread Laine Stump
On 3/22/19 7:36 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:53 -0400, Laine Stump wrote: This function is going to take on some of the functionality of its subordinate functions, which all live in qemu_hotplug.c. Signed-off-by: Laine Stump --- src/qemu/qemu_driver.c | 95

Re: [libvirt] [PATCH 11/21] qemu_hotplug: move (almost) all qemuDomainDetach*() functions together

2019-03-22 Thread Laine Stump
On 3/22/19 7:30 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:51 -0400, Laine Stump wrote: There were two outliers at the end of the file beyond the Vcpu functions. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 174 1 file changed

Re: [libvirt] [PATCH 09/21] qemu_hotplug: merge qemuDomainDetachThisHostDevice into qemuDomainDetachHostDevice

2019-03-22 Thread Laine Stump
On 3/22/19 5:32 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:49 -0400, Laine Stump wrote: It's now only called from one place, and combining the two functions highlights the similarity with Detach functions for other device types. Signed-off-by: Laine Stump --- src/qemu

Re: [libvirt] [PATCH 07/21] qemu_hotplug: refactor qemuDomainDetachDiskLive and qemuDomainDetachDiskDevice

2019-03-22 Thread Laine Stump
On 3/22/19 5:07 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:47 -0400, Laine Stump wrote: qemuDomainDetachDiskDevice() is only called from one place. Moving the contents of the function to that place makes qemuDomainDetachDiskLive() more similar to the other Detach functions called

Re: [libvirt] [PATCH 05/21] qemu_hotplug: eliminate multiple identical qemuDomainDetachHost*Device() functions

2019-03-22 Thread Laine Stump
On 3/22/19 8:28 AM, Ján Tomko wrote: On Thu, Mar 21, 2019 at 06:28:45PM -0400, Laine Stump wrote: There are separate Detach functions for PCI, USB, SCSI, Vhost, and Mediated hostdevs, but the functions are all 100% the same code, except that the PCI function checks for the guest side

Re: [libvirt] [PATCH 05/21] qemu_hotplug: eliminate multiple identical qemuDomainDetachHost*Device() functions

2019-03-22 Thread Laine Stump
On 3/22/19 4:27 AM, Peter Krempa wrote: On Thu, Mar 21, 2019 at 18:28:45 -0400, Laine Stump wrote: There are separate Detach functions for PCI, USB, SCSI, Vhost, and Mediated hostdevs, but the functions are all 100% the same code, except that the PCI function checks for the guest side

Re: [libvirt] [PATCH v3 09/36] network: move re-attach of bridge device out of network driver

2019-03-22 Thread Laine Stump
On 3/22/19 5:41 AM, Daniel P. Berrangé wrote: On Thu, Mar 21, 2019 at 10:25:21PM -0400, Laine Stump wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: During initial NIC setup the hypervisor drivers are responsible for attaching the TAP device to the bridge device. Any fixup after libvirtd

Re: [libvirt] [PATCH v3 10/36] network: move fixup for domain actual net def out of network driver

2019-03-21 Thread Laine Stump
in libvirt 1.2.11 in December 2014. It seems nearly impossible that someone would be upgrading from a libvirt that was 1.2.10 or older straight to libvirt-5.2.0 *without rebooting their host*. For this reason, I think the above code can/should be retired. Reviewed-by: Laine Stump (either way

Re: [libvirt] [PATCH v3 09/36] network: move re-attach of bridge device out of network driver

2019-03-21 Thread Laine Stump
a bug that someone reported on IRC awhile back (and does it in the correct way, rather than the stupid f'ed up way I would have done it if I hadn't completely forgot about it until just this instant :-P) Reviewed-by: Laine Stump --- src/conf/domain_conf.c | 20

Re: [libvirt] [PATCH v3 06/36] util: add helper method for re-attaching a tap device to a bridge

2019-03-21 Thread Laine Stump
On 3/21/19 9:14 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/libvirt_private.syms | 1 + src/util/virnetdevtap.c | 69 src/util/virnetdevtap.h | 12 +++ 3 files changed, 82

Re: [libvirt] [PATCH v3 05/36] network: use 'bridge' as actual type instead of 'network'

2019-03-21 Thread Laine Stump
On 3/21/19 9:07 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: 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

Re: [libvirt] [PATCH v3 04/36] network: add missing bandwidth limits for bridge forward type

2019-03-21 Thread Laine Stump
On 3/21/19 9:52 PM, Laine Stump wrote: On 3/21/19 8:58 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: 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

Re: [libvirt] [PATCH v3 04/36] network: add missing bandwidth limits for bridge forward type

2019-03-21 Thread Laine Stump
On 3/21/19 8:58 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: 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é

Re: [libvirt] [PATCH v3 01/36] network: restrict usage of port management APIs

2019-03-21 Thread Laine Stump
On 3/21/19 8:27 PM, Cole Robinson wrote: Okay so I needed to do some studying to understand what's going on in the first part of this series. Just gonna type some notes here: virDomainActualNetDef tracks all the data we need to convert a virNetworkPtr content to a virDomainNetDef . It's only

[libvirt] [PATCH 14/21] qemu_hotplug: remove extra function in middle of DetachController call chain

2019-03-21 Thread Laine Stump
qemuDomainDetachDeviceControllerLive() just checks if the controller type is SCSI, and then either returns failure, or calls qemuDomainDetachControllerDevice(). Instead, lets just check for type != SCSI at the top of the latter function, and call it directly. Signed-off-by: Laine Stump --- src

[libvirt] [PATCH 12/21] qemu_hotplug: move (Attach|Detach)Lease functions with others of same type

2019-03-21 Thread Laine Stump
-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 96 + 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 094d135aac..1f96f56942 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu

[libvirt] [PATCH 03/21] qemu_hotplug: remove unnecessary check for valid PCI address

2019-03-21 Thread Laine Stump
address, but instead use qemuDomainDeleteDevice(), which identifies the device by its alias. So checking for a valid PCI address is just pointless extra code that obscures the high level of similarity between all the individual qemuDomainDetach*Device() functions. Signed-off-by: Laine Stump --- src

[libvirt] [PATCH 04/21] qemu_hotplug: rename a virDomainDeviceInfoPtr to avoid confusion

2019-03-21 Thread Laine Stump
Having an InfoPtr named "dev" made my brain hurt. Renaming it to "info" gives one less thing to confuse when looking at the code. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_

[libvirt] [PATCH 19/21] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-21 Thread Laine Stump
code that currently has a separate copy for each type of device. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 72 + 1 file changed, 72 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b0e2c738b9..5e5ffe16d3

[libvirt] [PATCH 07/21] qemu_hotplug: refactor qemuDomainDetachDiskLive and qemuDomainDetachDiskDevice

2019-03-21 Thread Laine Stump
contain a callout to the one instance of (4) (netdev). Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 96 ++--- 1 file changed, 43 insertions(+), 53 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index af99f3bf4c..82

[libvirt] [PATCH 08/21] qemu_hotplug: don't call DetachThisHostDevice for hostdev network devices

2019-03-21 Thread Laine Stump
() to qemuDomainDetachThisDevice(), which makes this function fit the desired pattern for merging with the other detach functions, and paves the way to simplifying qemuDomainDetachHostDevice() too. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 16 +++- 1 file changed, 7 insertions

[libvirt] [PATCH 21/21] qemu_hotplug: delay sending DEVICE_REMOVED event until after *all* teardown

2019-03-21 Thread Laine Stump
Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 154 1 file changed, 78 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index de7a7a2c95..43cc3a314d 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu

[libvirt] [PATCH 16/21] test: replace calls to individual detach functions with one call to main detach

2019-03-21 Thread Laine Stump
h replaces the calls to qemuDomainDetach(Chr|Shmen|Watchdog|Disk)Device with a single call to the higher level function, allowing us to shift functionality between the lower level functions without breaking the tests. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 15 ---

[libvirt] [PATCH 06/21] qemu_hotplug: eliminate unnecessary call to qemuDomainDetachNetDevice()

2019-03-21 Thread Laine Stump
difference when parent.type == VIR_DOMAIN_DEVICE_NET, and just call qemuDomainDetachThisHostDevice() for all hostdevs. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotpl

[libvirt] [PATCH 15/21] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
(and the rest of the device-specific Detach functions) can be pulled up into qemuDomainDetachDeviceLive() without breaking the test. (This is done in the next patch). Signed-off-by: Laine Stump --- src/qemu/qemu_driver.c | 7 +++ src/qemu/qemu_hotplug.c | 3 --- 2 files changed, 7 insertions(+), 3

[libvirt] [PATCH 11/21] qemu_hotplug: move (almost) all qemuDomainDetach*() functions together

2019-03-21 Thread Laine Stump
There were two outliers at the end of the file beyond the Vcpu functions. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 174 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCH 13/21] qemu_hotplug: move qemuDomainDetachDeviceLive() to qemu_hotplug.c

2019-03-21 Thread Laine Stump
This function is going to take on some of the functionality of its subordinate functions, which all live in qemu_hotplug.c. Signed-off-by: Laine Stump --- src/qemu/qemu_driver.c | 95 - src/qemu/qemu_hotplug.c | 129 +++- src

[libvirt] [PATCH 20/21] qemu_hotplug: consolidate all common detach code in qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
and valid alias, which is done in the toplevel common code). For this reason, the Net function has been split in two, with the 2nd half (qemuDomainDetachShutdownNet()) called from the common function, right before sending the delete command to qemu. Signed-off-by: Laine Stump --- src/qemu/qemu_hotp

[libvirt] [PATCH 18/21] qemu_hotplug: standardize the names/args/calling of qemuDomainDetach*()

2019-03-21 Thread Laine Stump
me place as (*detach)->data.blah, it's just easier on the eyes to have, e.g., "disk->dst" rather than "(*detach)->data.disk-dst". Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 363 +++- 1 file changed, 205 insertions(+), 158 del

[libvirt] [PATCH 01/21] qemu_hotplug: remove erroneous call to qemuDomainDetachExtensionDevice()

2019-03-21 Thread Laine Stump
controllers are not hot pluggable, so this is dead code anyway. (The only controllers that can currently be hotplugged/unplugged are SCSI controllers). Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 12 1 file changed, 12 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b

[libvirt] [PATCH 02/21] qemu_hotplug: remove another erroneous qemuDomainDetachExtensionDevice() call

2019-03-21 Thread Laine Stump
h PCI and zPCI device in a cascaded way". In fact, no other devices call qemuDomainDetachExtensionDevice() during their qemuDomainRemove*Device() function, so it should be removed from qemuDomainRemoveRNGDevice as well. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 3 --- 1 file

[libvirt] [PATCH 10/21] qemu_hotplug: move qemuDomainChangeGraphicsPasswords()

2019-03-21 Thread Laine Stump
It was sitting down in the middle of all the qemuDomainDetach*() functions. Move it up with the rest of the qemuDomain*Graphics*() functions. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 151 1 file changed, 77 insertions(+), 74 deletions

[libvirt] [PATCH 05/21] qemu_hotplug: eliminate multiple identical qemuDomainDetachHost*Device() functions

2019-03-21 Thread Laine Stump
bject that's created). Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 129 +--- 1 file changed, 28 insertions(+), 101 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 701458b2cd..389d16b090 100644 --- a/src/qemu/qemu_hotp

[libvirt] [PATCH 17/21] qemu_hotplug: rename dev to match in qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
I'm about to add a second virDomainDeviceDef to this function that will point to the actual device in the domain object. while this is just a partially filled-in example of what to look for. Naming it match will make the code easier to follow. Signed-off-by: Laine Stump --- src/qemu

[libvirt] [PATCH 00/21] qemu_hotplug: refactor device detach functions to fix one serious and other minor bugs

2019-03-21 Thread Laine Stump
() functions in turn made it possible to move the code that builds and queues the DEVICE_REMOVED event into a single place in the one remaining higher level caller - qemuDomainRemoveDevice() - thus eliminating the "premature event" for *all* device types at once. Laine Stump (21): qe

[libvirt] [PATCH 09/21] qemu_hotplug: merge qemuDomainDetachThisHostDevice into qemuDomainDetachHostDevice

2019-03-21 Thread Laine Stump
It's now only called from one place, and combining the two functions highlights the similarity with Detach functions for other device types. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 107 +++- 1 file changed, 41 insertions(+), 66 deletions

Re: [libvirt] [PATCH v5] openvswitch: Add new port VLAN mode "802.1ad"

2019-03-15 Thread Laine Stump
On 3/12/19 7:48 AM, Pavel Hrdina wrote: On Fri, Mar 08, 2019 at 11:21:37AM -0500, Laine Stump wrote: On 3/8/19 8:34 AM, John Ferlan wrote: On 2/24/19 9:15 AM, ZhiPeng LU wrote: This patch adds functionality to allow libvirt to configure the '802.1ad' modes(802.1ad double-tagged

Re: [libvirt] [PATCH v5] openvswitch: Add new port VLAN mode "802.1ad"

2019-03-08 Thread Laine Stump
On 3/8/19 8:34 AM, John Ferlan wrote: On 2/24/19 9:15 AM, ZhiPeng LU wrote: This patch adds functionality to allow libvirt to configure the '802.1ad' modes(802.1ad double-tagged) on openvswitch networks. For example:

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

2019-03-01 Thread Laine Stump
On 2/27/19 11:29 AM, Daniel P. Berrangé wrote: 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 | 262 src/conf/domain_conf.h | 26

Re: [libvirt] [tck PATCH] Add script testing network bandwidth functionality

2019-02-26 Thread Laine Stump
to MANIFEST :-) Other than that, Reviewed-by: Laine Stump (the test could be made more thorough by checking that the bandwidth had actually been set (by checking the output of whatever appropriate tc command, and maybe even by doing a netcat from host to guest and making sure it stays below

Re: [libvirt] [tck PATCH] Don't set a default value for ostype

2019-02-26 Thread Laine Stump
Author: Daniel P. Berrange Date: Thu Mar 27 11:57:14 2014 + Change 'Sys::Virt::TCK::generic_domain' to take named params Signed-off-by: Daniel P. Berrangé Reviewed-by: Laine Stump --- lib/Sys/Virt/TCK.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH] nwfilter: allow for different format of IPv6 netmask/prefix in ebtables output

2019-02-22 Thread Laine Stump
On 2/21/19 1:02 PM, Daniel P. Berrangé wrote: On Fri, Feb 15, 2019 at 01:21:50PM -0500, Laine Stump wrote: The iptables-ebtables package is meant as a drop-in replacement for the native ebtables package, but it formats some items in the -L output differently, leading to failure of scripts

Re: [libvirt] [PATCH] iohelper: Remove remaining newlines from error messages

2019-02-22 Thread Laine Stump
newlines, we can simply not output them in the first place. This is what happens in pretty much all cases already, but in a couple instances newlines have managed to slip in. Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump --- src/util/iohelper.c | 4 ++-- 1 file changed, 2 insertions

[libvirt] NB this is a libvirt-tck patch Re: [PATCH] nwfilter: allow for different format of IPv6 netmask/prefix in ebtables output

2019-02-22 Thread Laine Stump
Sorry, I forgot to add "tck" to the subject line when I posted this patch. On 2/15/19 1:21 PM, Laine Stump wrote: The iptables-ebtables package is meant as a drop-in replacement for the native ebtables package, but it formats some items in the -L output differently, leading

Re: [libvirt] [PATCHv2 2/2] network: add netmask to dhcp range of dnsmasq conf file for IPv4

2019-02-21 Thread Laine Stump
On 2/20/19 4:10 PM, John Ferlan wrote: On 2/18/19 6:21 PM, Laine Stump wrote: dnsmasq documentation says that the *IPv4* prefix/network address/broadcast address sent to dhcp clients will be automatically determined by dnsmasq by looking at the interface it's listening on, so the original

Re: [libvirt] [PATCHv2 1/2] util: set missing data length in virSocketAddrPrefixToNetmask()

2019-02-21 Thread Laine Stump
On 2/20/19 4:10 PM, John Ferlan wrote: On 2/18/19 6:21 PM, Laine Stump wrote: This fixes a bug that has been present since the original version of the function was pushed in commit 1ab80f3 on Nov. 26 2010 (by me). The virSocketAddr::len was not being set. Apparently until now we were always

[libvirt] [PATCHv2 2/2] network: add netmask to dhcp range of dnsmasq conf file for IPv4

2019-02-18 Thread Laine Stump
there, it looks like there is no harm in just always adding the netmask to all IPv4 dhcp-range options similar to how prefix is added to all IPv6 dhcp-range options. Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 27 +++ .../dhcp6-nat-network.conf

[libvirt] [PATCHv2 0/2] network: add netmask to dhcp range of dnsmasq conf file for IPv4

2019-02-18 Thread Laine Stump
), and discovered the failure of getnameinfo() was due to a bug in a function that I added to the virSocketAddr library in 2010! Laine Stump (2): util: set missing data length in virSocketAddrPrefixToNetmask() network: add netmask to dhcp range of dnsmasq conf file for IPv4 src/network

[libvirt] [PATCHv2 1/2] util: set missing data length in virSocketAddrPrefixToNetmask()

2019-02-18 Thread Laine Stump
(coincidentally) initialized for the proper address family, but the bug became apparent when trying to use it to fill in an otherwise uninitialized object. Signed-off-by: Laine Stump --- src/util/virsocketaddr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virsocketaddr.c b/src

Re: [libvirt] [PATCH] conf: make virPCIDeviceAddressFormat void

2019-02-15 Thread Laine Stump
On 2/15/19 12:46 PM, Daniel P. Berrangé wrote: 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é Reviewed-by: Laine Stump -- libvir-list mailing list libvir

[libvirt] [PATCH] nwfilter: allow for different format of IPv6 netmask/prefix in ebtables output

2019-02-15 Thread Laine Stump
cases we need to replace [all ff's] with "", and it's not possible to do that in the opposite direction :-) Signed-off-by: Laine Stump --- NB: ebtables upstream hasn't changed the format of MAC addresses (yet). Also, some new errors have cropped up when running these same tests on RHE

Re: [libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output

2019-02-15 Thread Laine Stump
On 2/15/19 10:51 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 02:56:31PM +, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 09:51:09AM -0500, Laine Stump wrote: On 2/11/19 6:11 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 06:07:40AM -0500, Laine Stump wrote: On Mon

[libvirt] [PATCH] network: explicitly allow icmp/icmpv6 in libvirt zonefile

2019-02-14 Thread Laine Stump
owing forwarded traffic", we need to add rules to allow all icmp and icmpv6 traffic to the libvirt zone, and that's what this patch does. This is a further refinement of the resolution to https://bugzilla.redhat.com/1650320 Signed-off-by: Laine Stump --- src/network/libvirt.zone | 2 +

[libvirt] [PATCH] util: fix memory leak in virFirewallDInterfaceSetZone()

2019-02-13 Thread Laine Stump
with it. Signed-off-by: Laine Stump --- src/util/virfirewalld.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c index 47bacdcf4a..f8965eea09 100644 --- a/src/util/virfirewalld.c +++ b/src/util/virfirewalld.c @@ -351,13 +351,12

Re: [libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output

2019-02-11 Thread Laine Stump
On 2/11/19 9:56 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 09:51:09AM -0500, Laine Stump wrote: On 2/11/19 6:11 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 06:07:40AM -0500, Laine Stump wrote: On Mon, Feb 11, 2019, 5:50 AM Daniel P. Berrangé wrote: On Sat, Feb 09, 2019

Re: [libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output

2019-02-11 Thread Laine Stump
On 2/11/19 6:11 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 06:07:40AM -0500, Laine Stump wrote: On Mon, Feb 11, 2019, 5:50 AM Daniel P. Berrangé wrote: On Sat, Feb 09, 2019 at 02:03:05PM -0500, Laine Stump wrote: Since this test (050-apply-verify-host.t), we can't use a regexp

Re: [libvirt] [tck PATCH 1/4] storage: skip qcow1 tests when qcow1 isn't supported by qemu-img

2019-02-11 Thread Laine Stump
On 2/11/19 6:12 AM, Daniel P. Berrangé wrote: On Mon, Feb 11, 2019 at 06:10:38AM -0500, Laine Stump wrote: On Mon, Feb 11, 2019, 5:47 AM Daniel P. Berrangé wrote: On Thu, Feb 07, 2019 at 10:08:28PM -0500, Laine Stump wrote: RHEL8 has dropped support for qcow1 format images, so skip

Re: [libvirt] [tck PATCH 1/4] storage: skip qcow1 tests when qcow1 isn't supported by qemu-img

2019-02-11 Thread Laine Stump
On Mon, Feb 11, 2019, 5:47 AM Daniel P. Berrangé wrote: > On Thu, Feb 07, 2019 at 10:08:28PM -0500, Laine Stump wrote: > > RHEL8 has dropped support for qcow1 format images, so skip the tests > > related to creating/cloning qcow1 images (based on the output of > > qemu-img -

Re: [libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output

2019-02-11 Thread Laine Stump
On Mon, Feb 11, 2019, 5:50 AM Daniel P. Berrangé wrote: > On Sat, Feb 09, 2019 at 02:03:05PM -0500, Laine Stump wrote: > > Since this test (050-apply-verify-host.t), we can't use a regexp in > > the string to be compared. The fix method that leads to the least > > changes is

Re: [libvirt] [PATCH 0/4] bhyve: model PCI ISA bridge

2019-02-10 Thread Laine Stump
On 2/10/19 10:08 AM, Roman Bogorodskiy wrote: This adds modeling of the pci-isa bridge device for bhyve to make it possible to assign specific PCI address for instead of the default PCI slot 0. I tried to keep the existing behaviour, i.e. the isa-bridge controller is automatically added to

[libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output

2019-02-09 Thread Laine Stump
Since this test (050-apply-verify-host.t), we can't use a regexp in the string to be compared. The fix method that leads to the least changes is to use sed to remove potential leading 0's. Signed-off-by: Laine Stump --- (These changes fix *almost* all failures in nwfilter/050-apply-verify

[libvirt] [tck PATCH 4/4] nwfilter: allow for ebtables *not* removing leading 0 from mac addresses

2019-02-07 Thread Laine Stump
The ebtables command in RHEL8 prints 00 in a MAC address as "00", unlike e.g. Fedora 29, which prints it as "0". Allow for both. Signed-off-by: Laine Stump --- scripts/nwfilter/100-ping-still-working.t | 4 ++-- scripts/nwfilter/210-no-mac-spoofing.t| 4 ++--

[libvirt] [tck PATCH 3/4] networks: remove stray use of brctl command

2019-02-07 Thread Laine Stump
brctl has been deprecated for a long time, and distros are starting to remove it. "ip link blah type bridge" should be used instead. Signed-off-by: Laine Stump --- scripts/networks/340-guest-network-bridge.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [tck PATCH 1/4] storage: skip qcow1 tests when qcow1 isn't supported by qemu-img

2019-02-07 Thread Laine Stump
RHEL8 has dropped support for qcow1 format images, so skip the tests related to creating/cloning qcow1 images (based on the output of qemu-img -help). Signed-off-by: Laine Stump --- scripts/storage/100-create-vol-dir.t | 22 - scripts/storage/200-clone-vol-dir.t | 48

[libvirt] [tck PATCH 2/4] storage: fix/improve diagnostic messages

2019-02-07 Thread Laine Stump
Due to copy/paste, the tests for several other formats were described as "qcow". Also, a couple of messages didn't give the image format. Signed-off-by: Laine Stump --- scripts/storage/100-create-vol-dir.t | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[libvirt] [tck PATCH 0/4] A few libvirt-tck patches to fix false failures

2019-02-07 Thread Laine Stump
I found these when I ran the tck on RHEL8 beta. Laine Stump (4): storage: skip qcow1 tests when qcow1 isn't supported by qemu-img storage: fix/improve diagnostic messages networks: remove stray use of brctl command nwfilter: allow for ebtables *not* removing leading 0 from mac

Re: [libvirt] [PATCH] dosc: schema: fix usb source address device attribute format

2019-02-06 Thread Laine Stump
On 1/26/19 9:16 AM, John Ferlan wrote: On 1/21/19 3:57 AM, Nikolay Shirokovskiy wrote: Device attribute does not have dotted "portAddr" format. Instead it has single number format described but "usbAddr" which corresponds to device parsing code in virDomainHostdevSubsysUSBDefParseXML. Looks

[libvirt] [PATCH] util: remove test code accidentally committed to virFirewallDZoneExists

2019-02-03 Thread Laine Stump
quot; before pushing. This unfortunately causes a failure to start networks on systems that have a firewalld version that doesn't support our libvirt zone file (i.e. pretty much everyone). This patch removes the unintended line. Signed-off-by: Laine Stump --- Pushed as trivial / buildbreaker. src

Re: [libvirt] [PATCH v2 4/7] configure: selectively install a firewalld 'libvirt' zone

2019-02-01 Thread Laine Stump
On 2/1/19 8:49 AM, Laine Stump wrote: On 2/1/19 8:28 AM, Eric Garver wrote: On Thu, Jan 31, 2019 at 10:10:43PM -0500, Laine Stump wrote: On 1/31/19 8:24 PM, Laine Stump wrote: Changes from V1: [...] * make the rule's priority 32767 instead of 127. [...] + + +  + I found out after sending

Re: [libvirt] [PATCH v2 5/7] network: set firewalld zone of bridges to "libvirt" zone when appropriate

2019-02-01 Thread Laine Stump
On 2/1/19 8:24 AM, Daniel P. Berrangé wrote: On Thu, Jan 31, 2019 at 08:24:56PM -0500, Laine Stump wrote: From: Laine Stump This patch restores broken guest network connectivity after a host firewalld is switched to using an nftables backend. It does this by adding libvirt networks' bridge

Re: [libvirt] [PATCH v2 3/7] util: new virFirewallD APIs + docs

2019-02-01 Thread Laine Stump
On 2/1/19 8:17 AM, Daniel P. Berrangé wrote: On Thu, Jan 31, 2019 at 08:24:54PM -0500, Laine Stump wrote: +int +virFirewallDGetBackend(void) +{ +DBusConnection *sysbus = virDBusGetSystemBus(); +DBusMessage *reply = NULL; +virError error; +VIR_AUTOFREE(char *) backendStr = NULL

Re: [libvirt] [PATCH v2 4/7] configure: selectively install a firewalld 'libvirt' zone

2019-02-01 Thread Laine Stump
On 2/1/19 8:28 AM, Eric Garver wrote: On Thu, Jan 31, 2019 at 10:10:43PM -0500, Laine Stump wrote: On 1/31/19 8:24 PM, Laine Stump wrote: Changes from V1: [...] * make the rule's priority 32767 instead of 127. [...] + + + + I found out after sending this that when I make the priority

Re: [libvirt] [PATCH v2 4/7] configure: selectively install a firewalld 'libvirt' zone

2019-01-31 Thread Laine Stump
On 1/31/19 8:24 PM, Laine Stump wrote: Changes from V1: [...] * make the rule's priority 32767 instead of 127. [...] + + + + I found out after sending this that when I make the priority of the reject rule 32767 instead of 127, it's apparently ignored (in my example, I was able

[libvirt] [PATCH v2 4/7] configure: selectively install a firewalld 'libvirt' zone

2019-01-31 Thread Laine Stump
rt.spec file by calling the %firewalld_restart rpm macro, which is a part of the firewalld-filesystem package. (For distros that don't use rpm packages, the command "firewalld-cmd --reload" will have the same effect). Signed-off-by: Laine Stump --- Changes from V1: * only BuildRequi

[libvirt] [PATCH v2 6/7] network: allow configuring firewalld zone for virtual network bridge device

2019-01-31 Thread Laine Stump
his will be an error. Signed-off-by: Laine Stump --- Change from V1: move news.xml additions to a separate patch, as requested. docs/firewall.html.in | 5 + docs/formatnetwork.html.in | 17 + docs/schemas/basictypes.rng

[libvirt] [PATCH v2 5/7] network: set firewalld zone of bridges to "libvirt" zone when appropriate

2019-01-31 Thread Laine Stump
From: Laine Stump This patch restores broken guest network connectivity after a host firewalld is switched to using an nftables backend. It does this by adding libvirt networks' bridge interfaces to the new "libvirt" zone in firewalld. After this patch, the bridge interface of a

[libvirt] [PATCH v2 0/7] network: fix networking for firewalld+nftables

2019-01-31 Thread Laine Stump
in Daniel and John's review comments. In particular, I've made installation of the libvirt zone file optional, and if the libvirt zone is missing, I only log an error if the firewalld backend is set to nftables. Laine Stump (7): configure: change HAVE_FIREWALLD to WITH_FIREWALLD util: move all

[libvirt] [PATCH v2 3/7] util: new virFirewallD APIs + docs

2019-01-31 Thread Laine Stump
active firewalld zones. virFirewallDInterfaceSetZone() sets the firewalld zone of the given interface. virFirewallDZoneExists() can be used to learn whether or not a particular zone is present and active in firewalld. Signed-off-by: Laine Stump --- Change from V1: define several new functions

[libvirt] [PATCH v2 7/7] docs: update news.xml for firewalld zone changes

2019-01-31 Thread Laine Stump
Signed-off-by: Laine Stump --- New in V2. Split off from previous patch. docs/news.xml | 40 1 file changed, 40 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 5759a9e178..f47fec90b3 100644 --- a/docs/news.xml +++ b/docs/news.xml

[libvirt] [PATCH v2 1/7] configure: change HAVE_FIREWALLD to WITH_FIREWALLD

2019-01-31 Thread Laine Stump
rather than HAVE_FIREWALLD. Signed-off-by: Laine Stump --- New patch in V2 (NB, I already pushed patch 1 from V1, as it was ACKed, and not directly related to the rest of the series) m4/virt-firewalld.m4 | 4 ++-- src/network/bridge_driver.c| 6 +++--- src/nwfilter/nwfilter_driver.c

[libvirt] [PATCH v2 2/7] util: move all firewalld-specific stuff into its own files

2019-01-31 Thread Laine Stump
In preparation for adding several other firewalld-specific functions, separate the code that's unique to firewalld from the more-generic "firewall" file. Signed-off-by: Laine Stump --- Change from V1: define VIR_FIREWALL_FIREWALLD_SERVICE in virfirewalldpriv.h, since it should on

[libvirt] [PATCH] qemu: fix i6300esb watchdog hotplug on Q35

2019-01-17 Thread Laine Stump
a PCI address, not before. Resolves: https://bugzilla.redhat.com/1666559 Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index a1c3ca999b..40c693483e 100644 --- a/src

Re: [libvirt] [PATCH 4/5] network: regain guest network connectivity after firewalld switch to nftables

2019-01-16 Thread Laine Stump
On 1/15/19 12:54 PM, Daniel P. Berrangé wrote: On Tue, Jan 15, 2019 at 12:43:05PM -0500, Laine Stump wrote: On 1/15/19 11:39 AM, Daniel P. Berrangé wrote: On Wed, Jan 09, 2019 at 09:57:36PM -0500, Laine Stump wrote: From: Laine Stump In the past (when both libvirt and firewalld used iptables

Re: [libvirt] [PATCH 4/5] network: regain guest network connectivity after firewalld switch to nftables

2019-01-15 Thread Laine Stump
On 1/15/19 12:23 PM, John Ferlan wrote: On 1/9/19 9:57 PM, Laine Stump wrote: From: Laine Stump In the past (when both libvirt and firewalld used iptables), if either libvirt's rules *OR* firewalld's rules accepted a packet, it would be accepted. This was because libvirt and firewalld rules

<    8   9   10   11   12   13   14   15   16   17   >