all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network] fix #5324: non vlanaware zone: add mtu to veth links
Date: Mon, 25 Mar 2024 18:01:49 +0100	[thread overview]
Message-ID: <20240325170149.1142780-1-aderumier@odiso.com> (raw)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 src/PVE/Network/SDN/Zones/VlanPlugin.pm            | 3 +++
 src/test/zones/vlan/bridge/expected_sdn_interfaces | 4 ++++
 src/test/zones/vlan/bridge/sdn_config              | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 6a68e8d..13fb49e 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -106,17 +106,20 @@ sub generate_sdn_config {
 	@iface_config = ();
 	push @iface_config, "link-type veth";
 	push @iface_config, "veth-peer-name $vnet_uplinkpeer";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$vnet_uplink}}, @iface_config) if !$config->{$vnet_uplink};
 
 	@iface_config = ();
 	push @iface_config, "link-type veth";
 	push @iface_config, "veth-peer-name $vnet_uplink";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$vnet_uplinkpeer}}, @iface_config) if !$config->{$vnet_uplinkpeer};
 
 	@iface_config = ();
 	push @iface_config, "bridge_ports $bridge_ports $vnet_uplinkpeer";
 	push @iface_config, "bridge_stp off";
 	push @iface_config, "bridge_fd 0";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$bridgevlan}}, @iface_config) if !$config->{$bridgevlan};
     }
 
diff --git a/src/test/zones/vlan/bridge/expected_sdn_interfaces b/src/test/zones/vlan/bridge/expected_sdn_interfaces
index f9e96d1..fc05ff7 100644
--- a/src/test/zones/vlan/bridge/expected_sdn_interfaces
+++ b/src/test/zones/vlan/bridge/expected_sdn_interfaces
@@ -4,20 +4,24 @@ auto ln_myvnet
 iface ln_myvnet
 	link-type veth
 	veth-peer-name pr_myvnet
+	mtu 9200
 
 auto myvnet
 iface myvnet
 	bridge_ports ln_myvnet
 	bridge_stp off
 	bridge_fd 0
+	mtu 9200
 
 auto pr_myvnet
 iface pr_myvnet
 	link-type veth
 	veth-peer-name ln_myvnet
+	mtu 9200
 
 auto vmbr0v100
 iface vmbr0v100
 	bridge_ports  eth0.100 pr_myvnet
 	bridge_stp off
 	bridge_fd 0
+	mtu 9200
diff --git a/src/test/zones/vlan/bridge/sdn_config b/src/test/zones/vlan/bridge/sdn_config
index c6cfaaa..c61e659 100644
--- a/src/test/zones/vlan/bridge/sdn_config
+++ b/src/test/zones/vlan/bridge/sdn_config
@@ -6,6 +6,6 @@
                       },
              },
   zones   => {
-               ids => { myzone => { bridge => "vmbr0", ipam => "pve", type => "vlan" } },
+               ids => { myzone => { bridge => "vmbr0", ipam => "pve", type => "vlan", mtu => "9200" } },
              },
 }
-- 
2.39.2




             reply	other threads:[~2024-03-25 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:01 Alexandre Derumier [this message]
2024-04-04 13:58 ` Stefan Hanreich
2024-11-15 13:44   ` Stefan Hanreich
2024-11-15 14:58     ` Thomas Lamprecht
2024-11-15 15:04       ` Stefan Hanreich
2024-11-15 15:08 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240325170149.1142780-1-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal