Skip to content

Commit e5653fb

Browse files
committed
Change back to match mininet-hifi, except for max_queue_len=1000.
1 parent 3f61ea7 commit e5653fb

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

mininet/link.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,28 +191,24 @@ def bwCmds( self, bw=None, speedup=0, use_hfsc=False, use_tbf=False,
191191
if ( speedup > 0 and
192192
self.node.name[0:1] == 's' ):
193193
bw = speedup
194-
# BL: As far as I can discern,
195-
# burst is the max number of bytes we can send in 1 ms, but
196-
# this may not actually be correct! Why 1 ms?
197194
burst = bw * 1e6 / 8 * .001
195+
# This may not be correct - we should look more closely
196+
# at the semantics of burst (and cburst) to make sure we
197+
# are specifying the correct sizes. For now I have used
198+
# the same settings we had in the mininet-hifi code.
198199
if use_hfsc:
199200
cmds = [ '%s qdisc add dev %s root handle 1:0 hfsc default 1',
200201
'%s class add dev %s parent 1:0 classid 1:1 hfsc sc '
201202
+ 'rate %fMbit ul rate %fMbit' % ( bw, bw ) ]
202203
elif use_tbf:
203-
# was: latency_us = 10 * 1500 * 8 / bw
204-
latency_us = 1000
204+
latency_us = 10 * 1500 * 8 / bw
205205
cmds = ['%s qdisc add dev %s root handle 1: tbf ' +
206-
'rate %fMbit burst %f latency %fus' %
207-
( bw, burst, latency_us ) ]
206+
'rate %fMbit burst 15000 latency %fus' %
207+
( bw, latency_us ) ]
208208
else:
209-
# This may not be correct - we should look more closely
210-
# at the semantics of burst and cburst to make sure we
211-
# are specifying the correct sizes.
212209
cmds = [ '%s qdisc add dev %s root handle 1:0 htb default 1',
213210
'%s class add dev %s parent 1:0 classid 1:1 htb ' +
214-
'rate %fMbit burst %f cburst %f' %
215-
( bw, burst, burst ) ]
211+
'rate %fMbit burst 15k' % bw ]
216212
parent = ' parent 1:1 '
217213

218214
# ECN or RED

0 commit comments

Comments
 (0)