minitopo: specify the metric for the metric scheduler

This commit is contained in:
Quentin De Coninck 2016-06-21 17:31:17 +02:00
parent 588b99865e
commit 30084ffa43
2 changed files with 8 additions and 0 deletions

View File

@ -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):

View File

@ -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"