mpLinkCharacteristics: do as Mininet does: use htb, then netem

This commit is contained in:
Quentin De Coninck 2016-05-08 18:48:56 +02:00
parent a6dd6d64a4
commit 6336c158df

View File

@ -36,11 +36,11 @@ class MpLinkCharacteristics:
cmd = cmd + " tc qdisc change dev " + ifname + " " cmd = cmd + " tc qdisc change dev " + ifname + " "
cmd = cmd + " parent " + MpLinkCharacteristics.tcNetemParent cmd = cmd + " parent " + MpLinkCharacteristics.tcNetemParent
cmd = cmd + " handle " + MpLinkCharacteristics.tcNetemHandle cmd = cmd + " handle " + MpLinkCharacteristics.tcNetemHandle
cmd = cmd + " netem " + n.cmd + " delay " + self.delay + "ms" cmd = cmd + " htb rate " + self.bandwidth + "mbit"
cmd = cmd + " rate " + self.bandwidth + "mbit && " cmd = cmd + " burst " + str(int(self.queueSize) * 1500) + " && "
cmd = cmd + " tc qdisc add dev " + ifname + " " cmd = cmd + " tc qdisc add dev " + ifname + " "
cmd = cmd + " parent " + MpLinkCharacteristics.tcNetemHandle cmd = cmd + " parent " + MpLinkCharacteristics.tcNetemHandle
cmd = cmd + " pfifo limit " + self.queueSize + " && " cmd = cmd + " netem " + n.cmd + " delay " + self.delay + "ms && "
cmd = cmd + " true &" cmd = cmd + " true &"
return cmd return cmd