Skip to content

Commit

Permalink
change number of subflows for iperfScenario
Browse files Browse the repository at this point in the history
  • Loading branch information
qdeconinck committed Jul 13, 2020
1 parent 571db09 commit 25d1dd5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions experiments/iperf_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@
import os


class IPerfScenarioParameter(ExperimentParameter):
FM_SUBFLOWS = "iperfScenarioFMSublows"

def __init__(self, experiment_parameter_filename):
super(IPerfScenarioParameter, self).__init__(experiment_parameter_filename)
self.default_parameters.update({
IPerfScenarioParameter.FM_SUBFLOWS: "1",
})


class IPerfScenario(Experiment):
NAME = "iperfScenario"
PARAMETER_CLASS = IPerfScenarioParameter

IPERF_LOG = "iperf.log"
SERVER_LOG = "server.log"
Expand All @@ -17,6 +28,10 @@ def __init__(self, experiment_parameter_filename, topo, topo_config):
self.load_parameters()
self.ping()

def load_parameters(self):
super(IPerfScenario, self).load_parameters()
self.fm_subflows = self.experiment_parameter.get(IPerfScenarioParameter.FM_SUBFLOWS)

def prepare(self):
super(IPerfScenario, self).prepare()
self.topo.command_to(self.topo_config.client, "rm {}".format(IPerfScenario.IPERF_LOG))
Expand Down Expand Up @@ -47,6 +62,9 @@ def run(self):
for c in self.topo_config.clients[1:]:
self.topo.command_to(c, "sysctl -w net.mptcp.mptcp_enabled=0")

# And set nb of subflows for fullmesh
self.topo.command_to(self.topo_config.client, "echo {} > /sys/module/mptcp_fullmesh/parameters/num_subflows".format(self.fm_subflows))

self.topo.command_to(self.topo_config.client, "sleep 2")

# We run as follow.
Expand All @@ -58,3 +76,5 @@ def run(self):
cmd = self.get_client_iperf_cmd(self.topo_config.get_server_ip(), 50, 0)
self.topo.command_to(self.topo_config.client, cmd)
self.topo.command_to(self.topo_config.client, "sleep 2")

self.topo.command_to(self.topo_config.client, "echo 1 > /sys/module/mptcp_fullmesh/parameters/num_subflows")

0 comments on commit 25d1dd5

Please sign in to comment.