public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable
@ 2024-10-02 13:11 Aaron Lauterer
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function Aaron Lauterer
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

Since this version reworks a few things, especially in the logic, I
dropped the r-b and t-b tags in some patches.

The following patch has been dropped as this is handled in the API call
itself now.
[PATCH common v4 3/7] inotify: interfaces: make sure bridge_vids use space as separator

There is now a new one (2/7) changing the check in the iNotify.pm file
slightly.

this version reworks a few parts since
v4: incorporated @fionas suggestions, besides some style nits:
* rename check_list_empty to list_is_empty and adapt the return values
* renamed $check_vid to $valid_vid with return values for each case
* switch list separators to spaces in the API call, instead of when
  writing the file
* rework small logical error in the check if the end VLAN ID is larger
  than the start and $noerr is set.

v3: incorporated @shannons recommendations, in detail:
* improve regex with non-capturing group
* reworked check if valid VLAN config in UI field check
* small code style and spelling things
* reworded UI explanation text for bridge vids

v2:
* renamed format in JSONSchema to a more generic `pve-vlan-id-or-range`
* explicitly use spaces when writing interfaces file. This is one
  possible approach to deal with the fact, that the generic `-list`
  format will accept quite a few delimiters and we need spaces.
* code style improvements such as naming the regex results.
* add parameter verification to the web ui

With the changes to the JSONSchema we can then work on using it too for
the guest trunk option. This hasn't been started yet though.

common: Aaron Lauterer (3):
  tools: add check_list_empty function
  inotify: interfaces: check if bridge_vids is truthy instead of defined
  fix #3893: network: add vlan id and range parameter definitions

 src/PVE/INotify.pm    |  2 +-
 src/PVE/JSONSchema.pm | 39 +++++++++++++++++++++++++++++++++++++++
 src/PVE/Tools.pm      |  8 ++++++++
 3 files changed, 48 insertions(+), 1 deletion(-)


widget-toolkit: Aaron Lauterer (2):
  fix #3892: Network: add bridge vids field for bridge_vids
  Network: add explanation for bridge vids field

 src/node/NetworkEdit.js | 73 +++++++++++++++++++++++++++++++++++++++++
 src/node/NetworkView.js |  5 +++
 2 files changed, 78 insertions(+)


manager: Aaron Lauterer (2):
  fix #3893: api: network: add bridge_vids parameter
  fix #3893: ui: network: enable bridge_vids field

 PVE/API2/Network.pm         | 23 ++++++++++++++++++++++-
 www/manager6/node/Config.js |  1 +
 2 files changed, 23 insertions(+), 1 deletion(-)

-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-11 18:19   ` Thomas Lamprecht
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined Aaron Lauterer
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

In some situations we don't want a total empty list. I opted for a
dedicated function instead of integrating it as error in the
`split_list` function. It is used in many places and the potential
fallout from unintended behavior changes is too big.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
changes since:
v4: rename to `list_is_empty` and switch the return values
v3: none
v2: newly added

 src/PVE/Tools.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index bd305bd..36ffb05 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -718,6 +718,14 @@ sub split_list {
     return @data;
 }
 
+sub list_is_empty {
+    my ($list) = @_;
+    if (scalar(PVE::Tools::split_list($list)) < 1) {
+	return 1;
+    }
+    return 0;
+}
+
 sub trim {
     my $txt = shift;
 
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-11 18:23   ` [pve-devel] applied: " Thomas Lamprecht
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions Aaron Lauterer
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

The old check for defined would also be true if it contained an empty
string. By checking its truthyness, an empty string will be falsy and
therefore the default value will be used.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
changes since:
v4: newly added

 src/PVE/INotify.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 8a4a810..d29e2a1 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1315,7 +1315,7 @@ sub __interface_to_string {
 
 	if (defined($d->{bridge_vlan_aware})) {
 	    $raw .= "\tbridge-vlan-aware yes\n";
-	    my $vlans = defined($d->{bridge_vids}) ? $d->{bridge_vids} : "2-4094";
+	    my $vlans = $d->{bridge_vids} ? $d->{bridge_vids} : "2-4094";
 	    $raw .= "\tbridge-vids $vlans\n";
 	}
 	$done->{bridge_vlan_aware} = 1;
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function Aaron Lauterer
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-11 18:23   ` [pve-devel] applied: " Thomas Lamprecht
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids Aaron Lauterer
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

This is one step to make it possible to define the VLAN IDs and ranges
for bridges.

It is expected to be used in combination with the `-list` magic
property. Therefore it defines and checks the validity of a single list
item that could just be a single VLAN tag ID or a range.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
changes since
v4:
* reordered, used to be 2/7
* $check_vid got renamed to $valid_vid
* $valid_vid no returns explicit truthy/falsy values
* use `return` instead of `return undef`
* reworked last check ($start >= $end) to handle $noerr better

v3:superfloous
* switched regex to one with non-capturing group
* fixed superfloous space
v2:
* renamed schema to a more generic one with the use case of the guest
  trunk config in mind

 src/PVE/JSONSchema.pm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index ce39092..7c63af1 100644
--- a/src/PVE/JSONSchema.pm
+++ b/src/PVE/JSONSchema.pm
@@ -81,6 +81,12 @@ register_standard_option('pve-iface', {
     minLength => 2, maxLength => 20,
 });
 
+register_standard_option('pve-vlan-id-or-range', {
+    description => "VLAN ID or range.",
+    type => 'string', format => 'pve-vlan-id-or-range',
+    minLength => 1, maxLength => 9,
+});
+
 register_standard_option('pve-storage-id', {
     description => "The storage identifier.",
     type => 'string', format => 'pve-storage-id',
@@ -595,6 +601,39 @@ sub pve_verify_iface {
     return $id;
 }
 
+# vlan id (vids), single or range
+register_format('pve-vlan-id-or-range', \&pve_verify_vlan_id_or_range);
+sub pve_verify_vlan_id_or_range {
+    my ($vlan, $noerr) = @_;
+
+    my $valid_vid = sub {
+	my $tag = shift;
+	if ($tag < 2 || $tag > 4094) {
+	    return 0 if $noerr;
+	    die "invalid VLAN tag '$tag'\n";
+	}
+	return 1;
+    };
+
+    if ($vlan !~ m/^(\d+)(?:-(\d+))?$/) {
+	return if $noerr;
+	die "invalid VLAN configuration '$vlan'\n";
+    }
+    my $start = $1;
+    my $end = $2;
+    return if !$valid_vid->($start);
+    if ($end) {
+	return if !$valid_vid->($end);
+
+	if ($start >= $end) {
+	    return if $noerr;
+	    die "VLAN range must go from lower to higher tag '$vlan'\n";
+	}
+    }
+
+    return $vlan;
+}
+
 # general addresses by name or IP
 register_format('address', \&pve_verify_address);
 sub pve_verify_address {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
                   ` (2 preceding siblings ...)
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-11 20:55   ` Thomas Lamprecht
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field Aaron Lauterer
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

The new optional bridge_vids field allows to set that property via the
GUI. Since the backend needs to support it, the field needs to be
explicitly enabled.

For now, Proxmox VE (PVE) is the use case.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
---
changes since
v4: none
v3:
* switched regex to one with non-capturing group
* reworked valid VLAN check according to the suggestion
v2:
* added validation code following how it is implemented in the API

 src/node/NetworkEdit.js | 65 +++++++++++++++++++++++++++++++++++++++++
 src/node/NetworkView.js |  5 ++++
 2 files changed, 70 insertions(+)

diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
index 27c1baf..bfd0268 100644
--- a/src/node/NetworkEdit.js
+++ b/src/node/NetworkEdit.js
@@ -2,6 +2,9 @@ Ext.define('Proxmox.node.NetworkEdit', {
     extend: 'Proxmox.window.Edit',
     alias: ['widget.proxmoxNodeNetworkEdit'],
 
+    // Enable to show the VLAN ID field
+    bridge_set_vids: false,
+
     initComponent: function() {
 	let me = this;
 
@@ -57,11 +60,70 @@ Ext.define('Proxmox.node.NetworkEdit', {
 	}
 
 	if (me.iftype === 'bridge') {
+	    let vids = Ext.create('Ext.form.field.Text', {
+		fieldLabel: gettext('Bridge VIDS'),
+		name: 'bridge_vids',
+		emptyText: '2-4094',
+		disabled: true,
+		autoEl: {
+		    tag: 'div',
+		    'data-qtip': gettext('Space-separated list of VLANs and ranges, for example: 2 4 100-200'),
+		},
+		validator: function(value) {
+		    if (!value) { // empty
+			return true;
+		    }
+
+		    let vid_list = value.split(' ');
+
+		    let invalidVid = function(tag) {
+			if (!isNaN(tag) && (tag < 2 || tag > 4094)) {
+			    return `not a valid VLAN ID '${tag}'`;
+			}
+
+			return false;
+		    };
+
+		    for (const vid of vid_list) {
+			if (!vid) {
+			    continue;
+			}
+			let res = vid.match(/^(\d+)(?:-(\d+))?$/);
+			if (!res) {
+			    return `not a valid VLAN configuration '${vid}'`;
+			}
+			let start = Number(res[1]);
+			let end = Number(res[2]);
+
+			res = invalidVid(start);
+			if (res) {
+			    return res;
+			}
+
+			res = invalidVid(end);
+			if (res) {
+			    return res;
+			}
+
+			if (start >= end) {
+			    return `VID range must go from lower to higher tag: '${vid}'`;
+			}
+		    }
+		    return true;
+		},
+	    });
 	    column2.push({
 		xtype: 'proxmoxcheckbox',
 		fieldLabel: gettext('VLAN aware'),
 		name: 'bridge_vlan_aware',
 		deleteEmpty: !me.isCreate,
+		listeners: {
+		    change: function(f, newVal) {
+			if (me.bridge_set_vids) {
+			    vids.setDisabled(!newVal);
+			}
+		    },
+		},
 	    });
 	    column2.push({
 		xtype: 'textfield',
@@ -72,6 +134,9 @@ Ext.define('Proxmox.node.NetworkEdit', {
 		    'data-qtip': gettext('Space-separated list of interfaces, for example: enp0s0 enp1s0'),
 		},
 	    });
+	    if (me.bridge_set_vids) {
+		advancedColumn2.push(vids);
+	    }
 	} else if (me.iftype === 'OVSBridge') {
 	    column2.push({
 		xtype: 'textfield',
diff --git a/src/node/NetworkView.js b/src/node/NetworkView.js
index 1d67ac8..c08cbfa 100644
--- a/src/node/NetworkView.js
+++ b/src/node/NetworkView.js
@@ -33,6 +33,9 @@ Ext.define('Proxmox.node.NetworkView', {
 
     showApplyBtn: false,
 
+    // decides if VLAN IDs field for bridges is shown, depends on the product if needed
+    bridge_set_vids: false,
+
     initComponent: function() {
 	let me = this;
 
@@ -100,6 +103,7 @@ Ext.define('Proxmox.node.NetworkView', {
 		nodename: me.nodename,
 		iface: rec.data.iface,
 		iftype: rec.data.type,
+		bridge_set_vids: me.bridge_set_vids,
 		listeners: {
 		    destroy: () => reload(),
 		},
@@ -170,6 +174,7 @@ Ext.define('Proxmox.node.NetworkView', {
 		    nodename: me.nodename,
 		    iftype: iType,
 		    iface_default: findNextFreeInterfaceId(iDefault ?? iType),
+		    bridge_set_vids: me.bridge_set_vids,
 		    onlineHelp: 'sysadmin_network_configuration',
 		    listeners: {
 			destroy: () => reload(),
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
                   ` (3 preceding siblings ...)
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-11 20:49   ` Thomas Lamprecht
  2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 6/7] fix #3893: api: network: add bridge_vids parameter Aaron Lauterer
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

Make clear that it affects only out-/inbound traffic and can be used if
the underlying physical NICs support only a limited number of VLANs when
offloading is possible.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
---
changes since
v4: none
v3-follow-up:
* reordered inside the patch series
* reworded explanation according to suggestion

 src/node/NetworkEdit.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
index bfd0268..2e8dc25 100644
--- a/src/node/NetworkEdit.js
+++ b/src/node/NetworkEdit.js
@@ -112,6 +112,12 @@ Ext.define('Proxmox.node.NetworkEdit', {
 		    return true;
 		},
 	    });
+	    let vidsExplanation = Ext.create('Ext.form.field.Display', {
+		    disabled: true,
+		    userCls: 'pmx-hint',
+		    value: 'Limits the number of VLANs forwarded by the bridge ports. Useful if ' +
+			   'the physical NICs only support a limited number of offloaded VLANs.',
+	    });
 	    column2.push({
 		xtype: 'proxmoxcheckbox',
 		fieldLabel: gettext('VLAN aware'),
@@ -121,6 +127,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
 		    change: function(f, newVal) {
 			if (me.bridge_set_vids) {
 			    vids.setDisabled(!newVal);
+			    vidsExplanation.setDisabled(!newVal);
 			}
 		    },
 		},
@@ -136,6 +143,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
 	    });
 	    if (me.bridge_set_vids) {
 		advancedColumn2.push(vids);
+		advancedColumn2.push(vidsExplanation);
 	    }
 	} else if (me.iftype === 'OVSBridge') {
 	    column2.push({
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH manager v5 6/7] fix #3893: api: network: add bridge_vids parameter
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
                   ` (4 preceding siblings ...)
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 7/7] fix #3893: ui: network: enable bridge_vids field Aaron Lauterer
  2024-11-12  9:47 ` [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
  7 siblings, 0 replies; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

The API itself allows several list separators. The network configuration
for bridge_vids expects a space separated list. We therefore convert it
initially to a space separated list.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
I opted for a comment before the step where we split and reassemble the
list with spaces as separators as this step might be a bit obscure if
one is not aware of the reason (interfaces syntax).
Feel free to drop the comments if you think they are unnessecary

changes since
v4:
* use the list_is_empty function, therefore avoiding negative matches
* recreate the list with spaces as separators
v3:
* changed "vlans" to "VLANs" in description
v2:
* added checks to handle empty lists

 PVE/API2/Network.pm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index f39f04f5..397239ed 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -66,6 +66,11 @@ my $confdesc = {
 	type => 'boolean',
 	optional => 1,
     },
+    bridge_vids => {
+	description => "Specify the allowed VLANs. For example: '2 4 100-200'. Only used if the bridge is VLAN aware.",
+	optional => 1,
+	type => 'string', format => 'pve-vlan-id-or-range-list',
+    },
     bridge_ports => {
 	description => "Specify the interfaces you want to add to your bridge.",
 	optional => 1,
@@ -469,6 +474,14 @@ __PACKAGE__->register_method({
 		    if ! grep { $_ eq $iface } @ports;
 	    }
 
+	    if ($param->{bridge_vids} && PVE::Tools::list_is_empty($param->{bridge_vids})) {
+		raise_param_exc({ bridge_vids => "VLAN list items are empty" });
+	    }
+	    # make sure the list is space separated! other separators will cause problems in the
+	    # network configuration
+	    $param->{bridge_vids} = join(" ", PVE::Tools::split_list($param->{bridge_vids}))
+		if $param->{bridge_vids};
+
 	    $ifaces->{$iface} = $param;
 
 	    PVE::INotify::write_file('interfaces', $config);
@@ -558,7 +571,15 @@ __PACKAGE__->register_method({
 	    foreach my $k (keys %$param) {
 		$ifaces->{$iface}->{$k} = $param->{$k};
 	    }
-	    
+
+	    if ($param->{bridge_vids} && PVE::Tools::list_is_empty($param->{bridge_vids})) {
+		raise_param_exc({ bridge_vids => "VLAN list items are empty" });
+	    }
+	    # make sure the list is space separated! other separators will cause problems in the
+	    # network configuration
+	    $param->{bridge_vids} = join(" ", PVE::Tools::split_list($param->{bridge_vids}))
+		if $param->{bridge_vids};
+
 	    PVE::INotify::write_file('interfaces', $config);
 	};
 
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] [PATCH manager v5 7/7] fix #3893: ui: network: enable bridge_vids field
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
                   ` (5 preceding siblings ...)
  2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 6/7] fix #3893: api: network: add bridge_vids parameter Aaron Lauterer
@ 2024-10-02 13:11 ` Aaron Lauterer
  2024-11-12  9:47 ` [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
  7 siblings, 0 replies; 17+ messages in thread
From: Aaron Lauterer @ 2024-10-02 13:11 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
---
changes since
v4: none
v3: none
v2: none

 www/manager6/node/Config.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index d27592ce..7bdfb6d9 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -194,6 +194,7 @@ Ext.define('PVE.node.Config', {
 		    showApplyBtn: true,
 		    groups: ['services'],
 		    nodename: nodename,
+		    bridge_set_vids: true,
 		    onlineHelp: 'sysadmin_network_configuration',
 		},
 		{
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function Aaron Lauterer
@ 2024-11-11 18:19   ` Thomas Lamprecht
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-11 18:19 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

The subject still talks about the old name from v4, but..

Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
> In some situations we don't want a total empty list. I opted for a
> dedicated function instead of integrating it as error in the
> `split_list` function. It is used in many places and the potential
> fallout from unintended behavior changes is too big.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> changes since:
> v4: rename to `list_is_empty` and switch the return values
> v3: none
> v2: newly added
> 
>  src/PVE/Tools.pm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index bd305bd..36ffb05 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -718,6 +718,14 @@ sub split_list {
>      return @data;
>  }
>  
> +sub list_is_empty {
> +    my ($list) = @_;
> +    if (scalar(PVE::Tools::split_list($list)) < 1) {

(You're already in the PVE::Tools module, so this could call split_list directly)

> +	return 1;
> +    }
> +    return 0;

... this saves the call site a not really much, i.e. it would one allow to
write something like:

if (scalar(PVE::Tools::split_list($list)) == 0) {
    # ...
}

if (PVE::Tools::list_is_empty($list))) {
    # ...
}

And don't get me wrong, having a dedicated helper for such things that then
semantically encodes what's checked for in the method name can be fine, but
PVE::Tools is already very bloated, and it doesn't seem like we already require
this pattern often, or did you found other sites where this could be used?

Once pve-common gets split up, and we got some more specific and smaller module
dedicated to such stuff it might be fine to add this helper there, but for now
I'd avoid adding this as long as there are not many (existing) use cases.

I could fix patch 6/7 up on applying if nothing else pops up to avoid that
you need to send a v6 just for this.

> +}
> +
>  sub trim {
>      my $txt = shift;
>  



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] applied: [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined Aaron Lauterer
@ 2024-11-11 18:23   ` Thomas Lamprecht
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-11 18:23 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
> The old check for defined would also be true if it contained an empty
> string. By checking its truthyness, an empty string will be falsy and
> therefore the default value will be used.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> changes since:
> v4: newly added
> 
>  src/PVE/INotify.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [pve-devel] applied: [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions
  2024-10-02 13:11 ` [pve-devel] [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions Aaron Lauterer
@ 2024-11-11 18:23   ` Thomas Lamprecht
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-11 18:23 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
> This is one step to make it possible to define the VLAN IDs and ranges
> for bridges.
> 
> It is expected to be used in combination with the `-list` magic
> property. Therefore it defines and checks the validity of a single list
> item that could just be a single VLAN tag ID or a range.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> changes since
> v4:
> * reordered, used to be 2/7
> * $check_vid got renamed to $valid_vid
> * $valid_vid no returns explicit truthy/falsy values
> * use `return` instead of `return undef`
> * reworked last check ($start >= $end) to handle $noerr better
> 
> v3:superfloous
> * switched regex to one with non-capturing group
> * fixed superfloous space
> v2:
> * renamed schema to a more generic one with the use case of the guest
>   trunk config in mind
> 
>  src/PVE/JSONSchema.pm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field Aaron Lauterer
@ 2024-11-11 20:49   ` Thomas Lamprecht
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-11 20:49 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
> Make clear that it affects only out-/inbound traffic and can be used if
> the underlying physical NICs support only a limited number of VLANs when
> offloading is possible.

maybe something for the docs? As we use hints mostly to flag potential
dangerous/broken things in some edge cases or if the edit window only
covers that specific setting anyway.

> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> changes since
> v4: none
> v3-follow-up:
> * reordered inside the patch series
> * reworded explanation according to suggestion
> 
>  src/node/NetworkEdit.js | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
> index bfd0268..2e8dc25 100644
> --- a/src/node/NetworkEdit.js
> +++ b/src/node/NetworkEdit.js
> @@ -112,6 +112,12 @@ Ext.define('Proxmox.node.NetworkEdit', {
>  		    return true;
>  		},
>  	    });
> +	    let vidsExplanation = Ext.create('Ext.form.field.Display', {
> +		    disabled: true,
> +		    userCls: 'pmx-hint',
> +		    value: 'Limits the number of VLANs forwarded by the bridge ports. Useful if ' +
> +			   'the physical NICs only support a limited number of offloaded VLANs.',

If this gets added, can we gettext this? Translators frequently asked about
having more covered by gettext, and we can only win, as in the "worst" case
no one translates this which will still show it in the original English, just
like when not using gettext at all. 

In that case you will need a longer line, as we currently do not support
gettext with argument wrapped over multiple lines.

And/Or shorten it a bit, like:

'Limits the number of VLANs forwarded by bridge ports, useful for NICs with restricted VLAN offloading support.'


> +	    });
>  	    column2.push({
>  		xtype: 'proxmoxcheckbox',
>  		fieldLabel: gettext('VLAN aware'),
> @@ -121,6 +127,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
>  		    change: function(f, newVal) {
>  			if (me.bridge_set_vids) {
>  			    vids.setDisabled(!newVal);
> +			    vidsExplanation.setDisabled(!newVal);
>  			}
>  		    },
>  		},
> @@ -136,6 +143,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
>  	    });
>  	    if (me.bridge_set_vids) {
>  		advancedColumn2.push(vids);
> +		advancedColumn2.push(vidsExplanation);
>  	    }
>  	} else if (me.iftype === 'OVSBridge') {
>  	    column2.push({



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids
  2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids Aaron Lauterer
@ 2024-11-11 20:55   ` Thomas Lamprecht
  2024-11-12  9:03     ` Aaron Lauterer
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-11 20:55 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
> The new optional bridge_vids field allows to set that property via the
> GUI. Since the backend needs to support it, the field needs to be
> explicitly enabled.
> 
> For now, Proxmox VE (PVE) is the use case.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
> Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> changes since
> v4: none
> v3:
> * switched regex to one with non-capturing group
> * reworked valid VLAN check according to the suggestion
> v2:
> * added validation code following how it is implemented in the API
> 
>  src/node/NetworkEdit.js | 65 +++++++++++++++++++++++++++++++++++++++++
>  src/node/NetworkView.js |  5 ++++
>  2 files changed, 70 insertions(+)
> 
> diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
> index 27c1baf..bfd0268 100644
> --- a/src/node/NetworkEdit.js
> +++ b/src/node/NetworkEdit.js
> @@ -2,6 +2,9 @@ Ext.define('Proxmox.node.NetworkEdit', {
>      extend: 'Proxmox.window.Edit',
>      alias: ['widget.proxmoxNodeNetworkEdit'],
>  
> +    // Enable to show the VLAN ID field
> +    bridge_set_vids: false,
> +
>      initComponent: function() {
>  	let me = this;
>  
> @@ -57,11 +60,70 @@ Ext.define('Proxmox.node.NetworkEdit', {
>  	}
>  
>  	if (me.iftype === 'bridge') {
> +	    let vids = Ext.create('Ext.form.field.Text', {
> +		fieldLabel: gettext('Bridge VIDS'),

I know ifupdown2 names it VIDS, but is that really a good name here?
AFAICT it's not used outside of ifupdown2/cumuls, or do you got any references?

Maybe "Bridge VLAN IDs" would be a bit more telling?



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids
  2024-11-11 20:55   ` Thomas Lamprecht
@ 2024-11-12  9:03     ` Aaron Lauterer
  2024-11-12  9:55       ` Thomas Lamprecht
  0 siblings, 1 reply; 17+ messages in thread
From: Aaron Lauterer @ 2024-11-12  9:03 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion



On  2024-11-11  21:55, Thomas Lamprecht wrote:
> Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
>> The new optional bridge_vids field allows to set that property via the
>> GUI. Since the backend needs to support it, the field needs to be
>> explicitly enabled.
>>
>> For now, Proxmox VE (PVE) is the use case.
>>
>> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
>> Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
>> Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
>> ---
>> changes since
>> v4: none
>> v3:
>> * switched regex to one with non-capturing group
>> * reworked valid VLAN check according to the suggestion
>> v2:
>> * added validation code following how it is implemented in the API
>>
>>   src/node/NetworkEdit.js | 65 +++++++++++++++++++++++++++++++++++++++++
>>   src/node/NetworkView.js |  5 ++++
>>   2 files changed, 70 insertions(+)
>>
>> diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
>> index 27c1baf..bfd0268 100644
>> --- a/src/node/NetworkEdit.js
>> +++ b/src/node/NetworkEdit.js
>> @@ -2,6 +2,9 @@ Ext.define('Proxmox.node.NetworkEdit', {
>>       extend: 'Proxmox.window.Edit',
>>       alias: ['widget.proxmoxNodeNetworkEdit'],
>>   
>> +    // Enable to show the VLAN ID field
>> +    bridge_set_vids: false,
>> +
>>       initComponent: function() {
>>   	let me = this;
>>   
>> @@ -57,11 +60,70 @@ Ext.define('Proxmox.node.NetworkEdit', {
>>   	}
>>   
>>   	if (me.iftype === 'bridge') {
>> +	    let vids = Ext.create('Ext.form.field.Text', {
>> +		fieldLabel: gettext('Bridge VIDS'),
> 
> I know ifupdown2 names it VIDS, but is that really a good name here?
> AFAICT it's not used outside of ifupdown2/cumuls, or do you got any references?
> 
> Maybe "Bridge VLAN IDs" would be a bit more telling?

I tested it, and that is long enough to cause a line break in the label. 
I think I would opt for "VLAN IDs". It is only present on linux bridges 
and with the info box below as well it should be clear what it is for, 
without causing layout issues.

Will send a small v6 with the other suggestions too.




_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable
  2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
                   ` (6 preceding siblings ...)
  2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 7/7] fix #3893: ui: network: enable bridge_vids field Aaron Lauterer
@ 2024-11-12  9:47 ` Aaron Lauterer
  7 siblings, 0 replies; 17+ messages in thread
From: Aaron Lauterer @ 2024-11-12  9:47 UTC (permalink / raw)
  To: pve-devel

sent a v6 
https://lore.proxmox.com/pve-devel/20241112092554.106723-1-a.lauterer@proxmox.com/T/#t

On  2024-10-02  15:11, Aaron Lauterer wrote:
> Since this version reworks a few things, especially in the logic, I
> dropped the r-b and t-b tags in some patches.
> 
> The following patch has been dropped as this is handled in the API call
> itself now.
> [PATCH common v4 3/7] inotify: interfaces: make sure bridge_vids use space as separator
> 
> There is now a new one (2/7) changing the check in the iNotify.pm file
> slightly.
> 
> this version reworks a few parts since
> v4: incorporated @fionas suggestions, besides some style nits:
> * rename check_list_empty to list_is_empty and adapt the return values
> * renamed $check_vid to $valid_vid with return values for each case
> * switch list separators to spaces in the API call, instead of when
>    writing the file
> * rework small logical error in the check if the end VLAN ID is larger
>    than the start and $noerr is set.
> 
> v3: incorporated @shannons recommendations, in detail:
> * improve regex with non-capturing group
> * reworked check if valid VLAN config in UI field check
> * small code style and spelling things
> * reworded UI explanation text for bridge vids
> 
> v2:
> * renamed format in JSONSchema to a more generic `pve-vlan-id-or-range`
> * explicitly use spaces when writing interfaces file. This is one
>    possible approach to deal with the fact, that the generic `-list`
>    format will accept quite a few delimiters and we need spaces.
> * code style improvements such as naming the regex results.
> * add parameter verification to the web ui
> 
> With the changes to the JSONSchema we can then work on using it too for
> the guest trunk option. This hasn't been started yet though.
> 
> common: Aaron Lauterer (3):
>    tools: add check_list_empty function
>    inotify: interfaces: check if bridge_vids is truthy instead of defined
>    fix #3893: network: add vlan id and range parameter definitions
> 
>   src/PVE/INotify.pm    |  2 +-
>   src/PVE/JSONSchema.pm | 39 +++++++++++++++++++++++++++++++++++++++
>   src/PVE/Tools.pm      |  8 ++++++++
>   3 files changed, 48 insertions(+), 1 deletion(-)
> 
> 
> widget-toolkit: Aaron Lauterer (2):
>    fix #3892: Network: add bridge vids field for bridge_vids
>    Network: add explanation for bridge vids field
> 
>   src/node/NetworkEdit.js | 73 +++++++++++++++++++++++++++++++++++++++++
>   src/node/NetworkView.js |  5 +++
>   2 files changed, 78 insertions(+)
> 
> 
> manager: Aaron Lauterer (2):
>    fix #3893: api: network: add bridge_vids parameter
>    fix #3893: ui: network: enable bridge_vids field
> 
>   PVE/API2/Network.pm         | 23 ++++++++++++++++++++++-
>   www/manager6/node/Config.js |  1 +
>   2 files changed, 23 insertions(+), 1 deletion(-)
> 



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids
  2024-11-12  9:03     ` Aaron Lauterer
@ 2024-11-12  9:55       ` Thomas Lamprecht
  2024-11-12 10:29         ` Aaron Lauterer
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Lamprecht @ 2024-11-12  9:55 UTC (permalink / raw)
  To: Aaron Lauterer, Proxmox VE development discussion

Am 12.11.24 um 10:03 schrieb Aaron Lauterer:
> On  2024-11-11  21:55, Thomas Lamprecht wrote:
>> Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
>>>   	if (me.iftype === 'bridge') {
>>> +	    let vids = Ext.create('Ext.form.field.Text', {
>>> +		fieldLabel: gettext('Bridge VIDS'),
>>
>> I know ifupdown2 names it VIDS, but is that really a good name here?
>> AFAICT it's not used outside of ifupdown2/cumuls, or do you got any references?
>>
>> Maybe "Bridge VLAN IDs" would be a bit more telling?
> 
> I tested it, and that is long enough to cause a line break in the label.

While not breaking lines is naturally nice as long as there is a concise and
understandable text, but going for such niche abbreviations is IMO worse compared
to breaking layout slightly. And FWIW, we could also make the labels longer.

> I think I would opt for "VLAN IDs". It is only present on linux bridges 
> and with the info box below as well it should be clear what it is for, 
> without causing layout issues.

I'd still rather have a docs patch compared to the info box, maybe use a tooltip
there instead for a less intrusive hint?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids
  2024-11-12  9:55       ` Thomas Lamprecht
@ 2024-11-12 10:29         ` Aaron Lauterer
  0 siblings, 0 replies; 17+ messages in thread
From: Aaron Lauterer @ 2024-11-12 10:29 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion



On  2024-11-12  10:55, Thomas Lamprecht wrote:
> Am 12.11.24 um 10:03 schrieb Aaron Lauterer:
>> On  2024-11-11  21:55, Thomas Lamprecht wrote:
>>> Am 02.10.24 um 15:11 schrieb Aaron Lauterer:
>>>>    	if (me.iftype === 'bridge') {
>>>> +	    let vids = Ext.create('Ext.form.field.Text', {
>>>> +		fieldLabel: gettext('Bridge VIDS'),
>>>
>>> I know ifupdown2 names it VIDS, but is that really a good name here?
>>> AFAICT it's not used outside of ifupdown2/cumuls, or do you got any references?
>>>
>>> Maybe "Bridge VLAN IDs" would be a bit more telling?
>>
>> I tested it, and that is long enough to cause a line break in the label.
> 
> While not breaking lines is naturally nice as long as there is a concise and
> understandable text, but going for such niche abbreviations is IMO worse compared
> to breaking layout slightly. And FWIW, we could also make the labels longer.

Okay, I can send a follow up with the full ¨Bridge VLAN IDs" label, and 
if it is okay, I would increase the label size.
The label and input will not align with the ones above in the same 
column, though. Not sure if that is a dealbreaker if that input is a bit 
shorter.

> 
>> I think I would opt for "VLAN IDs". It is only present on linux bridges
>> and with the info box below as well it should be clear what it is for,
>> without causing layout issues.
> 
> I'd still rather have a docs patch compared to the info box, maybe use a tooltip
> there instead for a less intrusive hint?

The tooltip already explains the format. I tried to add the offloading 
info. What about the following?

"Space-separated list of VLANs and ranges offloaded to the hardware. 
Useful for NICs with restricted VLAN offloading support. For example: '2 
4 100-200'"

It is quite a bit, but


If we go for a docs patch I am not sure where to put it in our current 
network docs. We don't seem to have a section listing all the netwokr 
options and explaining them.



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-11-12 10:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 13:11 [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer
2024-10-02 13:11 ` [pve-devel] [PATCH common v5 1/7] tools: add check_list_empty function Aaron Lauterer
2024-11-11 18:19   ` Thomas Lamprecht
2024-10-02 13:11 ` [pve-devel] [PATCH common v5 2/7] inotify: interfaces: check if bridge_vids is truthy instead of defined Aaron Lauterer
2024-11-11 18:23   ` [pve-devel] applied: " Thomas Lamprecht
2024-10-02 13:11 ` [pve-devel] [PATCH common v5 3/7] fix #3893: network: add vlan id and range parameter definitions Aaron Lauterer
2024-11-11 18:23   ` [pve-devel] applied: " Thomas Lamprecht
2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 4/7] fix #3892: Network: add bridge vids field for bridge_vids Aaron Lauterer
2024-11-11 20:55   ` Thomas Lamprecht
2024-11-12  9:03     ` Aaron Lauterer
2024-11-12  9:55       ` Thomas Lamprecht
2024-11-12 10:29         ` Aaron Lauterer
2024-10-02 13:11 ` [pve-devel] [PATCH widget-toolkit v5 5/7] Network: add explanation for bridge vids field Aaron Lauterer
2024-11-11 20:49   ` Thomas Lamprecht
2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 6/7] fix #3893: api: network: add bridge_vids parameter Aaron Lauterer
2024-10-02 13:11 ` [pve-devel] [PATCH manager v5 7/7] fix #3893: ui: network: enable bridge_vids field Aaron Lauterer
2024-11-12  9:47 ` [pve-devel] [PATCH common, widget-toolkit, manager v5 0/7] fix #3893: make bridge vids configurable Aaron Lauterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal