From 30084ffa4362e75e7e4f35fb5dd07fb40894f5c3 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Tue, 21 Jun 2016 17:31:17 +0200 Subject: [PATCH] minitopo: specify the metric for the metric scheduler --- src/mpExperience.py | 6 ++++++ src/mpParamXp.py | 2 ++ 2 files changed, 8 insertions(+) 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"