Revision edf60032 mininet/link.py

View differences:

mininet/link.py
202 202
            elif use_tbf:
203 203
                if latency_ms is None:
204 204
                    latency_ms = 15 * 8 / bw
205
                cmds += ['%s qdisc add dev %s root handle 1: tbf ' +
206
                        'rate %fMbit burst 15000 latency %fms' %
207
                         ( bw, latency_ms ) ]
205
                cmds += [ '%s qdisc add dev %s root handle 1: tbf ' +
206
                          'rate %fMbit burst 15000 latency %fms' %
207
                          ( bw, latency_ms ) ]
208 208
            else:
209 209
                cmds += [ '%s qdisc add dev %s root handle 1:0 htb default 1',
210
                         '%s class add dev %s parent 1:0 classid 1:1 htb ' +
211
                         'rate %fMbit burst 15k' % bw ]
210
                          '%s class add dev %s parent 1:0 classid 1:1 htb ' +
211
                          'rate %fMbit burst 15k' % bw ]
212 212
            parent = ' parent 1:1 '
213 213

  
214 214
            # ECN or RED
......
282 282

  
283 283
        # Bandwidth limits via various methods
284 284
        bwcmds, parent = self.bwCmds( bw=bw, speedup=speedup,
285
                                 use_hfsc=use_hfsc, use_tbf=use_tbf,
286
                                 latency_ms=latency_ms, enable_ecn=enable_ecn,
287
                                 enable_red=enable_red )
285
                                      use_hfsc=use_hfsc, use_tbf=use_tbf,
286
                                      latency_ms=latency_ms,
287
                                      enable_ecn=enable_ecn,
288
                                      enable_red=enable_red )
288 289
        cmds += bwcmds
289 290

  
290 291
        # Delay/jitter/loss/max_queue_size using netem

Also available in: Unified diff