Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Laine Stump
On 6/12/24 2:32 PM, Roman Bogorodskiy wrote: Laine Stump wrote: On 6/10/24 2:54 PM, Roman Bogorodskiy wrote: Laine Stump wrote: This patch series enables libvirt to use nftables rules rather than iptables *when setting up virtual networks* (it does *not* add nftables support to the nw

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Laine Stump
On 6/12/24 11:46 AM, Andrea Bolognani wrote: On Wed, Jun 12, 2024 at 10:42:43AM GMT, Laine Stump wrote: On 6/12/24 9:18 AM, Andrea Bolognani wrote: On Wed, Jun 12, 2024 at 08:42:48AM GMT, Laine Stump wrote: On 6/12/24 6:47 AM, Daniel P. Berrangé wrote: On Wed, Jun 12, 2024 at 03:27:24AM -0700

[PATCH] tests: fix broken nftables test data so that individual tests are successful

2024-06-12 Thread Laine Stump
When the chain names and table name used by the nftables firewall backend were changed in commit 958aa7f274904eb8e4678a43eac845044f0dcc38, I forgot to change the test data file base.nftables, which has the extra "list" and "add chain/table" commands that are generated for the first test case of net

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Roman Bogorodskiy
Laine Stump wrote: > On 6/10/24 2:54 PM, Roman Bogorodskiy wrote: > >Laine Stump wrote: > > > > > This patch series enables libvirt to use nftables rules rather than > > > iptables *when setting up virtual networks* (it does *not* add > > > nftables support to the nwfilter driver). It accom

New libvirt-rust-xml project

2024-06-12 Thread Daniel P . Berrangé
There has been interest in creating an equivalent to the libvirt-go-xml-module project, but for Rust. Thus I've created the following new project: https://gitlab.com/libvirt/libvirt-rust-xml Don't expect to see any actual code there yet. It is just the absolute bare minimum Rust boilerplate set

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Andrea Bolognani
On Wed, Jun 12, 2024 at 10:42:43AM GMT, Laine Stump wrote: > On 6/12/24 9:18 AM, Andrea Bolognani wrote: > > On Wed, Jun 12, 2024 at 08:42:48AM GMT, Laine Stump wrote: > > > On 6/12/24 6:47 AM, Daniel P. Berrangé wrote: > > > > On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote: > > >

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Laine Stump
On 6/12/24 9:18 AM, Andrea Bolognani wrote: On Wed, Jun 12, 2024 at 08:42:48AM GMT, Laine Stump wrote: On 6/12/24 6:47 AM, Daniel P. Berrangé wrote: On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote: [...] I'd be extremely surprised to learn that guest network connectivity hasn'

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Andrea Bolognani
On Wed, Jun 12, 2024 at 08:42:48AM GMT, Laine Stump wrote: > On 6/12/24 6:47 AM, Daniel P. Berrangé wrote: > > On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote: > > > [...] I'd be extremely surprised to learn that > > > guest network connectivity hasn't worked on FreeBSD all this ti

Re: [PATCH 1/2] network: skip network driver init if no firewall backend is present

2024-06-12 Thread Laine Stump
On 6/11/24 12:47 PM, Daniel P. Berrangé wrote: If neither iptables or nftables are present, and no explicit config setting was made, skip network driver initialization, rather than making it a hard error. This allows libvirtd to carry on operating with the network driver disabled, while ensuring

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Laine Stump
On 6/12/24 6:47 AM, Daniel P. Berrangé wrote: On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote: On Wed, Jun 12, 2024 at 09:57:15AM GMT, Daniel P. Berrangé wrote: On Wed, Jun 12, 2024 at 01:54:47AM -0700, Andrea Bolognani wrote: Is there much of a difference between having an ex

[PATCH] tools: fix paths in PKI validation error messages

2024-06-12 Thread Daniel P . Berrangé
A couple of paths passed in the error messages, didnt match the paths that were actually being tested. Signed-off-by: Daniel P. Berrangé --- tools/virt-pki-validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virt-pki-validate.c b/tools/virt-pki-validate.c ind

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote: > On Wed, Jun 12, 2024 at 09:57:15AM GMT, Daniel P. Berrangé wrote: > > On Wed, Jun 12, 2024 at 01:54:47AM -0700, Andrea Bolognani wrote: > > > Is there much of a difference between having an explicit noop backend > > > that is check

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Andrea Bolognani
On Wed, Jun 12, 2024 at 09:57:15AM GMT, Daniel P. Berrangé wrote: > On Wed, Jun 12, 2024 at 01:54:47AM -0700, Andrea Bolognani wrote: > > Is there much of a difference between having an explicit noop backend > > that is checked for availability after all other ones, and simply not > > failing to in

Re: [PATCH RFC v2 00/12] Support throttle block filters

2024-06-12 Thread Chun Feng Wu
I just pushed v3 at https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/HIIXCOZG2AVNJJAO5KTPJHXRU4GPO2HI/

Re: [PATCH RFC v2 07/12] schema: Add new domain elements to support multiple throttle filters

2024-06-12 Thread Chun Feng Wu
I checked "QEMU_CAPS_OBJECT_JSON" in v3 https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/HIIXCOZG2AVNJJAO5KTPJHXRU4GPO2HI/

Re: [PATCH RFC v2 07/12] schema: Add new domain elements to support multiple throttle filters

2024-06-12 Thread Chun Feng Wu
fixed in v3 https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/HIIXCOZG2AVNJJAO5KTPJHXRU4GPO2HI/

[PATCH RFC v3 16/16] virsh: Add option "throttle-groups" to "attach_disk"

2024-06-12 Thread wucf
From: Chun Feng Wu * Update "attach_disk" to support new option: throttle-groups to form filter chain in QEMU for specific disk Signed-off-by: Chun Feng Wu --- tools/virsh-completer-domain.c | 64 ++ tools/virsh-completer-domain.h | 5 +++ tools/virsh-domain.

[PATCH RFC v3 15/16] virsh: Add support for throttle group operations

2024-06-12 Thread wucf
From: Chun Feng Wu * Add new cmds: throttlegroupset, throttlegrouplist, throttlegroupinfo, throttlegroupdel Signed-off-by: Chun Feng Wu --- tools/virsh-domain.c | 428 +++ 1 file changed, 428 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virs

[PATCH RFC v3 14/16] test_driver: Test throttle group lifecycle APIs

2024-06-12 Thread wucf
From: Chun Feng Wu * Extract common methods for both "testDomainSetThrottleGroup" and "testDomainSetBlockIoTune": testDomainValidateBlockIoTune, testDomainSetBlockIoTuneFields, testDomainCheckBlockIoTuneMutualExclusion, testDomainCheckBlockIoTuneMax * Test "Set": testDomainSetThrottleGroup * Te

[PATCH RFC v3 13/16] qemuxmlconftest: Add 'throttlefilter' tests

2024-06-12 Thread wucf
From: Chun Feng Wu * Add tests for "throttlegroup" * Add tests for "throttlefilter" Signed-off-by: Chun Feng Wu --- .../throttlefilter.x86_64-latest.args | 43 .../throttlefilter.x86_64-latest.xml | 65 +++ tests/qemuxmlconfdata/throttlefilter.xml

[PATCH RFC v3 12/16] qemu: command: Support throttle filters during qemuProcessLaunch

2024-06-12 Thread wucf
From: Chun Feng Wu * Add qemuBuildDiskThrottleFiltersCommandLine in qemuBuildDiskCommandLine to add "blockdev" * Make sure referenced throttle group exists Signed-off-by: Chun Feng Wu --- src/conf/domain_validate.c | 12 src/qemu/qemu_command.c| 40 +++

[PATCH RFC v3 11/16] qemu: command: Support throttle groups during qemuProcessLaunch

2024-06-12 Thread wucf
From: Chun Feng Wu * Add qemuBuildThrottleGroupCommandLine in qemuBuildCommandLine to add "object" of throttle-group * Verify throttle group definition when lauching vm * Check QEMU_CAPS_OBJECT_JSON before "qemuBuildObjectCommandlineFromJSON", which is to build "-object" option Signed-off-by:

[PATCH RFC v3 10/16] config: validate: Refactor disk iotune validation for reuse

2024-06-12 Thread wucf
From: Chun Feng Wu * Disk iotune validation can be reused for throttle group validation, refactor it into common method "virDomainDiskIoTuneValidate" Signed-off-by: Chun Feng Wu --- src/conf/domain_validate.c | 78 +- 1 file changed, 44 insertions(+), 34 de

[PATCH RFC v3 09/16] qemu: hotplug: Support hot attach and detach block disk along with throttle filters

2024-06-12 Thread wucf
From: Chun Feng Wu When attaching disk along with specified throttle groups, those groups will be chained up by parent node name, this change includes service side codes: * Each filter references one throttle group by group name * Update "qemuDomainDiskGetTopNodename" to take top throttle node n

[PATCH RFC v3 08/16] qemu: Implement qemu driver for throttle API

2024-06-12 Thread wucf
From: Chun Feng Wu Implement the following methods in qemu driver: * Extract common methods for "qemuDomainSetBlockIoTune" and "qemuDomainSetThrottleGroup": qemuDomainValidateBlockIoTune, qemuDomainSetBlockIoTuneFields, qemuDomainCheckBlockIoTuneMutualExclusion, qemuDomainCheckBlockIoTuneMax.

[PATCH RFC v3 07/16] remote: New APIs for ThrottleGroup lifecycle management

2024-06-12 Thread wucf
From: Chun Feng Wu Defined new public APIs: * virDomainSetThrottleGroup to add or update throttlegroup within specific domain, it will be referenced by throttlefilter later in disk to do limits * virDomainGetThrottleGroup to get throttlegroup info, old-style is discarded(APIs to query first for

[PATCH RFC v3 06/16] tests: Test qemuMonitorJSONGetThrottleGroup and qemuMonitorJSONUpdateThrottleGroup

2024-06-12 Thread wucf
From: Chun Feng Wu Within "testQemuMonitorJSONqemuMonitorJSONUpdateThrottleGroup" * Test qemuMonitorJSONGetThrottleGroup * Test qemuMonitorJSONUpdateThrottleGroup, which updates limits through "qom-set" Signed-off-by: Chun Feng Wu --- tests/qemumonitorjsontest.c | 86 +

[PATCH RFC v3 05/16] qemu: monitor: Add support for ThrottleGroup operations

2024-06-12 Thread wucf
From: Chun Feng Wu * ThrottleGroup is updated through "qemuMonitorJSONUpdateThrottleGroup" * ThrottleGroup is retrieved through "qemuMonitorJSONGetThrottleGroup" * ThrottleGroup is deleted by reusing "qemuMonitorDelObject" * ThrottleGroup is added by reusing "qemuMonitorAddObject" * "qemuMonitorM

[PATCH RFC v3 04/16] config: Introduce ThrottleFilter and corresponding XML parsing

2024-06-12 Thread wucf
From: Chun Feng Wu * Define new struct 'virDomainThrottleFilterDef' and corresponding destructor * Update _virDomainDiskDef to include virDomainThrottleFilterDef * Support new resource "Parse" and "Format" for operations between DOM XML and structs Signed-off-by: Chun Feng Wu --- src/conf/dom

[PATCH RFC v3 03/16] config: Introduce ThrottleGroup and corresponding XML parsing

2024-06-12 Thread wucf
From: Chun Feng Wu * Define new struct 'virDomainThrottleGroupDef' and corresponding destructor * Add operations(Add, Update, Del, Find, Copy, Free) for 'virDomainThrottleGroupDef' * Update _virDomainDef to include virDomainThrottleGroupDef * Support new resource "Parse" and "Format" for operati

[PATCH RFC v3 02/16] schema: Add new domain elements to support multiple throttle filters

2024-06-12 Thread wucf
From: Chun Feng Wu * Add new elements '' * can include multiple throttlegroup references to form filter chain in qemu * Chained throttle filters feature in qemu is described at https://github.com/qemu/qemu/blob/master/docs/throttle.txt Signed-off-by: Chun Feng Wu --- docs/formatdomain.rst

[PATCH RFC v3 01/16] schema: Add new domain elements to support multiple throttle groups

2024-06-12 Thread wucf
From: Chun Feng Wu * Refactor "diskIoTune" to extract common schema "iotune" * Add new elements '' * contains defintion, which references "iotune" Signed-off-by: Chun Feng Wu --- docs/formatdomain.rst | 26 +++ src/conf/schemas/domaincommon.rng | 274 --

[PATCH RFC v3 00/16] Support throttle block filters

2024-06-12 Thread wucf
From: Chun Feng Wu Hi, I am thinking to leverage "throttle block filter" in QEMU to support more flexible I/O limits(e.g. tiered I/O groups), one sample provided by QEMU doc is: https://github.com/qemu/qemu/blob/master/docs/throttle.txt "For example, let's say that we have three different drive

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 01:54:47AM -0700, Andrea Bolognani wrote: > On Tue, Jun 11, 2024 at 05:27:42PM GMT, Daniel P. Berrangé wrote: > > On Tue, Jun 11, 2024 at 08:49:42AM -0700, Andrea Bolognani wrote: > > > One additional issue with this: > > > > > > $ PATH=/usr/bin /usr/sbin/libvirtd > > >

Re: [libvirt PATCH 00/28] native support for nftables in virtual network driver

2024-06-12 Thread Andrea Bolognani
On Tue, Jun 11, 2024 at 05:27:42PM GMT, Daniel P. Berrangé wrote: > On Tue, Jun 11, 2024 at 08:49:42AM -0700, Andrea Bolognani wrote: > > One additional issue with this: > > > > $ PATH=/usr/bin /usr/sbin/libvirtd > > error : virNetworkLoadDriverConfig:146 : internal error: could not > > find a