diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml index 9d99ed2c0c..8142e960dd 100644 --- a/ci-scripts/ci_infra.yaml +++ b/ci-scripts/ci_infra.yaml @@ -339,6 +339,18 @@ rfsim4g_enb_nos1: CmdPrefix: docker exec rfsim4g-oai-enb IF: oaitun_enb1 +rfsim4g_enb_fembms: + Host: localhost + NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enm1 + CmdPrefix: docker exec rfsim4g-oai-enb + IF: oaitun_enm1 + +rfsim4g_ue_fembms: + Host: localhost + NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem1 + CmdPrefix: docker exec rfsim4g-oai-lte-ue0 + IF: oaitun_uem1 + l2sim5g_ue: Host: localhost AttachScript: docker start l2sim-oai-nr-ue0 diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 37bee74ff1..7242c04bb3 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -189,6 +189,52 @@ def Iperf_analyzeV3UDP(filename, iperf_bitrate_threshold, iperf_packetloss_thres else: return (False, 'Could not analyze iperf report') +def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetloss_threshold, iperf_opt): + if (not os.path.isfile(server_filename)): + return (False, 'Could not analyze, server report not found!') + # Computing the requested bandwidth in float + req_bw = 1.0 # default iperf throughput, in Mbps + result = re.search('-b *(?P[0-9\.]+)(?P[kKMG])', iperf_opt) + if result is not None: + req_bw = float(result.group('iperf_bandwidth')) + magn = result.group('magnitude') + if magn == "k" or magn == "K": + req_bw /= 1000 + elif magn == "G": + req_bw *= 1000 + statusTemplate = '(?:|\[ *\d+\].*) +0\.0-\s*(?P[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P[0-9\.]+) (?P[kKMG])bits\/sec +(?P[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P[0-9\.]+)%\))' + + with open(server_filename, 'r') as server_file: + for line in server_file.readlines(): + res = re.search(statusTemplate, str(line)) + if res is not None: + result = res + if result is None: + return (False, 'Could not parse server report!') + + bitrate = float(result.group('bitrate')) + magn = result.group('magnitude') + if magn == "k" or magn == "K": + bitrate /= 1000 + elif magn == "G": # we assume bitrate in Mbps, therefore it must be G now + bitrate *= 1000 + jitter = float(result.group('jitter')) + packetloss = float(result.group('packetloss')) + br_perf = float(bitrate)/float(req_bw) * 100 + br_perf = '%.2f ' % br_perf + + result = float(br_perf) >= float(iperf_bitrate_threshold) and float(packetloss) <= float(iperf_packetloss_threshold) + req_msg = f'Req Bitrate : {req_bw}' + bir_msg = f'Bitrate : {bitrate}' + brl_msg = f'Bitrate Perf: {br_perf} %' + if float(br_perf) < float(iperf_bitrate_threshold): + brl_msg += f' (too low! <{iperf_bitrate_threshold}%)' + jit_msg = f'Jitter : {jitter}' + pal_msg = f'Packet Loss : {packetloss}' + if float(packetloss) > float(iperf_packetloss_threshold): + pal_msg += f' (too high! >{self.iperf_packetloss_threshold}%)' + return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}') + #----------------------------------------------------------- # OaiCiTest Class Definition #----------------------------------------------------------- @@ -750,6 +796,10 @@ class OaiCiTest(): udpIperf = re.search('-u', iperf_opt) is not None bidirIperf = re.search('--bidir', iperf_opt) is not None client_filename = f'iperf_client_{self.testCase_id}_{ue.getName()}.log' + server_filename = f'iperf_server_{self.testCase_id}_{ue.getName()}.log' + ymlPath = CONTAINERS.yamlPath[0].split('/') + logPath = f'../cmake_targets/log/{ymlPath[1]}' + if udpIperf: iperf_opt = Iperf_ComputeModifiedBW(idx, ue_num, self.iperf_profile, self.iperf_args) # note: for UDP testing we don't want to use json report - reports 0 Mbps received bitrate diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 37d53e09e4..9f88fb71ef 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -110,22 +110,24 @@ 5 - - IperfFromContainer - Iperf UDP Downlink - rfsim4g-oai-lte-ue0 - rfsim4g-trf-gen - -B 12.0.0.2 -u -i 1 -s - -c 12.0.0.2 -u -i 1 -t 30 -b 2M + + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 2M -R + 25 + 80 - - IperfFromContainer - Iperf UDP Uplink - rfsim4g-trf-gen - rfsim4g-oai-lte-ue0 - -u -i 1 -s - -B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M + + Iperf + Iperf UDP UL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 1M + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index 5a6189dced..9b6fdabbce 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -91,21 +91,23 @@ - IperfFromContainer - Iperf UDP Downlink - rfsim4g-oai-lte-ue0 - rfsim4g-oai-enb - -B 10.0.1.2 -u -i 1 -s - -B 10.0.1.1 -c 10.0.1.2 -u -i 1 -t 30 -b 2M + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_enb_nos1 + -u -t 30 -b 2M -R + 25 + 80 - IperfFromContainer - Iperf UDP Uplink - rfsim4g-oai-enb - rfsim4g-oai-lte-ue0 - -B 10.0.1.1 -u -i 1 -s - -B 10.0.1.2 -c 10.0.1.1 -u -i 1 -t 30 -b 1M + Iperf + Iperf UDP UL + rfsim4g_ue + rfsim4g_enb_nos1 + -u -t 30 -b 1M + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index e6c3e1f965..d058f9f150 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -111,21 +111,23 @@ - IperfFromContainer - Iperf UDP Downlink - rfsim4g-oai-lte-ue0 - rfsim4g-trf-gen - -B 12.0.0.2 -u -i 1 -s - -c 12.0.0.2 -u -i 1 -t 30 -b 2M + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 2M -R + 25 + 80 - IperfFromContainer - Iperf UDP Uplink - rfsim4g-trf-gen - rfsim4g-oai-lte-ue0 - -u -i 1 -s - -B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M + Iperf + Iperf UDP UL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 1M + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index 86b217a2a4..280814a888 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -111,21 +111,23 @@ - IperfFromContainer - Iperf UDP Downlink - rfsim4g-oai-lte-ue0 - rfsim4g-trf-gen - -B 12.0.0.2 -u -i 1 -s - -c 12.0.0.2 -u -i 1 -t 30 -b 2M + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 2M -R + 25 + 80 - IperfFromContainer - Iperf UDP Uplink - rfsim4g-trf-gen - rfsim4g-oai-lte-ue0 - -u -i 1 -s - -B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M + Iperf + Iperf UDP UL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 1M + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index 60db5359e8..1a508b772a 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -72,12 +72,13 @@ - IperfFromContainer - Push MBMS traffic - rfsim4g-oai-lte-ue0 - rfsim4g-oai-enb - -sui1 -B 10.0.2.2 - -uc 10.0.2.2 -i1 -t10 -b2M -B10.0.2.1 + Iperf + Iperf UDP DL + rfsim4g_ue_fembms + rfsim4g_enb_fembms + -u -t 30 -b 2M + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 1685a4e47d..56ab42c323 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -72,12 +72,13 @@ - IperfFromContainer - Push MBMS traffic - rfsim4g-oai-lte-ue0 - rfsim4g-oai-enb - -sui1 -B 10.0.2.2 - -uc 10.0.2.2 -i1 -t10 -b2M -B10.0.2.1 + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_enb_nos1 + -u -t 30 -b 2M -R + 25 + 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml index 862e9cca52..a5501f2879 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -112,21 +112,23 @@ - IperfFromContainer - Iperf UDP Downlink - rfsim4g-oai-lte-ue0 - rfsim4g-trf-gen - -B 12.0.0.2 -u -i 1 -s - -c 12.0.0.2 -u -i 1 -t 30 -b 2M + Iperf + Iperf UDP DL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 2M -R + 25 + 80 - IperfFromContainer - Iperf UDP Uplink - rfsim4g-trf-gen - rfsim4g-oai-lte-ue0 - -u -i 1 -s - -B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 1M + Iperf + Iperf UDP UL + rfsim4g_ue + rfsim4g_ext_dn + -u -t 30 -b 1M + 25 + 80