[pve-devel] [PATCH pve-network 6/7] move mtu properties to zone
Alexandre Derumier
aderumier at odiso.com
Mon Feb 10 17:26:09 CET 2020
---
PVE/Network/SDN/VnetPlugin.pm | 6 ------
PVE/Network/SDN/Zones/EvpnPlugin.pm | 3 ++-
PVE/Network/SDN/Zones/QinQPlugin.pm | 6 ++++++
PVE/Network/SDN/Zones/VxlanPlugin.pm | 3 ++-
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/PVE/Network/SDN/VnetPlugin.pm b/PVE/Network/SDN/VnetPlugin.pm
index d24a539..bd61209 100644
--- a/PVE/Network/SDN/VnetPlugin.pm
+++ b/PVE/Network/SDN/VnetPlugin.pm
@@ -66,11 +66,6 @@ sub properties {
description => "alias name of the vnet",
optional => 1,
},
- mtu => {
- type => 'integer',
- description => "mtu",
- optional => 1,
- },
ipv4 => {
description => "Anycast router ipv4 address.",
type => 'string', format => 'CIDRv4',
@@ -96,7 +91,6 @@ sub options {
alias => { optional => 1 },
ipv4 => { optional => 1 },
ipv6 => { optional => 1 },
- mtu => { optional => 1 },
mac => { optional => 1 },
};
}
diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index b9a941f..056a7b1 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -32,6 +32,7 @@ sub options {
nodes => { optional => 1},
'vrf-vxlan' => { optional => 0 },
'controller' => { optional => 0 },
+ mtu => { optional => 1 },
};
}
@@ -55,7 +56,7 @@ sub generate_sdn_config {
my $mtu = 1450;
$mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
- $mtu = $vnet->{mtu} if $vnet->{mtu};
+ $mtu = $vnet->{mtu} if $plugin_config->{mtu};
#vxlan interface
my @iface_config = ();
diff --git a/PVE/Network/SDN/Zones/QinQPlugin.pm b/PVE/Network/SDN/Zones/QinQPlugin.pm
index 2023c02..28527b6 100644
--- a/PVE/Network/SDN/Zones/QinQPlugin.pm
+++ b/PVE/Network/SDN/Zones/QinQPlugin.pm
@@ -16,6 +16,11 @@ sub properties {
type => 'integer',
description => "vlan tag",
},
+ mtu => {
+ type => 'integer',
+ description => "mtu",
+ optional => 1,
+ },
};
}
@@ -25,6 +30,7 @@ sub options {
nodes => { optional => 1},
'tag' => { optional => 0 },
'bridge' => { optional => 0 },
+ 'mtu' => { optional => 1 },
};
}
diff --git a/PVE/Network/SDN/Zones/VxlanPlugin.pm b/PVE/Network/SDN/Zones/VxlanPlugin.pm
index e29e540..82760f1 100644
--- a/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -36,6 +36,7 @@ sub options {
return {
nodes => { optional => 1},
peers => { optional => 0 },
+ mtu => { optional => 1 },
};
}
@@ -57,7 +58,7 @@ sub generate_sdn_config {
my $mtu = 1450;
$mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
- $mtu = $vnet->{mtu} if $vnet->{mtu};
+ $mtu = $vnet->{mtu} if $plugin_config->{mtu};
#vxlan interface
my @iface_config = ();
--
2.20.1
More information about the pve-devel
mailing list