[PATCH] tools/libs/light: Fix nic->vlan memory allocation

2024-05-20 Thread Leigh Brown
ools/libs/light: Add vlan field to libxl_device_nic") Signed-off-by: Leigh Brown --- tools/libs/light/libxl_nic.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/light/libxl_nic.c b/tools/libs/light/libxl_nic.c index d861e3726d..300a96a8b1 100644 --

Re: xl list -l aborts with double free error with vlan patches

2024-05-20 Thread Leigh Brown
Hi, On 2024-05-20 15:33, Leigh Brown wrote: Hello, When running xl list -l with my VLAN patches applied, a double free error is raised. I'm unable to determine why. broken: 0cc01c603f4287233715a526b056bc20e0e97412 (HEAD) tools/xl: add vlan keyword to vif option

xl list -l aborts with double free error with vlan patches

2024-05-20 Thread Leigh Brown
Hello, When running xl list -l with my VLAN patches applied, a double free error is raised. I'm unable to determine why. broken: 0cc01c603f4287233715a526b056bc20e0e97412 (HEAD) tools/xl: add vlan keyword to vif option okay: 3bc14e4fa4b9832888710759a7dbe5f0d239f33b tools/libs/light: Add vla

[PATCH v4 0/2] Finalise bridge VLAN support

2024-05-17 Thread Leigh Brown
iterating through terms. Regards, Leigh. --- Leigh Brown (2): tools/hotplug/Linux: Add bridge VLAN support tools/examples: Example Linux bridge VLAN config docs/misc/linux-bridge-vlan/README | 68 + docs/misc/linux-bridge-vlan/br0.netdev | 7 ++ docs/misc/linux

[PATCH v4 2/2] tools/examples: Example Linux bridge VLAN config

2024-05-17 Thread Leigh Brown
Add a new directory linux-bridge-vlan with example files showing how to configure systemd-networkd to support a bridge VLAN configuration. Signed-off-by: Leigh Brown --- docs/misc/linux-bridge-vlan/README | 68 ++ docs/misc/linux-bridge-vlan/br0.netdev | 7

[PATCH v4 1/2] tools/hotplug/Linux: Add bridge VLAN support

2024-05-17 Thread Leigh Brown
e untagged. A complex example would be: vlan=1p/10-15/20-25u This capability requires the iproute2 bridge command to be installed. An error will be generated if the vlan parameter is set and the bridge command is not available. Signed-off-by: Leigh Brown --- tools/hotplug/Lin

Re: [PATCH v3 3/4] tools/hotplug/Linux: Add bridge VLAN support

2024-05-17 Thread Leigh Brown
Hi Jason, On 2024-05-17 03:19, Jason Andryuk wrote: On Thu, May 16, 2024 at 6:56 AM Leigh Brown wrote: Update add_to_bridge shell function to read the vlan parameter from xenstore and set the bridge VLAN configuration for the VID. Add additional helper functions to parse the vlan

[PATCH v3 4/4] docs/misc: Example Linux bridge VLAN config

2024-05-16 Thread Leigh Brown
Add a new directory linux-bridge-vlan with example files showing how to configure systemd-networkd to support a bridge VLAN configuration. Signed-off-by: Leigh Brown --- docs/misc/linux-bridge-vlan/README | 68 ++ docs/misc/linux-bridge-vlan/br0.netdev | 7

[PATCH v3 2/4] tools/xl: add vlan keyword to vif option

2024-05-16 Thread Leigh Brown
n the VIF when adding it to the bridge port. This will be done by the vif-bridge script and functions. Document the new `vlan' keyword in xl-network-configuration(5). Signed-off-by: Leigh Brown Reviewed-by: Jason Andryuk --- docs/man/xl-network-configuration.5.p

[PATCH v3 0/4] Add bridge VLAN support

2024-05-16 Thread Leigh Brown
idge VLAN in the Linux hotplug scripts. I don't believe NetBSD or FreeBSD support this capability, but if they do please point me in the direction of some documentation and/or examples. NB: I'm not very familiar with Xen code base so may have missed something important, although I

[PATCH v3 3/4] tools/hotplug/Linux: Add bridge VLAN support

2024-05-16 Thread Leigh Brown
e untagged. A complex example would be: vlan=1p/10-15/20-25u This capability requires the iproute2 bridge command to be installed. An error will be generated if the vlan parameter is set and the bridge command is not available. Signed-off-by: Leigh Brown --- tools/hotplug/Lin

[PATCH v3 1/4] tools/libs/light: Add vlan field to libxl_device_nic

2024-05-16 Thread Leigh Brown
rform VLAN filtering on bridge ports. The Xen hotplug scripts need to be updated to read this information from the xenstore and perform the required configuration. Signed-off-by: Leigh Brown Reviewed-by: Jason Andryuk --- tools/libs/light/libxl_nic.c | 10 ++ tools/libs/

Re: [RFC PATCH v2 5/5] tools/examples: Example Linux bridge VLAN config

2024-05-15 Thread Leigh Brown
Hi Jason, On 2024-05-15 01:58, Jason Andryuk wrote: On Wed, May 8, 2024 at 6:08 PM Leigh Brown wrote:> Add a new directory linux-bridge-vlan with examples files showing how to configure systemd-networkd to support a bridge VLAN configuration. Signed-off-by: Leigh Brown --- tools/examp

Re: [RFC PATCH v2 4/5] docs/man: document VIF vlan keyword

2024-05-15 Thread Leigh Brown
Hi Jason, On 2024-05-15 01:57, Jason Andryuk wrote: On Wed, May 8, 2024 at 5:39 PM Leigh Brown wrote: Document the new `vlan' keyword in xl-network-configuration(5). Signed-off-by: Leigh Brown Reviewed-by: Jason Andryuk One nit below --- docs/man/xl-network-configuration.5.p

Re: [RFC PATCH v2 3/5] tools/hotplug/Linux: Add bridge VLAN support

2024-05-15 Thread Leigh Brown
Hi Jason, On 2024-05-15 01:57, Jason Andryuk wrote: On Wed, May 8, 2024 at 6:55 PM Leigh Brown wrote: Update add_to_bridge shell function to read the vlan parameter from xenstore and set the bridge VLAN configuration for the VID. Add additional helper functions to parse the vlan

Re: [PATCH for-4.19] tools/xentop: fix cpu% sort order

2024-05-14 Thread Leigh Brown
On 2024-05-14 13:07, Andrew Cooper wrote: On 14/05/2024 9:13 am, Leigh Brown wrote: Although using integer comparison to compare doubles kind of works, it's annoying to see domains slightly out of order when sorting by cpu%. Add a compare_dbl() function and update compare_cpu_pct() to ca

Re: [PATCH for-4.19] tools/xentop: fix cpu% sort order

2024-05-14 Thread Leigh Brown
Hello, On 2024-05-14 13:07, Andrew Cooper wrote: On 14/05/2024 9:13 am, Leigh Brown wrote: Although using integer comparison to compare doubles kind of works, it's annoying to see domains slightly out of order when sorting by cpu%. Add a compare_dbl() function and update compare_cpu_pct

[PATCH] tools/xentop: fix cpu% sort order

2024-05-14 Thread Leigh Brown
Although using integer comparison to compare doubles kind of works, it's annoying to see domains slightly out of order when sorting by cpu%. Add a compare_dbl() function and update compare_cpu_pct() to call it. Signed-off-by: Leigh Brown --- tools/xentop/xentop.c | 13 - 1

Re: [PATCH for-4.19] libxl: fix population of the online vCPU bitmap for PVH

2024-05-10 Thread Leigh Brown
et as enabled, which contradicts the data in xenstore if vCPUs is different than maximum vCPUs. Fix by copying the internal libxl bitmap that's populated based on the vCPUs parameter. Reported-by: Arthur Borsboom Link: https://gitlab.com/libvirt/libvirt/-/issues/399 Reported-by: Leigh Br

Re: [RFC PATCH v2 0/5] Add bridge VLAN support

2024-05-09 Thread Leigh Brown
Hi Andrew, On 2024-05-09 16:53, Andrew Cooper wrote: On 08/05/2024 10:38 pm, Leigh Brown wrote: Hello all, I realised over the weekend that there is a valid use case for providing a VIF to a domain that has access to multiple VLANs, e.g. a router. Yes, you can create a VIF per VLAN, but if

[RFC PATCH v2 4/5] docs/man: document VIF vlan keyword

2024-05-08 Thread Leigh Brown
Document the new `vlan' keyword in xl-network-configuration(5). Signed-off-by: Leigh Brown --- docs/man/xl-network-configuration.5.pod.in | 38 ++ 1 file changed, 38 insertions(+) diff --git a/docs/man/xl-network-configuration.5.pod.in b/docs/man/xl-network-configurat

[RFC PATCH v2 2/5] tools/xl: add vlan keyword to vif option

2024-05-08 Thread Leigh Brown
n the VIF when adding it to the bridge port. This will be done by the vif-bridge script and functions. Signed-off-by: Leigh Brown --- tools/xl/xl_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index ed983200c3..7546fe7e7a 100644 --- a/too

[RFC PATCH v2 0/5] Add bridge VLAN support

2024-05-08 Thread Leigh Brown
I'm not very familiar with Xen code base so may have missed something important, although I have tested it and it is working well for me. Cheers, Leigh. Leigh Brown (5): tools/libs/light: Add vlan field to libxl_device_nic tools/xl: add vlan keyword to vif option tools/hotplug/Linux: Add

[RFC PATCH v2 1/5] tools/libs/light: Add vlan field to libxl_device_nic

2024-05-08 Thread Leigh Brown
rform VLAN filtering on bridge ports. The Xen hotplug scripts need to be updated to read this information from the xenstore and perform the required configuration. Signed-off-by: Leigh Brown --- tools/libs/light/libxl_nic.c | 10 ++ tools/libs/light/libxl_types.idl | 1 + 2 files ch

[RFC PATCH v2 5/5] tools/examples: Example Linux bridge VLAN config

2024-05-08 Thread Leigh Brown
Add a new directory linux-bridge-vlan with examples files showing how to configure systemd-networkd to support a bridge VLAN configuration. Signed-off-by: Leigh Brown --- tools/examples/linux-bridge-vlan/README | 68 +++ tools/examples/linux-bridge-vlan/br0.netdev | 7

[RFC PATCH v2 3/5] tools/hotplug/Linux: Add bridge VLAN support

2024-05-08 Thread Leigh Brown
e untagged. A complex example would be: vlan=1p/10-15/20-25u This capability only works when using the iproute2 bridge command, so a warning is issued if the vlan parameter is set and the bridge command is not available, as it will be ignored. Signed-off-by: Leigh Brown --- tools/hotplug/Lin

[RFC PATCH 1/5] tools/libs/light: Add vid field to libxl_device_nic

2024-05-03 Thread Leigh Brown
VLAN filtering on bridge ports. The Xen hotplug scripts need to be updated to read this information from then xenstore and perform the required configuration. Signed-off-by: Leigh Brown --- tools/libs/light/libxl_nic.c | 20 tools/libs/light/libxl_types.idl | 1 + 2 files ch

[RFC PATCH 0/5] Add bridge VLAN support

2024-05-03 Thread Leigh Brown
For many years I have been configuring VLANs on my Linux Dom0 by creating VLAN interfaces for each VLAN I wanted to connect a domain to and then a corresponding bridge. So I would tend to have things like: enp0s0-> br0 -> vif1, vif2 enp0s0.10 -> br0vl10 -> vif3, vif4 enp0s0.20 -> br0vl20 -

[RFC PATCH 4/5] docs/man: document VIF vid keyword

2024-05-03 Thread Leigh Brown
Document the new `vid' keyword in xl-network-configuration(5). Signed-off-by: Leigh Brown --- docs/man/xl-network-configuration.5.pod.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/man/xl-network-configuration.5.pod.in b/docs/man/xl-network-configuration.5.pod.in

[RFC PATCH 3/5] tools/hotplug/Linux: Add bridge VLAN support

2024-05-03 Thread Leigh Brown
Update add_to_bridge shell function to read the vid parameter from xenstore and set the bridge LAN for the VID to the given value. This only works when using the iproute2 bridge command, so a warning is issued if using the legacy brctl command and a vid is set. Signed-off-by: Leigh Brown

[RFC PATCH 2/5] tools/xl: add vid keyword vif option

2024-05-03 Thread Leigh Brown
Update parse_nic_config() to support a new `vid' keyword. This keyword specifies the numeric VLAN ID to assign to the VIF when attaching it to the bridge port, on operating systems that support the capability (e.g. Linux). Signed-off-by: Leigh Brown --- tools/xl/xl_parse.c | 2 ++ 1

[RFC PATCH 5/5] tools/examples: Examples Linux bridge VLAN config

2024-05-03 Thread Leigh Brown
Add a new directory linux-bridge-vlan showing how to configure systemd-networkd to support a bridge VLAN configuration. Signed-off-by: Leigh Brown --- tools/examples/linux-bridge-vlan/README | 52 +++ tools/examples/linux-bridge-vlan/br0.netdev | 7 +++ tools/examples

Re: [PATCH v2 2/6] tools/misc: rework xenwatchdogd signal handling

2024-04-11 Thread Leigh Brown
Hi Andrew, On 2024-04-11 13:12, Andrew Cooper wrote: On 29/03/2024 11:10 am, le...@solinno.co.uk wrote: diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index 2f7c822d61..35a0df655a 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -9,9 +9,11 @@ #inclu