From e5653fb63bff7638b2899f39f95482393c9786a2 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 27 Mar 2012 00:31:37 -0700 Subject: [PATCH] Change back to match mininet-hifi, except for max_queue_len=1000. --- mininet/link.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/mininet/link.py b/mininet/link.py index 0aa05cd..3aa071d 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -191,28 +191,24 @@ class TCIntf( Intf ): if ( speedup > 0 and self.node.name[0:1] == 's' ): bw = speedup - # BL: As far as I can discern, - # burst is the max number of bytes we can send in 1 ms, but - # this may not actually be correct! Why 1 ms? burst = bw * 1e6 / 8 * .001 + # This may not be correct - we should look more closely + # at the semantics of burst (and cburst) to make sure we + # are specifying the correct sizes. For now I have used + # the same settings we had in the mininet-hifi code. if use_hfsc: cmds = [ '%s qdisc add dev %s root handle 1:0 hfsc default 1', '%s class add dev %s parent 1:0 classid 1:1 hfsc sc ' + 'rate %fMbit ul rate %fMbit' % ( bw, bw ) ] elif use_tbf: - # was: latency_us = 10 * 1500 * 8 / bw - latency_us = 1000 + latency_us = 10 * 1500 * 8 / bw cmds = ['%s qdisc add dev %s root handle 1: tbf ' + - 'rate %fMbit burst %f latency %fus' % - ( bw, burst, latency_us ) ] + 'rate %fMbit burst 15000 latency %fus' % + ( bw, latency_us ) ] else: - # This may not be correct - we should look more closely - # at the semantics of burst and cburst to make sure we - # are specifying the correct sizes. cmds = [ '%s qdisc add dev %s root handle 1:0 htb default 1', '%s class add dev %s parent 1:0 classid 1:1 htb ' + - 'rate %fMbit burst %f cburst %f' % - ( bw, burst, burst ) ] + 'rate %fMbit burst 15k' % bw ] parent = ' parent 1:1 ' # ECN or RED