[pve-devel] [PATCH v1 pve-network 3/5] add out/in-rate parameter to tap_plug sub, keep version with just rate param

Hannes Laimer h.laimer at proxmox.com
Fri Sep 11 12:08:14 CEST 2020


Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 PVE/Network/SDN/Zones.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/PVE/Network/SDN/Zones.pm b/PVE/Network/SDN/Zones.pm
index 143d6e5..0fe6098 100644
--- a/PVE/Network/SDN/Zones.pm
+++ b/PVE/Network/SDN/Zones.pm
@@ -278,10 +278,15 @@ sub veth_create {
 
 sub tap_plug {
     my ($iface, $bridge, $tag, $firewall, $trunks, $rate) = @_;
+    tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate, $rate);
+}
+
+sub tap_plug {
+    my ($iface, $bridge, $tag, $firewall, $trunks, $outrate, $inrate) = @_;
 
     my $vnet = PVE::Network::SDN::Vnets::get_vnet($bridge);
     if (!$vnet) { # fallback for classic bridge
-	PVE::Network::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate);
+	PVE::Network::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $outrate, $inrate);
 	return;
     }
 
@@ -292,7 +297,7 @@ sub tap_plug {
 	if $plugin_config->{nodes} && !defined($plugin_config->{nodes}->{$nodename});
 
     my $plugin = PVE::Network::SDN::Zones::Plugin->lookup($plugin_config->{type});
-    $plugin->tap_plug($plugin_config, $vnet, $tag, $iface, $bridge, $firewall, $trunks, $rate);
+    $plugin->tap_plug($plugin_config, $vnet, $tag, $iface, $bridge, $firewall, $trunks, $outrate, $inrate);
 }
 
 1;
-- 
2.20.1






More information about the pve-devel mailing list