pespin has submitted this change. ( https://gerrit.osmocom.org/c/upf-benchmark/+/39575?usp=email )
Change subject: testsuites/gtplab-sysmo2025/tunmap: Improve function allocating TRX src IP addresses ......................................................................
testsuites/gtplab-sysmo2025/tunmap: Improve function allocating TRX src IP addresses
Change-Id: Ie57b1933f37b3903b043ac36cbc570fecdf4e352 --- M testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py 1 file changed, 12 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve
diff --git a/testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py b/testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py index 17e7ac8..18bb5a7 100644 --- a/testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py +++ b/testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py @@ -6,7 +6,18 @@
def calc_src_addr(self, addr_str, inc): li = addr_str.split(".") - return li[0] + "." + li[1] + "." + li[2] + "." + str(int(li[3]) + inc) + num_0 = (int(li[0]) << (3*8)) + num_1 = (int(li[1]) << (2*8)) + num_2 = (int(li[2]) << (1*8)) + num_3 = int(li[3]) + num = num_0 | num_1 | num_2 | num_3 + num += inc + li[0] = str((num >> (3*8)) & 0xff) + li[1] = str((num >> (2*8)) & 0xff) + li[2] = str((num >> (1*8)) & 0xff) + li[3] = str(num & 0xff) + return ".".join(li) +
# One stream per GTPU eNB/CN IP address. # Assumption: TEIDs are assigned sequentially (in pairs RAN/CN) over each IP