summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/Util.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-23 08:57:19 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-23 15:19:54 -0700
commit87794a3d5ddb55af9cc298ec97b2892918e657d4 (patch)
treeda72c22470325ba2b891350e7c435a0bad2a2960 /lib/Vyatta/Qos/Util.pm
parenta7ec99d913b0169b987a4ebdf2d26a36670b20bb (diff)
downloadvyatta-cfg-qos-87794a3d5ddb55af9cc298ec97b2892918e657d4.tar.gz
vyatta-cfg-qos-87794a3d5ddb55af9cc298ec97b2892918e657d4.zip
Reimplementation of WRED
Make a simpler version of WRED that acts more like Cisco. Use Diffserv on Linux paper for example of how to use DSMARK and GRED to achieve similar result.
Diffstat (limited to 'lib/Vyatta/Qos/Util.pm')
-rw-r--r--lib/Vyatta/Qos/Util.pm24
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/Vyatta/Qos/Util.pm b/lib/Vyatta/Qos/Util.pm
index ee1b722..7f5454d 100644
--- a/lib/Vyatta/Qos/Util.pm
+++ b/lib/Vyatta/Qos/Util.pm
@@ -21,7 +21,7 @@ use warnings;
our @EXPORT =
qw(getRate getPercent getBurstSize getProtocol getDsfield getTime getAutoRate);
-our @EXPORT_OK = qw(getIfIndex RedParam);
+our @EXPORT_OK = qw(getIfIndex);
use base qw(Exporter);
sub get_num {
@@ -319,26 +319,4 @@ sub ethtoolRate {
return $rate;
}
-# Compute parameters for RED algorithim based on bandwidth and latency
-#
-# Bandwidth (bits/sec) * Latency (ms)
-# Maximum Threshold = --------------------------------------
-# (bytes) 8 bits/byte * 1000000 us/sec
-#
-# Minimum Threshold = Maximum Threshold / 3
-# Avpkt = Average Packet Length
-# Burst = ( 2 * MinThreshold + MaxThreshold) / ( 3 * Avpkt )
-# Limit = 4 * MaxThreshold
-#
-# These are based on Sally Floyd's recommendations:
-# http://www.icir.org/floyd/REDparameters.txt
-sub RedParam {
- my ( $bandwidth, $latency, $avgpkt ) = @_;
- my $qmax = ( $bandwidth * $latency ) / 8000000;
- my $qmin = $qmax / 3;
- my $burst = ( 2 * $qmin + $qmax ) / ( 3 * $avgpkt );
-
- return ($qmin, $qmax, $burst, 0.1);
-}
-
1;