diff --git a/src/mpExperience.py b/src/mpExperience.py index f8a80ce..9e90f96 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -30,11 +30,17 @@ class MpExperience: self.setupSysctl() self.runUserspacePM() self.mpConfig.configureNetwork() + self.changeMetric() self.putPriorityOnPaths() self.runTcpDump() self.runNetemAt() pass + def changeMetric(self): + metric = self.xpParam.getParam(MpParamXp.METRIC) + if int(metric) >= 0: + self.mpTopo.notNSCommand("echo " + metric + " > /sys/module/mptcp_sched_metric/parameters/metric") + def putPriorityOnPaths(self): # Only meaningful if mpTopo is instance of MpMultiInterfaceTopo if isinstance(self.mpTopo, MpMultiInterfaceTopo): diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 4418203..bbfb633 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -53,6 +53,7 @@ class MpParamXp(MpParam): PRIOPATH0 = "prioPath0" PRIOPATH1 = "prioPath1" EXPIRATION = "expiration" + METRIC = "metric" # global sysctl @@ -88,6 +89,7 @@ class MpParamXp(MpParam): defaultValue[AUTOCORK] = "1" defaultValue[EARLYRETRANS] = "3" defaultValue[EXPIRATION] = "300" + defaultValue[METRIC] = "-1" defaultValue[CLIENTPCAP] = "no" defaultValue[SERVERPCAP] = "no"