From 335696282d624ca43a9dc94bd2a1ab4996401670 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 12 Jun 2023 14:40:56 +0200 Subject: [PATCH 01/31] chore(ci): post MR 1976, resync Signed-off-by: Raphael Defosseux --- ...nd40.tm1.25PRB.FairScheduler.usrpb210.conf | 16 ++++----- ...rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf | 14 ++++---- ci-scripts/conf_files/rru.fdd.band7.conf | 4 +-- ci-scripts/conf_files/rru.tdd.band40.conf | 4 +-- .../docker-compose.yml | 34 ++++-------------- .../docker-compose.yml | 35 +++++++++++++++++++ 6 files changed, 60 insertions(+), 47 deletions(-) create mode 100644 ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf index c325870035..6ced7573e0 100644 --- a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -1,4 +1,4 @@ -Active_eNBs = ( "eNB_Eurecom_LTEBox"); +Active_eNBs = ( "rcc-in-docker"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -13,7 +13,7 @@ eNBs = cell_type = "CELL_MACRO_ENB"; - eNB_name = "eNB_Eurecom_LTEBox"; + eNB_name = "rcc-in-docker"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; @@ -137,7 +137,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; + mme_ip_address = ( { ipv4 = "172.21.18.48"; ipv6 = "192:168:30::17"; port = 36412 ; active = "yes"; @@ -157,17 +157,17 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.45"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.45"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.45"; ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : { - global_log_level ="debug"; + global_log_level ="info"; hw_log_level ="info"; phy_log_level ="info"; mac_log_level ="info"; @@ -200,7 +200,7 @@ RUs = ( { local_if_name = "lo"; remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; + local_address = "127.0.0.3"; local_portc = 50000; remote_portc = 50000; local_portd = 50001; diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf index a94a243b89..11bc672958 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf @@ -1,4 +1,4 @@ -Active_eNBs = ( "eNB-Eurecom-LTEBox"); +Active_eNBs = ( "rcc-in-docker"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -13,7 +13,7 @@ eNBs = cell_type = "CELL_MACRO_ENB"; - eNB_name = "eNB-Eurecom-LTEBox"; + eNB_name = "rcc-in-docker"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; @@ -174,7 +174,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; + mme_ip_address = ( { ipv4 = "172.21.18.48"; ipv6 = "192:168:30::17"; port = 36412 ; active = "yes"; @@ -194,11 +194,11 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "172.21.18.46"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_S1U = "172.21.18.46"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; + ENB_IPV4_ADDRESS_FOR_X2C = "172.21.18.46"; ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } @@ -226,7 +226,7 @@ RUs = ( { local_if_name = "lo"; remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; + local_address = "127.0.0.3"; local_portc = 50000; remote_portc = 50000; local_portd = 50001; diff --git a/ci-scripts/conf_files/rru.fdd.band7.conf b/ci-scripts/conf_files/rru.fdd.band7.conf index a3b297049d..b8915767b4 100644 --- a/ci-scripts/conf_files/rru.fdd.band7.conf +++ b/ci-scripts/conf_files/rru.fdd.band7.conf @@ -2,7 +2,7 @@ RUs = ( { local_if_name = "lo"; - remote_address = "127.0.0.1" + remote_address = "127.0.0.3" local_address = "127.0.0.2"; local_portc = 50000; remote_portc = 50000; @@ -13,7 +13,7 @@ RUs = nb_tx = 1; nb_rx = 1; max_pdschReferenceSignalPower = -27; - max_rxgain = 115; + max_rxgain = 125; bands = [7]; } ); diff --git a/ci-scripts/conf_files/rru.tdd.band40.conf b/ci-scripts/conf_files/rru.tdd.band40.conf index 40af241cca..9fbadac7c1 100644 --- a/ci-scripts/conf_files/rru.tdd.band40.conf +++ b/ci-scripts/conf_files/rru.tdd.band40.conf @@ -2,7 +2,7 @@ RUs = ( { local_if_name = "lo"; - remote_address = "127.0.0.1" + remote_address = "127.0.0.3" local_address = "127.0.0.2"; local_portc = 50000; remote_portc = 50000; @@ -13,7 +13,7 @@ RUs = nb_tx = 1; nb_rx = 1; max_pdschReferenceSignalPower = -27; - max_rxgain = 115; + max_rxgain = 125; bands = [40]; } ); diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml index 2815afe3ae..5ca6121fca 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml @@ -7,15 +7,10 @@ services: container_name: lte-b200-rru-fdd-05Mhz-tm1 network_mode: "host" environment: - - USE_B2XX='yes' - - USE_FDD_RRU=True - - RRU_IF4P5_IF_NAME=lo - - RCC_REMOTE_IP_ADDRESS=127.0.0.3 - - RRU_LOCAL_IP_ADDRESS=127.0.0.2 - - UTRA_BAND_ID=7 - - THREAD_PARALLEL_CONFIG=PARALLEL_SINGLE_THREAD - - USE_ADDITIONAL_OPTIONS=--RUs.[0].max_rxgain 125 --log_config.global_log_options level,nocolor,time,line_num,function + USE_B2XX: 'yes' + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: + - ../../conf_files/rru.fdd.band7.conf:/opt/oai-enb/etc/enb.conf - /dev:/dev healthcheck: # pgrep does NOT work @@ -29,26 +24,9 @@ services: container_name: lte-b200-rcc-fdd-05Mhz-tm1 network_mode: "host" environment: - - USE_FDD_IF4P5_RCC=True - - ENB_NAME=rcc-in-docker - - MCC=208 - - MNC=92 - - MNC_LENGTH=2 - - TAC=1 - - UTRA_BAND_ID=7 - - DL_FREQUENCY_IN_MHZ=2680 - - UL_FREQUENCY_OFFSET_IN_MHZ=120 - - NID_CELL=0 - - NB_PRB=25 - - MME_S1C_IP_ADDRESS=172.21.18.48 - - RCC_IF_NAME=eno1 - - RCC_S1C_IP_ADDRESS=172.21.18.46 - - RCC_IP_ADDRESS=172.21.18.46 - - IF4P5_IF_NAME=lo - - IF4P5_RRU_IP_ADDRESS=127.0.0.2 - - IF4P5_RCC_IP_ADDRESS=127.0.0.3 - - THREAD_PARALLEL_CONFIG=PARALLEL_SINGLE_THREAD - - USE_ADDITIONAL_OPTIONS=--log_config.global_log_options level,nocolor,time,line_num,function + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function + volumes: + - ../../conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf:/opt/oai-enb/etc/enb.conf healthcheck: # pgrep does NOT work test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem" diff --git a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml new file mode 100644 index 0000000000..7fed7dbf18 --- /dev/null +++ b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml @@ -0,0 +1,35 @@ +version: '3.8' + +services: + rru_tdd: + image: oai-enb:latest + privileged: true + container_name: lte-b200-rru-tdd-05Mhz-tm1 + network_mode: "host" + environment: + USE_B2XX: 'yes' + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function + volumes: + - ../../conf_files/rru.tdd.band40.conf:/opt/oai-enb/etc/enb.conf + - /dev:/dev + healthcheck: + # pgrep does NOT work + test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem" + interval: 10s + timeout: 5s + retries: 5 + rcc_tdd: + image: oai-enb:latest + privileged: true + container_name: lte-b200-rcc-tdd-05Mhz-tm1 + network_mode: "host" + environment: + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function + volumes: + - ../../conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf:/opt/oai-enb/etc/enb.conf + healthcheck: + # pgrep does NOT work + test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem" + interval: 10s + timeout: 5s + retries: 5 From 925b4dea215023145971537ffcd8fb569a14cf60 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 14 Jun 2023 12:00:03 +0200 Subject: [PATCH 02/31] chore(ci): adding one FDD scenario Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 4 +- ci-scripts/ran.py | 2 +- ...container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 184 ++++++++++++++++++ ...lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml | 4 +- .../container_lte_b200_fdd_10Mhz_tm1.xml | 4 +- .../container_lte_b200_fdd_10Mhz_tm1_cdrx.xml | 4 +- .../container_lte_b200_fdd_20Mhz_tm1.xml | 4 +- 7 files changed, 194 insertions(+), 12 deletions(-) create mode 100644 ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 520876ad06..54edae9e67 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -842,8 +842,6 @@ class Containerize(): for image in imagesList: imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) mySSH.command(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', '\$', 2) - localMmeIpAddr = EPC.MmeIPAddress - mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2) # Currently support only one svcName = self.services[self.eNB_instance] @@ -903,7 +901,7 @@ class Containerize(): cnt = 0 while (cnt < 20): mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30) - result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore()) + result = re.search('got sync|Starting F1AP at CU|Waiting for RUs to be configured', mySSH.getBefore()) if result is None: time.sleep(6) cnt += 1 diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index fff204a018..ba618d3b01 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -895,7 +895,7 @@ class RANManagement(): htmleNBFailureMsg += ' Command line option(s) correctly applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n' else: htmleNBFailureMsg += ' Command line option(s) NOT applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n' - result = re.search('Exiting OAI softmodem', str(line)) + result = re.search('Exiting OAI softmodem|Caught SIGTERM, shutting down', str(line)) if result is not None: exitSignalReceived = True result = re.search('[Ss]egmentation [Ff]ault', str(line)) diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml new file mode 100644 index 0000000000..4abc2855bc --- /dev/null +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -0,0 +1,184 @@ + + + test-fdd-05-tm1-if4-5 + Test-FDD-05MHz-TM1-IF4.5 + tasks + +100000 +111110 +300000 +040101 +030131 030132 +040301 040531 040633 040634 040636 040671 040672 040673 040401 040201 +030231 +200000 + + + + + Pull_Local_Registry + Pull Images from Local Registry + 0 + oai-enb + + + + Custom_Command + Disable Sleep States + hutch + sudo cpupower idle-set -D 0 + + + Custom_Command + Enable Sleep States + hutch + sudo cpupower idle-set -E + + + Custom_Command + Reset USRP + hutch + sudo -S b2xx_fx3_utils --reset-device + + + + Deploy_Object + Deploy RRU (FDD/Band7/5MHz/B200) in a container + ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 + rru_fdd + 0 + 0 + + + + Deploy_Object + Deploy RCC (FDD/Band7/5MHz) in a container + ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 + rcc_fdd + 0 + 0 + + + + IdleSleep + Sleep + 5 + + + + Undeploy_Object + Undeploy RCC/RRU + ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 + 0 + 0 + + + + Initialize_UE + Initialize UE + adb_ue_1 adb_ue_2 + + + Terminate_UE + Terminate UE + adb_ue_1 adb_ue_2 + + + Attach_UE + Attach UEs + adb_ue_1 adb_ue_2 + + + Detach_UE + Detach UEs + adb_ue_1 adb_ue_2 + + + + Ping + ping (5MHz - 20 sec) + -c 20 + 5 + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile) + -u -b 15M -t 30 -i 1 + 50 + DL + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile) + -u -b 15M -t 30 -i 1 + 50 + DL + adb_ue_1 + + + + Iperf + iperf (5MHz - DL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + DL + adb_ue_2 + + + + Iperf + iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile) + -u -b 9M -t 30 -i 1 + 50 + balanced + UL + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile) + -u -b 9M -t 30 -i 1 + 50 + single-ue + UL + adb_ue_1 + + + + Iperf + iperf (5MHz - UL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + UL + adb_ue_1 + + + diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml index bf8cb5e256..149ecf9b70 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml @@ -32,7 +32,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm 040101 030102 000010 040301 040502 000011 040302 000001 000012 040303 000002 000013 040503 040401 040201 -030201 +030202 200000 @@ -64,7 +64,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm 0 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml index ea89f4193a..5b9f060d3c 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml @@ -34,7 +34,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 030111 000001 040301 040511 040613 040614 040615 040651 040652 040653 040654 040401 040201 -030201 +030211 200000 @@ -72,7 +72,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml index 788a1759dc..cafcc91a69 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml @@ -33,7 +33,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 030112 040301 040302 040512 040612 040650 040401 040201 -030201 +030212 200000 @@ -65,7 +65,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 0 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml index 4fef927a3b..49f221644b 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml @@ -33,7 +33,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 030121 000001 040301 040521 040623 040624 040625 040662 040401 040201 -030201 +030221 200000 @@ -71,7 +71,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1 From 832c1acc4ec664ecdc88c73223302a7dc2b2a688 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 14 Jun 2023 14:43:55 +0200 Subject: [PATCH 03/31] chore(ci): adding one TDD scenario Signed-off-by: Raphael Defosseux --- .../container_lte_b200_tdd_05Mhz_tm1.xml | 4 +- ...container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 205 ++++++++++++++++++ .../container_lte_b200_tdd_05Mhz_tm2.xml | 4 +- .../container_lte_b200_tdd_10Mhz_tm1.xml | 4 +- .../container_lte_b200_tdd_20Mhz_tm1.xml | 4 +- ...e_b200_tdd_20Mhz_tm1_default_scheduler.xml | 4 +- 6 files changed, 215 insertions(+), 10 deletions(-) create mode 100644 ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml index eb11412ef5..14a6fcf65b 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml @@ -33,7 +33,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml 040101 030104 040301 040501 040602 040601 040603 040604 040605 040642 040641 040643 040644 040645 040401 040201 -030201 +030204 200000 @@ -79,7 +79,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml new file mode 100644 index 0000000000..4d8aee0e31 --- /dev/null +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -0,0 +1,205 @@ + + + test-tdd-05-if4-5 + Test-TDD-05MHz-TM1-IF4.5 + tasks + +300000 +100000 +111110 +030134 030135 +040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201 +030231 +040101 +200000 + + + + + Pull_Local_Registry + Pull Images from Local Registry + 0 + oai-enb + + + + Custom_Command + Disable Sleep States + starsky + sudo cpupower idle-set -D 0 + + + Custom_Command + Enable Sleep States + starsky + sudo cpupower idle-set -E + + + + Custom_Command + Reset USRP + starsky + sudo -S b2xx_fx3_utils --reset-device + + + + Deploy_Object + Deploy RRU (TDD/Band40/5MHz/B200) in a container + ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 + rru_tdd + 0 + 0 + + + + Deploy_Object + Deploy RCC (TDD/Band40/5MHz) in a container + ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 + rcc_tdd + 0 + 0 + + + + IdleSleep + Sleep + 5 + + + + Undeploy_Object + Undeploy RRU/RCC + ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 + 0 + 0 + + + + Initialize_UE + Initialize UE + adb_ue_1 adb_ue_2 + + + Terminate_UE + Terminate UE + adb_ue_1 adb_ue_2 + + + Attach_UE + Attach UE + adb_ue_1 adb_ue_2 + + + Detach_UE + Detach UE + adb_ue_1 adb_ue_2 + + + + Ping + ping (5MHz - 20 sec) + -c 20 + 25 + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced) + -u -b 6.5M -t 30 -i 1 + 50 + balanced + DL + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue) + -u -b 6.5M -t 30 -i 1 + 50 + single-ue + DL + adb_ue_1 + + + + Iperf + iperf (5MHz - DL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + DL + adb_ue_1 + + + + Iperf + iperf (5MHz - DL/TCP)(30 sec) + -t 30 -i 1 -fm + 50 + DL + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced) + -u -b 2M -t 30 -i 1 + 50 + balanced + UL + adb_ue_1 adb_ue_2 + + + + Iperf + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 + 50 + single-ue + UL + adb_ue_1 + + + + Iperf + iperf (5MHz - UL/TCP)(30 sec)(single-ue) + -t 30 -i 1 -fm + 50 + single-ue + UL + adb_ue_1 + + + + Iperf + iperf (5MHz - UL/TCP)(30 sec) + -t 30 -i 1 -fm + 50 + UL + adb_ue_1 adb_ue_2 + + + diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml index 887b5dab9b..f0cfd03d12 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml @@ -32,7 +32,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm2.xml 040101 030105 040301 040502 040606 040608 040646 040648 040401 040201 -030201 +030205 200000 @@ -69,7 +69,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm2.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml index 3874ff7028..cdfe6467b9 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml @@ -32,7 +32,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml 040101 030114 040301 040511 040612 040611 040613 040614 040615 040652 040651 040653 040654 040655 040401 040201 -030201 +030214 200000 @@ -69,7 +69,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml index 77e00d72ac..bd6d2f64f1 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml @@ -32,7 +32,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml 040101 030124 040301 040521 040622 040621 040623 040662 040401 040201 -030201 +030224 200000 @@ -69,7 +69,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml index fd454f13e2..ef6d640c0d 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml @@ -32,7 +32,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml 040101 030125 040301 040522 040627 040626 040628 040629 040630 040667 040666 040668 040669 040670 040401 040201 -030201 +030225 200000 @@ -71,7 +71,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml 5 - + Undeploy_Object Undeploy eNB ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler From 9e3de383723bc3a16eef8114626a4cc8095c4808 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 21 Jun 2023 15:28:37 +0200 Subject: [PATCH 04/31] chore(ci): renaming properly the IF4.5 conf files and cleaning-up all RCC/RRU files Signed-off-by: Raphael Defosseux --- ci-scripts/conf_files/README.md | 3 +- ...and40.25prb.tm1.if4p5.fair-scheduler.conf} | 0 ...onf => enb-rcc.band7.25prb.tm1.if4p5.conf} | 0 ....conf => enb-rru.band40.usrpb210.tm1.conf} | 0 ...7.conf => enb-rru.band7.usrpb210.tm1.conf} | 0 ...d40.tm1.100PRB.FairScheduler.usrpb210.conf | 225 --------------- ...nd40.tm1.50PRB.FairScheduler.usrpb210.conf | 225 --------------- ...cc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf | 262 ------------------ ...rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf | 262 ------------------ .../rcc.band38.tm1.50PRB.multi.rru.conf | 0 ...cc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf | 0 .../rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf | 0 .../{ => untested}/rcc.band7.tm1.nfapi.conf | 0 .../{ => untested}/rru.band38.tm1.master.conf | 0 .../{ => untested}/rru.band38.tm1.slave.conf | 0 .../if4p5_usrp210_band40_test_05mhz.xml | 104 ------- .../if4p5_usrp210_band40_test_10mhz.xml | 107 ------- .../if4p5_usrp210_band40_test_20mhz.xml | 105 ------- .../if4p5_usrp210_band7_test_05mhz.xml | 104 ------- .../if4p5_usrp210_band7_test_10mhz.xml | 104 ------- .../if4p5_usrp210_band7_test_20mhz.xml | 104 ------- .../docker-compose.yml | 4 +- .../docker-compose.yml | 4 +- 23 files changed, 6 insertions(+), 1607 deletions(-) rename ci-scripts/conf_files/{rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf => enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf} (100%) rename ci-scripts/conf_files/{rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf => enb-rcc.band7.25prb.tm1.if4p5.conf} (100%) rename ci-scripts/conf_files/{rru.tdd.band40.conf => enb-rru.band40.usrpb210.tm1.conf} (100%) rename ci-scripts/conf_files/{rru.fdd.band7.conf => enb-rru.band7.usrpb210.tm1.conf} (100%) delete mode 100644 ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf delete mode 100644 ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf delete mode 100644 ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf delete mode 100644 ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf rename ci-scripts/conf_files/{ => untested}/rcc.band38.tm1.50PRB.multi.rru.conf (100%) rename ci-scripts/conf_files/{ => untested}/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf (100%) rename ci-scripts/conf_files/{ => untested}/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf (100%) rename ci-scripts/conf_files/{ => untested}/rcc.band7.tm1.nfapi.conf (100%) rename ci-scripts/conf_files/{ => untested}/rru.band38.tm1.master.conf (100%) rename ci-scripts/conf_files/{ => untested}/rru.band38.tm1.slave.conf (100%) delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml delete mode 100644 ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml diff --git a/ci-scripts/conf_files/README.md b/ci-scripts/conf_files/README.md index 31e4129712..c9a2a582d4 100644 --- a/ci-scripts/conf_files/README.md +++ b/ci-scripts/conf_files/README.md @@ -29,7 +29,8 @@ Examples: - standard monolithic gNB, 2x2 configuration, with SDAP: `gnb.sa.band78.162prb.usrpn310.2x2-sdap.conf` - gNB-CU: `gnb-cu.sa.f1.conf` - monolithic gNB, L2sim: `gnb.sa.band77.106prb.l2sim.conf` -- RCC (4G eNB with IF4.5 split): `enb.band40.25prb.if45.tm1-fairscheduler.conf` +- monolithic eNB: `enb.band7.25prb.usrpb200.conf` +- RCC (4G eNB with IF4.5 split): `enb-rcc.band7.25prb.tm1.if4p5.conf` Notes: - there is no need for TDD/FDD, this is encoded in the band number diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf rename to ci-scripts/conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf rename to ci-scripts/conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf diff --git a/ci-scripts/conf_files/rru.tdd.band40.conf b/ci-scripts/conf_files/enb-rru.band40.usrpb210.tm1.conf similarity index 100% rename from ci-scripts/conf_files/rru.tdd.band40.conf rename to ci-scripts/conf_files/enb-rru.band40.usrpb210.tm1.conf diff --git a/ci-scripts/conf_files/rru.fdd.band7.conf b/ci-scripts/conf_files/enb-rru.band7.usrpb210.tm1.conf similarity index 100% rename from ci-scripts/conf_files/rru.fdd.band7.conf rename to ci-scripts/conf_files/enb-rru.band7.usrpb210.tm1.conf diff --git a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf deleted file mode 100644 index 094ea88ad1..0000000000 --- a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf +++ /dev/null @@ -1,225 +0,0 @@ -Active_eNBs = ( "eNB_Eurecom_LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - - ////////// Identification parameters: - eNB_ID = 0xe00; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB_Eurecom_LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "TDD"; - tdd_config = 1; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 40; - downlink_frequency = 2350000000L; - uplink_frequency_offset = 0; - Nid_cell = 0; - N_RB_DL = 100; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 1; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower =-29; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -106; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; - /* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; - */ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - - ue_TransmissionMode = 1; - } - ); - - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); - - enable_measurement_reports = "no"; - - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - - log_config : - { - global_log_level ="debug"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - - } -); -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - scheduler_mode = "fairRR"; - puSch10xSnr = 200; - puCch10xSnr = 200; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_if_name = "lo"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; - local_rf = "no" - tr_preference = "udp_if4p5" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - eNB_instances = [0]; - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); diff --git a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf deleted file mode 100644 index 41a3c08552..0000000000 --- a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf +++ /dev/null @@ -1,225 +0,0 @@ -Active_eNBs = ( "eNB_Eurecom_LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - - ////////// Identification parameters: - eNB_ID = 0xe00; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB_Eurecom_LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "TDD"; - tdd_config = 1; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 40; - downlink_frequency = 2350000000L; - uplink_frequency_offset = 0; - Nid_cell = 0; - N_RB_DL = 50; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 1; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower =-27; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -106; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; - /* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; - */ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - - ue_TransmissionMode = 1; - } - ); - - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); - - enable_measurement_reports = "no"; - - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - - log_config : - { - global_log_level ="debug"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - - } -); -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - scheduler_mode = "fairRR"; - puSch10xSnr = 200; - puCch10xSnr = 200; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_if_name = "lo"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; - local_rf = "no" - tr_preference = "udp_if4p5" - nb_tx = 1 - nb_rx = 1 - att_tx = 6 - att_rx = 6; - eNB_instances = [0]; - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf deleted file mode 100644 index a6829fe215..0000000000 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf +++ /dev/null @@ -1,262 +0,0 @@ -Active_eNBs = ( "eNB-Eurecom-LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - - ////////// Identification parameters: - eNB_ID = 0xe00; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB-Eurecom-LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2680000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 100; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - pbch_repetition = "FALSE"; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -29; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -104; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; - /* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; - */ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - ue_TransmissionMode = 1; - - //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; -/* rxPool_dataHoppingConfig_hoppingParameter = 0; - rxPool_dataHoppingConfig_numSubbands = "ns1"; - rxPool_dataHoppingConfig_rbOffset = 0; - rxPool_commTxResourceUC-ReqAllowed = "TRUE"; -*/ - // Parameters for SIB19 - discRxPool_cp_Len = "normal" - discRxPool_discPeriod = "rf32" - discRxPool_numRetx = 1; - discRxPool_numRepetition = 2; - discRxPool_ResourceConfig_prb_Num = 5; - discRxPool_ResourceConfig_prb_Start = 3; - discRxPool_ResourceConfig_prb_End = 21; - discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - discRxPool_ResourceConfig_offsetIndicator_choice = 0; - discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - - } - ); - - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); - - enable_measurement_reports = "no"; - - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 160; - puCch10xSnr = 160; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_if_name = "lo"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; - local_rf = "no" - tr_preference = "udp_if4p5" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - eNB_instances = [0]; - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf deleted file mode 100644 index 3366e1ee4b..0000000000 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf +++ /dev/null @@ -1,262 +0,0 @@ -Active_eNBs = ( "eNB-Eurecom-LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - - ////////// Identification parameters: - eNB_ID = 0xe00; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB-Eurecom-LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2680000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 50; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - pbch_repetition = "FALSE"; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -27; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -104; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; - /* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; - */ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - ue_TransmissionMode = 1; - - //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; -/* rxPool_dataHoppingConfig_hoppingParameter = 0; - rxPool_dataHoppingConfig_numSubbands = "ns1"; - rxPool_dataHoppingConfig_rbOffset = 0; - rxPool_commTxResourceUC-ReqAllowed = "TRUE"; -*/ - // Parameters for SIB19 - discRxPool_cp_Len = "normal" - discRxPool_discPeriod = "rf32" - discRxPool_numRetx = 1; - discRxPool_numRepetition = 2; - discRxPool_ResourceConfig_prb_Num = 5; - discRxPool_ResourceConfig_prb_Start = 3; - discRxPool_ResourceConfig_prb_End = 21; - discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - discRxPool_ResourceConfig_offsetIndicator_choice = 0; - discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - - } - ); - - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - port = 36412 ; - active = "yes"; - preference = "ipv4"; - } - ); - - enable_measurement_reports = "no"; - - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 160; - puCch10xSnr = 160; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_if_name = "lo"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; - local_rf = "no" - tr_preference = "udp_if4p5" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - eNB_instances = [0]; - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; diff --git a/ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf b/ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf rename to ci-scripts/conf_files/untested/rcc.band38.tm1.50PRB.multi.rru.conf diff --git a/ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf rename to ci-scripts/conf_files/untested/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf diff --git a/ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf rename to ci-scripts/conf_files/untested/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf diff --git a/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf similarity index 100% rename from ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf rename to ci-scripts/conf_files/untested/rcc.band7.tm1.nfapi.conf diff --git a/ci-scripts/conf_files/rru.band38.tm1.master.conf b/ci-scripts/conf_files/untested/rru.band38.tm1.master.conf similarity index 100% rename from ci-scripts/conf_files/rru.band38.tm1.master.conf rename to ci-scripts/conf_files/untested/rru.band38.tm1.master.conf diff --git a/ci-scripts/conf_files/rru.band38.tm1.slave.conf b/ci-scripts/conf_files/untested/rru.band38.tm1.slave.conf similarity index 100% rename from ci-scripts/conf_files/rru.band38.tm1.slave.conf rename to ci-scripts/conf_files/untested/rru.band38.tm1.slave.conf diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml deleted file mode 100644 index 715dc0e315..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - test-05 - Test-05MHz - tasks - - 030201 - 040101 - 030104 030105 040301 040501 040602 040642 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (TDD/Band40) - -O ci-scripts/conf_files/rru.tdd.band40.conf --RUs.[0].max_rxgain 125 --log_config.global_log_options level,nocolor,time - 0 - - - - Initialize_eNB - Initialize RCC (TDD/Band40/5MHz) - -O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf --log_config.global_log_options level,nocolor,time - 1 - - - - Terminate_eNB - Terminate RCC - 1 - - - - Terminate_eNB - Terminate RRU - 0 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (5MHz - 20 sec) - -c 20 - 25 - - - - Iperf - iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue) - -u -b 6.5M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue) - -u -b 2M -t 30 -i 1 -R - 50 - single-ue - - - diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml deleted file mode 100644 index b7c2622283..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - test-10 - Test-10MHz - tasks - 1 - True - 040612 - - 030201 - 040101 - 030114 030115 040301 040511 040612 040652 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (TDD/Band40) - -O ci-scripts/conf_files/rru.tdd.band40.conf --RUs.[0].max_rxgain 120 --log_config.global_log_options level,nocolor,time - 0 - - - - Initialize_eNB - Initialize RCC (TDD/Band40/10MHz/info) - -O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf --log_config.global_log_options level,nocolor,time - 1 - - - - Terminate_eNB - Terminate RCC - 1 - - - - Terminate_eNB - Terminate RRU - 0 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (10MHz - 20 sec) - -c 20 - 25 - - - - Iperf - iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) - -u -b 13.5M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (10MHz - UL/2Mbps/UDP)(30 sec)(single-ue) - -u -b 2M -t 30 -i 1 -R - 60 - single-ue - - - diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml deleted file mode 100644 index 287f75c59f..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - test-20 - Test-20MHz - tasks - 1 - - 030201 - 040101 - 030124 030125 040301 040521 040622 040662 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (TDD/Band40) - -O ci-scripts/conf_files/rru.tdd.band40.conf --log_config.global_log_options level,nocolor,time - 0 - - - - Initialize_eNB - Initialize RCC (TDD/Band40/20MHz/info) - -O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default --log_config.global_log_options level,nocolor,time - 1 - - - - Terminate_eNB - Terminate RCC - 1 - - - - Terminate_eNB - Terminate RRU - 0 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (20MHz - 20 sec) - -c 20 - 25 - - - - Iperf - iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) - -u -b 13.5M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (20MHz - UL/2Mbps/UDP)(30 sec)(single-ue) - -u -b 2M -t 30 -i 1 -R - 50 - single-ue - - - diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml deleted file mode 100644 index fc3fe29992..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - test-if4p5-05 - Test-IF4.5-05MHz - tasks - - 030201 - 040101 - 030101 030102 040301 040501 040604 040642 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (FDD/Band7) - -O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 125 --log_config.global_log_options level,nocolor,time - 1 - - - - Initialize_eNB - Initialize RCC (FDD/Band7/5MHz) - -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time - 0 - - - - Terminate_eNB - Terminate RCC - 0 - - - - Terminate_eNB - Terminate RRU - 1 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (5MHz - 20 sec) - -c 20 - 5 - - - - Iperf - iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile) - -u -b 15M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile) - -u -b 9M -t 30 -i 1 -R - 50 - single-ue - - - diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml deleted file mode 100644 index 8aa07a1c43..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - test-if4p5-10 - Test-IF4.5-10MHz - tasks - - 030201 - 040101 - 030111 030112 040301 040511 040614 040652 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (FDD/Band7) - -O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 120 --log_config.global_log_options level,nocolor,time - 1 - - - - Initialize_eNB - Initialize RCC (FDD/Band7/10MHz) - -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time - 0 - - - - Terminate_eNB - Terminate RCC - 0 - - - - Terminate_eNB - Terminate RRU - 1 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (10MHz - 20 sec) - -c 20 - 5 - - - - Iperf - iperf (10MHz - DL/32Mbps/UDP)(30 sec)(single-ue profile) - -u -b 32M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (10MHz - UL/5Mbps/UDP)(30 sec)(single-ue profile) - -u -b 5M -t 30 -i 1 -R - 60 - single-ue - - - diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml b/ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml deleted file mode 100644 index 01f26bdf0f..0000000000 --- a/ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - test-if4p5-20 - Test-IF4.5-20MHz - tasks - - 030201 - 040101 - 030121 030122 040301 040521 040624 040662 040401 040201 030201 030202 - - - - - - Initialize_eNB - Initialize RRU (FDD/Band7) - -O ci-scripts/conf_files/rru.fdd.band7.conf --log_config.global_log_options level,nocolor,time - 1 - - - - Initialize_eNB - Initialize RCC (FDD/Band7/20MHz) - -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time - 0 - - - - Terminate_eNB - Terminate RCC - 0 - - - - Terminate_eNB - Terminate RRU - 1 - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - Ping - ping (20MHz - 20 sec) - -c 20 - 5 - - - - Iperf - iperf (20MHz - DL/50Mbps/UDP)(30 sec)(single-ue profile) - -u -b 50M -t 30 -i 1 - 50 - single-ue - - - - Iperf - iperf (20MHz - UL/10Mbps/UDP)(30 sec)(single-ue profile) - -u -b 10M -t 30 -i 1 -R - 50 - single-ue - - - diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml index 5ca6121fca..518a39de23 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml @@ -10,7 +10,7 @@ services: USE_B2XX: 'yes' USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: - - ../../conf_files/rru.fdd.band7.conf:/opt/oai-enb/etc/enb.conf + - ../../conf_files/enb-rru.band7.usrpb210.tm1.conf:/opt/oai-enb/etc/enb.conf - /dev:/dev healthcheck: # pgrep does NOT work @@ -26,7 +26,7 @@ services: environment: USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: - - ../../conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf:/opt/oai-enb/etc/enb.conf + - ../../conf_files/enb-rcc.band7.25prb.tm1.if4p5.conf:/opt/oai-enb/etc/enb.conf healthcheck: # pgrep does NOT work test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem" diff --git a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml index 7fed7dbf18..7867ccc1ff 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml @@ -10,7 +10,7 @@ services: USE_B2XX: 'yes' USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: - - ../../conf_files/rru.tdd.band40.conf:/opt/oai-enb/etc/enb.conf + - ../../conf_files/enb-rru.band40.usrpb210.tm1.conf:/opt/oai-enb/etc/enb.conf - /dev:/dev healthcheck: # pgrep does NOT work @@ -26,7 +26,7 @@ services: environment: USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function volumes: - - ../../conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf:/opt/oai-enb/etc/enb.conf + - ../../conf_files/enb-rcc.band40.25prb.tm1.if4p5.fair-scheduler.conf:/opt/oai-enb/etc/enb.conf healthcheck: # pgrep does NOT work test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem" From dd6ca5f15a0a83205a75dffd1505310d863cab7d Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 11 Jul 2023 08:48:48 +0200 Subject: [PATCH 05/31] fix(ci): proper ping operation syntax post-refactoring Signed-off-by: Raphael Defosseux --- ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 2 +- ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml index 4abc2855bc..df544ab529 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -118,7 +118,7 @@ Ping ping (5MHz - 20 sec) - -c 20 + -c 20 %cn_ip% 5 adb_ue_1 adb_ue_2 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index 4d8aee0e31..b71cc555e6 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -119,7 +119,7 @@ Ping ping (5MHz - 20 sec) - -c 20 + -c 20 %cn_ip% 25 adb_ue_1 adb_ue_2 From 26a5ec2b4d9df6eeaba7c76343aa676e34f72671 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 11 Jul 2023 15:28:53 +0200 Subject: [PATCH 06/31] chore(ci): clean-up ltebox logs before launching Signed-off-by: Raphael Defosseux --- ci-scripts/epc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index 30a9fc87a4..3505e9bdc2 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -166,6 +166,8 @@ class EPCManagement(): mySSH.command('echo ' + self.Password + ' | sudo -S ./run_mme 2>&1 | stdbuf -o0 tee -a mme_' + self.testCase_id + '.log &', 'MME app initialization complete', 100) elif re.match('ltebox', self.Type, re.IGNORECASE): mySSH.command('cd /opt/ltebox/tools', '\$', 5) + # Clean-up the logs from previous runs + mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ../var/log/*.0', '\$', 5) mySSH.command('echo ' + self.Password + ' | sudo -S ./start_mme', '\$', 5) else: logging.error('This option should not occur!') From ae751e13ca8f8b0e66a4e148a68bf4dfd0a74f43 Mon Sep 17 00:00:00 2001 From: Vaibhav Shrivastava Date: Wed, 12 Jul 2023 17:43:05 +0530 Subject: [PATCH 07/31] incorrectStringBooleanError CPPCheck warnings fix on W27 --- common/utils/ds/byte_array.c | 2 +- .../LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c | 4 ++-- openair3/SECU/aes_128_cbc_cmac.c | 4 ++-- openair3/SECU/aes_128_ctr.c | 2 +- openair3/SECU/aes_128_ecb.c | 2 +- openair3/SECU/secu_defs.c | 4 ++-- openair3/TEST/test_aes128_ctr.c | 24 +++++++++---------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/common/utils/ds/byte_array.c b/common/utils/ds/byte_array.c index 04a2af0c5d..dfc8872662 100644 --- a/common/utils/ds/byte_array.c +++ b/common/utils/ds/byte_array.c @@ -28,7 +28,7 @@ byte_array_t copy_byte_array(byte_array_t src) { byte_array_t dst = {0}; dst.buf = malloc(src.len); - DevAssert(dst.buf != NULL && "Memory exhausted"); + AssertFatal(dst.buf != NULL, "Memory exhausted"); memcpy(dst.buf, src.buf, src.len); dst.len = src.len; return dst; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c index eb8c7ee98e..45133dc2f4 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c @@ -35,8 +35,8 @@ void *nr_pdcp_integrity_nia2_init(uint8_t integrity_key[16]) // This is a hack. Reduce the 3 functions to just cipher? // No. The overhead is x8 times more. Don't change before measuring // return integrity_key; - cbc_cmac_ctx_t* ctx = calloc(1, sizeof(cbc_cmac_ctx_t)); - DevAssert(ctx != NULL && "Memory exhausted"); + cbc_cmac_ctx_t* ctx = calloc(1, sizeof(cbc_cmac_ctx_t)); + AssertFatal(ctx != NULL, "Memory exhausted"); *ctx = init_aes_128_cbc_cmac(integrity_key); return ctx; diff --git a/openair3/SECU/aes_128_cbc_cmac.c b/openair3/SECU/aes_128_cbc_cmac.c index 6b02f1673a..da925f6d1e 100644 --- a/openair3/SECU/aes_128_cbc_cmac.c +++ b/openair3/SECU/aes_128_cbc_cmac.c @@ -184,7 +184,7 @@ void aes_128_cbc_cmac(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, u sz_iv = 16; iv = (uint8_t*)k_iv->iv16.iv; } else { - DevAssert(0!=0 && "Unknwon Initialization vector"); + AssertFatal(0 != 0, "Unknwon Initialization vector"); } CMAC_Update(ctx, iv, sz_iv); @@ -233,7 +233,7 @@ void cipher_aes_128_cbc_cmac(cbc_cmac_ctx_t const* ctx, const aes_128_t* k_iv, b sz_iv = 16; iv = (uint8_t*)k_iv->iv16.iv; } else { - DevAssert(0!=0 && "Unknwon Initialization vector"); + AssertFatal(0 != 0, "Unknwon Initialization vector"); } CMAC_Update(ctx->mac, iv, sz_iv); diff --git a/openair3/SECU/aes_128_ctr.c b/openair3/SECU/aes_128_ctr.c index 4caf6ee3cf..d9740e3b96 100644 --- a/openair3/SECU/aes_128_ctr.c +++ b/openair3/SECU/aes_128_ctr.c @@ -49,7 +49,7 @@ void aes_128_ctr(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, uint8_ int len_ev = 0; rc = EVP_EncryptUpdate(ctx, out, &len_ev, msg.buf, msg.len); - DevAssert(!(len_ev > len_out) && "Buffer overflow"); + AssertFatal(!(len_ev > len_out), "Buffer overflow"); // Finalise the encryption. Normally ciphertext bytes may be written at // this stage, but this does not occur in GCM mode diff --git a/openair3/SECU/aes_128_ecb.c b/openair3/SECU/aes_128_ecb.c index 2969166dc1..98b36031a1 100644 --- a/openair3/SECU/aes_128_ecb.c +++ b/openair3/SECU/aes_128_ecb.c @@ -40,7 +40,7 @@ void aes_128_ecb(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, uint8_ int len_ev = 0; rc = EVP_EncryptUpdate(ctx, out, &len_ev, msg.buf, msg.len); - DevAssert(!(len_ev > len_out) && "Buffer overflow"); + AssertFatal(!(len_ev > len_out), "Buffer overflow"); // Finalise the encryption. Normally ciphertext bytes may be written at // this stage, but this does not occur in GCM mode diff --git a/openair3/SECU/secu_defs.c b/openair3/SECU/secu_defs.c index 4a6782de97..58a8754bad 100644 --- a/openair3/SECU/secu_defs.c +++ b/openair3/SECU/secu_defs.c @@ -43,7 +43,7 @@ void stream_compute_integrity(eia_alg_id_e alg, nas_stream_cipher_t const* strea nas_stream_encrypt_eia2(stream_cipher, out); } else { LOG_E(OSA, "Provided integrity algorithm is currently not supported = %u\n", alg); - DevAssert(0 != 0 && "Unknown Algorithm type"); + AssertFatal(0 != 0, "Unknown Algorithm type"); } } @@ -60,7 +60,7 @@ void stream_compute_encrypt(eea_alg_id_e alg, nas_stream_cipher_t const* stream_ nas_stream_encrypt_eea2(stream_cipher, out); } else { LOG_E(OSA, "Provided encrypt algorithm is currently not supported = %u\n", alg); - DevAssert(0 != 0 && "Unknown Algorithm type"); + AssertFatal(0 != 0, "Unknown Algorithm type"); } } diff --git a/openair3/TEST/test_aes128_ctr.c b/openair3/TEST/test_aes128_ctr.c index b29b0d2e16..697d0bf3f8 100644 --- a/openair3/TEST/test_aes128_ctr.c +++ b/openair3/TEST/test_aes128_ctr.c @@ -49,7 +49,7 @@ void test_1(void) 0xb2, 0x0e, 0xd7, 0xda, 0xd2, 0xf2, 0x33, 0xdc, 0x3c, 0x22, 0xd7, 0xbd, 0xee, 0xed, 0x8e, 0x78}; int rc = memcmp(out, result, 32); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); uint8_t text_decipher[32] = {0}; @@ -57,7 +57,7 @@ void test_1(void) aes_128_ctr(&p, 32, out, 32, text_decipher); rc = memcmp(text, text_decipher, 32); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Error: Text and deciphered text do not match\n"); } void test_2(void) @@ -83,13 +83,13 @@ void test_2(void) 0x92, 0x23, 0x95, 0x87, 0xb8, 0x95, 0x60, 0x86, 0xbc, 0xab, 0x18, 0x83, 0x60, 0x42, 0xe2, 0xe6, 0xce, 0x42, 0x43, 0x2a, 0x17, 0x10, 0x5c, 0x53, 0xd0}; int rc = memcmp(out, result, 99); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); uint8_t text_decipher[100] = {0}; aes_128_ctr(&p, 99, out, 99, text_decipher); rc = memcmp(text, text_decipher, 99); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Text and deciphered text do not match"); } void test_3(void) @@ -110,14 +110,14 @@ void test_3(void) 0xa4, 0x81, 0x38, 0xa3, 0xb0, 0xc4, 0x71, 0xe2, 0xa7, 0x04, 0x1a, 0x57, 0x64, 0x23, 0xd2, 0x92, 0x72, 0x87, 0xf0, 0x00}; int rc = memcmp(out, result, 39); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); // Decipher uint8_t text_decipher[40] = {0}; aes_128_ctr(&p, 40, out, 40, text_decipher); rc = memcmp(text, text_decipher, 39); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Text and deciphered text do not match"); } void test_4(void) @@ -144,14 +144,14 @@ void test_4(void) 0x10, 0xfe, 0xb3, 0x24, 0xba, 0x74, 0xc4, 0xc1, 0x56, 0xe0, 0x4d, 0x39, 0x09, 0x72, 0x09, 0x65, 0x3a, 0xc3, 0x3e, 0x5a, 0x5f, 0x2d, 0x88, 0x64}; int rc = memcmp(out, result, 127); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); // Decipher uint8_t text_decipher[128] = {0}; aes_128_ctr(&p, 128, out, 128, text_decipher); rc = memcmp(text, text_decipher, 127); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Text and deciphered text do not match"); } void test_5(void) @@ -180,14 +180,14 @@ void test_5(void) 0x3f, 0x95, 0x62, 0x33, 0x71, 0xd4, 0x9b, 0x14, 0x7c, 0x0a, 0xf4, 0x86, 0x17, 0x1f, 0x22, 0xcd, 0x04, 0xb1, 0xcb, 0xeb, 0x26, 0x58, 0x22, 0x3e, 0x69, 0x38}; int rc = memcmp(out, result, 155); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); // Decipher uint8_t text_decipher[156] = {0}; aes_128_ctr(&p, 156, out, 156, text_decipher); rc = memcmp(text, text_decipher, 155); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Text and deciphered text do not match"); } void test_6(void) @@ -238,14 +238,14 @@ void test_6(void) 0x7a, 0xb3, 0xb6, 0x72, 0x5d, 0x1a, 0x6f, 0x3f, 0x98, 0xb9, 0xc9, 0xda, 0xa8, 0x98, 0x2a, 0xff, 0x06, 0x78, 0x28, 0x00}; int rc = memcmp(out, result, 483); - DevAssert(rc == 0 && "Ciphering did not produce the expected results"); + AssertFatal(rc == 0, "Ciphering did not produce the expected results"); // Decipher uint8_t text_decipher[512] = {0}; aes_128_ctr(&p, 512, out, 512, text_decipher); rc = memcmp(text, text_decipher, 483); - DevAssert(rc == 0 && "Text and deciphered text do not match"); + AssertFatal(rc == 0, "Text and deciphered text do not match"); } void doit(void) From e198b741558099b496f99f1e2f223558ce42ad3b Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 15 Jun 2023 12:18:06 +0200 Subject: [PATCH 08/31] fixes running FR2 test with sanitize --- executables/nr-gnb.c | 29 ++++++++++++------- executables/nr-ru.c | 11 ++++--- openair1/PHY/INIT/nr_parms.c | 2 +- openair1/PHY/MODULATION/slot_fep_nr.c | 2 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 6 ++-- openair2/LAYER2/NR_MAC_gNB/config.c | 6 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 5 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 +-- 8 files changed, 37 insertions(+), 28 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index fd5439ce74..3957d3fe05 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -112,25 +112,28 @@ time_stats_t softmodem_stats_rx_sf; // total rx time void tx_func(void *param) { - processingData_L1tx_t *info = (processingData_L1tx_t *) param; + PHY_VARS_gNB *gNB = info->gNB; int frame_tx = info->frame; int slot_tx = info->slot; - - int absslot_tx = info->timestamp_tx/info->gNB->frame_parms.get_samples_per_slot(slot_tx,&info->gNB->frame_parms); - int absslot_rx = absslot_tx-info->gNB->RU_list[0]->sl_ahead; + int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms); + int i = 0; + for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++) + cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms); + int samples = cumul_samples / (i + 1); + int absslot_tx = info->timestamp_tx / samples; + int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; - start_meas(&info->gNB->phy_proc_tx); + start_meas(&gNB->phy_proc_tx); - clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.start_L1_TX[rt_prof_idx]); + clock_gettime(CLOCK_MONOTONIC, &gNB->rt_L1_profiling.start_L1_TX[rt_prof_idx]); phy_procedures_gNB_TX(info, frame_tx, slot_tx, 1); - clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.return_L1_TX[rt_prof_idx]); + clock_gettime(CLOCK_MONOTONIC, &gNB->rt_L1_profiling.return_L1_TX[rt_prof_idx]); if (get_softmodem_params()->reorder_thread_disable) { - PHY_VARS_gNB *gNB = info->gNB; processingData_RU_t syncMsgRU; syncMsgRU.frame_tx = frame_tx; syncMsgRU.slot_tx = slot_tx; @@ -141,7 +144,7 @@ void tx_func(void *param) } /* this thread is done with the sched_info, decrease the reference counter */ deref_sched_response(info->sched_response_id); - stop_meas(&info->gNB->phy_proc_tx); + stop_meas(&gNB->phy_proc_tx); } @@ -180,10 +183,14 @@ void rx_func(void *param) int slot_tx = info->slot_tx; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; - int absslot_tx = info->timestamp_tx/gNB->frame_parms.get_samples_per_slot(slot_rx,&gNB->frame_parms); + int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms); + int i = 0; + for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++) + cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms); + int samples = cumul_samples / (i + 1); + int absslot_tx = info->timestamp_tx / samples; int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; - clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.start_L1_RX[rt_prof_idx]); start_meas(&softmodem_stats_rxtx_sf); diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c9d3dab560..3cae919d9e 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1015,10 +1015,13 @@ void ru_tx_func(void *param) { int print_frame = 8; char filename[40]; - - // note that this will break for 60/120 kHz, to be handled - int absslot_tx = info->timestamp_tx/fp->get_samples_per_slot(slot_tx,fp); - int absslot_rx = absslot_tx-ru->sl_ahead; + int cumul_samples = fp->get_samples_per_slot(0, fp); + int i = 0; + for (i = 1; i < fp->slots_per_subframe / 2; i++) + cumul_samples += fp->get_samples_per_slot(i, fp); + int samples = cumul_samples / (i + 1); + int absslot_tx = info->timestamp_tx / samples; + int absslot_rx = absslot_tx - ru->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.start_RU_TX[rt_prof_idx]); // do TX front-end processing if needed (precoding and/or IDFTs) diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index c444440451..2043668f2d 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -180,7 +180,7 @@ uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp) if(fp->numerology_index == 0) samp_count = fp->samples_per_subframe; else - samp_count = (slot%(fp->slots_per_subframe/2)) ? fp->samples_per_slotN0 : fp->samples_per_slot0; + samp_count = (slot % (fp->slots_per_subframe / 2)) ? fp->samples_per_slotN0 : fp->samples_per_slot0; return samp_count; } diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index c8ec74d61f..0af0ca4b0d 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -229,7 +229,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, { unsigned int nb_prefix_samples = frame_parms->nb_prefix_samples; unsigned int nb_prefix_samples0 = frame_parms->nb_prefix_samples0; - + dft_size_idx_t dftsize = get_dft(frame_parms->ofdm_symbol_size); // This is for misalignment issues int32_t tmp_dft_in[8192] __attribute__ ((aligned (32))); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 395a69b0b3..ea4e6b83f6 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -355,7 +355,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, switch (scc->ssb_PositionsInBurst->present) { case 1 : - cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24; + cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] << 24; cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0; break; case 2 : @@ -366,8 +366,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->ssb_table.ssb_mask_list[0].ssb_mask = 0; cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0; for (int i = 0; i < 4; i++) { - cfg->ssb_table.ssb_mask_list[0].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[3-i]<ssb_table.ssb_mask_list[1].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[7-i]<ssb_table.ssb_mask_list[0].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8); + cfg->ssb_table.ssb_mask_list[1].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8); } break; default: diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 39f72831f4..488a41f2f2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -331,7 +331,7 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch switch (scc->ssb_PositionsInBurst->present) { case 1 : - cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24; + cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] << 24; cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0; break; case 2 : @@ -342,8 +342,8 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = 0; cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0; for (int i=0; i<4; i++) { - cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[3-i]<ssb_table.ssb_mask_list[1].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[7-i]<ssb_table.ssb_mask_list[0].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8); + cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8); } break; default: diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 0d66ec0842..b08ffd520f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -99,10 +99,9 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc "240kHZ subcarrier won't work with current VRB map because a single SSB might be across 2 slots\n"); uint16_t *vrb_map = cc[CC_id].vrb_map; - const int extra_prb = ssb_subcarrier_offset > 0; - for (int rb = 0; rb < 20+extra_prb; rb++) - vrb_map[rbStart + rb] = SL_to_bitmap(symStart, 4); + for (int rb = 0; rb < 20 + extra_prb; rb++) + vrb_map[rbStart + rb] = SL_to_bitmap(symStart % 14, 4); } void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, nfapi_nr_dl_tti_request_t *DL_req) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index d7f461d231..850b62dc8a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -636,12 +636,12 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE, if (NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP == reportQuantity_type) { sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] = - *(csi_report->SSB_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); + *(csi_report->SSB_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1U<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); LOG_D(MAC,"SSB_index = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]); } else { sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] = - *(csi_report->CSI_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); + *(csi_report->CSI_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1U<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); LOG_D(MAC,"CSI-RS Resource Indicator = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]); } *cumul_bits += cri_ssbri_bitlen; From 02e1b64379ae503f166992ac8b0b08e4d85a4f91 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 13 Jul 2023 16:48:19 +0200 Subject: [PATCH 09/31] small code review --- openair1/PHY/defs_nr_common.h | 2 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/config.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 2b0a07fda7..ea0b3cc24b 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -45,7 +45,7 @@ #define MAX_NUM_SUBCARRIER_SPACING 5 #define NR_MAX_OFDM_SYMBOL_SIZE 4096 -#define NR_SYMBOLS_PER_SLOT 14 +#define NR_SYMBOLS_PER_SLOT NR_NUMBER_OF_SYMBOLS_PER_SLOT #define ONE_OVER_SQRT2_Q15 23170 #define ONE_OVER_TWO_Q15 16384 diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index ea4e6b83f6..0369f678fd 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -366,8 +366,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->ssb_table.ssb_mask_list[0].ssb_mask = 0; cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0; for (int i = 0; i < 4; i++) { - cfg->ssb_table.ssb_mask_list[0].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8); - cfg->ssb_table.ssb_mask_list[1].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8); + cfg->ssb_table.ssb_mask_list[0].ssb_mask += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8; + cfg->ssb_table.ssb_mask_list[1].ssb_mask += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8; } break; default: diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 488a41f2f2..58072c1e0e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -342,8 +342,8 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = 0; cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0; for (int i=0; i<4; i++) { - cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8); - cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8); + cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8; + cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8; } break; default: diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index b08ffd520f..49d23185dc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -40,6 +40,7 @@ #include "UTIL/OPT/opt.h" #include "RRC/NR/nr_rrc_config.h" #include "common/utils/nr/nr_common.h" +#include "openair1/PHY/defs_nr_common.h" #define ENABLE_MAC_PAYLOAD_DEBUG @@ -101,7 +102,7 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc uint16_t *vrb_map = cc[CC_id].vrb_map; const int extra_prb = ssb_subcarrier_offset > 0; for (int rb = 0; rb < 20 + extra_prb; rb++) - vrb_map[rbStart + rb] = SL_to_bitmap(symStart % 14, 4); + vrb_map[rbStart + rb] = SL_to_bitmap(symStart % NR_SYMBOLS_PER_SLOT, 4); } void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, nfapi_nr_dl_tti_request_t *DL_req) From 91a7dc806fc0756c53a96d7ecfc093c1a7983a4c Mon Sep 17 00:00:00 2001 From: mir Date: Mon, 17 Jul 2023 12:47:30 +0200 Subject: [PATCH 10/31] First commit to remove crypt dependency --- CMakeLists.txt | 4 ---- openair3/NGAP/ngap_gNB.c | 23 +++++++++++++---------- openair3/S1AP/s1ap_eNB.c | 23 +++++++++++++---------- openair3/SECU/kdf.h | 2 +- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bef6278246..eb6707c418 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,10 +300,6 @@ target_link_libraries(lte_rrc PRIVATE nr_rrc) add_library(nr_rrc ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c) target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc) - -# S1AP and NGAP need crypt library -pkg_check_modules(libcrypt REQUIRED libcrypt) - # S1AP ############## set(S1AP_DIR ${OPENAIR3_DIR}/S1AP) diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c index f877e9d4ba..09dc9321a1 100644 --- a/openair3/NGAP/ngap_gNB.c +++ b/openair3/NGAP/ngap_gNB.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include "openair3/SECU/kdf.h" #include "tree.h" #include "queue.h" @@ -71,17 +71,20 @@ void ngap_gNB_handle_register_gNB(instance_t instance, ngap_register_gnb_req_t * void ngap_gNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); -uint32_t ngap_generate_gNB_id(void) { - char *out; - char hostname[50]; - int ret; - uint32_t gNB_id; +uint32_t ngap_generate_gNB_id(void) +{ /* Retrieve the host name */ - ret = gethostname(hostname, sizeof(hostname)); + char hostname[32] = {0}; + int const ret = gethostname(hostname, sizeof(hostname)); DevAssert(ret == 0); - out = crypt(hostname, "eurecom"); - DevAssert(out != NULL); - gNB_id = ((out[0] << 24) | (out[1] << 16) | (out[2] << 8) | out[3]); + + uint8_t key[32] = {"eurecom"}; + byte_array_t data = {.len = 32, .buf = (uint8_t *)hostname}; + + uint8_t out[32] = {0}; + kdf(key, data, 32, out); + + uint32_t const gNB_id = ((out[0] << 24) | (out[1] << 16) | (out[2] << 8) | out[3]); return gNB_id; } diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 700148f05e..2baf315599 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include "openair3/SECU/kdf.h" #include "tree.h" #include "queue.h" @@ -108,17 +108,20 @@ int s1ap_timer_remove(long timer_id) return ret; } -uint32_t s1ap_generate_eNB_id(void) { - char *out; - char hostname[50]; - int ret; - uint32_t eNB_id; +uint32_t s1ap_generate_eNB_id(void) +{ /* Retrieve the host name */ - ret = gethostname(hostname, sizeof(hostname)); + char hostname[32] = {0}; + int const ret = gethostname(hostname, sizeof(hostname)); DevAssert(ret == 0); - out = crypt(hostname, "eurecom"); - DevAssert(out != NULL); - eNB_id = ((out[0] << 24) | (out[1] << 16) | (out[2] << 8) | out[3]); + + uint8_t key[32] = {"eurecom"}; + byte_array_t data = {.len = 32, .buf = (uint8_t *)hostname}; + + uint8_t out[32] = {0}; + kdf(key, data, 32, out); + + uint32_t const eNB_id = ((out[0] << 24) | (out[1] << 16) | (out[2] << 8) | out[3]); return eNB_id; } diff --git a/openair3/SECU/kdf.h b/openair3/SECU/kdf.h index 9567296bd2..ad8a842fad 100644 --- a/openair3/SECU/kdf.h +++ b/openair3/SECU/kdf.h @@ -24,7 +24,7 @@ #include #include -#include "byte_array.h" +#include "common/utils/ds/byte_array.h" void kdf(const uint8_t key[32], byte_array_t data, size_t len, uint8_t out[len]); From 10383fcafeec6a80694f0ab696027006a768c53b Mon Sep 17 00:00:00 2001 From: mir Date: Mon, 17 Jul 2023 18:18:34 +0200 Subject: [PATCH 11/31] Crypt library dependencies removed --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb6707c418..0ae2cd3417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,8 +321,6 @@ add_library(s1ap ) target_link_libraries(s1ap PUBLIC asn1_s1ap) target_link_libraries(s1ap PRIVATE nr_rrc asn1_nr_rrc_hdrs lte_rrc) -target_include_directories(s1ap PRIVATE ${libcrypt_INCLUDE_DIRS}) -target_link_libraries(s1ap PUBLIC ${libcrypt_LIBRARIES}) # NGAP ############## @@ -344,8 +342,6 @@ add_library(ngap ) target_link_libraries(ngap PUBLIC asn1_ngap) target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) -target_include_directories(ngap PRIVATE ${libcrypt_INCLUDE_DIRS}) -target_link_libraries(ngap PRIVATE ${libcrypt_LIBRARIES}) #M2AP ############## @@ -1442,7 +1438,7 @@ add_library(e1_if ${NR_RRC_DIR}/cucp_cuup_e1ap.c ) -target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} crypt e1ap GTPV1U) +target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U) add_library(e1_pdcp_if ${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_e1_api.c From 86563e8058ad30f375f57070b425f37636f6372e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 18 Jul 2023 10:48:47 +0200 Subject: [PATCH 12/31] Remove unused libgcrypt dependency --- cmake_targets/tools/MODULES/FindGcrypt.cmake | 36 -------------------- cmake_targets/tools/build_helper | 3 +- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100755 cmake_targets/tools/MODULES/FindGcrypt.cmake diff --git a/cmake_targets/tools/MODULES/FindGcrypt.cmake b/cmake_targets/tools/MODULES/FindGcrypt.cmake deleted file mode 100755 index fd4517dafb..0000000000 --- a/cmake_targets/tools/MODULES/FindGcrypt.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# - Find gnutls -# Find the native GCRYPT includes and library -# -# GCRYPT_FOUND - True if gnutls found. -# GCRYPT_INCLUDE_DIR - where to find gnutls.h, etc. -# GCRYPT_LIBRARIES - List of libraries when using gnutls. - -if (GCRYPT_INCLUDE_DIR AND GCRYPT_LIBRARIES) - set(GCRYPT_FIND_QUIETLY TRUE) -endif (GCRYPT_INCLUDE_DIR AND GCRYPT_LIBRARIES) - -# Include dir -find_path(GCRYPT_INCLUDE_DIR - NAMES - gcrypt.h -) - -# Library -find_library(GCRYPT_LIBRARY - NAMES gcrypt -) - -# handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCRYPT DEFAULT_MSG GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR) - -IF(GCRYPT_FOUND) - SET( GCRYPT_LIBRARIES ${GCRYPT_LIBRARY} ) -ELSE(GCRYPT_FOUND) - SET( GCRYPT_LIBRARIES ) -ENDIF(GCRYPT_FOUND) - -# Lastly make it so that the GCRYPT_LIBRARY and GCRYPT_INCLUDE_DIR variables -# only show up under the advanced options in the gui cmake applications. -MARK_AS_ADVANCED( GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR ) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 88f84538ef..2d5537bbdd 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -595,7 +595,7 @@ check_install_oai_software() { case "$(get_distribution_release)" in "ubuntu18.04") add_cmake_repo - specific_packages="libgcrypt11-dev" + specific_packages="" ;; "debian11") specific_packages="libz-dev" @@ -645,7 +645,6 @@ check_install_oai_software() { pkgconfig \ libconfig-devel \ libffi-devel \ - libgcrypt-devel \ lksctp-tools \ lksctp-tools-devel \ libtool \ From 6050c5db66cb8e527efc826b3ea7e60497347167 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 18 Jul 2023 10:50:38 +0200 Subject: [PATCH 13/31] GnuTLS: only used by webserver, so move it to additional packages --- cmake_targets/tools/build_helper | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 2d5537bbdd..6108efbfcc 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -554,11 +554,12 @@ check_install_additional_tools (){ ;; esac PACKAGE_LIST="\ - doxygen \ - libpthread-stubs0-dev \ - libqt5charts5-dev \ - tshark \ - uml-utilities \ + doxygen \ + libgnutls28-dev \ + libpthread-stubs0-dev \ + libqt5charts5-dev \ + tshark \ + uml-utilities \ iperf3 \ libforms-bin \ libforms-dev \ @@ -568,6 +569,7 @@ check_install_additional_tools (){ doxygen \ ctags \ iperf3 \ + gnutls-devel \ xforms \ xforms-devel \ xmlstarlet" @@ -576,6 +578,7 @@ check_install_additional_tools (){ doxygen \ ctags \ iperf3 \ + gnutls-devel \ xforms \ xforms-devel \ xmlstarlet" @@ -614,7 +617,6 @@ check_install_oai_software() { liblapack-dev \ liblapacke-dev \ libreadline-dev \ - libgnutls28-dev \ libconfig-dev \ libsctp-dev \ libssl-dev \ @@ -655,7 +657,6 @@ check_install_oai_software() { openssl-devel \ patch \ readline-devel \ - gnutls-devel \ lapack \ lapack-devel \ blas \ From 08069035416b68abb79db99cb6fb92f3d491050e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 18 Jul 2023 10:51:57 +0200 Subject: [PATCH 14/31] Harmonize additional packages installer: RHEL/Fedora are identical --- cmake_targets/tools/build_helper | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 6108efbfcc..d50b62c389 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -564,7 +564,7 @@ check_install_additional_tools (){ libforms-bin \ libforms-dev \ xmlstarlet" - elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then + elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]] || [[ "$OS_DISTRO" == "fedora" ]]; then PACKAGE_LIST="\ doxygen \ ctags \ @@ -573,15 +573,6 @@ check_install_additional_tools (){ xforms \ xforms-devel \ xmlstarlet" - elif [[ "$OS_DISTRO" == "fedora" ]]; then - PACKAGE_LIST=" \ - doxygen \ - ctags \ - iperf3 \ - gnutls-devel \ - xforms \ - xforms-devel \ - xmlstarlet" fi $SUDO $INSTALLER install -y $PACKAGE_LIST $optional_packages } From 149ca8e1903bf9972d75e2d0ecf5efc9fe3d6d8b Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 17 Jul 2023 16:40:51 +0200 Subject: [PATCH 15/31] nrUE: quick fix for compatibility with Open5GS --- openair3/NAS/NR_UE/nr_nas_msg_sim.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index 607e3e20d1..aa6080f564 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -448,11 +448,17 @@ void generateRegistrationRequest(as_nas_info_t *initialNasMsg, nr_ue_nas_t *nas) size += fill_suci(&mm_msg->registration_request.fgsmobileidentity, nas->uicc); } +#if 0 + /* This cannot be sent in clear, the core network Open5GS rejects the UE. + * TODO: do we have to send this at some point? + * For the time being, let's keep it here for later proper fix. + */ mm_msg->registration_request.presencemask |= REGISTRATION_REQUEST_5GMM_CAPABILITY_PRESENT; mm_msg->registration_request.fgmmcapability.iei = REGISTRATION_REQUEST_5GMM_CAPABILITY_IEI; mm_msg->registration_request.fgmmcapability.length = 1; mm_msg->registration_request.fgmmcapability.value = 0x7; size += 3; +#endif mm_msg->registration_request.presencemask |= REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_PRESENT; mm_msg->registration_request.nruesecuritycapability.iei = REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_IEI; From ae5dbf4e7af55cde64dfdcd1cb7553b97d42b70e Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 18 Jul 2023 17:02:32 +0200 Subject: [PATCH 16/31] bug fix in arrays indexes --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 292 +++++++++++++-------------- 1 file changed, 141 insertions(+), 151 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 458b4a9ee5..02de3a2bbd 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1158,36 +1158,27 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, pucch_pdu->prb_size,pucch_pdu->nr_of_symbols); int Prx = gNB->gNB_config.carrier_config.num_rx_ant.value; + // AssertFatal((pucch_pdu->prb_size&1) == 0,"prb_size %d is not a multiple of2\n",pucch_pdu->prb_size); int Prx2 = (Prx==1)?2:Prx; // use 2 for Nb antennas in case of single antenna to allow the following allocations - int prb_size_ext = pucch_pdu->prb_size+(pucch_pdu->prb_size&1); - int16_t r_re_ext[Prx2][2][8*prb_size_ext] __attribute__((aligned(32))); - int16_t r_im_ext[Prx2][2][8*prb_size_ext] __attribute__((aligned(32))); - int16_t r_re_ext2[Prx2][2][8*prb_size_ext] __attribute__((aligned(32))); - int16_t r_im_ext2[Prx2][2][8*prb_size_ext] __attribute__((aligned(32))); - int16_t rd_re_ext[Prx2][2][4*prb_size_ext] __attribute__((aligned(32))); - int16_t rd_im_ext[Prx2][2][4*prb_size_ext] __attribute__((aligned(32))); - int16_t *r_re_ext_p,*r_im_ext_p,*rd_re_ext_p,*rd_im_ext_p; - int nb_re_pucch = 12*pucch_pdu->prb_size; + int prb_size_ext = pucch_pdu->prb_size+(pucch_pdu->prb_size&1); - int16_t rp[Prx2][2][nb_re_pucch*2]; + c16_t rp[Prx2][2][nb_re_pucch]; memset(rp, 0, sizeof(rp)); - int16_t *tmp_rp = NULL; - __m64 dmrs_re,dmrs_im; for (int aa=0;aanr_of_symbols;symb++) { - tmp_rp = ((int16_t *)&rxdataF[aa][soffset + (l2+symb)*frame_parms->ofdm_symbol_size]); + c16_t *tmp_rp = ((c16_t *)&rxdataF[aa][soffset + (l2 + symb) * frame_parms->ofdm_symbol_size]); if (re_offset[symb] + nb_re_pucch < frame_parms->ofdm_symbol_size) { - memcpy1((void*)rp[aa][symb],(void*)&tmp_rp[re_offset[symb]*2],nb_re_pucch*sizeof(int32_t)); + memcpy1(rp[aa][symb], &tmp_rp[re_offset[symb]], nb_re_pucch * sizeof(c16_t)); } else { int neg_length = frame_parms->ofdm_symbol_size-re_offset[symb]; int pos_length = nb_re_pucch-neg_length; - memcpy1((void*)rp[aa][symb],(void*)&tmp_rp[re_offset[symb]*2],neg_length*sizeof(int32_t)); - memcpy1((void*)&rp[aa][symb][neg_length*2],(void*)tmp_rp,pos_length*sizeof(int32_t)); + memcpy1(rp[aa][symb], &tmp_rp[re_offset[symb]], neg_length * sizeof(c16_t)); + memcpy1(&rp[aa][symb][neg_length], tmp_rp, pos_length * sizeof(c16_t)); } } } @@ -1205,51 +1196,65 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, int nc_group_size=1; // 2 PRB int ngroup = prb_size_ext/nc_group_size/2; int32_t corr32_re[2][ngroup][Prx2],corr32_im[2][ngroup][Prx2]; - for (int aa=0;aaprb_size&1) == 0,"prb_size %d is not a multiple of 2\n",pucch_pdu->prb_size); - if ((pucch_pdu->prb_size&1) > 0) { // if the number of PRBs is odd + int16_t r_re_ext[Prx2][2][8 * prb_size_ext] __attribute__((aligned(32))); + int16_t r_im_ext[Prx2][2][8 * prb_size_ext] __attribute__((aligned(32))); + int16_t r_re_ext2[Prx2][2][8 * prb_size_ext] __attribute__((aligned(32))); + int16_t r_im_ext2[Prx2][2][8 * prb_size_ext] __attribute__((aligned(32))); + int16_t rd_re_ext[Prx2][2][4 * prb_size_ext] __attribute__((aligned(32))); + int16_t rd_im_ext[Prx2][2][4 * prb_size_ext] __attribute__((aligned(32))); + + if (pucch_pdu->prb_size != prb_size_ext) { + // if the number of PRBs is odd + // we fill the unsed part of the arrays + for (int aa = 0; aa < Prx; aa++) { for (int symb=0; symbnr_of_symbols;symb++) { - for (int aa=0;aaprb_size],0,8*pucch_pdu->prb_size*sizeof(int16_t)); - memset(&r_im_ext[aa][symb][8*pucch_pdu->prb_size],0,8*pucch_pdu->prb_size*sizeof(int16_t)); - memset(&rd_re_ext[aa][symb][4*pucch_pdu->prb_size],0,8*pucch_pdu->prb_size*sizeof(int16_t)); - memset(&rd_im_ext[aa][symb][4*pucch_pdu->prb_size],0,8*pucch_pdu->prb_size*sizeof(int16_t)); + const int sz = pucch_pdu->prb_size; + memset(r_re_ext[aa][symb] + 8 * sz, 0, 8 * sizeof(int16_t)); + memset(r_im_ext[aa][symb] + 8 * sz, 0, 8 * sizeof(int16_t)); + memset(rd_re_ext[aa][symb] + 4 * sz, 0, 4 * sizeof(int16_t)); + memset(rd_im_ext[aa][symb] + 4 * sz, 0, 4 * sizeof(int16_t)); } } } + for (int symb=0; symbnr_of_symbols;symb++) { // 24 REs contains 48x16-bit, so 6x8x16-bit - for (int prb=0;prbprb_size;prb+=2) { for (int aa=0;aaprb_size; prb++) { + int16_t *r_re_ext_p = &r_re_ext[aa][symb][8 * prb]; + int16_t *r_im_ext_p = &r_im_ext[aa][symb][8 * prb]; + int16_t *rd_re_ext_p = &rd_re_ext[aa][symb][4 * prb]; + int16_t *rd_im_ext_p = &rd_im_ext[aa][symb][4 * prb]; - for (int idx=0; idx<8; idx++) { - r_re_ext_p[idx<<1]=rp[aa][symb][prb*24+6*idx]; - r_im_ext_p[idx<<1]=rp[aa][symb][prb*24+1+6*idx]; - rd_re_ext_p[idx]=rp[aa][symb][prb*24+2+6*idx]; - rd_im_ext_p[idx]=rp[aa][symb][prb*24+3+6*idx]; - r_re_ext_p[1+(idx<<1)]=rp[aa][symb][prb*24+4+6*idx]; - r_im_ext_p[1+(idx<<1)]=rp[aa][symb][prb*24+5+6*idx]; + for (int idx = 0; idx < 4; idx++) { + c16_t *rp_base = rp[aa][symb] + prb * 12 + 3 * idx; + AssertFatal(prb * 12 + 3 * idx + 2 < nb_re_pucch, ""); + r_re_ext_p[idx << 1] = rp_base->r; + r_im_ext_p[idx << 1] = rp_base->i; + rp_base++; + rd_re_ext_p[idx] = rp_base->r; + rd_im_ext_p[idx] = rp_base->i; + rp_base++; + r_re_ext_p[1 + (idx << 1)] = rp_base->r; + r_im_ext_p[1 + (idx << 1)] = rp_base->i; } #ifdef DEBUG_NR_PUCCH_RX - for (int i=0;i<8;i++) printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n",aa,prb+(i>>2),i,rd_re_ext_p[i],rd_im_ext_p[i]); - for (int i=0;i<16;i++) printf("Ant %d PRB %d data[%d] -> (%d,%d)\n",aa,prb+(i>>3),i,r_re_ext_p[i],r_im_ext_p[i]); + for (int i = 0; i < 8; i++) + printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n", aa, prb + (i >> 2), i, rd_re_ext_p[i], rd_im_ext_p[i]); + for (int i = 0; i < 16; i++) + printf("Ant %d PRB %d data[%d] -> (%d,%d)\n", aa, prb + (i >> 3), i, r_re_ext_p[i], r_im_ext_p[i]); #endif - } // aa - } // prb + } + } // first compute DMRS component - uint32_t x1 = 0, x2 = 0, s = 0; + uint32_t x1 = 0, x2 = 0, sGold = 0; + uint8_t *sGold8 = (uint8_t *)&sGold; x2 = (((1<<17)*((14*slot) + (pucch_pdu->start_symbol_index+symb) + 1)*((2*pucch_pdu->dmrs_scrambling_id) + 1)) + (2*pucch_pdu->dmrs_scrambling_id))%(1U<<31); // c_init calculation according to TS38.211 subclause #ifdef DEBUG_NR_PUCCH_RX printf("slot %d, start_symbol_index %d, symbol %d, dmrs_scrambling_id %d\n", @@ -1257,27 +1262,34 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, #endif int reset = 1; for (int i=0; i<=(pucch_pdu->prb_start>>2); i++) { - s = lte_gold_generic(&x1, &x2, reset); + sGold = lte_gold_generic(&x1, &x2, reset); reset = 0; } for (int group=0;group>=5; corr32_im[group][aa]>>=5;*/ #ifdef DEBUG_NR_PUCCH_RX @@ -1333,95 +1341,77 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, #endif } //aa - if ((group&1) == 1) s = lte_gold_generic(&x1, &x2, 0); + if ((group & 1) == 1) + sGold = lte_gold_generic(&x1, &x2, 0); } // group } // symb - uint32_t x1, x2, s=0; + uint32_t x1, x2, sGold = 0; // unscrambling x2 = ((pucch_pdu->rnti)<<15)+pucch_pdu->data_scrambling_id; - s = lte_gold_generic(&x1, &x2, 1); + sGold = lte_gold_generic(&x1, &x2, 1); + uint8_t *sGold8 = (uint8_t *)&sGold; #ifdef DEBUG_NR_PUCCH_RX printf("x2 %x, s %x\n",x2,s); #endif for (int symb=0;symbnr_of_symbols;symb++) { - __m64 c_re0,c_im0,c_re1,c_im1,c_re2,c_im2,c_re3,c_im3; + __m64 c_re[4], c_im[4]; int re_off=0; for (int prb=0;prb Date: Wed, 5 Jul 2023 20:00:33 +0200 Subject: [PATCH 17/31] make common code for data copy to the scope --- executables/nr-ru.c | 9 ++- .../nr_dl_channel_estimation.c | 8 ++- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 4 +- .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 7 +- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 4 +- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 2 +- openair1/PHY/TOOLS/nr_phy_scope.c | 24 +++---- openair1/PHY/TOOLS/phy_scope_interface.c | 64 +++++++++---------- openair1/PHY/TOOLS/phy_scope_interface.h | 38 +++++++---- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 4 +- 10 files changed, 87 insertions(+), 77 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c19d3f8b4f..dd3b1ac0cb 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1249,8 +1249,13 @@ void *ru_thread( void *param ) { clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.return_RU_feprx[rt_prof_idx]); //LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1); LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx); - if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData) - ((scopeData_t *)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData); + gNBscopeCopy(RC.gNB[0], + gNBRxdataF, + ru->common.rxdataF[0], + sizeof(c16_t), + 1, + gNB->frame_parms.samples_per_slot_wCP, + proc->tti_rx * gNB->frame_parms.samples_per_slot_wCP); // Do PRACH RU processing int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index baf9d91bb3..1dc97cc674 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -993,7 +993,13 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, } if (dmrss == 2) - UEscopeCopy(ue, pbchDlChEstimateTime, (void*)dl_ch_estimates_time, sizeof(struct complex16), ue->frame_parms.nb_antennas_rx, ue->frame_parms.ofdm_symbol_size); + UEscopeCopy(ue, + pbchDlChEstimateTime, + (void *)dl_ch_estimates_time, + sizeof(c16_t), + ue->frame_parms.nb_antennas_rx, + ue->frame_parms.ofdm_symbol_size, + 0); return(0); } diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 3d1d9b8c73..de672b8cc5 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -745,7 +745,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, log2_maxh, n_rb); // log2_maxh+I0_shift - UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), frame_parms->nb_antennas_rx, rx_size); + UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), frame_parms->nb_antennas_rx, rx_size, 0); if (frame_parms->nb_antennas_rx > 1) { LOG_D(PHY,"we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx); @@ -761,7 +761,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, s, n_rb); - UEscopeCopy(ue, pdcchLlr, llr, sizeof(int16_t), 1, llr_size); + UEscopeCopy(ue, pdcchLlr, llr, sizeof(int16_t), 1, llr_size, 0); #if T_TRACER diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 0b63af4af7..37feb297eb 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -259,7 +259,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, int32_t *log2_maxh, int rx_size_symbol, int nbRx, - int32_t rxdataF_comp[][nbRx][rx_size_symbol], + int32_t rxdataF_comp[][nbRx][rx_size_symbol * NR_SYMBOLS_PER_SLOT], c16_t ptrs_phase_per_slot[][NR_SYMBOLS_PER_SLOT], int32_t ptrs_re_per_slot[][NR_SYMBOLS_PER_SLOT]) { @@ -621,7 +621,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, codeword_TB0, codeword_TB1, layer_llr); - + // if (llr[0][0]) abort(); for (int i=0; isymbols_per_slot), T_BUFFER(&rxdataF_comp[gNB_id][0], 2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL * 12 * 2)); #endif - - UEscopeCopy(ue, pdschRxdataF_comp, rxdataF_comp, sizeof(c16_t), nbRx, rx_size_symbol); + UEscopeCopy(ue, pdschRxdataF_comp, rxdataF_comp[0], sizeof(c16_t), nbRx, rx_size_symbol * NR_SYMBOLS_PER_SLOT, 0); if (ue->phy_sim_pdsch_rxdataF_comp) for (int a = 0; a < nbRx; a++) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index c846e55227..b51f225268 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -486,8 +486,8 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, } // legacy code use int16, but it is complex16 - UEscopeCopy(ue, pbchRxdataF_comp, pbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, pbch_e_rx_idx/2); - UEscopeCopy(ue, pbchLlr, pbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, pbch_e_rx_idx); + UEscopeCopy(ue, pbchRxdataF_comp, pbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, pbch_e_rx_idx / 2, 0); + UEscopeCopy(ue, pbchLlr, pbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, pbch_e_rx_idx, 0); #ifdef DEBUG_PBCH write_output("rxdataF_comp.m","rxFcomp",rxdataF_comp[0],240*3,1,1); short *p = (short *)rxdataF_comp[0]); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 6b40f0f54c..0112d5809e 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -404,7 +404,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, int32_t *log2_maxhrx_size_symbol, int rx_size_symbol, int nbRx, - int32_t rxdataF_comp[][nbRx][rx_size_symbol], + int32_t rxdataF_comp[][nbRx][rx_size_symbol * NR_SYMBOLS_PER_SLOT], c16_t ptrs_phase_per_slot[][NR_SYMBOLS_PER_SLOT], int32_t ptrs_re_per_slot[][NR_SYMBOLS_PER_SLOT]); diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index bc202590ed..9b0d152c6d 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -501,7 +501,9 @@ static void timeResponse (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { static void gNBfreqWaterFall (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { NR_DL_FRAME_PARMS *frame_parms=&p->gNB->frame_parms; //use 1st antenna - genericWaterFall(graph, (scopeSample_t *)p->liveData, frame_parms->samples_per_frame_wCP, + genericWaterFall(graph, + (scopeSample_t *)p->liveData[gNBRxdataF], + frame_parms->samples_per_frame_wCP, frame_parms->slots_per_frame, "X axis: Frequency domain, one subframe"); } @@ -736,26 +738,19 @@ static void *scope_thread_gNB(void *arg) { } #endif -static void copyRxdataF(int32_t *data, int slot, void *scopeData) { - scopeData_t *scope=(scopeData_t *)scopeData; - memcpy(((int32_t *)scope->liveData) + slot*scope->gNB->frame_parms.samples_per_slot_wCP, - data, - scope->gNB->frame_parms.samples_per_slot_wCP*sizeof(int32_t)); -} - STATICFORXSCOPE void gNBinitScope(scopeParms_t *p) { - AssertFatal(p->gNB->scopeData=malloc(sizeof(scopeData_t)),""); + AssertFatal(p->gNB->scopeData = calloc(sizeof(scopeData_t), 1), ""); scopeData_t *scope=(scopeData_t *) p->gNB->scopeData; scope->argc=p->argc; scope->argv=p->argv; scope->ru=p->ru; scope->gNB=p->gNB; - scope->slotFunc=copyRxdataF; - AssertFatal(scope->liveData= calloc(p->gNB->frame_parms.samples_per_frame_wCP*sizeof(int32_t),1),""); + scope->copyData = copyData; #ifndef WEBSRVSCOPE pthread_t forms_thread; threadCreate(&forms_thread, scope_thread_gNB, p->gNB->scopeData, "scope", -1, OAI_PRIORITY_RT_LOW); + copyDataMutexInit(scope); #endif } static void ueWaterFall (scopeGraphData_t **data, OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) { @@ -1140,14 +1135,13 @@ static void *nrUEscopeThread(void *arg) { STATICFORXSCOPE void nrUEinitScope(PHY_VARS_NR_UE *ue) { - AssertFatal(ue->scopeData=malloc(sizeof(scopeData_t)),""); + AssertFatal(ue->scopeData = calloc(sizeof(scopeData_t), 1), ""); scopeData_t *scope=(scopeData_t *) ue->scopeData; - scope->copyData=UEcopyData; - AssertFatal(scope->liveData=calloc(sizeof(scopeGraphData_t *), UEdataTypeNumberOfItems),""); + scope->copyData = copyData; #ifndef WEBSRVSCOPE pthread_t forms_thread; threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW); - UEcopyDataMutexInit(); + copyDataMutexInit(scope); #endif } diff --git a/openair1/PHY/TOOLS/phy_scope_interface.c b/openair1/PHY/TOOLS/phy_scope_interface.c index 6dfcc36c75..14f361362d 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.c +++ b/openair1/PHY/TOOLS/phy_scope_interface.c @@ -35,14 +35,12 @@ #include "phy_scope_interface.h" #define SOFTSCOPE_ENDFUNC_IDX 0 -#define THREAD_MEM 4 static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}}; -pthread_mutex_t UEcopyDataMutex; - -int UEcopyDataMutexInit(void) { - return pthread_mutex_init(&UEcopyDataMutex, NULL); +int copyDataMutexInit(scopeData_t *p) +{ + return pthread_mutex_init(&p->copyDataMutex, NULL); } int load_softscope(char *exectype, void *initarg) { @@ -60,46 +58,44 @@ int end_forms(void) { return -1; } -void UEcopyData(PHY_VARS_NR_UE *ue, enum UEdataType type, void *dataIn, int elementSz, int colSz, int lineSz) { - // Local static copy of the scope data bufs - // The active data buf is alterned to avoid interference between the Scope thread (display) and the Rx thread (data input) - // Index of THREAD_MEM could be set to the number of Rx threads + 1. Rx slots could run asynchronous to each other. - // THREAD_MEM = 4 slot process running in parallel is an assumption. THREAD_MEM can be increased if scope appears inconsistent. - static scopeGraphData_t *copyDataBufs[UEdataTypeNumberOfItems][THREAD_MEM] = {0}; - static int copyDataBufsIdx[UEdataTypeNumberOfItems] = {0}; - - scopeData_t *tmp = (scopeData_t *)ue->scopeData; +void copyData(void *scopeData, enum scopeDataType type, void *dataIn, int elementSz, int colSz, int lineSz, int offset) +{ + scopeData_t *tmp = (scopeData_t *)scopeData; if (tmp) { // Begin of critical zone between UE Rx threads that might copy new data at the same time: - pthread_mutex_lock(&UEcopyDataMutex); - int newCopyDataIdx = (copyDataBufsIdx[type]<(THREAD_MEM-1))?copyDataBufsIdx[type]+1:0; - copyDataBufsIdx[type] = newCopyDataIdx; - pthread_mutex_unlock(&UEcopyDataMutex); + pthread_mutex_lock(&tmp->copyDataMutex); + scopeGraphData_t *oldData = ((scopeGraphData_t **)tmp->liveData)[type]; + tmp->copyDataBufsIdx[type] = (tmp->copyDataBufsIdx[type] + 1) % COPIES_MEM; + int newCopyDataIdx = tmp->copyDataBufsIdx[type]; + pthread_mutex_unlock(&tmp->copyDataMutex); // End of critical zone between UE Rx threads - + int oldDataSz = oldData ? oldData->dataSize : 0; + int newSz = max(elementSz * colSz * (lineSz + offset), oldDataSz); // New data will be copied in a different buffer than the live one - scopeGraphData_t *copyData = copyDataBufs[type][newCopyDataIdx]; - - if (copyData == NULL || copyData->dataSize < elementSz*colSz*lineSz) { - scopeGraphData_t *ptr = (scopeGraphData_t*) realloc(copyData, sizeof(scopeGraphData_t) + elementSz*colSz*lineSz); - + scopeGraphData_t *newData = tmp->copyDataBufs[type][newCopyDataIdx]; + if (newData == NULL || newData->dataSize < newSz) { + scopeGraphData_t *ptr = (scopeGraphData_t *)realloc(newData, sizeof(scopeGraphData_t) + newSz); if (!ptr) { - LOG_E(PHY,"can't realloc\n"); + LOG_E(PHY, "can't realloc\n"); return; } else { - copyData = ptr; + tmp->copyDataBufs[type][newCopyDataIdx] = ptr; + if (!newData) // we have a new malloc + *ptr = (scopeGraphData_t){0}; + newData = ptr; + newData->dataSize = newSz; } } + if (offset && oldDataSz) // we copy the previous buffer because we have as input only a part of + memcpy(newData + 1, oldData + 1, oldDataSz); - copyData->dataSize = elementSz*colSz*lineSz; - copyData->elementSz = elementSz; - copyData->colSz = colSz; - copyData->lineSz = lineSz; - memcpy(copyData+1, dataIn, elementSz*colSz*lineSz); - copyDataBufs[type][newCopyDataIdx] = copyData; + newData->elementSz = elementSz; + newData->colSz = colSz; + newData->lineSz = lineSz + offset; + memcpy(((void *)(newData + 1)) + elementSz * colSz * offset, dataIn, elementSz * colSz * lineSz); - // The new data just copied in the local static buffer becomes live now - ((scopeGraphData_t **)tmp->liveData)[type] = copyData; + // The new data just copied becomes live now + ((scopeGraphData_t **)tmp->liveData)[type] = newData; } } diff --git a/openair1/PHY/TOOLS/phy_scope_interface.h b/openair1/PHY/TOOLS/phy_scope_interface.h index d0e3bf7dac..3c520513cf 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.h +++ b/openair1/PHY/TOOLS/phy_scope_interface.h @@ -57,7 +57,7 @@ typedef struct { PHY_VARS_gNB *gNB; } scopeParms_t; -enum UEdataType { +enum scopeDataType { pbchDlChEstimateTime, pbchLlr, pbchRxdataF_comp, @@ -66,18 +66,11 @@ enum UEdataType { pdschLlr, pdschRxdataF_comp, commonRxdataF, - UEdataTypeNumberOfItems + gNBRxdataF, + MAX_SCOPE_TYPES }; -typedef struct scopeData_s { - int *argc; - char **argv; - RU_t *ru; - PHY_VARS_gNB *gNB; - void *liveData; - void (*slotFunc)(int32_t *data, int slot, void *scopeData); - void (*copyData)(PHY_VARS_NR_UE *,enum UEdataType, void *data, int elementSz, int colSz, int lineSz); -} scopeData_t; +#define COPIES_MEM 4 typedef struct { int dataSize; @@ -86,12 +79,29 @@ typedef struct { int lineSz; } scopeGraphData_t; +typedef struct scopeData_s { + int *argc; + char **argv; + RU_t *ru; + PHY_VARS_gNB *gNB; + scopeGraphData_t *liveData[MAX_SCOPE_TYPES]; + void (*copyData)(void *, enum scopeDataType, void *data, int elementSz, int colSz, int lineSz, int offset); + pthread_mutex_t copyDataMutex; + scopeGraphData_t *copyDataBufs[MAX_SCOPE_TYPES][COPIES_MEM]; + int copyDataBufsIdx[MAX_SCOPE_TYPES]; +} scopeData_t; + int load_softscope(char *exectype, void *initarg); int end_forms(void) ; -int UEcopyDataMutexInit(void); -void UEcopyData(PHY_VARS_NR_UE *ue, enum UEdataType type, void *dataIn, int elementSz, int colSz, int lineSz); +int copyDataMutexInit(scopeData_t *); +void copyData(void *, enum scopeDataType type, void *dataIn, int elementSz, int colSz, int lineSz, int offset); -#define UEscopeCopy(ue, type, ...) if(ue->scopeData) ((scopeData_t*)ue->scopeData)->copyData(ue, type, ##__VA_ARGS__); +#define UEscopeCopy(ue, type, ...) \ + if (ue->scopeData) \ + ((scopeData_t *)ue->scopeData)->copyData((scopeData_t *)ue->scopeData, type, ##__VA_ARGS__); +#define gNBscopeCopy(gnb, type, ...) \ + if (gnb->scopeData) \ + ((scopeData_t *)gnb->scopeData)->copyData((scopeData_t *)gNB->scopeData, type, ##__VA_ARGS__); extended_kpi_ue* getKPIUE(); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 3300f7a421..eba59eb712 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1078,7 +1078,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C, VCD_FUNCTION_OUT); - UEscopeCopy(ue, pdschLlr, llr[0], sizeof(int16_t), 1, rx_llr_size); + UEscopeCopy(ue, pdschLlr, llr[0], sizeof(int16_t), 1, rx_llr_size, 0); LOG_D(PHY, "DLSCH data reception at nr_slot_rx: %d\n", nr_slot_rx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); @@ -1179,7 +1179,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx.p_time/(cpuf*1000.0)); LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, nr_slot_rx); - UEscopeCopy(ue, commonRxdataF, rxdataF, sizeof(int32_t), ue->frame_parms.nb_antennas_rx, rxdataF_sz); + UEscopeCopy(ue, commonRxdataF, rxdataF, sizeof(int32_t), ue->frame_parms.nb_antennas_rx, rxdataF_sz, 0); } From 7e112c4caf0b10f09f1630c3283920639cae06fe Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 6 Jul 2023 14:04:47 +0200 Subject: [PATCH 18/31] fix qtscope with new api --- openair1/PHY/TOOLS/nr_phy_qt_scope.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp b/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp index 5aecc3906b..69a0506531 100644 --- a/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp +++ b/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp @@ -1234,12 +1234,14 @@ void *nrUEQtscopeThread(void *arg) // gNB scope initialization void nrgNBinitQtScope(scopeParms_t *p) { - scopeData_t *scope = (scopeData_t *)malloc(sizeof(scopeData_t)); + scopeData_t *scope = (scopeData_t *)calloc(sizeof(scopeData_t), 1); scope->gNB = p->gNB; scope->argc = p->argc; scope->argv = p->argv; scope->ru = p->ru; + scope->copyData = copyData; + copyDataMutexInit(scope); p->gNB->scopeData = scope; @@ -1250,11 +1252,10 @@ void nrgNBinitQtScope(scopeParms_t *p) // UE scope initialization void nrUEinitQtScope(PHY_VARS_NR_UE *ue) { - scopeData_t *scope = (scopeData_t *)malloc(sizeof(scopeData_t)); + scopeData_t *scope = (scopeData_t *)calloc(sizeof(scopeData_t), 1); - scope->liveData = calloc(sizeof(scopeGraphData_t *), UEdataTypeNumberOfItems); - scope->copyData = UEcopyData; - UEcopyDataMutexInit(); + scope->copyData = copyData; + copyDataMutexInit(scope); ue->scopeData = scope; From f0e4f74a7c016a9dcd31621bcd26371512378fab Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 10 Jul 2023 10:02:25 +0200 Subject: [PATCH 19/31] review --- openair1/PHY/TOOLS/nr_phy_qt_scope.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp b/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp index 69a0506531..4f73978448 100644 --- a/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp +++ b/openair1/PHY/TOOLS/nr_phy_qt_scope.cpp @@ -1234,7 +1234,7 @@ void *nrUEQtscopeThread(void *arg) // gNB scope initialization void nrgNBinitQtScope(scopeParms_t *p) { - scopeData_t *scope = (scopeData_t *)calloc(sizeof(scopeData_t), 1); + scopeData_t *scope = (scopeData_t *)calloc(1, sizeof(scopeData_t)); scope->gNB = p->gNB; scope->argc = p->argc; @@ -1252,7 +1252,7 @@ void nrgNBinitQtScope(scopeParms_t *p) // UE scope initialization void nrUEinitQtScope(PHY_VARS_NR_UE *ue) { - scopeData_t *scope = (scopeData_t *)calloc(sizeof(scopeData_t), 1); + scopeData_t *scope = (scopeData_t *)calloc(1, sizeof(scopeData_t)); scope->copyData = copyData; copyDataMutexInit(scope); From 9318bf30a376a4740df7cc73aa6548d52e9f65b8 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 19 Jul 2023 10:50:09 +0100 Subject: [PATCH 20/31] Fix support for NR band n40 accordingly with 3GPP TS 38.101-1 V15.22.0 --- openair2/GNB_APP/gnb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index db770c19fb..d724785399 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -112,7 +112,7 @@ const sync_raster_t sync_raster[] = { {34, 0, 5030, 1, 5056}, {38, 0, 6431, 1, 6544}, {39, 0, 4706, 1, 4795}, - {40, 0, 5756, 1, 5995}, + {40, 1, 5762, 1, 5989}, {41, 0, 6246, 3, 6717}, {41, 1, 6252, 3, 6714}, {48, 1, 7884, 1, 7982}, From 428f9c09467453162b4083768c7a1a404f5d17c9 Mon Sep 17 00:00:00 2001 From: Vaibhav Shrivastava Date: Tue, 11 Jul 2023 18:10:50 +0530 Subject: [PATCH 21/31] fix uninitialized variable warnings found by cppcheck --- common/utils/T/tracer/hacks/multi-rru-clean.c | 2 +- executables/nr-ru.c | 2 +- openair1/SIMULATION/LTE_PHY/mbmssim.c | 2 +- openair1/SIMULATION/LTE_PHY/syncsim.c | 2 +- openair2/UTIL/OMG/omg.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/utils/T/tracer/hacks/multi-rru-clean.c b/common/utils/T/tracer/hacks/multi-rru-clean.c index 791ef6fac9..fd94253fb0 100644 --- a/common/utils/T/tracer/hacks/multi-rru-clean.c +++ b/common/utils/T/tracer/hacks/multi-rru-clean.c @@ -152,7 +152,7 @@ int main(int n, char **v) int32_t length; char *v; int vpos = 0; - struct timespec t; + struct timespec t = {0}; char *buf; /* read event from file */ diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c9d3dab560..0356b37412 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -502,7 +502,7 @@ void fh_if5_north_asynch_in(RU_t *ru,int *frame,int *slot) { NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms; RU_proc_t *proc = &ru->proc; int tti_tx,frame_tx; - openair0_timestamp timestamp_tx; + openair0_timestamp timestamp_tx = 0; AssertFatal(1==0,"Shouldn't get here\n"); // printf("Received subframe %d (TS %llu) from RCC\n",tti_tx,timestamp_tx); frame_tx = (timestamp_tx / (fp->samples_per_subframe*10))&1023; diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index 331b16b9bf..f2f6bb43e0 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -585,7 +585,7 @@ double SNR,snr0=-2.0,snr1,rate = 0; int print_perf=0; int main(int argc, char **argv) { - int k,i,j,aa; + int k = 0,i,j,aa; int re; int s,Kr,Kr_bytes; LTE_DL_FRAME_PARMS *frame_parms; diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index 39952f6ab9..0a041258c2 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -312,7 +312,7 @@ int main(int argc, char **argv) { #ifdef IFFT_FPGA int **txdataF2; #endif - int **txdata,**txdata1,**txdata2; + int **txdata,**txdata1 = NULL,**txdata2 = NULL; double **s_re,**s_im,**s_re1,**s_im1,**s_re2,**s_im2,**r_re,**r_im,**r_re1,**r_im1,**r_re2,**r_im2; double iqim = 0.0; unsigned char pbch_pdu[6]; diff --git a/openair2/UTIL/OMG/omg.c b/openair2/UTIL/OMG/omg.c index f13da86c9f..23b8bb114c 100644 --- a/openair2/UTIL/OMG/omg.c +++ b/openair2/UTIL/OMG/omg.c @@ -793,7 +793,7 @@ main (int argc, char *argv[]) { char y_area[20]; char z_area[20]; char fname[64], vname[64]; - Data_Flow_Unit omv_data; + Data_Flow_Unit omv_data = {0}; //default parameters for (node_type = eNB; node_type < MAX_NUM_NODE_TYPES; node_type++) { From 9a55658b57bef2edf3b4319d2933090cba5bf63f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 20 Jul 2023 13:21:27 +0200 Subject: [PATCH 22/31] Fix bug in scheduler lock mechanism nr_mac_prepare_ra_ue() is called with the scheduler being locked via NR_SCHED_ENSURE_LOCKED(), but if there is no free RA process, it unlocks the scheduler via NR_SCHED_UNLOCK(). This is commit fixes this. In short, when calling nr_mac_prepare_ra_ue(), the scheduler is locked, and should always return with the scheduler being locked. --- openair2/LAYER2/NR_MAC_gNB/config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 39f72831f4..5b91dadca6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -594,7 +594,6 @@ bool nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig } if (ra_index == NR_NB_RA_PROC_MAX) { LOG_E(NR_MAC, "RA processes are not available for CFRA RNTI %04x\n", rnti); - NR_SCHED_UNLOCK(&nrmac->sched_lock); return false; } NR_RA_t *ra = &cc->ra[ra_index]; From 372c067335feca50fcc213913cc3c3c36ce5a3b3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 20 Jul 2023 13:30:21 +0200 Subject: [PATCH 23/31] T GUI tools: guard with cmake option, default off The T tools offering a GUI use libxft as a dependency. By default, we try to limit the amount of dependencies, but libxft comes with X11. Put the GUI tools behind cmake option T_TOOLS_GUI (default: off) to only build on demand with a cmake option. --- common/utils/T/tracer/CMakeLists.txt | 80 +++++++++++++++------------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/common/utils/T/tracer/CMakeLists.txt b/common/utils/T/tracer/CMakeLists.txt index 6f66c2f4ee..b60649d2d4 100644 --- a/common/utils/T/tracer/CMakeLists.txt +++ b/common/utils/T/tracer/CMakeLists.txt @@ -21,30 +21,6 @@ target_link_libraries(extract_output_subframe PRIVATE tracer_utils) add_executable(extract extract.c) target_link_libraries(extract PRIVATE tracer_utils) -add_executable(textlog textlog.c) -target_link_libraries(textlog PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) - - -find_library(png png REQUIRED) -add_executable(enb enb.c) -target_link_libraries(enb PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) -target_link_libraries(enb PRIVATE png) - -add_executable(ue ue.c) -target_link_libraries(ue PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) -target_link_libraries(ue PRIVATE png) - -add_executable(vcd vcd.c) -target_link_libraries(vcd PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) - -add_executable(to_vcd to_vcd.c) -target_link_libraries(to_vcd PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) - add_executable(macpdu2wireshark macpdu2wireshark.c) target_link_libraries(macpdu2wireshark PRIVATE tracer_utils) @@ -52,22 +28,52 @@ add_executable(multi multi.c) target_link_libraries(multi PRIVATE tracer_utils T) target_include_directories(multi PRIVATE ..) -add_executable(gnb gnb.c) -target_link_libraries(gnb PRIVATE tracer_utils tracer_filter tracer_gui - tracer_logger tracer_view tracer_events) -target_link_libraries(gnb PRIVATE png) - -add_subdirectory(filter) -add_subdirectory(gui) -add_subdirectory(logger) -add_subdirectory(view) - add_custom_target(T_tools) add_dependencies(T_tools - record replay extract_config textlog enb ue vcd macpdu2wireshark - extract_input_subframe extract_output_subframe to_vcd extract multi - gnb) + record replay extract_config extract_input_subframe + extract_output_subframe extract macpdu2wireshark multi) add_dependencies(nr-softmodem T_tools) add_dependencies(nr-uesoftmodem T_tools) add_dependencies(lte-softmodem T_tools) add_dependencies(lte-uesoftmodem T_tools) + +# Some T tracer tools need additional libraries (Xft, also PNG) that come with +# a long list of dependencies. We put it behind a separate option for +# GUI-related tools so they can be added on demand, if necessary. +add_boolean_option(T_TRACER_GUI OFF "Compile T tracer GUI tools" OFF) +if(T_TRACER_GUI) + add_executable(textlog textlog.c) + target_link_libraries(textlog PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + + find_library(png png REQUIRED) + add_executable(enb enb.c) + target_link_libraries(enb PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + target_link_libraries(enb PRIVATE png) + + add_executable(gnb gnb.c) + target_link_libraries(gnb PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + target_link_libraries(gnb PRIVATE png) + + add_executable(ue ue.c) + target_link_libraries(ue PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + target_link_libraries(ue PRIVATE png) + + add_executable(vcd vcd.c) + target_link_libraries(vcd PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + + add_executable(to_vcd to_vcd.c) + target_link_libraries(to_vcd PRIVATE tracer_utils tracer_filter tracer_gui + tracer_logger tracer_view tracer_events) + + add_subdirectory(gui) + add_subdirectory(filter) + add_subdirectory(logger) + add_subdirectory(view) + + add_dependencies(T_tools textlog enb gnb ue vcd to_vcd) +endif() From 0ba050f419c0d682d1c7fc6681fa454c3c4f0bb7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 20 Jul 2023 13:45:20 +0200 Subject: [PATCH 24/31] libxft is an optional dependency Reason: see previous commit. Don't install libxft by default --- cmake_targets/tools/build_helper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 88f84538ef..357f0f0dc2 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -562,12 +562,14 @@ check_install_additional_tools (){ iperf3 \ libforms-bin \ libforms-dev \ + libxft-dev \ xmlstarlet" elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then PACKAGE_LIST="\ doxygen \ ctags \ iperf3 \ + libXft-devel \ xforms \ xforms-devel \ xmlstarlet" @@ -576,6 +578,7 @@ check_install_additional_tools (){ doxygen \ ctags \ iperf3 \ + libXft-devel \ xforms \ xforms-devel \ xmlstarlet" @@ -619,7 +622,6 @@ check_install_oai_software() { libsctp-dev \ libssl-dev \ libtool \ - libxft-dev \ patch \ openssl \ zlib1g-dev \ @@ -649,7 +651,6 @@ check_install_oai_software() { lksctp-tools \ lksctp-tools-devel \ libtool \ - libXft-devel \ ninja-build \ make \ openssl \ From 089180b069917e4a693b1c3d4d7ebdb8c5d20bcf Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 20 Jul 2023 14:36:40 +0200 Subject: [PATCH 25/31] remove dead code --- openair1/PHY/INIT/nr_init_ue.c | 4 ---- openair1/PHY/defs_nr_UE.h | 13 ------------- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 3 +-- openair1/SIMULATION/NR_PHY/ulsim.c | 12 ++++-------- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index a09d00b291..580db261ae 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -299,11 +299,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) // init RX buffers common_vars->rxdata = malloc16(fp->nb_antennas_rx * sizeof(c16_t *)); - common_vars->rxdataF = malloc16(fp->nb_antennas_rx * sizeof(c16_t *)); for (i=0; inb_antennas_rx; i++) { common_vars->rxdata[i] = malloc16_clear((2 * (fp->samples_per_frame) + fp->ofdm_symbol_size) * sizeof(c16_t)); - common_vars->rxdataF[i] = malloc16_clear((2 * (fp->samples_per_frame) + fp->ofdm_symbol_size) * sizeof(c16_t)); } // ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK) @@ -415,10 +413,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) for (int i = 0; i < fp->nb_antennas_rx; i++) { free_and_zero(common_vars->rxdata[i]); - free_and_zero(common_vars->rxdataF[i]); } free_and_zero(common_vars->rxdata); - free_and_zero(common_vars->rxdataF); for (int slot = 0; slot < fp->slots_per_frame; slot++) { for (int symb = 0; symb < fp->symbols_per_slot; symb++) diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 93ff036d4f..0cd9cef722 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -222,11 +222,6 @@ typedef struct { /// - first index: tx antenna [0..nb_antennas_tx[ /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES[ c16_t **txData; - /// \brief Holds the transmit data in the frequency domain. - /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. - /// - first index: tx antenna [0..nb_antennas_tx[ - /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX[ - c16_t **txdataF; /// \brief Holds the received data in time domain. /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. @@ -234,14 +229,6 @@ typedef struct { /// - second index: sample [0..2*FRAME_LENGTH_COMPLEX_SAMPLES+2048[ c16_t **rxdata; - /// \brief Holds the received data in time domain. - /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. - /// - first index: rx antenna [0..nb_antennas_rx[ - /// - second index: sample [0..2*FRAME_LENGTH_COMPLEX_SAMPLES+2048[ - c16_t **rxdataF; - - /// holds output of the sync correlator - int32_t *sync_corr; /// estimated frequency offset (in radians) for all subcarriers int32_t freq_offset; /// nid2 is the PSS value, the PCI (physical cell id) will be: 3*NID1 (SSS value) + NID2 (PSS value) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 3300f7a421..163e3a11f1 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -335,8 +335,7 @@ void nr_ue_measurement_procedures(uint16_t l, T_INT((int)(ue->measurements.rx_power_avg_dB[0] - ue->measurements.n0_power_avg_dB)), T_INT((int)ue->measurements.rx_power_avg_dB[0]), T_INT((int)ue->measurements.n0_power_avg_dB), - T_INT((int)ue->measurements.wideband_cqi_avg[0]), - T_INT((int)ue->common_vars.freq_offset)); + T_INT((int)ue->measurements.wideband_cqi_avg[0])); #endif } diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 4c193df4fd..4915b1cffa 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1184,15 +1184,11 @@ int main(int argc, char **argv) if (n_trials == 1) { LOG_M("txsig0.m", "txs0", &UE->common_vars.txData[0][slot_offset], slot_length, 1, 1); - LOG_M("txsig0F.m", "txs0F", UE->common_vars.txdataF[0], frame_parms->ofdm_symbol_size * 14, 1, 1); if (precod_nbr_layers > 1) { - LOG_M("txsig1.m", "txs1", &UE->common_vars.txData[1][slot_offset], slot_length, 1, 1); - LOG_M("txsig1F.m", "txs1F", UE->common_vars.txdataF[1], frame_parms->ofdm_symbol_size * 14, 1, 1); - if (precod_nbr_layers == 4) { - LOG_M("txsig2.m", "txs2", &UE->common_vars.txData[2][slot_offset], slot_length, 1, 1); - LOG_M("txsig3.m", "txs3", &UE->common_vars.txData[3][slot_offset], slot_length, 1, 1); - LOG_M("txsig2F.m", "txs2F", UE->common_vars.txdataF[2], frame_parms->ofdm_symbol_size * 14, 1, 1); - LOG_M("txsig3F.m", "txs3F", UE->common_vars.txdataF[3], frame_parms->ofdm_symbol_size * 14, 1, 1); + LOG_M("txsig1.m", "txs1", &UE->common_vars.txData[1][slot_offset], slot_length, 1, 1); + if (precod_nbr_layers == 4) { + LOG_M("txsig2.m", "txs2", &UE->common_vars.txData[2][slot_offset], slot_length, 1, 1); + LOG_M("txsig3.m", "txs3", &UE->common_vars.txData[3][slot_offset], slot_length, 1, 1); } } } From c56b4bf515148dff13341930f411d290288d07e1 Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 14 Jul 2023 18:19:51 +0200 Subject: [PATCH 26/31] fix computation of absolute slot --- executables/nr-gnb.c | 13 ++++++------- executables/nr-ru.c | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 3957d3fe05..33fe6b3f2a 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -117,10 +117,10 @@ void tx_func(void *param) int frame_tx = info->frame; int slot_tx = info->slot; int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms); - int i = 0; - for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++) + int i = 1; + for (; i < gNB->frame_parms.slots_per_subframe / 2; i++) cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms); - int samples = cumul_samples / (i + 1); + int samples = cumul_samples / i; int absslot_tx = info->timestamp_tx / samples; int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; @@ -182,12 +182,11 @@ void rx_func(void *param) int frame_tx = info->frame_tx; int slot_tx = info->slot_tx; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; - int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms); - int i = 0; - for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++) + int i = 1; + for (; i < gNB->frame_parms.slots_per_subframe / 2; i++) cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms); - int samples = cumul_samples / (i + 1); + int samples = cumul_samples / i; int absslot_tx = info->timestamp_tx / samples; int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 3cae919d9e..0426ee5405 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1016,10 +1016,10 @@ void ru_tx_func(void *param) { char filename[40]; int cumul_samples = fp->get_samples_per_slot(0, fp); - int i = 0; - for (i = 1; i < fp->slots_per_subframe / 2; i++) + int i = 1; + for (; i < fp->slots_per_subframe / 2; i++) cumul_samples += fp->get_samples_per_slot(i, fp); - int samples = cumul_samples / (i + 1); + int samples = cumul_samples / i; int absslot_tx = info->timestamp_tx / samples; int absslot_rx = absslot_tx - ru->sl_ahead; int rt_prof_idx = absslot_rx % RT_PROF_DEPTH; From e04554dcb066ead8d212f08732b19902a1928c27 Mon Sep 17 00:00:00 2001 From: mir Date: Fri, 21 Jul 2023 09:39:36 +0200 Subject: [PATCH 27/31] Warnings generated in gcc 13 and tackled in this PR (except const correctness) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 49 /home/mir/workspace/oai_dev/common/utils/T/tracer/to_vcd.c: In function ‘main’: 50 /home/mir/workspace/oai_dev/common/utils/T/tracer/to_vcd.c:349:30: warning: ‘%s’ directive writing up to 240 bytes into a region of size between 11 and 251 [-Wformat-overflow=] 51 349 | sprintf(format, "%c [%s] %s", 52 | ^~ 53 In file included from /usr/include/stdio.h:894, 54 from /home/mir/workspace/oai_dev/common/utils/T/tracer/to_vcd.c:1: 55 In function ‘sprintf’, 56 inlined from ‘main’ at /home/mir/workspace/oai_dev/common/utils/T/tracer/to_vcd.c:349:5: 57 /usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 6 and 486 bytes into a destination of size 256 58 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, 59 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 39 | __glibc_objsize (__s), __fmt, 61 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 40 | __va_arg_pack ()); 63 | ~~~~~~~~~~~~~~~~~ 2005 /home/mir/workspace/oai_dev/openair1/SIMULATION/TOOLS/random_channel.c:1726:6: warning: conflicting types for ‘set_channeldesc_owner’ due to enum/integer mismatch; have ‘void(channel_desc_t *, uint32_t)’ { aka ‘void(channel_desc_t *, unsigned int)’} [-Wenum-int-mismatch] 2006 1726 | void set_channeldesc_owner(channel_desc_t *cdesc, uint32_t module_id) { 2007 | ^~~~~~~~~~~~~~~~~~~~~ 2008 In file included from /home/mir/workspace/oai_dev/openair1/SIMULATION/TOOLS/random_channel.c:31: 2009 /home/mir/workspace/oai_dev/openair1/SIMULATION/TOOLS/sim.h:348:6: note: previous declaration of ‘set_channeldesc_owner’ with type ‘void(channel_desc_t *, channelmod_moduleid_t)’ 2010 348 | void set_channeldesc_owner(channel_desc_t *cdesc, channelmod_moduleid_t module_id); 2011 | ^~~~~~~~~~~~~~~~~~~~~ 24209 /home/mir/workspace/oai_dev/openair1/SCHED_UE/phy_procedures_lte_ue.c:954:17: warning: ‘n1_pucch_inter’ may be used uninitialized [-Wmaybe-uninitialized] 24210 954 | return(n1_pucch_inter); 24211 | ^ 24212 /home/mir/workspace/oai_dev/openair1/SCHED_UE/phy_procedures_lte_ue.c:647:60: note: ‘n1_pucch_inter’ was declared here 24213 647 | uint16_t n1_pucch0=0,n1_pucch1=0,n1_pucch2=0,n1_pucch3=0,n1_pucch_inter; 24214 | --- common/utils/T/tracer/to_vcd.c | 8 +++----- openair1/SCHED_UE/phy_procedures_lte_ue.c | 4 ++-- openair1/SIMULATION/TOOLS/random_channel.c | 5 +++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/common/utils/T/tracer/to_vcd.c b/common/utils/T/tracer/to_vcd.c index 998649af01..a3c13aebf9 100644 --- a/common/utils/T/tracer/to_vcd.c +++ b/common/utils/T/tracer/to_vcd.c @@ -345,11 +345,9 @@ int main(int n, char **v) /* setup traces */ for (i = 0; i < nvars; i++) { char format[256]; - if (strlen(vars[i].arg) + strlen(vars[i].vcd_name) > 256-16) abort(); - sprintf(format, "%c [%s] %s", - vars[i].boolean ? 'b' : 'l', - vars[i].arg, - vars[i].vcd_name); + int ret = snprintf(format, 256, "%c [%s] %s", vars[i].boolean ? 'b' : 'l', vars[i].arg, vars[i].vcd_name); + if (ret > 255) + abort(); textlog = new_textlog(h, database, vars[i].event, format); logger_add_view(textlog, vcd_view); on_off(database, vars[i].event, is_on, 1); diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 19d58ef4b5..c8c83e86bc 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -644,7 +644,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; uint8_t nCCE0,nCCE1,nCCE2,nCCE3,harq_ack1,harq_ack0,harq_ack3,harq_ack2; ANFBmode_t bundling_flag; - uint16_t n1_pucch0=0,n1_pucch1=0,n1_pucch2=0,n1_pucch3=0,n1_pucch_inter; + uint16_t n1_pucch0 = 0, n1_pucch1 = 0, n1_pucch2 = 0, n1_pucch3 = 0, n1_pucch_inter = 0; static uint8_t candidate_dl[9]; // which downlink(s) the current ACK/NACK is associating to uint8_t last_dl=0xff; // the last downlink with valid DL-DCI. for calculating the PUCCH resource index int sf; @@ -951,7 +951,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, // proc->frame_tx%1024, // proc->subframe_tx,n1_pucch_inter, // b[0],b[1]); - return(n1_pucch_inter); + return n1_pucch_inter; } else if ((bundling_flag==multiplexing)&&(SR==0)) { // Table 10.1 if (subframe == 3) { LOG_I(PHY, "sbuframe=%d \n",subframe); diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c index fad949ce93..f360adad32 100644 --- a/openair1/SIMULATION/TOOLS/random_channel.c +++ b/openair1/SIMULATION/TOOLS/random_channel.c @@ -1723,8 +1723,9 @@ void free_channel_desc_scm(channel_desc_t *ch) { free(ch); } -void set_channeldesc_owner(channel_desc_t *cdesc, uint32_t module_id) { - cdesc->module_id=module_id; +void set_channeldesc_owner(channel_desc_t *cdesc, channelmod_moduleid_t module_id) +{ + cdesc->module_id = module_id; } void set_channeldesc_name(channel_desc_t *cdesc,char *modelname) { From 195143811efab5fc8cc68e2a7075334b169afd2f Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 12 Jul 2023 15:17:16 +0200 Subject: [PATCH 28/31] Replacement of strings by f-strings in cls_oaicitest --- ci-scripts/cls_oaicitest.py | 339 ++++++++++++++++++------------------ 1 file changed, 169 insertions(+), 170 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 4d0d4d8f17..06ae655f37 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -134,9 +134,9 @@ class OaiCiTest(): full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' - SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5) - SSH.command('cd ' + self.UESourceCodePath, '\$', 5) - SSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) + SSH.command(f'mkdir -p {self.UESourceCodePath}', '\$', 5) + SSH.command(f'cd {self.UESourceCodePath}', '\$', 5) + SSH.command(f'if [ ! -e .git ]; then stdbuf -o0 git clone {full_ran_repo_name} .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) # here add a check if git clone or git fetch went smoothly SSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) SSH.command('git config user.name "OAI Jenkins"', '\$', 5) @@ -170,11 +170,11 @@ class OaiCiTest(): HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'OK', CONST.ALL_PROCESSES_OK) return - SSH.command('echo ' + self.UEPassword + ' | sudo -S git clean -x -d -ff', '\$', 30) + SSH.command(f'echo {self.UEPassword} | sudo -S git clean -x -d -ff', '\$', 30) # if the commit ID is provided use it to point to it if self.ranCommitID != '': - SSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) + SSH.command(f'git checkout -f {self.ranCommitID}', '\$', 30) # if the branch is not develop, then it is a merge request and we need to do # the potential merge. Note that merge conflicts should already been checked earlier if self.ranAllowMerge: @@ -182,33 +182,33 @@ class OaiCiTest(): if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): SSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30) else: - logging.debug('Merging with the target branch: ' + self.ranTargetBranch) - SSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30) + logging.debug(f'Merging with the target branch: {self.ranTargetBranch}') + SSH.command(f'git merge --ff origin/{self.ranTargetBranch} -m "Temporary merge for CI"', '\$', 30) SSH.command('source oaienv', '\$', 5) SSH.command('cd cmake_targets', '\$', 5) SSH.command('mkdir -p log', '\$', 5) SSH.command('chmod 777 log', '\$', 5) # no need to remove in log (git clean did the trick) - SSH.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 1200) + SSH.command(f'stdbuf -o0 ./build_oai {self.Build_OAI_UE_args} 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 1200) SSH.command('ls ran_build/build', '\$', 3) SSH.command('ls ran_build/build', '\$', 3) buildStatus = True result = re.search(self.air_interface, SSH.getBefore()) if result is None: buildStatus = False - SSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5) - SSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5) - SSH.command('mv compile_oai_ue.log ' + 'build_log_' + self.testCase_id, '\$', 5) + SSH.command(f'mkdir -p build_log_{self.testCase_id}', '\$', 5) + SSH.command(f'mv log/* build_log_{self.testCase_id}', '\$', 5) + SSH.command(f'mv compile_oai_ue.log build_log_{self.testCase_id}', '\$', 5) if buildStatus: # Generating a BUILD INFO file - SSH.command('echo "SRC_BRANCH: ' + self.ranBranch + '" > ../LAST_BUILD_INFO.txt', '\$', 2) - SSH.command('echo "SRC_COMMIT: ' + self.ranCommitID + '" >> ../LAST_BUILD_INFO.txt', '\$', 2) + SSH.command(f'echo "SRC_BRANCH: {self.ranBranch}" > ../LAST_BUILD_INFO.txt', '\$', 2) + SSH.command(f'echo "SRC_COMMIT: {self.ranCommitID}" >> ../LAST_BUILD_INFO.txt', '\$', 2) if self.ranAllowMerge: SSH.command('echo "MERGED_W_TGT_BRANCH: YES" >> ../LAST_BUILD_INFO.txt', '\$', 2) if self.ranTargetBranch == '': SSH.command('echo "TGT_BRANCH: develop" >> ../LAST_BUILD_INFO.txt', '\$', 2) else: - SSH.command('echo "TGT_BRANCH: ' + self.ranTargetBranch + '" >> ../LAST_BUILD_INFO.txt', '\$', 2) + SSH.command(f'echo "TGT_BRANCH: {self.ranTargetBranch}" >> ../LAST_BUILD_INFO.txt', '\$', 2) else: SSH.command('echo "MERGED_W_TGT_BRANCH: NO" >> ../LAST_BUILD_INFO.txt', '\$', 2) SSH.close() @@ -248,7 +248,7 @@ class OaiCiTest(): UE_prefix = 'NR ' SSH = sshconnection.SSHConnection() SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) - SSH.command('cd ' + self.UESourceCodePath, '\$', 5) + SSH.command(f'cd {self.UESourceCodePath}', '\$', 5) # Initialize_OAI_UE_args usually start with -C and followed by the location in repository SSH.command('source oaienv', '\$', 5) SSH.command('cd cmake_targets/ran_build/build', '\$', 5) @@ -262,11 +262,11 @@ class OaiCiTest(): SSH.command('sed -f /tmp/adapt_usim_parameters.sed ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf > ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf', '\$', 5) else: SSH.command('sed -e "s#93#92#" -e "s#8baf473f2f8fd09487cccbd7097c6862#fec86ba6eb707ed08905757b1bb44b8f#" -e "s#e734f8734007d6c5ce7a0508809e7e9c#C42449363BBAD02B66D16BC975D77CC1#" ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf > ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf', '\$', 5) - SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf .u*', '\$', 5) - SSH.command('echo ' + self.UEPassword + ' | sudo -S ../../nas_sim_tools/build/conf2uedata -c ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf -o .', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S rm -Rf .u*', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S ../../nas_sim_tools/build/conf2uedata -c ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf -o .', '\$', 5) else: - SSH.command('if [ -e rbconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm rbconfig.raw; fi', '\$', 5) - SSH.command('if [ -e reconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm reconfig.raw; fi', '\$', 5) + SSH.command(f'if [ -e rbconfig.raw ]; then echo {self.UEPassword} | sudo -S rm rbconfig.raw; fi', '\$', 5) + SSH.command(f'if [ -e reconfig.raw ]; then echo {self.UEPassword} | sudo -S rm reconfig.raw; fi', '\$', 5) # Copy the RAW files from gNB running directory (maybe on another machine) copyin_res = SSH.copyin(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath + '/cmake_targets/rbconfig.raw', '.') if (copyin_res == 0): @@ -275,9 +275,9 @@ class OaiCiTest(): if (copyin_res == 0): SSH.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, './reconfig.raw', self.UESourceCodePath + '/cmake_targets/ran_build/build') SSH.command(f'echo "ulimit -c unlimited && {self.cmd_prefix} ./{self.air_interface} {self.Initialize_OAI_UE_args}" > ./my-lte-uesoftmodem-run{self.UE_instance}.sh', '\$', 5) - SSH.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5) - SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5) - self.UELogFile = 'ue_' + self.testCase_id + '.log' + SSH.command(f'chmod 775 ./my-lte-uesoftmodem-run {self.UE_instance}.sh', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S rm -Rf {self.UESourceCodePath}/cmake_targets/ue_{self.testCase_id}.log', '\$', 5) + self.UELogFile = f'ue_{self.testCase_id}.log' # We are now looping several times to hope we really sync w/ an eNB doOutterLoop = True @@ -285,9 +285,9 @@ class OaiCiTest(): gotSyncStatus = True fullSyncStatus = True while (doOutterLoop): - SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets/ran_build/build', '\$', 5) - SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5) - SSH.command('echo $USER; nohup sudo -E stdbuf -o0 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh' + ' > ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log ' + ' 2>&1 &', self.UEUserName, 5) + SSH.command(f'cd {self.UESourceCodePath}/cmake_targets/ran_build/build', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S rm -Rf {self.UESourceCodePath}/cmake_targets/ue_{self.testCase_id}.log', '\$', 5) + SSH.command(f'echo $USER; nohup sudo -E stdbuf -o0 ./my-lte-uesoftmodem-run {self.UE_instance}.sh > {self.UESourceCodePath}/cmake_targets/ue_{self.testCase_id}.log 2>&1 &', self.UEUserName, 5) time.sleep(6) SSH.command('cd ../..', '\$', 5) doLoop = True @@ -302,7 +302,7 @@ class OaiCiTest(): gotSyncStatus = False doLoop = False continue - SSH.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4) + SSH.command(f'stdbuf -o0 cat ue_{self.testCase_id}.log | egrep --text --color=never -i "wait|sync"', '\$', 4) if self.air_interface == 'nr-uesoftmodem': result = re.search('Starting sync detection', SSH.getBefore()) else: @@ -317,7 +317,7 @@ class OaiCiTest(): SSH.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4) result = re.search('-uesoftmodem', SSH.getBefore()) if result is not None: - SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT -r *-uesoftmodem', '\$', 4) + SSH.command(f'echo {self.UEPassword} | sudo -S killall --signal=SIGINT -r *-uesoftmodem', '\$', 4) time.sleep(3) outterLoopCounter = outterLoopCounter - 1 if (outterLoopCounter == 0): @@ -347,7 +347,7 @@ class OaiCiTest(): SSH.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4) result = re.search('nr-uesoftmodem', SSH.getBefore()) if result is not None: - SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT nr-uesoftmodem', '\$', 4) + SSH.command(f'echo {self.UEPassword} | sudo -S killall --signal=SIGINT nr-uesoftmodem', '\$', 4) time.sleep(6) else: # Here we do have a great chance that the UE did cell-sync w/ eNB @@ -355,7 +355,7 @@ class OaiCiTest(): doOutterLoop = False fullSyncStatus = True continue - SSH.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Frequency"', '\$', 4) + SSH.command(f'stdbuf -o0 cat ue_{self.testCase_id}.log | egrep --text --color=never -i "wait|sync|Frequency"', '\$', 4) if self.air_interface == 'nr-uesoftmodem': # Positive messaging --> result = re.search('Measured Carrier Frequency', SSH.getBefore()) @@ -378,7 +378,7 @@ class OaiCiTest(): SSH.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4) result = re.search('lte-uesoftmodem', SSH.getBefore()) if result is not None: - SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT lte-uesoftmodem', '\$', 4) + SSH.command(f'echo {self.UEPassword} | sudo -S killall --signal=SIGINT lte-uesoftmodem', '\$', 4) outterLoopCounter = outterLoopCounter - 1 if (outterLoopCounter == 0): doOutterLoop = False @@ -543,13 +543,13 @@ class OaiCiTest(): result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output) if result is None: message = ue_header + ': Packet Loss Not Found!' - logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m') + logging.error(f'\u001B[1;37;41m {message} \u001B[0m') return (False, message) packetloss = result.group('packetloss') result = re.search('rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', ping_output) if result is None: message = ue_header + ': Ping RTT_Min RTT_Avg RTT_Max Not Found!' - logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m') + logging.error(f'\u001B[1;37;41m {message} \u001B[0m') return (False, message) rtt_min = result.group('rtt_min') rtt_avg = result.group('rtt_avg') @@ -561,10 +561,10 @@ class OaiCiTest(): max_msg = f'RTT(Max) : {rtt_max} ms' logging.info(f'\u001B[1;37;44m ping result for {ue_header} \u001B[0m') - logging.info(f'\u001B[1;34m ' + pal_msg + '\u001B[0m') - logging.info(f'\u001B[1;34m ' + min_msg + '\u001B[0m') - logging.info(f'\u001B[1;34m ' + avg_msg + '\u001B[0m') - logging.info(f'\u001B[1;34m ' + max_msg + '\u001B[0m') + logging.info(f'\u001B[1;34m {pal_msg} \u001B[0m') + logging.info(f'\u001B[1;34m {min_msg} \u001B[0m') + logging.info(f'\u001B[1;34m {avg_msg} \u001B[0m') + logging.info(f'\u001B[1;34m {max_msg} \u001B[0m') message = f'{ue_header}\n{pal_msg}\n{min_msg}\n{avg_msg}\n{max_msg}' @@ -580,7 +580,7 @@ class OaiCiTest(): if self.ping_rttavg_threshold != '': if float(rtt_avg) > float(self.ping_rttavg_threshold): ping_rttavg_error_msg = f'RTT(Avg) too high: {rtt_avg} ms; Target: {self.ping_rttavg_threshold} ms' - message += '\n' + ping_rttavg_error_msg + message += f'\n {ping_rttavg_error_msg}' logging.error('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m') return (False, message) @@ -631,8 +631,8 @@ class OaiCiTest(): iperf_bandwidth_new = float(iperf_bandwidth) - ((ue_num - 1) * residualBW) else: iperf_bandwidth_new = residualBW - iperf_bandwidth_str = '-b ' + iperf_bandwidth - iperf_bandwidth_str_new = '-b ' + ('%.2f' % iperf_bandwidth_new) + iperf_bandwidth_str = f'-b {iperf_bandwidth}' + iperf_bandwidth_str_new = f"-b {'%.2f' % iperf_bandwidth_new}" result = re.sub(iperf_bandwidth_str, iperf_bandwidth_str_new, str(self.iperf_args)) if result is None: logging.debug('\u001B[1;37;41m Calculate Iperf bandwidth Failed! \u001B[0m') @@ -648,17 +648,17 @@ class OaiCiTest(): maxbitrate = result.group('maximum') minbitrate = result.group('minimum') lock.acquire() - logging.debug('\u001B[1;37;44m TCP iperf result (' + UE_IPAddress + ') \u001B[0m') + logging.debug(f'\u001B[1;37;44m TCP iperf result ({UE_IPAddress}) \u001B[0m') msg = 'TCP Stats :\n' if avgbitrate is not None: - logging.debug('\u001B[1;34m Avg Bitrate : ' + avgbitrate + '\u001B[0m') - msg += 'Avg Bitrate : ' + avgbitrate + '\n' + logging.debug(f'\u001B[1;34m Avg Bitrate : {avgbitrate} \u001B[0m') + msg += f'Avg Bitrate : {avgbitrate} \n' if maxbitrate is not None: - logging.debug('\u001B[1;34m Max Bitrate : ' + maxbitrate + '\u001B[0m') - msg += 'Max Bitrate : ' + maxbitrate + '\n' + logging.debug(f'\u001B[1;34m Max Bitrate : {maxbitrate} \u001B[0m') + msg += f'Max Bitrate : {maxbitrate} \n' if minbitrate is not None: - logging.debug('\u001B[1;34m Min Bitrate : ' + minbitrate + '\u001B[0m') - msg += 'Min Bitrate : ' + minbitrate + '\n' + logging.debug(f'\u001B[1;34m Min Bitrate : {minbitrate} \u001B[0m') + msg += f'Min Bitrate : {minbitrate} \n' statusQueue.put(0) statusQueue.put(device_id) statusQueue.put(UE_IPAddress) @@ -672,9 +672,9 @@ class OaiCiTest(): result = re.search('-u', str(iperf_real_options)) if result is None: logging.debug('Into Iperf_analyzeV2TCPOutput client') - filename = EPC.SourceCodePath + '/scripts/iperf_' + self.testCase_id + '_' + device_id + '.log' + filename = f'{EPC.SourceCodePath}/scripts/iperf_{self.testCase_id}_{device_id}.log' response = self.Iperf_analyzeV2TCPOutput(lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, EPC, SSH, filename) - logging.debug('Iperf_analyzeV2TCPOutput response returned value = ' + str(response)) + logging.debug(f'Iperf_analyzeV2TCPOutput response returned value = {response}') return response result = re.search('Server Report:', SSH.getBefore()) @@ -709,13 +709,13 @@ class OaiCiTest(): packetloss = result.group('packetloss') jitter = result.group('jitter') lock.acquire() - logging.debug('\u001B[1;37;44m iperf result (' + UE_IPAddress + ') \u001B[0m') + logging.debug(f'\u001B[1;37;44m iperf result {UE_IPAddress} \u001B[0m') iperfStatus = True - msg = 'Req Bitrate : ' + req_bandwidth + '\n' - logging.debug('\u001B[1;34m Req Bitrate : ' + req_bandwidth + '\u001B[0m') + msg = f'Req Bitrate : {req_bandwidth} \n' + logging.debug(f'\u001B[1;34m Req Bitrate : {req_bandwidth} \u001B[0m') if bitrate is not None: - msg += 'Bitrate : ' + bitrate + '\n' - logging.debug('\u001B[1;34m Bitrate : ' + bitrate + '\u001B[0m') + msg += f'Bitrate : {bitrate} \n' + logging.debug(f'\u001B[1;34m Bitrate : {bitrate} \u001B[0m') result = re.search('(?P[0-9\.]+) [KMG]bits/sec', str(bitrate)) if result is not None: actual_bw = float(str(result.group('real_bw'))) @@ -730,18 +730,18 @@ class OaiCiTest(): actual_bw = actual_bw * 1000000000 br_loss = 100 * actual_bw / req_bw bitperf = '%.2f ' % br_loss - msg += 'Bitrate Perf: ' + bitperf + '%\n' - logging.debug('\u001B[1;34m Bitrate Perf: ' + bitperf + '%\u001B[0m') + msg += f'Bitrate Perf: {bitperf} %\n' + logging.debug(f'\u001B[1;34m Bitrate Perf: {bitperf} %\u001B[0m') if packetloss is not None: - msg += 'Packet Loss : ' + packetloss + '%\n' - logging.debug('\u001B[1;34m Packet Loss : ' + packetloss + '%\u001B[0m') + msg += f'Packet Loss : {packetloss} %\n' + logging.debug(f'\u001B[1;34m Packet Loss : {packetloss} %\u001B[0m') if float(packetloss) > float(self.iperf_packetloss_threshold): msg += 'Packet Loss too high!\n' logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m') iperfStatus = False if jitter is not None: - msg += 'Jitter : ' + jitter + '\n' - logging.debug('\u001B[1;34m Jitter : ' + jitter + '\u001B[0m') + msg += f'Jitter : {jitter} \n' + logging.debug(f'\u001B[1;34m Jitter : {jitter} \u001B[0m') if (iperfStatus): statusQueue.put(0) else: @@ -785,16 +785,15 @@ class OaiCiTest(): if result is not None: report.append(str(line)) report_msg+=result.group('role') + ' ' + result.group('direction')+ '\t = ' +result.group('bitrate')+'\n' - if len(report)>0: lock.acquire() statusQueue.put(0) statusQueue.put(device_id) statusQueue.put(UE_IPAddress) statusQueue.put(report_msg) - logging.debug('\u001B[1;37;45m TCP Bidir Iperf Result (' + UE_IPAddress + ') \u001B[0m') + logging.debug(f'\u001B[1;37;45m TCP Bidir Iperf Result ({UE_IPAddress}) \u001B[0m') for rLine in report_msg.split('\n'): - logging.debug('\u001B[1;35m ' + rLine + '\u001B[0m') + logging.debug(f'\u001B[1;35m {rLine} \u001B[0m') lock.release() else: self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file') @@ -896,20 +895,20 @@ class OaiCiTest(): statusQueue.put(0) statusQueue.put(device_id) statusQueue.put(UE_IPAddress) - req_msg = 'Req Bitrate : ' + req_bandwidth - bir_msg = 'Bitrate : ' + bitrate - brl_msg = 'Bitrate Perf: ' + bitperf - jit_msg = 'Jitter : ' + jitter - pal_msg = 'Packet Loss : ' + packetloss - statusQueue.put(req_msg + '\n' + bir_msg + '\n' + brl_msg + '\n' + jit_msg + '\n' + pal_msg + '\n' + pal_too_high_msg + '\n' + bit_too_low_msg + '\n') - logging.debug('\u001B[1;37;45m iperf result (' + UE_IPAddress + ') \u001B[0m') - logging.debug('\u001B[1;35m ' + req_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + bir_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + brl_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + jit_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + pal_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + pal_too_high_msg + '\u001B[0m') - logging.debug('\u001B[1;35m ' + bit_too_low_msg + '\u001B[0m') + req_msg = f'Req Bitrate : {req_bandwidth}' + bir_msg = f'Bitrate : {bitrate}' + brl_msg = f'Bitrate Perf: {bitperf}' + jit_msg = f'Jitter : {jitter}' + pal_msg = f'Packet Loss : {packetloss}' + statusQueue.put(f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}\n{pal_too_high_msg}\n{bit_too_low_msg}\n') + logging.debug(f'\u001B[1;37;45m iperf result ({UE_IPAddress}) \u001B[0m') + logging.debug(f'\u001B[1;35m {req_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {bir_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {brl_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {jit_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {pal_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {pal_too_high_msg} \u001B[0m') + logging.debug(f'\u001B[1;35m {bit_too_low_msg} \u001B[0m') lock.release() else: self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log') @@ -927,7 +926,7 @@ class OaiCiTest(): statusQueue.put(device_id) statusQueue.put(UE_IPAddress) if result is not None: - logging.debug('\u001B[1;37;41m ' + result.group('error') + ' \u001B[0m') + logging.debug(f"\u001B[1;37;41m {result.group('error')} \u001B[0m") statusQueue.put(result.group('error')) else: logging.debug('\u001B[1;37;41m Bitrate and/or Packet Loss Not Found! \u001B[0m') @@ -937,13 +936,13 @@ class OaiCiTest(): bitrate = result.group('bitrate') packetloss = result.group('packetloss') lock.acquire() - logging.debug('\u001B[1;37;44m iperf result (' + UE_IPAddress + ') \u001B[0m') - logging.debug('\u001B[1;34m Bitrate : ' + bitrate + '\u001B[0m') - msg = 'Bitrate : ' + bitrate + '\n' + logging.debug(f'\u001B[1;37;44m iperf result ({UE_IPAddress}) \u001B[0m') + logging.debug(f'\u001B[1;34m Bitrate : {bitrate} \u001B[0m') + msg = f'Bitrate : {bitrate} \n' iperfStatus = True if packetloss is not None: - logging.debug('\u001B[1;34m Packet Loss : ' + packetloss + '%\u001B[0m') - msg += 'Packet Loss : ' + packetloss + '%\n' + logging.debug(f'\u001B[1;34m Packet Loss : {packetloss} %\u001B[0m') + msg += f'Packet Loss : {packetloss} %\n' if float(packetloss) > float(self.iperf_packetloss_threshold): logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m') msg += 'Packet Loss too high!\n' @@ -1102,8 +1101,8 @@ class OaiCiTest(): # -B 10.0.1.1 -u -s -i 1 -fm server_options = re.sub('-u.*$', '-u -s -i 1 -fm', str(self.iperf_args)) server_options = server_options.replace('-c','-B') - SSH.command('rm -f /tmp/tmp_iperf_server_' + self.testCase_id + '.log', '\$', 5) - SSH.command('echo $USER; nohup iperf ' + server_options + ' > /tmp/tmp_iperf_server_' + self.testCase_id + '.log 2>&1 &', iServerUser, 5) + SSH.command(f'rm -f /tmp/tmp_iperf_server_{self.testCase_id}.log', '\$', 5) + SSH.command(f'echo $USER; nohup iperf {server_options} > /tmp/tmp_iperf_server_{self.testCase_id}.log 2>&1 &', iServerUser, 5) time.sleep(0.5) SSH.close() @@ -1112,13 +1111,13 @@ class OaiCiTest(): modified_options = modified_options.replace('-R','') iperf_time = self.Iperf_ComputeTime() SSH.open(iClientIPAddr, iClientUser, iClientPasswd) - SSH.command('rm -f /tmp/tmp_iperf_' + self.testCase_id + '.log', '\$', 5) - iperf_status = SSH.command('stdbuf -o0 iperf ' + modified_options + ' 2>&1 | stdbuf -o0 tee /tmp/tmp_iperf_' + self.testCase_id + '.log', '\$', int(iperf_time)*5.0) + SSH.command(f'rm -f /tmp/tmp_iperf_{self.testCase_id}.log', '\$', 5) + iperf_status = SSH.command(f'stdbuf -o0 iperf {modified_options} 2>&1 | stdbuf -o0 tee /tmp/tmp_iperf_{self.testCase_id}.log', '\$', int(iperf_time)*5.0) status_queue = SimpleQueue() lock = Lock() if iperf_status < 0: message = 'iperf on OAI UE crashed due to TIMEOUT !' - logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') + logging.debug(f'\u001B[1;37;41m {message} \u001B[0m') clientStatus = -2 else: if self.iperf_options == 'sink': @@ -1139,20 +1138,20 @@ class OaiCiTest(): SSH.close() if (clientStatus == -1): - if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')): - os.remove('iperf_server_' + self.testCase_id + '.log') - SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log') - filename='iperf_server_' + self.testCase_id + '_OAI-UE.log' + if (os.path.isfile(f'iperf_server_{self.testCase_id}.log')): + os.remove(f'iperf_server_{self.testCase_id}.log') + SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, f'/tmp/tmp_iperf_server_{self.testCase_id}.log', f'iperf_server_{self.testCase_id}_OAI-UE.log') + filename=f'iperf_server_{self.testCase_id}_OAI-UE.log' self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0) # copying on the EPC server for logCollection if (clientStatus == -1): - copyin_res = SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log') + copyin_res = SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, f'/tmp/tmp_iperf_server_{self.testCase_id}.log', f'iperf_server_{self.testCase_id}_OAI-UE.log') if (copyin_res == 0): - SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_OAI-UE.log', EPC.SourceCodePath + '/scripts') - copyin_res = SSH.copyin(iClientIPAddr, iClientUser, iClientPasswd, '/tmp/tmp_iperf_' + self.testCase_id + '.log', 'iperf_' + self.testCase_id + '_OAI-UE.log') + SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, f'iperf_server_{self.testCase_id}_OAI-UE.log', f'{EPC.SourceCodePath}/scripts') + copyin_res = SSH.copyin(iClientIPAddr, iClientUser, iClientPasswd, f'/tmp/tmp_iperf_{self.testCase_id}.log', f'iperf_{self.testCase_id}_OAI-UE.log') if (copyin_res == 0): - SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_OAI-UE.log', EPC.SourceCodePath + '/scripts') + SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, f'iperf_{self.testCase_id}_OAI-UE.log', f'{EPC.SourceCodePath}/scripts') iperf_noperf = False if status_queue.empty(): iperf_status = False @@ -1248,9 +1247,9 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS) def AnalyzeLogFile_UE(self, UElogFile,HTML,RAN): - if (not os.path.isfile('./' + UElogFile)): + if (not os.path.isfile(f'./{UElogFile}')): return -1 - ue_log_file = open('./' + UElogFile, 'r') + ue_log_file = open(f'./{UElogFile}', 'r') exitSignalReceived = False foundAssertion = False msgAssertion = '' @@ -1352,59 +1351,59 @@ class OaiCiTest(): try: mibMsg = "MIB Information: " + result.group(1) + ', ' + result.group(2) HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mibMsg = " nidcell = " + result.group('nidcell') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mibMsg = " n_rb_dl = " + result.group('n_rb_dl') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mibMsg = " phich_duration = " + result.group('phich_duration') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mibMsg = " phich_resource = " + result.group('phich_resource') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mibMsg = " tx_ant = " + result.group('tx_ant') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') mib_found = True except Exception as e: - logging.error('\033[91m' + "MIB marker was not found" + '\033[0m') + logging.error(f'\033[91m MIB marker was not found \033[0m') result = re.search("Measured Carrier Frequency (?P\d{1,15}) Hz", str(line)) if result is not None and (not frequency_found): try: - mibMsg = "Measured Carrier Frequency = " + result.group('measured_carrier_frequency') + ' Hz' + mibMsg = f"Measured Carrier Frequency = {result.group('measured_carrier_frequency')} Hz" HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') frequency_found = True except Exception as e: - logging.error('\033[91m' + "Measured Carrier Frequency not found" + '\033[0m') + logging.error(f'\033[91m Measured Carrier Frequency not found \033[0m') result = re.search("PLMN MCC (?P\d{1,3}), MNC (?P\d{1,3}), TAC", str(line)) if result is not None and (not plmn_found): try: - mibMsg = 'PLMN MCC = ' + result.group('mcc') + ' MNC = ' + result.group('mnc') + mibMsg = f"PLMN MCC = {result.group('mcc')} MNC = {result.group('mnc')}" HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') plmn_found = True except Exception as e: - logging.error('\033[91m' + "PLMN not found" + '\033[0m') + logging.error(f'\033[91m PLMN not found \033[0m') result = re.search("Found (?P[\w,\s]{1,15}) \(name from internal table\)", str(line)) if result is not None: try: - mibMsg = "The operator is: " + result.group('operator') + mibMsg = f"The operator is: {result.group('operator')}" HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') except Exception as e: - logging.error('\033[91m' + "Operator name not found" + '\033[0m') + logging.error(f'\033[91m Operator name not found \033[0m') result = re.search("SIB5 InterFreqCarrierFreq element (.{1,4})/(.{1,4})", str(line)) if result is not None: try: - mibMsg = "SIB5 InterFreqCarrierFreq element " + result.group(1) + '/' + result.group(2) + mibMsg = f'SIB5 InterFreqCarrierFreq element {result.group(1)}/{result.group(2)}' HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + ' -> ' - logging.debug('\033[94m' + mibMsg + '\033[0m') + logging.debug(f'\033[94m{mibMsg}\033[0m') except Exception as e: - logging.error('\033[91m' + "SIB5 InterFreqCarrierFreq element not found" + '\033[0m') + logging.error(f'\033[91m SIB5 InterFreqCarrierFreq element not found \033[0m') result = re.search("DL Carrier Frequency/ARFCN : \-*(?P\d{1,15}/\d{1,4})", str(line)) if result is not None: try: @@ -1412,78 +1411,78 @@ class OaiCiTest(): new_freq = re.sub('/[0-9]+','',freq) float_freq = float(new_freq) / 1000000 HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + 'DL Freq: ' + ('%.1f' % float_freq) + ' MHz' - logging.debug('\033[94m' + " DL Carrier Frequency is: " + str(freq) + '\033[0m') + logging.debug(f'\033[94m DL Carrier Frequency is: {freq}\033[0m') except Exception as e: - logging.error('\033[91m' + " DL Carrier Frequency not found" + '\033[0m') + logging.error(f'\033[91m DL Carrier Frequency not found \033[0m') result = re.search("AllowedMeasBandwidth : (?P\d{1,7})", str(line)) if result is not None: try: prb = result.group('allowed_bandwidth') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + ' -- PRB: ' + prb + '\n' - logging.debug('\033[94m' + " AllowedMeasBandwidth: " + prb + '\033[0m') + logging.debug(f'\033[94m AllowedMeasBandwidth: {prb}\033[0m') except Exception as e: - logging.error('\033[91m' + " AllowedMeasBandwidth not found" + '\033[0m') + logging.error(f'\033[91m AllowedMeasBandwidth not found \033[0m') ue_log_file.close() if rrcConnectionRecfgComplete > 0: - statMsg = 'UE connected to eNB (' + str(rrcConnectionRecfgComplete) + ' RRCConnectionReconfigurationComplete message(s) generated)' - logging.debug('\033[94m' + statMsg + '\033[0m') + statMsg = f'UE connected to eNB ({rrcConnectionRecfgComplete}) RRCConnectionReconfigurationComplete message(s) generated)' + logging.debug(f'\033[94m{statMsg}\033[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if nrUEFlag: if nrDecodeMib > 0: - statMsg = 'UE showed ' + str(nrDecodeMib) + ' "MIB decode" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {nrDecodeMib} "MIB decode" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if nrFoundDCI > 0: - statMsg = 'UE showed ' + str(nrFoundDCI) + ' "DCI found" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {nrFoundDCI} "DCI found" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if nrCRCOK > 0: - statMsg = 'UE showed ' + str(nrCRCOK) + ' "PDSCH decoding" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {nrCRCOK} "PDSCH decoding" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if not frequency_found: statMsg = 'NR-UE could NOT synch!' - logging.error('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + logging.error(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if nbPduSessAccept > 0: - statMsg = 'UE showed ' + str(nbPduSessAccept) + ' "Received PDU Session Establishment Accept" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {nbPduSessAccept} "Received PDU Session Establishment Accept" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if nbPduDiscard > 0: - statMsg = 'UE showed ' + str(nbPduDiscard) + ' "warning: discard PDU, sn out of window" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {nbPduDiscard} "warning: discard PDU, sn out of window" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if uciStatMsgCount > 0: - statMsg = 'UE showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {uciStatMsgCount} "uci->stat" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if pdcpDataReqFailedCount > 0: - statMsg = 'UE showed ' + str(pdcpDataReqFailedCount) + ' "PDCP data request failed" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {pdcpDataReqFailedCount} "PDCP data request failed" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if badDciCount > 0: - statMsg = 'UE showed ' + str(badDciCount) + ' "bad DCI 1(A)" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {badDciCount} "bad DCI 1(A)" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if f1aRetransmissionCount > 0: - statMsg = 'UE showed ' + str(f1aRetransmissionCount) + ' "Format1A Retransmission but TBS are different" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {f1aRetransmissionCount} "Format1A Retransmission but TBS are different" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if fatalErrorCount > 0: - statMsg = 'UE showed ' + str(fatalErrorCount) + ' "FATAL ERROR:" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {fatalErrorCount} "FATAL ERROR:" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if macBsrTimerExpiredCount > 0: - statMsg = 'UE showed ' + str(fatalErrorCount) + ' "MAC BSR Triggered ReTxBSR Timer expiry" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {fatalErrorCount} "MAC BSR Triggered ReTxBSR Timer expiry" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if RAN.eNBmbmsEnables[0]: if mbms_messages > 0: - statMsg = 'UE showed ' + str(mbms_messages) + ' "TRIED TO PUSH MBMS DATA" message(s)' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + statMsg = f'UE showed {mbms_messages} "TRIED TO PUSH MBMS DATA" message(s)' + logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m') else: statMsg = 'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)' - logging.debug('\u001B[1;30;41m ' + statMsg + ' \u001B[0m') + logging.debug(f'\u001B[1;30;41m{statMsg}\u001B[0m') global_status = CONST.OAI_UE_PROCESS_NO_MBMS_MSGS HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n' if foundSegFault: @@ -1527,22 +1526,22 @@ class OaiCiTest(): def TerminateOAIUE(self,HTML,RAN,EPC,CONTAINERS): SSH = sshconnection.SSHConnection() SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) - SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5) + SSH.command(f'cd {self.UESourceCodePath}/cmake_targets', '\$', 5) SSH.command('ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5) result = re.search('-uesoftmodem', SSH.getBefore()) if result is not None: - SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal SIGINT -r .*-uesoftmodem || true', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S killall --signal SIGINT -r .*-uesoftmodem || true', '\$', 5) time.sleep(10) SSH.command('ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5) result = re.search('-uesoftmodem', SSH.getBefore()) if result is not None: - SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal SIGKILL -r .*-uesoftmodem || true', '\$', 5) + SSH.command(f'echo {self.UEPassword} | sudo -S killall --signal SIGKILL -r .*-uesoftmodem || true', '\$', 5) time.sleep(5) - SSH.command('rm -f my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5) + SSH.command(f'rm -f my-lte-uesoftmodem-run {self.UE_instance}.sh', '\$', 5) SSH.close() result = re.search('ue_', str(self.UELogFile)) if result is not None: - copyin_res = SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/' + self.UELogFile, '.') + copyin_res = SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword,f'{self.UESourceCodePath}/cmake_targets/{self.UELogFile}', '.') if (copyin_res == -1): logging.debug('\u001B[1;37;41m Could not copy UE logfile to analyze it! \u001B[0m') HTML.htmlUEFailureMsg='Could not copy UE logfile to analyze it!' @@ -1557,7 +1556,7 @@ class OaiCiTest(): else: ueAction = 'Connection' if (logStatus < 0): - logging.debug('\u001B[1m' + ueAction + ' Failed \u001B[0m') + logging.debug(f'\u001B[1m {ueAction} Failed \u001B[0m') HTML.htmlUEFailureMsg='' + ueAction + ' Failed\n' + HTML.htmlUEFailureMsg HTML.CreateHtmlTestRow('N/A', 'KO', logStatus, 'UE') if self.air_interface == 'lte-uesoftmodem': @@ -1571,7 +1570,7 @@ class OaiCiTest(): self.Initialize_OAI_UE_args = '' self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS) else: - logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m') + logging.debug(f'\u001B[1m {ueAction} Completed \u001B[0m') HTML.htmlUEFailureMsg='' + ueAction + ' Completed\n' + HTML.htmlUEFailureMsg HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) self.UELogFile = '' @@ -1596,7 +1595,7 @@ class OaiCiTest(): #terminate all RAN nodes eNB/gNB/OCP for instance in range(0, len(RAN.air_interface)): if RAN.air_interface[instance]!='': - logging.debug('Auto Termination of Instance ' + str(instance) + ' : ' + RAN.air_interface[instance]) + logging.debug(f'Auto Termination of Instance {instance} : {RAN.air_interface[instance]}') RAN.eNB_instance=instance RAN.TerminateeNB(HTML,EPC) if CONTAINERS.yamlPath[0] != '': @@ -1623,7 +1622,7 @@ class OaiCiTest(): #terminate all RAN nodes eNB/gNB/OCP for instance in range(0, len(RAN.air_interface)): if RAN.air_interface[instance]!='': - logging.debug('Auto Termination of Instance ' + str(instance) + ' : ' + RAN.air_interface[instance]) + logging.debug(f'Auto Termination of Instance {instance} : {RAN.air_interface[instance]}') RAN.eNB_instance=instance RAN.TerminateeNB(HTML,EPC) if CONTAINERS.yamlPath[0] != '': @@ -1685,7 +1684,7 @@ class OaiCiTest(): def Perform_X2_Handover(self,HTML,RAN,EPC): html_queue = SimpleQueue() fullMessage = '
'
-		msg = 'Doing X2 Handover w/ option ' + self.x2_ho_options
+		msg = f'Doing X2 Handover w/ option {self.x2_ho_options}'
 		logging.debug(msg)
 		fullMessage += msg + '\n'
 		if self.x2_ho_options == 'network':
@@ -1711,7 +1710,7 @@ class OaiCiTest():
 			sys.exit('Insufficient Parameter')
 		SSH = sshconnection.SSHConnection()
 		SSH.open(IPAddress, UserName, Password)
-		SSH.command('cd ' + SourceCodePath, '\$', 5)
+		SSH.command(f'cd {SourceCodePath}', '\$', 5)
 		SSH.command('cd cmake_targets', '\$', 5)
 		SSH.command('rm -f build.log.zip', '\$', 5)
 		SSH.command('zip -r build.log.zip build_log_*/*', '\$', 60)
@@ -1724,7 +1723,7 @@ class OaiCiTest():
 			sys.exit(0)
 		SSH = sshconnection.SSHConnection()
 		SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
-		SSH.command('cd ' + EPC.SourceCodePath, '\$', 5)
+		SSH.command(f'cd {EPC.SourceCodePath}', '\$', 5)
 		SSH.command('cd scripts', '\$', 5)
 		SSH.command('rm -f ping.log.zip', '\$', 5)
 		SSH.command('zip ping.log.zip ping*.log', '\$', 60)
@@ -1738,7 +1737,7 @@ class OaiCiTest():
 			sys.exit(0)
 		SSH = sshconnection.SSHConnection()
 		SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
-		SSH.command('cd ' + EPC.SourceCodePath, '\$', 5)
+		SSH.command(f'cd {EPC.SourceCodePath}', '\$', 5)
 		SSH.command('cd scripts', '\$', 5)
 		SSH.command('rm -f iperf.log.zip', '\$', 5)
 		SSH.command('zip iperf.log.zip iperf*.log', '\$', 60)
@@ -1752,11 +1751,11 @@ class OaiCiTest():
 			sys.exit(0)
 		SSH = sshconnection.SSHConnection()
 		SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
-		SSH.command('cd ' + self.UESourceCodePath, '\$', 5)
-		SSH.command('cd cmake_targets', '\$', 5)
-		SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -f ue.log.zip', '\$', 5)
-		SSH.command('echo ' + self.UEPassword + ' | sudo -S zip ue.log.zip ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 60)
-		SSH.command('echo ' + self.UEPassword + ' | sudo -S rm ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 5)
+		SSH.command(f'cd {self.UESourceCodePath}', '\$', 5)
+		SSH.command(f'cd cmake_targets', '\$', 5)
+		SSH.command(f'echo {self.UEPassword} | sudo -S rm -f ue.log.zip', '\$', 5)
+		SSH.command(f'echo {self.UEPassword} | sudo -S zip ue.log.zip ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 60)
+		SSH.command(f'echo {self.UEPassword} | sudo -S rm ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 5)
 		SSH.close()
 
 	def ConditionalExit(self):
@@ -1766,7 +1765,7 @@ class OaiCiTest():
 		sys.exit(1)
 
 	def ShowTestID(self):
-		logging.info('\u001B[1m----------------------------------------\u001B[0m')
-		logging.info('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m')
-		logging.info('\u001B[1m' + self.desc + '\u001B[0m')
-		logging.info('\u001B[1m----------------------------------------\u001B[0m')
+		logging.info(f'\u001B[1m----------------------------------------\u001B[0m')
+		logging.info(f'\u001B[1m Test ID: {self.testCase_id} \u001B[0m')
+		logging.info(f'\u001B[1m {self.desc} \u001B[0m')
+		logging.info(f'\u001B[1m----------------------------------------\u001B[0m')

From e1361431defbe1a443b22e4b438eac41fc0f42b8 Mon Sep 17 00:00:00 2001
From: Jaroslava Fiedlerova 
Date: Thu, 13 Jul 2023 14:13:17 +0200
Subject: [PATCH 29/31] Add constant for list of images in cls_containerize

---
 ci-scripts/cls_containerize.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index 3f034e9b73..cc1d9c9e4f 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -53,10 +53,13 @@ import sshconnection as SSH
 import helpreadme as HELP
 import constants as CONST
 import cls_oaicitest
+
 #-----------------------------------------------------------
 # Helper functions used here and in other classes
 # (e.g., cls_cluster.py)
 #-----------------------------------------------------------
+IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue']
+
 def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTargetBranch, ranAllowMerge):
 	if ranCommitID == '':
 		logging.error('need ranCommitID in CreateWorkspace()')
@@ -800,8 +803,7 @@ class Containerize():
 			logging.debug('Removing test images locally')
 			myCmd = cls_cmd.LocalCmd()
 
-		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup', 'oai-gnb-aw2s']
-		for image in imageNames:
+		for image in IMAGES:
 			imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
 			cmd = f'docker rmi oai-ci/{imageTag}'
 			myCmd.run(cmd, reportNonZero=False)
@@ -838,8 +840,7 @@ class Containerize():
 
 		mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
 		mySSH.command('cp docker-compose.y*ml ci-docker-compose.yml', '\$', 5)
-		imagesList = ['oai-enb', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue']
-		for image in imagesList:
+		for image in IMAGES:
 			imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
 			mySSH.command(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', '\$', 2)
 		localMmeIpAddr = EPC.MmeIPAddress
@@ -1005,7 +1006,7 @@ class Containerize():
 			HTML.htmleNBFailureMsg='Could not copy logfile to analyze it!'
 			HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
 			self.exitStatus = 1
-                # use function for UE log analysis, when oai-nr-ue container is used
+		# use function for UE log analysis, when oai-nr-ue container is used
 		elif 'oai-nr-ue' in services:
 			self.exitStatus == 0
 			logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
@@ -1198,8 +1199,7 @@ class Containerize():
 		myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
 		cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
 		myCmd.run(cmd, silent=self.displayedNewTags)
-		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
-		for image in imageNames:
+		for image in IMAGES:
 			tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
 			cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml'
 			myCmd.run(cmd, silent=self.displayedNewTags)

From 16e7f4666b530d926444edabbf1ed3ba53dd8cb6 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Fri, 21 Jul 2023 13:12:29 +0200
Subject: [PATCH 30/31] chore(ci): adding a timeout of 1 hour for any scenario
 run in python framework

Signed-off-by: Raphael Defosseux 
---
 ci-scripts/Jenkinsfile-cluster           | 2 ++
 ci-scripts/Jenkinsfile-nrue              | 2 ++
 ci-scripts/Jenkinsfile-physim-deploy     | 2 ++
 ci-scripts/Jenkinsfile-tmp-full-ran      | 2 ++
 ci-scripts/Jenkinsfile-tmp-multi-enb     | 2 ++
 ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 2 ++
 ci-scripts/Jenkinsfile-tmp-ran           | 2 ++
 ci-scripts/Jenkinsfile-tmp-ue            | 2 ++
 8 files changed, 16 insertions(+)

diff --git a/ci-scripts/Jenkinsfile-cluster b/ci-scripts/Jenkinsfile-cluster
index f210275bd9..65774c3280 100644
--- a/ci-scripts/Jenkinsfile-cluster
+++ b/ci-scripts/Jenkinsfile-cluster
@@ -204,7 +204,9 @@ pipeline {
               for (xmlFile in myXmlTestSuite) {
                 if (fileExists(xmlFile)) {
                   try {
+                   timeout (time: 60, unit: 'MINUTES') {
                     sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
+                   }
                   } catch (Exception e) {
                     currentBuild.result = 'FAILURE'
                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-nrue b/ci-scripts/Jenkinsfile-nrue
index ab5fe0747d..da14750c3c 100644
--- a/ci-scripts/Jenkinsfile-nrue
+++ b/ci-scripts/Jenkinsfile-nrue
@@ -200,7 +200,9 @@ pipeline {
               for (xmlFile in myXmlTestSuite) {
                 if (fileExists(xmlFile)) {
                   try {
+                   timeout (time: 60, unit: 'MINUTES') {
                     sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
+                   }
                   } catch (Exception e) {
                     currentBuild.result = 'FAILURE'
                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
index 431db144ff..dac812e922 100644
--- a/ci-scripts/Jenkinsfile-physim-deploy
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -192,7 +192,9 @@ pipeline {
               for (xmlFile in myXmlTestSuite) {
                 if (fileExists(xmlFile)) {
                   try {
+                   timeout (time: 60, unit: 'MINUTES') {
                     sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
+                   }
                   } catch (Exception e) {
                     currentBuild.result = 'FAILURE'
                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran
index 57ac8ea919..5ee06cc585 100644
--- a/ci-scripts/Jenkinsfile-tmp-full-ran
+++ b/ci-scripts/Jenkinsfile-tmp-full-ran
@@ -200,7 +200,9 @@ pipeline {
                             for (xmlFile in myXmlTestSuite) {
                             if (fileExists(xmlFile)) {
                                 try {
+                                  timeout (time: 60, unit: 'MINUTES') {
                                     sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+                                  }
                                 } catch (Exception e) {
                                     currentBuild.result = 'FAILURE'
                                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb
index d5b303d5ac..0a1b944c5f 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb
@@ -196,7 +196,9 @@ pipeline {
                             for (xmlFile in myXmlTestSuite) {
                                 if (fileExists(xmlFile)) {
                                     try {
+                                      timeout (time: 60, unit: 'MINUTES') {
                                         sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+                                      }
                                     } catch (Exception e) {
                                         currentBuild.result = 'FAILURE'
                                         buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
index 00690e1298..aae0c3d973 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
@@ -215,7 +215,9 @@ pipeline {
               for (xmlFile in myXmlTestSuite) {
                 if (fileExists(xmlFile)) {
                   try {
+                   timeout (time: 60, unit: 'MINUTES') {
                     sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+                   }
                   } catch (Exception e) {
                     currentBuild.result = 'FAILURE'
                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index f396aad757..cddd72e23b 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -211,7 +211,9 @@ pipeline {
                             for (xmlFile in myXmlTestSuite) {
                             if (fileExists(xmlFile)) {
                                 try {
+                                  timeout (time: 60, unit: 'MINUTES') {
                                     sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+                                  }
                                 } catch (Exception e) {
                                     currentBuild.result = 'FAILURE'
                                     buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-ue b/ci-scripts/Jenkinsfile-tmp-ue
index aea976cc3f..dec4df9812 100644
--- a/ci-scripts/Jenkinsfile-tmp-ue
+++ b/ci-scripts/Jenkinsfile-tmp-ue
@@ -185,7 +185,9 @@ pipeline {
                             for (xmlFile in myXmlTestSuite) {
                             if (fileExists(xmlFile)) {
                                 try {
+                                  timeout (time: 60, unit: 'MINUTES') {
                                     sh "python3 main.py --mode=TestUE --UEIPAddress=${params.UE_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
+                                  }
                                 } catch (Exception e) {
                                     currentBuild.result = 'FAILURE'
                                     buildStageStatus = false

From a1f7284ee3b8fe0367bd55e8a26b1765ec45d843 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Fri, 21 Jul 2023 16:00:58 +0200
Subject: [PATCH 31/31] Update 40 MHz 1x1 timing thresholds

These timings shifted slightly in an MR recently. Since it is only
micro-seconds, and these thresholds are much higher in the 60 MHz (1x1
and 2x2) tests, it is safe to increase.
---
 ci-scripts/datalog_rt_stats.default.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ci-scripts/datalog_rt_stats.default.yaml b/ci-scripts/datalog_rt_stats.default.yaml
index 8f7f0f015c..6304404742 100644
--- a/ci-scripts/datalog_rt_stats.default.yaml
+++ b/ci-scripts/datalog_rt_stats.default.yaml
@@ -16,9 +16,9 @@ Ref :
   L1 Rx processing : 305.0
   PUSCH inner-receiver : 150.0
   PUSCH decoding : 210.0
-  Schedule Response : 20.0
+  Schedule Response : 30.0
   DL & UL scheduling timing : 10.0
-  UL Indication : 30.0
+  UL Indication : 40.0
 Threshold :
   feprx : 1.25
   feptx_prec : 1.25