aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-15 18:07:24 +0200
committerpespin <pespin@sysmocom.de>2020-06-16 10:04:04 +0000
commit5680255fb59b689c5aa4337541396f642af57837 (patch)
treeaf913cb3f93871425fdcabe1548f7c8b7d368b10 /src/osmo_gsm_tester
parent229f11647e64bcb0b1268b5c7a2561f87256bf0f (diff)
iperf3: Add support for setting TOS
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/iperf3.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/obj/iperf3.py b/src/osmo_gsm_tester/obj/iperf3.py
index d79ff98..4ccbf42 100644
--- a/src/osmo_gsm_tester/obj/iperf3.py
+++ b/src/osmo_gsm_tester/obj/iperf3.py
@@ -219,7 +219,7 @@ class IPerf3Client(log.Origin):
locally = not self._run_node or self._run_node.is_local()
return locally
- def prepare_test_proc(self, dir=None, netns=None, time_sec=None, proto=None, bitrate=0):
+ def prepare_test_proc(self, dir=None, netns=None, time_sec=None, proto=None, bitrate=0, tos=None):
values = config.get_defaults('iperf3cli')
config.overlay(values, self.testenv.suite().config().get('iperf3cli', {}))
@@ -256,6 +256,9 @@ class IPerf3Client(log.Origin):
popen_args += ('--bidir',)
if proto == IPerf3Client.PROTO_UDP:
popen_args += ('-u', '-b', str(bitrate))
+ if tos is not None:
+ popen_args += ('-S', str(tos))
+
if self.runs_locally():
proc = self.prepare_test_proc_locally(netns, popen_args)
else: