[pve-devel] [PATCH v1 pve-common 2/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:13 CEST 2020


Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 src/PVE/Network.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index 3e7a1c1..3b09cec 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -389,6 +389,11 @@ my $cleanup_firewall_bridge = sub {
 
 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, $inrate, $outrate) = @_;
 
     #cleanup old port config from any openvswitch bridge
     eval {run_command("/usr/bin/ovs-vsctl del-port $iface", outfunc => sub {}, errfunc => sub {}) };
@@ -422,7 +427,7 @@ sub tap_plug {
 	}
     }
 
-    tap_rate_limit($iface, $rate);
+    tap_rate_limit($iface, $outrate, $inrate);
 }
 
 sub tap_unplug {
-- 
2.20.1






More information about the pve-devel mailing list