From 2ab842d37b83288cff329baf8e26e34c01e685c0 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Thu, 28 Nov 2019 11:22:35 +0100 Subject: [PATCH] fix both policing and position of shaping/policing --- src/mpLinkCharacteristics.py | 4 ++-- src/mpMultiInterfaceConfig.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mpLinkCharacteristics.py b/src/mpLinkCharacteristics.py index 6e49b99..5dbd7b3 100644 --- a/src/mpLinkCharacteristics.py +++ b/src/mpLinkCharacteristics.py @@ -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 diff --git a/src/mpMultiInterfaceConfig.py b/src/mpMultiInterfaceConfig.py index 63ded6d..b089a5f 100644 --- a/src/mpMultiInterfaceConfig.py +++ b/src/mpMultiInterfaceConfig.py @@ -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"