wip userspace pm
Signed-off-by: Benjamin Hesmans <benjamin.hesmans@uclouvain.be>
This commit is contained in:
parent
9004ca4062
commit
b448fd6ce4
@ -16,10 +16,37 @@ class MpExperience:
|
|||||||
|
|
||||||
def prepare(self):
|
def prepare(self):
|
||||||
self.setupSysctl()
|
self.setupSysctl()
|
||||||
|
self.runUserspacePM()
|
||||||
self.runTcpDump()
|
self.runTcpDump()
|
||||||
self.runNetemAt()
|
self.runNetemAt()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def runUserspacePM(self):
|
||||||
|
if self.xpParam.getParam(MpParamXp.KERNELPMC) != "netlink":
|
||||||
|
print("Client : Error, I can't change the userspace pm if the kernel pm is not netlink !")
|
||||||
|
else:
|
||||||
|
upmc = self.xpParam.getParam(MpParamXp.USERPMC)
|
||||||
|
self.mpConfig.commandTo(self.mpConfig.client, upmc + \
|
||||||
|
"&>upmc.log &")
|
||||||
|
if self.xpParam.getParam(MpParamXp.KERNELPMS) != "netlink":
|
||||||
|
print("Server : Error, I can't change the userspace pm if the kernel pm is not netlink !")
|
||||||
|
else:
|
||||||
|
upms = self.xpParam.getParam(MpParamXp.USERPMS)
|
||||||
|
self.mpConfig.commandTo(self.mpConfig.server, upms + \
|
||||||
|
"&>upms.log &")
|
||||||
|
|
||||||
|
def cleanUserspacePM(self):
|
||||||
|
if self.xpParam.getParam(MpParamXp.KERNELPMC) != "netlink":
|
||||||
|
print("Client : Error, I can't change the userspace pm if the kernel pm is not netlink !")
|
||||||
|
else:
|
||||||
|
upmc = self.xpParam.getParam(MpParamXp.USERPMC)
|
||||||
|
self.mpConfig.commandTo(self.mpConfig.client, "killall " + upmc)
|
||||||
|
if self.xpParam.getParam(MpParamXp.KERNELPMS) != "netlink":
|
||||||
|
print("Server : Error, I can't change the userspace pm if the kernel pm is not netlink !")
|
||||||
|
else:
|
||||||
|
upms = self.xpParam.getParam(MpParamXp.USERPMS)
|
||||||
|
self.mpConfig.commandTo(self.mpConfig.server, "killall " + upms)
|
||||||
|
|
||||||
def runNetemAt(self):
|
def runNetemAt(self):
|
||||||
if not self.mpTopo.changeNetem == "yes":
|
if not self.mpTopo.changeNetem == "yes":
|
||||||
print("I don't need to change netem")
|
print("I don't need to change netem")
|
||||||
@ -54,6 +81,7 @@ class MpExperience:
|
|||||||
self.mpTopo.commandTo(self.mpConfig.server,
|
self.mpTopo.commandTo(self.mpConfig.server,
|
||||||
"killall tcpdump")
|
"killall tcpdump")
|
||||||
self.backUpSysctl()
|
self.backUpSysctl()
|
||||||
|
self.cleanUserspacePM()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def setupSysctl(self):
|
def setupSysctl(self):
|
||||||
|
@ -7,6 +7,8 @@ class MpParamXp(MpParam):
|
|||||||
KERNELPM = "kpm"
|
KERNELPM = "kpm"
|
||||||
KERNELPMC = "kpmc" #kernel path manager client / server
|
KERNELPMC = "kpmc" #kernel path manager client / server
|
||||||
KERNELPMS = "kpms"
|
KERNELPMS = "kpms"
|
||||||
|
USERPMC = "upmc"
|
||||||
|
USERPMS = "upms" #userspace path manager client / server
|
||||||
CLIENTPCAP = "clientPcap"
|
CLIENTPCAP = "clientPcap"
|
||||||
SERVERPCAP = "serverPcap"
|
SERVERPCAP = "serverPcap"
|
||||||
XPTYPE = "xpType"
|
XPTYPE = "xpType"
|
||||||
@ -38,7 +40,8 @@ class MpParamXp(MpParam):
|
|||||||
defaultValue[RMEM] = "10240 87380 16777216"
|
defaultValue[RMEM] = "10240 87380 16777216"
|
||||||
defaultValue[KERNELPM] = "fullmesh"
|
defaultValue[KERNELPM] = "fullmesh"
|
||||||
defaultValue[KERNELPMC] = "fullmesh"
|
defaultValue[KERNELPMC] = "fullmesh"
|
||||||
defaultValue[KERNELPMS] = "fullmesh"
|
defaultValue[USERPMC] = "fullmesh"
|
||||||
|
defaultValue[USERPMS] = "fullmesh"
|
||||||
defaultValue[SCHED] = "default"
|
defaultValue[SCHED] = "default"
|
||||||
|
|
||||||
defaultValue[CLIENTPCAP] = "no"
|
defaultValue[CLIENTPCAP] = "no"
|
||||||
|
Loading…
Reference in New Issue
Block a user