[pve-devel] [PATCH 1/4] pve-bridge : move rate limit code to PVE::Network:tap_rate_limit

Alexandre Derumier aderumier at odiso.com
Tue Mar 5 10:22:15 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 pve-bridge |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/pve-bridge b/pve-bridge
index 8e50112..b8ef158 100755
--- a/pve-bridge
+++ b/pve-bridge
@@ -34,14 +34,7 @@ die "bridge '$bridge' does not exist\n" if !$bridgemtu;
 system ("/sbin/ifconfig $iface 0.0.0.0 promisc up mtu $bridgemtu") == 0 ||
     die "interface activation failed\n";
 
-if ($net->{rate}) {
-
-    my $debug = 0;
-    my $rate = int($net->{rate}*1024*1024);
-    my $burst = 1024*1024;
-
-    PVE::Network::setup_tc_rate_limit($iface, $rate, $burst, $debug);
-}
+PVE::Network::tap_rate_limit($iface, $net->{rate}) if $net->{rate};
 
 my $newbridge = PVE::Network::activate_bridge_vlan($bridge, $net->{tag});
 PVE::Network::copy_bridge_config($bridge, $newbridge) if $bridge ne $newbridge;
-- 
1.7.10.4



More information about the pve-devel mailing list