Revision ae2ede79

View differences:

mininet/link.py
196 196
            # are specifying the correct sizes. For now I have used
197 197
            # the same settings we had in the mininet-hifi code.
198 198
            if use_hfsc:
199
                cmds = [ '%s qdisc add dev %s root handle 1:0 hfsc default 1',
199
                cmds += [ '%s qdisc add dev %s root handle 1:0 hfsc default 1',
200 200
                          '%s class add dev %s parent 1:0 classid 1:1 hfsc sc '
201 201
                          + 'rate %fMbit ul rate %fMbit' % ( bw, bw ) ]
202 202
            elif use_tbf:
203 203
                latency_us = 10 * 1500 * 8 / bw
204
                cmds = ['%s qdisc add dev %s root handle 1: tbf ' +
204
                cmds += ['%s qdisc add dev %s root handle 1: tbf ' +
205 205
                        'rate %fMbit burst 15000 latency %fus' %
206 206
                         ( bw, latency_us ) ]
207 207
            else:
208
                cmds = [ '%s qdisc add dev %s root handle 1:0 htb default 1',
208
                cmds += [ '%s qdisc add dev %s root handle 1:0 htb default 1',
209 209
                         '%s class add dev %s parent 1:0 classid 1:1 htb ' +
210 210
                         'rate %fMbit burst 15k' % bw ]
211 211
            parent = ' parent 1:1 '
212 212

  
213 213
            # ECN or RED
214 214
            if enable_ecn:
215
                cmds = [ '%s qdisc add dev %s' + parent +
215
                cmds += [ '%s qdisc add dev %s' + parent +
216 216
                          'handle 10: red limit 1000000 ' +
217 217
                          'min 20000 max 25000 avpkt 1000 ' +
218 218
                          'burst 20 ' +
219 219
                          'bandwidth %fmbit probability 1 ecn' % bw ]
220 220
                parent = ' parent 10: '
221 221
            elif enable_red:
222
                cmds = [ '%s qdisc add dev %s' + parent +
222
                cmds += [ '%s qdisc add dev %s' + parent +
223 223
                          'handle 10: red limit 1000000 ' +
224 224
                          'min 20000 max 25000 avpkt 1000 ' +
225 225
                          'burst 20 ' +
226 226
                          'bandwidth %fmbit probability 1' % bw ]
227 227
                parent = ' parent 10: '
228

  
229 228
        return cmds, parent
230 229

  
231 230
    @staticmethod

Also available in: Unified diff