Permalink
Browse files

Added use_fq option

  • Loading branch information...
Flavio Decastro
Flavio Decastro committed Oct 11, 2017
1 parent b142cf3 commit 9614a9445249b898cb4ed2d56c3699ca19c38e01
Showing with 6 additions and 3 deletions.
  1. +6 −3 mininet/link.py
View
@@ -230,7 +230,7 @@ class TCIntf( Intf ):
bwParamMax = 1000
def bwCmds( self, bw=None, speedup=0, use_hfsc=False, use_tbf=False,
latency_ms=None, enable_ecn=False, enable_red=False ):
latency_ms=None, enable_ecn=False, enable_red=False, use_fq=False ):
"Return tc commands to set bandwidth"
cmds, parent = [], ' root '
@@ -257,6 +257,9 @@ def bwCmds( self, bw=None, speedup=0, use_hfsc=False, use_tbf=False,
cmds += [ '%s qdisc add dev %s root handle 5: tbf ' +
'rate %fMbit burst 15000 latency %fms' %
( bw, latency_ms ) ]
elif use_fq:
cmds += ['%s qdisc add dev %s root fq pacing'
+ ' maxrate %fMbit ' % bw ]
else:
cmds += [ '%s qdisc add dev %s root handle 5:0 htb default 1',
'%s class add dev %s parent 5:0 classid 5:1 htb ' +
@@ -314,7 +317,7 @@ def tc( self, cmd, tc='tc' ):
def config( self, bw=None, delay=None, jitter=None, loss=None,
gro=False, txo=True, rxo=True,
speedup=0, use_hfsc=False, use_tbf=False,
speedup=0, use_hfsc=False, use_tbf=False, use_fq=False,
latency_ms=None, enable_ecn=False, enable_red=False,
max_queue_size=None, **params ):
"""Configure the port and set its properties.
@@ -363,7 +366,7 @@ def on( isOn ):
# Bandwidth limits via various methods
bwcmds, parent = self.bwCmds( bw=bw, speedup=speedup,
use_hfsc=use_hfsc, use_tbf=use_tbf,
use_hfsc=use_hfsc, use_tbf=use_tbf, use_fq=use_fq,
latency_ms=latency_ms,
enable_ecn=enable_ecn,
enable_red=enable_red )

0 comments on commit 9614a94

Please sign in to comment.