2015-01-08 18:52:45 +00:00
|
|
|
from mpParam import MpParam
|
|
|
|
|
|
|
|
class MpParamXp(MpParam):
|
|
|
|
|
|
|
|
RMEM = "rmem"
|
2015-03-24 09:05:40 +00:00
|
|
|
WMEM = "wmem"
|
2015-01-21 10:34:29 +00:00
|
|
|
SCHED = "sched"
|
2015-11-25 09:46:27 +00:00
|
|
|
CC = "congctrl"
|
2016-04-14 13:41:50 +00:00
|
|
|
AUTOCORK = "autocork"
|
2016-04-29 13:01:41 +00:00
|
|
|
EARLYRETRANS = "earlyRetrans"
|
2015-01-14 14:19:39 +00:00
|
|
|
KERNELPM = "kpm"
|
2015-02-23 10:32:22 +00:00
|
|
|
KERNELPMC = "kpmc" #kernel path manager client / server
|
|
|
|
KERNELPMS = "kpms"
|
2015-02-23 11:26:32 +00:00
|
|
|
USERPMC = "upmc"
|
|
|
|
USERPMS = "upms" #userspace path manager client / server
|
2015-02-23 11:42:14 +00:00
|
|
|
USERPMCARGS = "upmc_args"
|
|
|
|
USERPMSARGS = "upms_args"
|
2015-01-08 18:52:45 +00:00
|
|
|
CLIENTPCAP = "clientPcap"
|
|
|
|
SERVERPCAP = "serverPcap"
|
2016-04-13 07:38:17 +00:00
|
|
|
SNAPLENPCAP = "snaplenPcap"
|
2015-01-08 18:52:45 +00:00
|
|
|
XPTYPE = "xpType"
|
|
|
|
PINGCOUNT = "pingCount"
|
2015-01-12 15:34:41 +00:00
|
|
|
DDIBS = "ddIBS"
|
|
|
|
DDOBS = "ddIBS"
|
|
|
|
DDCOUNT = "ddCount"
|
|
|
|
PVRATELIMIT= "pvRateLimit"
|
|
|
|
PVG = "pvG" #patched version of pv
|
|
|
|
PVZ = "pvZ"
|
|
|
|
NCSERVERPORT = "ncServerPort"
|
|
|
|
NCCLIENTPORT = "ncClientPort"
|
2015-02-10 10:03:21 +00:00
|
|
|
CHANGEPV = "changePv"
|
|
|
|
CHANGEPVAT = "changePvAt"
|
2015-08-14 22:34:27 +00:00
|
|
|
HTTPSFILE = "file" # file to wget, if random : we create a file with random data called random.
|
|
|
|
HTTPSRANDOMSIZE = "file_size" # if file is set to random, define the size of the random file
|
2015-11-05 14:06:30 +00:00
|
|
|
EPLOADTESTDIR = "epload_test_dir"
|
2015-12-01 16:48:32 +00:00
|
|
|
HTTPFILE = "http_file"
|
|
|
|
HTTPRANDOMSIZE = "http_file_size"
|
2015-12-02 09:22:57 +00:00
|
|
|
NETPERFTESTLEN = "netperfTestlen"
|
|
|
|
NETPERFTESTNAME = "netperfTestname"
|
|
|
|
NETPERFREQRESSIZE = "netperfReqresSize"
|
2015-12-02 14:22:51 +00:00
|
|
|
ABCONCURRENTREQUESTS = "abConccurentRequests"
|
|
|
|
ABTIMELIMIT = "abTimelimit"
|
2016-04-14 13:41:50 +00:00
|
|
|
SIRIRUNTIME = "siriRunTime"
|
|
|
|
SIRIQUERYSIZE = "siriQuerySize"
|
|
|
|
SIRIRESPONSESIZE = "siriResponseSize"
|
|
|
|
SIRIDELAYQUERYRESPONSE = "siriDelayQueryResponse"
|
|
|
|
SIRIMINPAYLOADSIZE = "siriMinPayloadSize"
|
|
|
|
SIRIMAXPAYLOADSIZE = "siriMaxPayloadSize"
|
|
|
|
SIRIINTERVALTIMEMS = "siriIntervalTimeMs"
|
|
|
|
SIRIBUFFERSIZE = "siriBufferSize"
|
2016-04-27 14:08:21 +00:00
|
|
|
VLCFILE = "vlcFile"
|
|
|
|
VLCTIME = "vlcTime"
|
2016-06-01 13:37:13 +00:00
|
|
|
DITGKBYTES = "ditgKBytes"
|
2016-06-09 09:02:10 +00:00
|
|
|
DITGCONSTANTPACKETSIZE = "ditgConstantPacketSize"
|
2016-06-01 12:52:25 +00:00
|
|
|
DITGMEANPOISSONPACKETSSEC = "ditgMeanPoissonPacketsSec"
|
2016-06-08 14:45:50 +00:00
|
|
|
DITGCONSTANTPACKETSSEC = "ditgConstantPacketsSec"
|
2016-06-07 14:10:47 +00:00
|
|
|
DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec"
|
|
|
|
DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec"
|
2016-05-13 08:00:29 +00:00
|
|
|
PRIOPATH0 = "prioPath0"
|
|
|
|
PRIOPATH1 = "prioPath1"
|
2016-06-21 15:35:03 +00:00
|
|
|
BACKUPPATH0 = "backupPath0"
|
2016-06-21 15:32:19 +00:00
|
|
|
BACKUPPATH1 = "backupPath1"
|
2016-05-13 13:41:49 +00:00
|
|
|
EXPIRATION = "expiration"
|
2016-06-08 14:45:50 +00:00
|
|
|
BUFFERAUTOTUNING = "bufferAutotuning"
|
2016-06-21 15:31:17 +00:00
|
|
|
METRIC = "metric"
|
2015-08-14 22:34:27 +00:00
|
|
|
|
2015-01-08 18:52:45 +00:00
|
|
|
|
2015-01-14 14:19:39 +00:00
|
|
|
# global sysctl
|
|
|
|
sysctlKey = {}
|
|
|
|
sysctlKey[RMEM] = "net.ipv4.tcp_rmem"
|
2015-03-24 09:05:40 +00:00
|
|
|
sysctlKey[WMEM] = "net.ipv4.tcp_wmem"
|
2015-01-14 14:19:39 +00:00
|
|
|
sysctlKey[KERNELPM] = "net.mptcp.mptcp_path_manager"
|
2015-01-21 10:34:29 +00:00
|
|
|
sysctlKey[SCHED] = "net.mptcp.mptcp_scheduler"
|
2015-11-25 09:46:27 +00:00
|
|
|
sysctlKey[CC] = "net.ipv4.tcp_congestion_control"
|
2016-04-14 13:41:50 +00:00
|
|
|
sysctlKey[AUTOCORK] = "net.ipv4.tcp_autocorking"
|
2016-04-29 13:01:41 +00:00
|
|
|
sysctlKey[EARLYRETRANS] = "net.ipv4.tcp_early_retrans"
|
2016-05-13 13:41:49 +00:00
|
|
|
sysctlKey[EXPIRATION] = "net.mptcp.mptcp_sched_expiration"
|
2016-06-08 14:45:50 +00:00
|
|
|
sysctlKey[BUFFERAUTOTUNING] = "net.ipv4.tcp_moderate_rcvbuf"
|
2016-04-29 13:01:41 +00:00
|
|
|
|
2015-01-14 14:19:39 +00:00
|
|
|
|
2015-02-23 10:32:22 +00:00
|
|
|
sysctlKeyClient = {}
|
|
|
|
sysctlKeyClient[KERNELPMC] = "net.mptcp.mptcp_path_manager"
|
|
|
|
sysctlKeyServer = {}
|
|
|
|
sysctlKeyServer[KERNELPMS] = "net.mptcp.mptcp_path_manager"
|
2015-01-14 14:19:39 +00:00
|
|
|
|
2015-01-08 18:52:45 +00:00
|
|
|
defaultValue = {}
|
|
|
|
|
2015-01-14 14:19:39 +00:00
|
|
|
defaultValue[RMEM] = "10240 87380 16777216"
|
2015-03-24 09:05:40 +00:00
|
|
|
defaultValue[WMEM] = "4096 16384 4194304"
|
2015-01-14 14:19:39 +00:00
|
|
|
defaultValue[KERNELPM] = "fullmesh"
|
2015-02-23 10:32:22 +00:00
|
|
|
defaultValue[KERNELPMC] = "fullmesh"
|
2015-02-27 10:24:48 +00:00
|
|
|
defaultValue[KERNELPMS] = "fullmesh"
|
2015-02-23 11:26:32 +00:00
|
|
|
defaultValue[USERPMC] = "fullmesh"
|
|
|
|
defaultValue[USERPMS] = "fullmesh"
|
2015-02-23 11:42:14 +00:00
|
|
|
defaultValue[USERPMCARGS] = ""
|
|
|
|
defaultValue[USERPMSARGS] = ""
|
2015-11-25 09:46:27 +00:00
|
|
|
defaultValue[CC] = "olia"
|
2015-01-21 10:34:29 +00:00
|
|
|
defaultValue[SCHED] = "default"
|
2016-04-14 13:41:50 +00:00
|
|
|
defaultValue[AUTOCORK] = "1"
|
2016-04-29 13:01:41 +00:00
|
|
|
defaultValue[EARLYRETRANS] = "3"
|
2016-05-13 13:41:49 +00:00
|
|
|
defaultValue[EXPIRATION] = "300"
|
2016-06-08 14:45:50 +00:00
|
|
|
defaultValue[BUFFERAUTOTUNING] = "1"
|
2016-06-21 15:31:17 +00:00
|
|
|
defaultValue[METRIC] = "-1"
|
2015-01-14 14:19:39 +00:00
|
|
|
|
2015-01-08 18:52:45 +00:00
|
|
|
defaultValue[CLIENTPCAP] = "no"
|
|
|
|
defaultValue[SERVERPCAP] = "no"
|
2016-04-13 07:38:17 +00:00
|
|
|
defaultValue[SNAPLENPCAP] = "65535" # Default snapping value of tcpdump
|
2015-03-05 10:32:11 +00:00
|
|
|
defaultValue[XPTYPE] = "none"
|
2015-01-08 18:52:45 +00:00
|
|
|
defaultValue[PINGCOUNT] = "5"
|
2015-01-12 15:34:41 +00:00
|
|
|
defaultValue[DDIBS] = "1k"
|
|
|
|
defaultValue[DDOBS] = "1k"
|
|
|
|
defaultValue[DDCOUNT] = "5000" #5k * 1k = 5m
|
|
|
|
defaultValue[PVRATELIMIT] = "400k"
|
|
|
|
defaultValue[PVZ] = "10000"
|
|
|
|
defaultValue[PVG] = "10000"
|
|
|
|
defaultValue[NCSERVERPORT] = "33666"
|
|
|
|
defaultValue[NCCLIENTPORT] = "33555"
|
2015-02-10 10:03:21 +00:00
|
|
|
defaultValue[CHANGEPV] = "no"
|
2015-08-14 22:34:27 +00:00
|
|
|
defaultValue[HTTPSFILE] = "random"
|
|
|
|
defaultValue[HTTPSRANDOMSIZE] = "1024"
|
2015-11-05 14:06:30 +00:00
|
|
|
defaultValue[EPLOADTESTDIR] = "/bla/bla/bla"
|
2015-12-01 16:48:32 +00:00
|
|
|
defaultValue[HTTPFILE] = "random"
|
|
|
|
defaultValue[HTTPRANDOMSIZE] = "1024"
|
2015-12-02 09:22:57 +00:00
|
|
|
defaultValue[NETPERFTESTLEN] = "10"
|
|
|
|
defaultValue[NETPERFTESTNAME] = "TCP_RR"
|
2015-12-02 14:22:51 +00:00
|
|
|
defaultValue[NETPERFREQRESSIZE] = "2K,256"
|
|
|
|
defaultValue[ABCONCURRENTREQUESTS] = "50"
|
|
|
|
defaultValue[ABTIMELIMIT] = "20"
|
2016-04-14 13:41:50 +00:00
|
|
|
defaultValue[SIRIQUERYSIZE] = "2500"
|
|
|
|
defaultValue[SIRIRESPONSESIZE] = "750"
|
|
|
|
defaultValue[SIRIDELAYQUERYRESPONSE] = "0"
|
|
|
|
defaultValue[SIRIMINPAYLOADSIZE] = "85"
|
|
|
|
defaultValue[SIRIMAXPAYLOADSIZE] = "500"
|
|
|
|
defaultValue[SIRIINTERVALTIMEMS] = "333"
|
|
|
|
defaultValue[SIRIBUFFERSIZE] = "9"
|
2016-04-27 14:08:21 +00:00
|
|
|
defaultValue[VLCFILE] = "bunny_ibmff_360.mpd"
|
|
|
|
defaultValue[VLCTIME] = "0"
|
2016-06-01 13:37:13 +00:00
|
|
|
defaultValue[DITGKBYTES] = "10000"
|
2016-06-09 09:02:10 +00:00
|
|
|
defaultValue[DITGCONSTANTPACKETSIZE] = "1428"
|
2016-06-07 14:10:47 +00:00
|
|
|
defaultValue[DITGMEANPOISSONPACKETSSEC] = "0"
|
2016-06-08 14:45:50 +00:00
|
|
|
defaultValue[DITGCONSTANTPACKETSSEC] = "0"
|
2016-06-07 14:10:47 +00:00
|
|
|
defaultValue[DITGBURSTSONPACKETSSEC] = "0"
|
|
|
|
defaultValue[DITGBURSTSOFFPACKETSSEC] = "0"
|
2016-05-13 08:00:29 +00:00
|
|
|
defaultValue[PRIOPATH0] = "0"
|
|
|
|
defaultValue[PRIOPATH1] = "0"
|
2016-06-21 15:35:03 +00:00
|
|
|
defaultValue[BACKUPPATH0] = "0"
|
2016-06-21 15:32:19 +00:00
|
|
|
defaultValue[BACKUPPATH1] = "0"
|
2015-01-08 18:52:45 +00:00
|
|
|
|
|
|
|
def __init__(self, paramFile):
|
|
|
|
MpParam.__init__(self, paramFile)
|
2015-02-26 16:43:45 +00:00
|
|
|
|
2015-01-08 18:52:45 +00:00
|
|
|
def getParam(self, key):
|
|
|
|
val = MpParam.getParam(self, key)
|
|
|
|
if val is None:
|
|
|
|
if key in MpParamXp.defaultValue:
|
|
|
|
return MpParamXp.defaultValue[key]
|
|
|
|
else:
|
|
|
|
raise Exception("Param not found " + key)
|
|
|
|
else:
|
|
|
|
return val
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
s = MpParam.__str__(self)
|
|
|
|
return s
|