fix both policing and position of shaping/policing
This commit is contained in:
parent
71010be455
commit
2ab842d37b
@ -65,8 +65,8 @@ class MpLinkCharacteristics:
|
|||||||
for n in self.netemAt:
|
for n in self.netemAt:
|
||||||
cmd = cmd + "sleep {}".format(n.delta)
|
cmd = cmd + "sleep {}".format(n.delta)
|
||||||
cmd = cmd + " && tc qdisc del dev {} ingress".format(ifname)
|
cmd = cmd + " && tc qdisc del dev {} ingress".format(ifname)
|
||||||
cmd = cmd + " && tc qdisc add dev {} handle ffff: ingress".format(ifname)
|
cmd = cmd + " ; tc qdisc add dev {} handle ffff: ingress".format(ifname)
|
||||||
cmd = cmd + " && tc filter add dev {} parent fff: u32 match u32 0 0 police rate {}mbit burst {} drop && ".format(ifname, self.bandwidth, int(self.queueSize) * 1500)
|
cmd = cmd + " && tc filter add dev {} parent ffff: u32 match u32 0 0 police rate {}mbit burst {} drop && ".format(ifname, self.bandwidth, int(self.queueSize) * 1500)
|
||||||
|
|
||||||
cmd = cmd + " true &"
|
cmd = cmd + " true &"
|
||||||
return cmd
|
return cmd
|
||||||
|
@ -130,13 +130,13 @@ class MpMultiInterfaceConfig(MpConfig):
|
|||||||
return self.getSwitchServerName(id)
|
return self.getSwitchServerName(id)
|
||||||
|
|
||||||
def getMidL2RInterface(self, id):
|
def getMidL2RInterface(self, id):
|
||||||
return self.getMidLeftName(id) + "-eth2"
|
return self.getMidRightName(id) + "-eth2"
|
||||||
|
|
||||||
def getMidR2LInterface(self, id):
|
def getMidR2LInterface(self, id):
|
||||||
return self.getMidRightName(id) + "-eth1"
|
return self.getMidRightName(id) + "-eth1"
|
||||||
|
|
||||||
def getMidL2RIncomingInterface(self, id):
|
def getMidL2RIncomingInterface(self, id):
|
||||||
return self.getMidLeftName(id) + "-eth1"
|
return self.getMidRightName(id) + "-eth1"
|
||||||
|
|
||||||
def getMidR2LIncomingInterface(self, id):
|
def getMidR2LIncomingInterface(self, id):
|
||||||
return self.getMidRightName(id) + "-eth2"
|
return self.getMidRightName(id) + "-eth2"
|
||||||
|
Loading…
Reference in New Issue
Block a user