Change in osmo-gsm-tester[master]: iperf: adds the option to define the packet length for udp.

pespin gerrit-no-reply at lists.osmocom.org
Fri Jun 11 11:49:08 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24273 )

Change subject: iperf: adds the option to define the packet length for udp.
......................................................................

iperf: adds the option to define the packet length for udp.

Added the feature to configure the packet length in udp iperf. Added a modifier to select the length value.
The default value is configured to 1460.

Change-Id: Ic886faa82b7cb25f2bce685eb80910623e4ff686
---
M src/osmo_gsm_tester/obj/iperf3.py
A sysmocom/scenarios/cfg-iperf3-packet-length at .conf
2 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/obj/iperf3.py b/src/osmo_gsm_tester/obj/iperf3.py
index 4b88df0..9e03a02 100644
--- a/src/osmo_gsm_tester/obj/iperf3.py
+++ b/src/osmo_gsm_tester/obj/iperf3.py
@@ -32,6 +32,7 @@
     config_schema = {
         'time': schema.DURATION,
         'protocol': 'iperf3_protocol',
+        'packet_length' : schema.UINT,
         }
     schema.register_config_schema('iperf3cli', config_schema)
 
@@ -271,6 +272,10 @@
             popen_args += ('--bidir',)
         if proto == IPerf3Client.PROTO_UDP:
             popen_args += ('-u', '-b', str(bitrate))
+            # Add the buffer length.
+            if values.get('packet_length'):
+                packet_length = str(values.get('packet_length'))
+                popen_args += ('-l', packet_length)
         if tos is not None:
             popen_args += ('-S', str(tos))
 
diff --git a/sysmocom/scenarios/cfg-iperf3-packet-length at .conf b/sysmocom/scenarios/cfg-iperf3-packet-length at .conf
new file mode 100644
index 0000000..340daf0
--- /dev/null
+++ b/sysmocom/scenarios/cfg-iperf3-packet-length at .conf
@@ -0,0 +1,3 @@
+config:
+  iperf3cli:
+    packet_length: ${param1}
\ No newline at end of file

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24273
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ic886faa82b7cb25f2bce685eb80910623e4ff686
Gerrit-Change-Number: 24273
Gerrit-PatchSet: 3
Gerrit-Owner: alealcon <alejandro.leal at srs.io>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210611/a037c51d/attachment.htm>


More information about the gerrit-log mailing list