projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4b0f8c7
)
Network : add tap_rate_limit
author
Alexandre Derumier
<aderumier@odiso.com>
Tue, 5 Mar 2013 09:23:42 +0000
(10:23 +0100)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Tue, 5 Mar 2013 10:48:02 +0000
(11:48 +0100)
Moved from pve-bridge
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
data/PVE/Network.pm
patch
|
blob
|
blame
|
history
diff --git
a/data/PVE/Network.pm
b/data/PVE/Network.pm
index c20951eac65660c417ed73eb4fa227247474bcec..7d3707dc10828084e247f21a5626808548b42d50 100644
(file)
--- a/
data/PVE/Network.pm
+++ b/
data/PVE/Network.pm
@@
-38,6
+38,15
@@
sub setup_tc_rate_limit {
}
}
+sub tap_rate_limit {
+ my ($iface, $rate) = @_;
+
+ my $debug = 0;
+ $rate = int($rate*1024*1024);
+ my $burst = 1024*1024;
+
+ setup_tc_rate_limit($iface, $rate, $burst, $debug);
+}
sub copy_bridge_config {
my ($br0, $br1) = @_;