[RFC PATCH 2/5] add a global feature for supporting virHistogram

2022-09-21 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/ch/ch_driver.c | 1 + src/driver.c| 1 + src/esx/esx_driver.c| 1 + src/libvirt_internal.h | 5 + src/libxl/libxl_driver.c| 1 + src/lxc/lxc_driver.c| 1 +

[RFC PATCH 5/5] remote: add virHistogram support for RPC as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/remote/remote_protocol.x | 16 src/remote_protocol-structs | 13 + 2 files changed, 29 insertions(+) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 79ffc63f03..c23e184d3a 100644 ---

[RFC PATCH 3/5] virtypedparams: add VIR_TYPED_PARAM_HISTOGRAM_OKAY

2022-09-21 Thread Amneesh Singh
This patch adds a flag VIR_TYPED_PARAM_HISTOGRAM_OKAY which works similar to VIR_TYPED_PARAM_STRING_OKAY to maintain server-client compatibility. Signed-off-by: Amneesh Singh --- include/libvirt/libvirt-common.h.in | 5 src/admin/admin_server_dispatch.c | 6 +++- src/libvirt.c

[RFC PATCH 4/5] qemu_driver: add histograms to the stats

2022-09-21 Thread Amneesh Singh
This patch adds histograms to the stats which were previously ignored due to them not being a virTypedParameterType earlier. Signed-off-by: Amneesh Singh --- src/qemu/qemu_driver.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 1/5] virtypedparam: add virHistogram as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
This patch adds virHistogram, a list of (x,y) pairs denoting a histogram as a virTypedParameterType. Signed-off-by: Amneesh Singh --- include/libvirt/libvirt-common.h.in | 54 +-- src/libvirt_private.syms| 7 ++ src/libvirt_public.syms | 6 ++

[RFC PATCH 0/5] add support for histograms as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
This series extends https://listman.redhat.com/archives/libvir-list/2022-September/234197.html to support histogram statistics. This requires adding it as a virTypedParameterType. [1/5]: - add virHistogram as a virTypedParameterType - add utility functions for virHistogram [2/5] - add a

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Jason Gunthorpe
On Wed, Sep 21, 2022 at 03:44:24PM -0300, Jason Gunthorpe wrote: > If /dev/vfio/vfio is provided by iommufd it may well have to trigger a > different ulimit tracking - if that is the only sticking point it > seems minor and should be addressed in some later series that adds > /dev/vfio/vfio

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Jason Gunthorpe
On Wed, Sep 21, 2022 at 03:30:55PM -0400, Steven Sistare wrote: > > If Steve wants to keep it then someone needs to fix the deadlock in > > the vfio implementation before any userspace starts to appear. > > The only VFIO_DMA_UNMAP_FLAG_VADDR issue I am aware of is broken pinned > accounting >

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Laine Stump
On 9/21/22 2:06 PM, Alex Williamson wrote: [Cc+ Steve, libvirt, Daniel, Laine] On Tue, 20 Sep 2022 16:56:42 -0300 Jason Gunthorpe wrote: On Tue, Sep 13, 2022 at 09:28:18AM +0200, Eric Auger wrote: Hi, On 9/13/22 03:55, Tian, Kevin wrote: We didn't close the open of how to get this merged

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Jason Gunthorpe
On Wed, Sep 21, 2022 at 12:06:49PM -0600, Alex Williamson wrote: > > I still think the compat gaps are small. I've realized that > > VFIO_DMA_UNMAP_FLAG_VADDR has no implementation in qemu, and since it > > can deadlock the kernel I propose we purge it completely. > > Steve won't be happy to

Re: [libvirt PATCH v2 00/16] Use nbdkit for http/ftp/ssh network drives in libvirt

2022-09-21 Thread Jonathon Jongsma
On 9/19/22 8:48 AM, Peter Krempa wrote: On Wed, Aug 31, 2022 at 13:40:45 -0500, Jonathon Jongsma wrote: After a bit of a lengthy delay, this is the second version of this patch series. See https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more information about the goal, but the summary

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Alex Williamson
[Cc+ Steve, libvirt, Daniel, Laine] On Tue, 20 Sep 2022 16:56:42 -0300 Jason Gunthorpe wrote: > On Tue, Sep 13, 2022 at 09:28:18AM +0200, Eric Auger wrote: > > Hi, > > > > On 9/13/22 03:55, Tian, Kevin wrote: > > > We didn't close the open of how to get this merged in LPC due to the > > >

Re: [PATCH 13/37] util: xml: Adjust documentation of virXMLPropString

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: All callers treat NULL as if the string is not present in the XML. Adjust the description so that it's implied that it's not an error and thus also no error reporting is expected. Signed-off-by: Peter Krempa --- src/util/virxml.c | 3 ++- 1 file changed,

Re: [PATCH 15/37] virDomainNetDefParseXML: Convert parsing of 'source_node' to a switch() statement

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Convert the individual 'if' clauses to a swtich statement. s/swtich/switch/ By moving the check that 'source_node' is non-null inside of each case rather we will be able to move more type specific code into the swithc s/swithc/switch/ statemen

Re: [PATCH 14/37] util: xml: Introduce virXMLPropStringRequired

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Similarly to virXMLPropString it extracts a string but reports an errori s/errori/error/ similar to the newer virXMLProp helpers if the attribute is not present. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virxml.c

Re: [PATCH 09/37] virDomainNetIPInfoParseXML: Don't VIR_FREE and overwrite autofreed 'nodes'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Use two separate variables for the nodes and count instead. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 12/37] util: xml: Introduce virXMLPropUUID

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: The helper function extracts an UUID with semantics similar to other *a UUID helpers we have. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virxml.c| 45 src/util/virxml.h

Re: [PATCH 10/37] virDomainNetIPInfoParseXML: Simplify cleanup

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Do the XPath fetches first as they don't require cleanup and rename 'cleanup' to 'error' and take it only on failure. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-)

Re: [PATCH 08/37] virDomainNetIPInfoParseXML: Remove pointless automatic clearing of 'route' and 'ip'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: The variables are only used in code paths which can't fail after they are allocated. Additionally decrease scope of the variables. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

Re: [PATCH 07/37] virDomainNetDefParseXML: Use virXMLPropEnumDefault for parsing 'def->type'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Replace ad-hoc logic that fills the default by use of the proper helper function. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 11/37] virDomainNetIPInfoParseXML: Don't force callers to set proper 'ctxt->node'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: In certain cases it's inconvenient to move the XPAth's context current *XPath node in the caller. Add a 'node' argument and override it inside the function. VIR_XPATH_NODE_AUTORESTORE handles the cleanup. Signed-off-by: Peter Krempa ---

Re: [PATCH 06/37] virDomainNetDefParseXML: Split out parsing of 'driver' subelement

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Separate the code into virDomainNetDefParseXMLDriver. Some local variables were renamed and the scope decreased. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 238 ++--- 1 file changed, 126 insertions(+),

Re: [PATCH 04/37] virDomainNetDefParseXML: Remove unnecessary temporary variables

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Some values were extracted into a temporary variable and then assigned to the definition later without a modification. Directly assign them instead. One slight modification was done to 'ifname' which was cleared in certain cases. Signed-off-by: Peter

Re: [PATCH 05/37] virDomainNetDefParseXML: Separate and localize parsing of 'backend/@vhost'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Move it into an independent block and move temporary variables locally. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) @@ -9484,7 +9479,14 @@

Re: [PATCH 05/37] virDomainNetDefParseXML: Separate and localize parsing of 'backend/@vhost'

2022-09-21 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Move it into an independent block and move temporary variables locally. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt PATCH] nodedev: switch to udev 'bind' events

2022-09-21 Thread Laine Stump
On 9/20/22 3:23 PM, Jonathon Jongsma wrote: Rather than listening to 'add' udev events, listen for 'bind' events instead. When we get an 'add' event, the sysfs tree for the device is often not ready yet. In that case we sleep in a loop until the sysfs tree appears, or give up after a timeout.

Re: [libvirt PATCH] src: warn if client hits the max requests limit

2022-09-21 Thread Peter Krempa
On Wed, Aug 24, 2022 at 16:21:02 +0100, Daniel P. Berrangé wrote: > Since they are simply normal RPC messages, the keep alive packets are > subject to the "max_client_requests" limit just like any API calls. > > Thus, if a client hits the 'max_client_requests' limit and all the > pending API

Re: [libvirt PATCH] src: warn if client hits the max requests limit

2022-09-21 Thread Daniel P . Berrangé
ping On Wed, Aug 24, 2022 at 04:21:02PM +0100, Daniel P. Berrangé wrote: > Since they are simply normal RPC messages, the keep alive packets are > subject to the "max_client_requests" limit just like any API calls. > > Thus, if a client hits the 'max_client_requests' limit and all the > pending