fix both policing and position of shaping/policing

This commit is contained in:
Quentin De Coninck 2019-11-28 11:22:35 +01:00
parent 71010be455
commit 2ab842d37b
2 changed files with 4 additions and 4 deletions

View File

@ -65,8 +65,8 @@ class MpLinkCharacteristics:
for n in self.netemAt:
cmd = cmd + "sleep {}".format(n.delta)
cmd = cmd + " && tc qdisc del dev {} 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 qdisc add dev {} handle ffff: ingress".format(ifname)
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 &"
return cmd

View File

@ -130,13 +130,13 @@ class MpMultiInterfaceConfig(MpConfig):
return self.getSwitchServerName(id)
def getMidL2RInterface(self, id):
return self.getMidLeftName(id) + "-eth2"
return self.getMidRightName(id) + "-eth2"
def getMidR2LInterface(self, id):
return self.getMidRightName(id) + "-eth1"
def getMidL2RIncomingInterface(self, id):
return self.getMidLeftName(id) + "-eth1"
return self.getMidRightName(id) + "-eth1"
def getMidR2LIncomingInterface(self, id):
return self.getMidRightName(id) + "-eth2"