Change back to match mininet-hifi, except for max_queue_len=1000.

This commit is contained in:
Bob Lantz
2012-03-27 00:31:37 -07:00
parent 3f61ea7104
commit e5653fb63b
+8 -12
View File
@@ -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