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):
|
||||
self.setupSysctl()
|
||||
self.runUserspacePM()
|
||||
self.runTcpDump()
|
||||
self.runNetemAt()
|
||||
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):
|
||||
if not self.mpTopo.changeNetem == "yes":
|
||||
print("I don't need to change netem")
|
||||
@ -54,6 +81,7 @@ class MpExperience:
|
||||
self.mpTopo.commandTo(self.mpConfig.server,
|
||||
"killall tcpdump")
|
||||
self.backUpSysctl()
|
||||
self.cleanUserspacePM()
|
||||
pass
|
||||
|
||||
def setupSysctl(self):
|
||||
|
@ -7,6 +7,8 @@ class MpParamXp(MpParam):
|
||||
KERNELPM = "kpm"
|
||||
KERNELPMC = "kpmc" #kernel path manager client / server
|
||||
KERNELPMS = "kpms"
|
||||
USERPMC = "upmc"
|
||||
USERPMS = "upms" #userspace path manager client / server
|
||||
CLIENTPCAP = "clientPcap"
|
||||
SERVERPCAP = "serverPcap"
|
||||
XPTYPE = "xpType"
|
||||
@ -38,7 +40,8 @@ class MpParamXp(MpParam):
|
||||
defaultValue[RMEM] = "10240 87380 16777216"
|
||||
defaultValue[KERNELPM] = "fullmesh"
|
||||
defaultValue[KERNELPMC] = "fullmesh"
|
||||
defaultValue[KERNELPMS] = "fullmesh"
|
||||
defaultValue[USERPMC] = "fullmesh"
|
||||
defaultValue[USERPMS] = "fullmesh"
|
||||
defaultValue[SCHED] = "default"
|
||||
|
||||
defaultValue[CLIENTPCAP] = "no"
|
||||
|
Loading…
Reference in New Issue
Block a user