From 31f12b62e0ba57ca7daccd5b26757ebfa7a44af8 Mon Sep 17 00:00:00 2001 From: mjoang Date: Fri, 19 Nov 2021 16:30:32 -0500 Subject: [PATCH 01/28] fix the race condition in UE where PUSCH could not be sent when UE sends PUCCH and PUSCH at the same slot. --- .../nfapi/public_inc/fapi_nr_ue_constants.h | 1 + openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 37 +++++++++++++++---- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 6 +++ 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h index e144ce9447..eca6c2fa72 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h @@ -57,6 +57,7 @@ /// UL_CONFIG_REQ #define FAPI_NR_UL_CONFIG_LIST_NUM 10 +#define FAPI_NR_UL_CONFIG_TYPE_NONE 0x00 #define FAPI_NR_UL_CONFIG_TYPE_PRACH 0x01 #define FAPI_NR_UL_CONFIG_TYPE_PUCCH 0x02 #define FAPI_NR_UL_CONFIG_TYPE_PUSCH 0x03 diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index f6e4d90bee..960eec3067 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -152,7 +152,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ if (scheduled_response->ul_config != NULL){ fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config; - + int pdu_done = 0; pthread_mutex_lock(&ul_config->mutex_ul_config); for (i = 0; i < ul_config->number_pdus; ++i){ @@ -167,6 +167,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu; /* PUCCH */ fapi_nr_ul_config_pucch_pdu *pucch_config_pdu; + LOG_D(PHY, "%d.%d ul B %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); switch (pdu_type){ @@ -192,6 +193,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid); memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length); harq_process_ul_ue->status = ACTIVE; + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + pdu_done++; + LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } @@ -215,6 +219,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ memcpy((void*)&(pucch_vars->pucch_pdu[j]), (void*)pucch_config_pdu, sizeof(fapi_nr_ul_config_pucch_pdu)); pucch_vars->active[j] = true; found = true; + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + pdu_done++; + LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } @@ -226,18 +233,34 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ // prach config pdu prach_config_pdu = &ul_config->ul_config_list[i].prach_config_pdu; memcpy((void*)&(PHY_vars_UE_g[module_id][cc_id]->prach_vars[gNB_id]->prach_pdu), (void*)prach_config_pdu, sizeof(fapi_nr_ul_config_prach_pdu)); + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + pdu_done++; + LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + break; + + case (FAPI_NR_UL_CONFIG_TYPE_NONE): + pdu_done++; // count the no of pdu processed + LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; default: + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + pdu_done++; // count the no of pdu processed + LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } - if (scheduled_response->tx_request) - scheduled_response->tx_request->number_of_pdus = 0; - ul_config->sfn = 0; - ul_config->slot = 0; - ul_config->number_pdus = 0; - memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list)); + + //Clear the fields when all the config pdu are done + if (pdu_done == ul_config->number_pdus) { + if (scheduled_response->tx_request) + scheduled_response->tx_request->number_of_pdus = 0; + ul_config->sfn = 0; + ul_config->slot = 0; + ul_config->number_pdus = 0; + LOG_D(PHY, "%d.%d clear ul_config %p\n", scheduled_response->frame, slot, ul_config); + memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list)); + } pthread_mutex_unlock(&ul_config->mutex_ul_config); } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index c23d4bb073..bd427ee1ef 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -60,6 +60,12 @@ static prach_association_pattern_t prach_assoc_pattern; static ssb_list_info_t ssb_list; void fill_ul_config(fapi_nr_ul_config_request_t *ul_config, frame_t frame_tx, int slot_tx, uint8_t pdu_type){ + // clear ul_config for new frame/slot + if ((ul_config->slot != slot_tx || ul_config->sfn != frame_tx) && ul_config->number_pdus != 0) { + LOG_D(MAC, "%d.%d %d.%d f clear ul %p t %d pdu %d\n", frame_tx, slot_tx, ul_config->sfn, ul_config->slot, ul_config, pdu_type, ul_config->number_pdus); + ul_config->number_pdus = 0; + memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list)); + } ul_config->ul_config_list[ul_config->number_pdus].pdu_type = pdu_type; ul_config->slot = slot_tx; ul_config->sfn = frame_tx; From 1dc78a8a9884a15a83ddad4420efa17821e11e30 Mon Sep 17 00:00:00 2001 From: mjoang Date: Fri, 3 Dec 2021 11:08:12 -0500 Subject: [PATCH 02/28] remove unused structure per review request. --- openair2/PHY_INTERFACE/UE_MAC_interface.h | 58 ----------------------- 1 file changed, 58 deletions(-) diff --git a/openair2/PHY_INTERFACE/UE_MAC_interface.h b/openair2/PHY_INTERFACE/UE_MAC_interface.h index 42e790d1e9..207c3293b4 100644 --- a/openair2/PHY_INTERFACE/UE_MAC_interface.h +++ b/openair2/PHY_INTERFACE/UE_MAC_interface.h @@ -68,64 +68,6 @@ typedef enum { } UE_MAC_Tx_ind_type_e; - -// *** UE_UL_Config.request related structures - - -typedef struct{ - //module_id_t module_idP; - //int CC_id; - //frame_t frameP; - uint8_t eNB_id; - //uint16_t rnti; - //sub_frame_t subframe_tx; - uint32_t SR_payload; //0 or 1 -}UE_MAC_ul_config_SR; - - - -typedef struct{ - //module_id_t module_idP; - //int CC_id; - //frame_t frameP; - uint8_t eNB_indexP; - //sub_frame_t subframeP; - - uint8_t ra_RACH_MaskIndex; - int8_t ra_PREAMBLE_RECEIVED_TARGET_POWER; - uint8_t ra_TDD_map_index; - uint16_t ra_RNTI; - uint8_t *Msg3; -}UE_MAC_ul_config_rach; - -typedef struct { - union { - UE_MAC_ul_config_rach ue_rach_config; - //UE_MAC_ul_config_ULSCH ue_ULSCH_pdu; - UE_MAC_ul_config_SR ue_SR_config; - }; -} UE_MAC_ul_config_request_list; - -typedef struct { - nfapi_tl_t tl; - uint16_t length_list; - UE_MAC_ul_config_request_list* ue_ul_config_list; -} UE_MAC_ul_config_request_body_t; - -typedef struct { - //nfapi_p7_message_header_t header; - uint16_t sfn_sf; - UE_MAC_ul_config_request_body_t ue_ul_config_request_body; //nfapi_dl_config_request_body_t -} UE_MAC_ul_config_request_t; - - - - - - - - - // *** UE_Tx.request related structures typedef struct { From e462d321c90ea4311f448bc3255dc8fa59010f44 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 7 Dec 2021 21:50:28 +0100 Subject: [PATCH 03/28] test result per MR + post to git --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 9 ++ ci-scripts/ran_dashboard/Hdashboard.py | 159 +++++++++++++++++++++-- 2 files changed, 160 insertions(+), 8 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index f594511b0a..bd8d9f4163 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -378,6 +378,15 @@ pipeline { } } } + stage ("Result Update"){ + steps { + script { + dir ('ci-scripts/ran_dashboard') { + sh "python3 Hdashboard.py testevent ${params.eNB_MR}" + } + } + } + } } } } diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 5e34ae50bf..ae62ff1a2f 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -43,7 +43,7 @@ import gitlab import yaml import os import time - +import sys from sqlconnect import SQLConnect @@ -86,6 +86,29 @@ class Dashboard: mydb.close_connection() return mydb.data + def singleMR_initHTML(self, date): + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('Test Dashboard\n') + self.f_html.write('\n') + self.f_html.write('
\n') + self.f_html.write('
\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('
OAI RAN TEST Status Dashboard
Update : '+date+'
\n') + self.f_html.write('
\n') + self.f_html.write('
\n') + + def Test_initHTML(self, date): self.f_html.write('\n') self.f_html.write('\n') @@ -197,11 +220,13 @@ class Dashboard: self.f_html.write('\n') - def Build(self, type, htmlfilename): + def Build(self, type, mr, htmlfilename): if type=='MR': self.Build_MR_Table(htmlfilename) elif type=='Tests': self.Build_Test_Table(htmlfilename) + elif type=='singleMR': + self.Build_singleMR_Table(mr,htmlfilename) else : print("Undefined Dashboard Type, options : MR or Tests") @@ -291,6 +316,93 @@ class Dashboard: self.Test_terminateHTML() + def Build_singleMR_Table(self,singlemr,htmlfilename): + print("Building single MR Tests Results...") + + self.f_html=open(htmlfilename,'w') + + ###update date/time, format dd/mm/YY H:M:S + now = datetime.now() + dt_string = now.strftime("%d/%m/%Y %H:%M") + #HTML table header + self.singleMR_initHTML(dt_string) + + + #1 table per MR if test results exist => 1 table for matching mr + for x in range(len(self.git)): + mr=str(self.git[x]['iid']) + if mr==singlemr: + #if 'PASS' not in self.db[mr]: + self.f_html.write('

'+mr+''+' '+self.git[x]['title'] + '

\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write(' \n') + self.f_html.write(' \n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + + #parsing the tests + for t in self.tests: + + row=[] + short_name= t + hyperlink= self.tests[t]['link'] + job=self.tests[t]['job'] + + + if job in self.db[mr]: + if 'PASS' in self.db[mr][job]: + row.append(self.db[mr][job]['PASS']) + else: + row.append('') + if 'FAIL' in self.db[mr][job]: + row.append(self.db[mr][job]['FAIL']) + else: + row.append('') + #2 columns for last_pass and last_fail links + if 'last_pass' in self.db[mr][job]: + lastpasshyperlink= self.db[mr][job]['last_pass'][1] + lastpasstext= self.db[mr][job]['last_pass'][0] + else: + lastpasshyperlink='' + lastpasstext='' + + if 'last_fail' in self.db[mr][job]: + lastfailhyperlink= self.db[mr][job]['last_fail'][1] + lastfailtext= self.db[mr][job]['last_fail'][0] + else: + lastfailhyperlink='' + lastfailtext='' + + + + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + if row[0]!='': + self.f_html.write('\n') + else: + self.f_html.write('\n') + if row[1]!='': + self.f_html.write('\n') + else: + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + self.f_html.write('\n') + + self.f_html.write('
Test NameBenchTest# Pass# FailLast PassLast Fail
'+short_name+''+self.tests[t]['bench']+''+self.tests[t]['test']+''+str(row[0])+''+str(row[1])+''+lastpasstext+''+lastfailtext+'
\n') + + #terminate HTML table and close file + self.Test_terminateHTML() + + + def Build_MR_Table(self,htmlfilename): print("Building Merge Requests Dashboard...") @@ -379,6 +491,7 @@ class Dashboard: #terminate HTML table and close file self.MR_terminateHTML() + def CopyToS3(self,htmlfilename,bucket,key): print("Uploading to S3 bucket") #Creating Session With Boto3. @@ -387,15 +500,45 @@ class Dashboard: #Creating S3 Resource From the Session. result = s3.upload_file(htmlfilename, bucket,key, ExtraArgs={'ACL':'public-read','ContentType': 'text/html'}) + #unused + def CopyCSS(self,path): + s3 = boto3.resource('s3') + copy_source = {'Bucket': 'oaitestdashboard','Key':'test_styles.css'} + s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css') + + + def PostGitNote(self,singlemr) + gl = gitlab.Gitlab.from_config('OAI') + project_id = 223 + project = gl.projects.get(project_id) + editable_mr = project.mergerequests.get(int(singlemr)) + mr_notes = editable_mr.notes.list() + mr_note = editable_mr.notes.create({'body': 'Test Results for you MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) + editable_mr.save() + + def main(): - htmlDash=Dashboard() - htmlDash.Build('MR','/tmp/MR_index.html') - htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html') - htmlDash.Build('Tests','/tmp/Tests_index.html') - htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') + #individual MR test results + test dashboard, event based (end of jenkins pipeline) + if len(sys.argv)>1: + if sys.argv[1]=="testevent" : + mr=sys.argv[2] + htmlDash=Dashboard() + htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') + htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') + htmlDash.Build('Tests','0000','/tmp/Tests_index.html') + htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') + htmlDash.PostGitNote(mr) + #test and MR status dash boards, cron based + else: + htmlDash=Dashboard() + htmlDash.Build('MR','0000','/tmp/MR_index.html') + htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html') + htmlDash.Build('Tests','0000','/tmp/Tests_index.html') + htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') + + - if __name__ == "__main__": # execute only if run as a script main() From bc6a4b92dc60badb86899a761da88d56daa3f6c0 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 7 Dec 2021 22:36:52 +0100 Subject: [PATCH 04/28] change agent for boto3 --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 1 + ci-scripts/ran_dashboard/Hdashboard.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index bd8d9f4163..bb51871e37 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -379,6 +379,7 @@ pipeline { } } stage ("Result Update"){ + agent {label DataBaseHost} steps { script { dir ('ci-scripts/ran_dashboard') { diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index ae62ff1a2f..25618afd2f 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -507,7 +507,7 @@ class Dashboard: s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css') - def PostGitNote(self,singlemr) + def PostGitNote(self,singlemr): gl = gitlab.Gitlab.from_config('OAI') project_id = 223 project = gl.projects.get(project_id) From 08affe9712a7e1938737161a4ed33c1c6a9ff47e Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 09:04:03 +0100 Subject: [PATCH 05/28] update jenkinsfile for lockable resource3 --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 6 +++++- ci-scripts/ran_dashboard/Hdashboard.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index bb51871e37..7ec6452159 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -37,6 +37,7 @@ def testStageName = params.pipelineTestStageName // Name of the phone/server resource def ciSmartPhonesResource1 = params.SmartPhonesResource1 def ciSmartPhonesResource2 = params.SmartPhonesResource2 +def ciSmartPhonesResource3 = params.SmartPhonesResource3 // Global Parameters. Normally they should be populated when the master job // triggers the slave job with parameters @@ -55,7 +56,7 @@ pipeline { options { disableConcurrentBuilds() ansiColor('xterm') - lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1) + lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1,resource: ciSmartPhonesResource3) } stages { stage("Build Init") { @@ -87,6 +88,9 @@ pipeline { if (params.SmartPhonesResource2 == null) { allParametersPresent = false } + if (params.SmartPhonesResource3 == null) { + allParametersPresent = false + } // 1st eNB parameters if (params.eNB_IPAddress == null) { allParametersPresent = false diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 25618afd2f..ac0aa5aa62 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -513,7 +513,7 @@ class Dashboard: project = gl.projects.get(project_id) editable_mr = project.mergerequests.get(int(singlemr)) mr_notes = editable_mr.notes.list() - mr_note = editable_mr.notes.create({'body': 'Test Results for you MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) + mr_note = editable_mr.notes.create({'body': 'Test Results for your MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) editable_mr.save() From 8325c36c50544bbc7b6f9fe5d9696745a4c8fcbe Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 09:11:46 +0100 Subject: [PATCH 06/28] fix bug in aws link to test results --- ci-scripts/ran_dashboard/Hdashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index ac0aa5aa62..54a789b2e7 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -513,7 +513,7 @@ class Dashboard: project = gl.projects.get(project_id) editable_mr = project.mergerequests.get(int(singlemr)) mr_notes = editable_mr.notes.list() - mr_note = editable_mr.notes.create({'body': 'Test Results for your MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) + mr_note = editable_mr.notes.create({'body': 'Test Results for your MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) editable_mr.save() From c3d63606a641644dd8b61713cb41354846de7382 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 09:19:39 +0100 Subject: [PATCH 07/28] fix resource lock syntax --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 7ec6452159..1213c48a16 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -56,7 +56,7 @@ pipeline { options { disableConcurrentBuilds() ansiColor('xterm') - lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1,resource: ciSmartPhonesResource3) + lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource1]],resource: ciSmartPhonesResource3) } stages { stage("Build Init") { From 5109fc66d65f77b517b750725083de68aab499bd Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 15:14:52 +0100 Subject: [PATCH 08/28] disable OAIUE B200 for the moment --- ci-scripts/Jenkinsfile-trig-nsa | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index de0b5c96ff..4a56270e90 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -80,13 +80,13 @@ pipeline { booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling OAIUE B200 - build job: "RAN-SA-OAIUE-B200-CN5G", wait : true, propagate : false, parameters: [ - string(name: 'eNB_MR', value: String.valueOf(MR)), - string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE)) - ] + //build job: "RAN-SA-OAIUE-B200-CN5G", wait : true, propagate : false, parameters: [ + // string(name: 'eNB_MR', value: String.valueOf(MR)), + // string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + // string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + // string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + // booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE)) + //] //calling OAIUE N310 build job: "RAN-SA-OAIUE-N310-CN5G", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), From 8ab33355ed164bbaaafb94318eb8452e87a7959b Mon Sep 17 00:00:00 2001 From: Laurent Thomas Date: Mon, 6 Dec 2021 17:02:45 +0100 Subject: [PATCH 09/28] Clean up build_oai and CMakeLists.txt - Remove useless RU and PHYSIM variables - provide function to trigger ASN.1 file generation --- cmake_targets/CMakeLists.txt | 186 ++++++-------------- cmake_targets/build_oai | 37 +--- openair1/PHY/TOOLS/time_meas.c | 11 +- openair1/PHY/TOOLS/time_meas.h | 8 +- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 49 +----- 5 files changed, 76 insertions(+), 215 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 6e960cce23..329ed7bb3d 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -69,8 +69,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_AW2SORI") endif (${RF_BOARD} STREQUAL "OAI_USRP") -message("RU=${RU}") - pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2) if(NOT ${OPENPGM_FOUND}) message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built") @@ -270,6 +268,22 @@ function(make_version VERSION_VALUE) endforeach() set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE) endfunction() + +macro(compile_asn1 asn1Source asn1cCmd ResultFlag) + # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make + execute_process(COMMAND ${asn1cCmd} ${asn1Source} RESULT_VARIABLE ret) + + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "${ret}: error") + endif (NOT ${ret} STREQUAL 0) + + add_custom_target ( + ${ResultFlag} ALL + ${asn1cCmd} ${asn1Source} + DEPENDS ${asn1Source} + ) +endmacro(compile_asn1) + #################################################### # compilation flags ############################################# @@ -434,23 +448,11 @@ set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6. add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION}) set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) -# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" - RESULT_VARIABLE ret) -endif (${RU} STREQUAL 0) +set(rrc_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}") + +compile_asn1("${RRC_GRAMMAR}" "${rrc_cmd}" rrc_flag) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) file(GLOB rrc_source ${RRC_FULL_DIR}/*.c) -add_custom_target ( - rrc_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" - DEPENDS ${RRC_GRAMMAR} - ) - -set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code add_library(RRC_LIB ${rrc_source} ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c) @@ -467,21 +469,12 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" - RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif () +set(nr_rrc_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}") + +compile_asn1("${NR_RRC_GRAMMAR}" "${nr_rrc_cmd}" nr_rrc_flag) + file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) - -add_custom_target ( - nr_rrc_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" - DEPENDS ${NR_RRC_GRAMMAR} - ) - add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source} ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c ) @@ -503,22 +496,11 @@ set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE}) set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" - RESULT_VARIABLE ret) - if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") - endif (NOT ${ret} STREQUAL 0) - file(GLOB S1AP_source ${S1AP_C_DIR}/*.c) -endif (${RU} STREQUAL 0) +set(s1ap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}") - add_custom_target ( - s1ap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" - DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" - ) +compile_asn1("${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "${s1ap_cmd}" s1ap_flag) +file(GLOB S1AP_source ${S1AP_C_DIR}/*.c) add_library(S1AP_LIB ${S1AP_source} ${S1AP_DIR}/s1ap_common.c @@ -560,20 +542,11 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files) set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" - RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) +set (ngap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}") + +compile_asn1("${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "${ngap_cmd}" ngap_flag) + file(GLOB NGAP_source ${NGAP_C_DIR}/*.c) - -add_custom_target ( - ngap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" - DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" -) - add_library(NGAP_LIB ${NGAP_source} # ${NGAP_DIR}/ngap_common.c @@ -627,23 +600,10 @@ set(M2AP_ASN_DIR ${M2AP_DIR}/MESSAGES/ASN1/${M2AP_RELEASE}) set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" - RESULT_VARIABLE ret) - if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") - endif (NOT ${ret} STREQUAL 0) -endif (${RU} STREQUAL 0) +set(m2ap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}") +compile_asn1("${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "${m2ap_cmd}" m2_flag) file(GLOB M2AP_source ${M2AP_C_DIR}/*.c) - -add_custom_target ( - m2_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" - DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES} - ) - add_library(M2AP_LIB ${M2AP_source} ${M2AP_DIR}/m2ap_common.c @@ -700,23 +660,12 @@ set(M3AP_ASN_DIR ${M3AP_DIR}/MESSAGES/ASN1/${M3AP_RELEASE}) set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" - RESULT_VARIABLE ret) - if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") - endif (NOT ${ret} STREQUAL 0) -endif (${RU} STREQUAL 0) +set(m3_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}") + +compile_asn1("${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "${m3_cmd}" m3_flag) file(GLOB M3AP_source ${M3AP_C_DIR}/*.c) -add_custom_target ( - m3_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" - DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES} - ) - add_library(M3AP_LIB ${M3AP_source} ${M3AP_DIR}/m3ap_common.c @@ -757,23 +706,12 @@ add_definitions(-DX2AP_VERSION=${X2AP_VERSION}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" - RESULT_VARIABLE ret) - if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") - endif (NOT ${ret} STREQUAL 0) -endif (${RU} STREQUAL 0) +set(x2_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}") + +compile_asn1("${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "${x2_cmd}" x2_flag) file(GLOB X2AP_source ${X2AP_C_DIR}/*.c) -add_custom_target ( - x2_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" - DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} - ) - add_library(X2AP_LIB ${X2AP_source} ${X2AP_DIR}/x2ap_common.c @@ -817,36 +755,23 @@ set(F1AP_ASN_FILES ${F1AP_ASN_DIR}/F1AP-Containers.asn ) -if (${RU} STREQUAL 0) - set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) - message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}") - execute_process( - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} - RESULT_VARIABLE ret - ) - - if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "asn1c: error") - endif (NOT ${ret} STREQUAL 0) - - add_custom_target ( - f1_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} - DEPENDS ${F1AP_ASN_FILES} - ) - file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) - add_library(F1AP_LIB - ${F1AP_ASN_GENERATED_C_FILES} - ) - add_dependencies (F1AP_LIB f1_flag) - - include_directories ("${F1AP_ASN_GENERATED_C_DIR}") - include_directories ("${F1AP_DIR}") - - file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c) - add_library(F1AP ${F1AP_C_FILES} ) - -endif (${RU} STREQUAL 0) +set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) + +set(f1_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" "${F1AP_ASN_GENERATED_C_DIR}") + +compile_asn1("${F1AP_ASN_FILES}" "${f1_cmd}" f1_flag) + +file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) +add_library(F1AP_LIB + ${F1AP_ASN_GENERATED_C_FILES} + ) +add_dependencies (F1AP_LIB f1_flag) + +include_directories ("${F1AP_ASN_GENERATED_C_DIR}") +include_directories ("${F1AP_DIR}") + +file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c) +add_library(F1AP ${F1AP_C_FILES} ) # Hardware dependant options ################################### @@ -1036,7 +961,6 @@ add_boolean_option(DRIVER2013 True "only relevant for EXMIMO") add_boolean_option(EXMIMO_IOT True "????") add_boolean_option(LOCALIZATION False "???") add_integer_option(MAX_NUM_CCs 1 "????") -add_boolean_option(PHYSIM False "for L1 simulators (dlsim, ulsim, ...)") add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator") add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging options") add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures") diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 5c833c502a..b427b161e5 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -27,9 +27,8 @@ set -e # Include helper functions -ORIGIN_PATH=$PWD -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -source $THIS_SCRIPT_PATH/tools/build_helper +THIS_SCRIPT_PATH=$(dirname $(readlink -f "$0")) +source "$THIS_SCRIPT_PATH"/tools/build_helper # Set environment variables (OPENAIR_HOME, ...) set_openair_env @@ -38,7 +37,6 @@ set_openair_env gen_nvram_path=$OPENAIR_DIR/targets/bin conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -MSC_GEN=0 XFORMS="True" SKIP_SHARED_LIB_FLAG="False" UE_EXPANSION="False" @@ -106,7 +104,7 @@ Options --nrUE Makes the NR UE softmodem --RU - Makes the OAI RRU (without full stack) + Makes the OAI RRU --UE Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file --UE-conf-nvram [configuration file] @@ -208,28 +206,24 @@ function main() { -g | --run-with-gdb) case "$2" in "Release") - GDB=0 CMAKE_BUILD_TYPE="Release" echo_info "Will Compile without gdb symbols and with compiler optimization" CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Release" shift ;; "RelWithDebInfo") - GDB=0 CMAKE_BUILD_TYPE="RelWithDebInfo" echo_info "Will Compile with gdb symbols" CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1" shift ;; "MinSizeRel") - GDB=0 CMAKE_BUILD_TYPE="MinSizeRel" echo_info "Will Compile for minimal exec size" CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=MinSizeRel" shift ;; "Debug" | *) - GDB=1 CMAKE_BUILD_TYPE="Debug" echo_info "Will Compile with gdb symbols and disable compiler optimization" CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug" @@ -244,37 +238,30 @@ function main() { shift;; --eNB) eNB=1 - RU=0 echo_info "Will compile eNB" shift;; --eNBocp) eNBocp=1 - RU=0 echo_info "Will compile OCP eNB" shift;; --gNB) gNB=1 - RU=0 - NR="True" echo_info "Will compile gNB" shift;; --RU) - RU=1 + RU=1 echo_info "Will compile RRU" shift;; -a | --agent) echo_info "FlexRAN support is always compiled into the eNB" shift;; --UE) - RU=0 UE=1 echo_info "Will compile UE" shift;; --nrUE) - RU=0 nrUE=1 rfsimNas=1 - NR="True" echo_info "Will compile NR UE" shift;; --mu) @@ -282,10 +269,10 @@ function main() { echo_info "Will compile with UE_EXPANSION" shift;; --UE-conf-nvram) - conf_nvram_path=$(readlink -f $2) + conf_nvram_path=$(readlink -f "$2") shift 2;; --UE-gen-nvram) - gen_nvram_path=$(readlink -f $2) + gen_nvram_path=$(readlink -f "$2") shift 2;; -w | --hardware) # Use OAI_USRP as the key word USRP is used inside UHD driver @@ -309,7 +296,6 @@ function main() { shift 2;; -P | --phy_simulators) SIMUS_PHY=1 - RU=0 echo_info "Will compile dlsim, ulsim, ..." shift;; -S | --core_simulators) @@ -344,11 +330,11 @@ function main() { echo_info "Will compile hw latency test program" shift;; --verbose-ci) - VERBOSE_CI=1 + VERBOSE_CI=1 echo_info "Will compile with verbose instructions in CI Docker env" shift;; --verbose-compile) - VERBOSE_COMPILE=1 + VERBOSE_COMPILE=1 echo_info "Will compile with verbose instructions" shift;; --cflags_processor) @@ -478,7 +464,7 @@ function main() { ######################################################## # to be discussed - if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" -o "$RU" = "1" ] ; then + if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" ] ; then if [ "$HW" = "None" -a "$TP" = "None" ] ; then echo_info "No local radio head and no transport protocol selected" fi @@ -629,7 +615,6 @@ function main() { echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file - echo "set ( RU $RU )" >> $cmake_file echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file @@ -677,14 +662,10 @@ function main() { $build_dir $config_libconfig_shlib \ lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so - if [ "$RU" = "0" ] ; then - compilations \ $build_dir coding \ libcoding.so $dbin/libcoding.so - - fi fi fi diff --git a/openair1/PHY/TOOLS/time_meas.c b/openair1/PHY/TOOLS/time_meas.c index 996f7fb277..1b62687f7e 100644 --- a/openair1/PHY/TOOLS/time_meas.c +++ b/openair1/PHY/TOOLS/time_meas.c @@ -25,20 +25,17 @@ #include #include #include "assertions.h" -#ifndef PHYSIM - #include - #include "common/config/config_userapi.h" -#endif +#include +#include "common/config/config_userapi.h" +#include // global var for openair performance profiler int opp_enabled = 0; double cpu_freq_GHz __attribute__ ((aligned(32))); double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0; -#ifndef PHYSIM static uint32_t max_cpumeasur; static time_stats_t **measur_table; notifiedFIFO_t measur_fifo; -#endif double get_cpu_freq_GHz(void) { if (cpu_freq_GHz <1 ) { @@ -187,7 +184,6 @@ double get_time_meas_us(time_stats_t *ts) return 0; } -#ifndef PHYSIM /* function for the asynchronous measurment module: cpu stat are sent to a dedicated thread * which is in charge of computing the cpu time spent in a given function/algorithm... */ @@ -294,4 +290,3 @@ void end_meas(void) { msg->msgid = TIMESTAT_MSGID_END ; pushNotifiedFIFO(&measur_fifo, nfe); } -#endif diff --git a/openair1/PHY/TOOLS/time_meas.h b/openair1/PHY/TOOLS/time_meas.h index 1ef2935917..bb2bb3d276 100644 --- a/openair1/PHY/TOOLS/time_meas.h +++ b/openair1/PHY/TOOLS/time_meas.h @@ -31,9 +31,7 @@ #include #include #include -#ifndef PHYSIM - #include "common/utils/threadPool/thread-pool.h" -#endif +#include "common/utils/threadPool/thread-pool.h" // global var to enable openair performance profiler extern int opp_enabled; extern double cpu_freq_GHz __attribute__ ((aligned(32)));; @@ -72,10 +70,8 @@ typedef struct { char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/ int meas_index; /*!< \brief index of this measure in the measure array (not used for PHY simulators)*/ int meas_enabled; /*!< \brief per measure enablement flag. send_meas tests this flag, unused today in start_meas and stop_meas*/ -#ifndef PHYSIM notifiedFIFO_elt_t *tpoolmsg; /*!< \brief message pushed to the cpu measurment queue to report a measure START or STOP */ time_stats_msg_t *tstatptr; /*!< \brief pointer to the time_stats_msg_t data in the tpoolmsg, stored here for perf considerations*/ -#endif } time_stats_t; #define MEASURE_ENABLED(X) (X->meas_enabled) @@ -165,7 +161,6 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) { } } -#ifndef PHYSIM extern notifiedFIFO_t measur_fifo; #define CPUMEASUR_SECTION "cpumeasur" @@ -187,5 +182,4 @@ extern notifiedFIFO_t measur_fifo; } void end_meas(void); -#endif //ifndef PHYSIM #endif diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 940931694c..aa5c66c8f5 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -844,11 +844,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_ } else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n"); stop_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]); -#if PHYSIM - printf("[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0)); -#else LOG_D(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0)); -#endif if(first_symbol_flag) { proc->first_symbol_available = 1; @@ -1028,17 +1024,11 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]); -#if PHYSIM - printf(" --> Unscrambling for CW0 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf("AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n", - frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0)); -#else + LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); LOG_I(PHY, "AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n", frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0)); -#endif if(is_cw1_active) { // start ldpc decode for CW 1 @@ -1091,19 +1081,12 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, } - stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]); -#if PHYSIM - printf(" --> Unscrambling for CW1 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf("AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n", - frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0)); -#else + stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]); + LOG_D(PHY, " --> Unscrambling for CW1 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); LOG_D(PHY, "AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n", frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0)); -#endif - LOG_D(PHY,"AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n", frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0)); @@ -1413,11 +1396,8 @@ void *UE_thread_slot1_dl_processing(void *arg) { stop_meas(&ue->ue_front_end_per_slot_stat[proc->thread_id][1]); -#if PHYSIM - printf("[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0)); -#else + LOG_D(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0)); -#endif //wait until pdcch is decoded @@ -1507,11 +1487,8 @@ void *UE_thread_slot1_dl_processing(void *arg) { //printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,nr_slot_rx); stop_meas(&ue->pdsch_procedures_per_slot_stat[proc->thread_id][1]); -#if PHYSIM - printf("[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0)); -#else + LOG_D(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0)); -#endif if (pthread_mutex_lock(&proc->mutex_slot1_dl_processing) != 0) { LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RXTX\n" ); @@ -1881,14 +1858,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, dlsch_parallel); stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]); -#if PHYSIM - printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0)); - printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0)); -#else + LOG_D(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0)); LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0)); -#endif - // deactivate dlsch once dlsch proc is done @@ -1964,9 +1936,7 @@ if (nr_slot_rx==9) { } stop_meas(&ue->generic_stat); -#if PHYSIM -printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0)); -#endif + LOG_D(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0)); #ifdef EMOS phy_procedures_emos_UE_RX(ue,slot,gNB_id); @@ -1976,11 +1946,8 @@ phy_procedures_emos_UE_RX(ue,slot,gNB_id); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_rx[proc->thread_id]); -#if PHYSIM -printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0)); -#else + LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0)); -#endif //#endif //pdsch From 48493ed1252ac5feb12a36224b0e446e135780fe Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Dec 2021 16:53:33 +0100 Subject: [PATCH 10/28] Ubuntu18 dockerfiles: create intermediary build image This commit creates an intermediary build image for all eNB, gNB, UE, nrUE, RU targets (ran-build) after the image containing all RAN compilation dependencies (ran-base). Then, the corresponding target container images are just copied from the ran-build. --- ....ran.ubuntu18 => Dockerfile.base.ubuntu18} | 2 +- docker/Dockerfile.build.ubuntu18 | 38 +++++++++++++++++++ docker/Dockerfile.eNB.ubuntu18 | 24 +++++------- docker/Dockerfile.gNB.ubuntu18 | 24 +++++------- docker/Dockerfile.lteRU.ubuntu18 | 20 +++------- docker/Dockerfile.lteUE.ubuntu18 | 24 +++++------- docker/Dockerfile.nrUE.ubuntu18 | 25 +++++------- 7 files changed, 82 insertions(+), 75 deletions(-) rename docker/{Dockerfile.ran.ubuntu18 => Dockerfile.base.ubuntu18} (98%) create mode 100644 docker/Dockerfile.build.ubuntu18 diff --git a/docker/Dockerfile.ran.ubuntu18 b/docker/Dockerfile.base.ubuntu18 similarity index 98% rename from docker/Dockerfile.ran.ubuntu18 rename to docker/Dockerfile.base.ubuntu18 index 3ef81ec030..ca23688430 100644 --- a/docker/Dockerfile.ran.ubuntu18 +++ b/docker/Dockerfile.base.ubuntu18 @@ -26,7 +26,7 @@ #--------------------------------------------------------------------- -FROM ubuntu:bionic AS ran-build +FROM ubuntu:bionic AS ran-base ARG NEEDED_GIT_PROXY ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris diff --git a/docker/Dockerfile.build.ubuntu18 b/docker/Dockerfile.build.ubuntu18 new file mode 100644 index 0000000000..b479ee90d9 --- /dev/null +++ b/docker/Dockerfile.build.ubuntu18 @@ -0,0 +1,38 @@ +#/* +# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more +# * contributor license agreements. See the NOTICE file distributed with +# * this work for additional information regarding copyright ownership. +# * The OpenAirInterface Software Alliance licenses this file to You under +# * the OAI Public License, Version 1.1 (the "License"); you may not use this file +# * except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.openairinterface.org/?page_id=698 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# *------------------------------------------------------------------------------- +# * For more information about the OpenAirInterface (OAI) Software Alliance: +# * contact@openairinterface.org +# */ +#--------------------------------------------------------------------- +# +# Dockerfile for the Open-Air-Interface BUILD service +# Valid for Ubuntu 18.04 +# +#--------------------------------------------------------------------- + +FROM ran-base:latest as ran-build + +RUN rm -Rf /oai-ran +WORKDIR /oai-ran +COPY . . + +# build all targets so final targets can be created afterwards +RUN /bin/sh oaienv && \ + cd cmake_targets && \ + mkdir -p log && \ + ./build_oai --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18 index 5a5bf2a96d..4e79813621 100644 --- a/docker/Dockerfile.eNB.ubuntu18 +++ b/docker/Dockerfile.eNB.ubuntu18 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest as enb-base + FROM ran-build:latest AS enb-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --eNB --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \ cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -85,15 +77,17 @@ COPY --from=enb-build \ /oai-ran/targets/bin/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ # Now we are copying from builder-image the UHD files. -COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib -COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin +COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=enb-base \ + /usr/local/lib/libuhd.so.3.15.0 \ + /usr/local/lib/libprotobuf-c.so.1 \ + /usr/local/lib/ +COPY --from=enb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin WORKDIR /usr/lib/x86_64-linux-gnu -COPY --from=enb-build \ +COPY --from=enb-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \ diff --git a/docker/Dockerfile.gNB.ubuntu18 b/docker/Dockerfile.gNB.ubuntu18 index 70eea9fe92..2d5bc754a1 100644 --- a/docker/Dockerfile.gNB.ubuntu18 +++ b/docker/Dockerfile.gNB.ubuntu18 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest as gnb-base + FROM ran-build:latest AS gnb-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --gNB --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \ cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -87,15 +79,17 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ # Now we are copying from builder-image the UHD files. -COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib -COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin +COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=gnb-base \ + /usr/local/lib/libuhd.so.3.15.0 \ + /usr/local/lib/libprotobuf-c.so.1 \ + /usr/local/lib/ +COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin WORKDIR /usr/lib/x86_64-linux-gnu -COPY --from=gnb-build \ +COPY --from=gnb-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \ diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18 index 3978da63d6..c9c076dd76 100644 --- a/docker/Dockerfile.lteRU.ubuntu18 +++ b/docker/Dockerfile.lteRU.ubuntu18 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest as ru-base + FROM ran-build:latest AS ru-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --RU --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \ cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -81,12 +73,12 @@ COPY --from=ru-build \ ./ # Now we are copying from builder-image the UHD files. -COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib -COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin +COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=ru-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin WORKDIR /usr/lib/x86_64-linux-gnu -COPY --from=ru-build \ +COPY --from=ru-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \ diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18 index 5c15456b0a..c6c7060df5 100644 --- a/docker/Dockerfile.lteUE.ubuntu18 +++ b/docker/Dockerfile.lteUE.ubuntu18 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS lte-ue-base + FROM ran-build:latest AS lte-ue-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --UE --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \ python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \ cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -89,16 +81,18 @@ COPY --from=lte-ue-build \ /oai-ran/targets/bin/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libSIMU.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ # Now we are copying from builder-image the UHD files. -COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib -COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin +COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=lte-ue-base \ + /usr/local/lib/libuhd.so.3.15.0 \ + /usr/local/lib/libprotobuf-c.so.1 \ + /usr/local/lib/ +COPY --from=lte-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin WORKDIR /usr/lib/x86_64-linux-gnu -COPY --from=lte-ue-build \ +COPY --from=lte-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \ diff --git a/docker/Dockerfile.nrUE.ubuntu18 b/docker/Dockerfile.nrUE.ubuntu18 index 03b0f94c69..63b0b7f498 100644 --- a/docker/Dockerfile.nrUE.ubuntu18 +++ b/docker/Dockerfile.nrUE.ubuntu18 @@ -25,18 +25,11 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS nr-ue-base + FROM ran-build:latest AS nr-ue-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --nrUE --ninja -w USRP --verbose-ci && \ - cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh +RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh #start from scratch for target executable FROM ubuntu:bionic as oai-nr-ue @@ -89,16 +82,18 @@ COPY --from=nr-ue-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ # Now we are copying from builder-image the UHD files. -COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib -COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin +COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=nr-ue-base \ + /usr/local/lib/libuhd.so.3.15.0 \ + /usr/local/lib/libprotobuf-c.so.1 \ + /usr/local/lib/ +COPY --from=nr-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin WORKDIR /usr/lib/x86_64-linux-gnu -COPY --from=nr-ue-build \ +COPY --from=nr-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \ From cffa73bf4550cc24e4f4a9ec851b63f0c48974fd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Dec 2021 16:53:50 +0100 Subject: [PATCH 11/28] RHEL8.2 dockerfiles: create intermediary build image This commit creates an intermediary build image for all eNB, gNB, UE, nrUE, RU targets (ran-build) after the image containing all RAN compilation dependencies (ran-base). Then, the corresponding target container images are just copied from the ran-build. The only exception is phySim, which is still compiled independently, as the build_oai would otherwise put all compiled files into phy_simulators/build instead of ran_build/build. We do this at this state to avoid any inconsistencies. --- ...le.ran.rhel8.2 => Dockerfile.base.rhel8.2} | 2 +- docker/Dockerfile.build.rhel8.2 | 38 +++++++++++++++++++ docker/Dockerfile.eNB.rhel8.2 | 24 ++++-------- docker/Dockerfile.gNB.rhel8.2 | 24 ++++-------- docker/Dockerfile.lteRU.rhel8.2 | 22 ++++------- docker/Dockerfile.lteUE.rhel8.2 | 24 ++++-------- docker/Dockerfile.nrUE.rhel8.2 | 25 +++++------- docker/Dockerfile.phySim.rhel8.2 | 6 +-- docker/Dockerfile.ran.rhel7.oc4-4 | 2 +- docker/Dockerfile.ran.rhel8.2.oc4-4 | 2 +- 10 files changed, 82 insertions(+), 87 deletions(-) rename docker/{Dockerfile.ran.rhel8.2 => Dockerfile.base.rhel8.2} (97%) create mode 100644 docker/Dockerfile.build.rhel8.2 diff --git a/docker/Dockerfile.ran.rhel8.2 b/docker/Dockerfile.base.rhel8.2 similarity index 97% rename from docker/Dockerfile.ran.rhel8.2 rename to docker/Dockerfile.base.rhel8.2 index 0941bd68ea..3050f09849 100644 --- a/docker/Dockerfile.ran.rhel8.2 +++ b/docker/Dockerfile.base.rhel8.2 @@ -26,7 +26,7 @@ #--------------------------------------------------------------------- -FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build +FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base ARG NEEDED_GIT_PROXY ENV TZ=Europe/Paris ENV BUILD_UHD_FROM_SOURCE=True diff --git a/docker/Dockerfile.build.rhel8.2 b/docker/Dockerfile.build.rhel8.2 new file mode 100644 index 0000000000..7ddfcdc034 --- /dev/null +++ b/docker/Dockerfile.build.rhel8.2 @@ -0,0 +1,38 @@ +#/* +# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more +# * contributor license agreements. See the NOTICE file distributed with +# * this work for additional information regarding copyright ownership. +# * The OpenAirInterface Software Alliance licenses this file to You under +# * the OAI Public License, Version 1.1 (the "License"); you may not use this file +# * except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.openairinterface.org/?page_id=698 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# *------------------------------------------------------------------------------- +# * For more information about the OpenAirInterface (OAI) Software Alliance: +# * contact@openairinterface.org +# */ +#--------------------------------------------------------------------- +# +# Dockerfile for the Open-Air-Interface BUILD service +# Valid for Ubuntu 18.04 +# +#--------------------------------------------------------------------- + +FROM ran-base:latest as ran-build + +RUN rm -Rf /oai-ran +WORKDIR /oai-ran +COPY . . + +#run build_oai to build the target image +RUN /bin/sh oaienv && \ + cd cmake_targets && \ + mkdir -p log && \ + ./build_oai --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2 index 185e31a2cd..b92a57ce85 100644 --- a/docker/Dockerfile.eNB.rhel8.2 +++ b/docker/Dockerfile.eNB.rhel8.2 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS enb-base + FROM ran-build:latest AS enb-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --eNB --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \ cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -78,10 +70,9 @@ COPY --from=enb-build \ /oai-ran/targets/bin/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ -COPY --from=enb-build \ +COPY --from=enb-base \ /lib64/libconfig.so.9 \ /lib64/libblas.so.3 \ /lib64/liblapack.so.3 \ @@ -100,12 +91,13 @@ COPY --from=enb-build \ /lib64/ # Now we are copying from builder-image the UHD files. -COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 -COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin +COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=enb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib +COPY --from=enb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin WORKDIR /usr/local/share/uhd/rfnoc -COPY --from=enb-build /usr/local/share/uhd/rfnoc/ . +COPY --from=enb-base /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index 41fdd2f158..7a69ec42a2 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS gnb-base + FROM ran-build:latest AS gnb-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --gNB --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \ cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -83,10 +75,9 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ -COPY --from=gnb-build \ +COPY --from=gnb-base \ /lib64/libconfig.so.9 \ /lib64/libforms.so.2 \ /lib64/libblas.so.3 \ @@ -106,12 +97,13 @@ COPY --from=gnb-build \ /lib64/ # Now we are copying from builder-image the UHD files. -COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 -COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin +COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=gnb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib +COPY --from=gnb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin WORKDIR /usr/local/share/uhd/rfnoc -COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ . +COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2 index ddb2ac1167..226530fe86 100644 --- a/docker/Dockerfile.lteRU.rhel8.2 +++ b/docker/Dockerfile.lteRU.rhel8.2 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS ru-base + FROM ran-build:latest AS ru-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --RU --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \ cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -75,7 +67,7 @@ COPY --from=ru-build \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ ./ -COPY --from=ru-build \ +COPY --from=ru-base \ /lib64/libconfig.so.9 \ /lib64/libblas.so.3 \ /lib64/liblapack.so.3 \ @@ -94,12 +86,12 @@ COPY --from=ru-build \ /lib64/ # Copying from the ran-build image the USRP needed packages -COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 -COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin +COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=ru-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=ru-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin WORKDIR /usr/local/share/uhd/rfnoc -COPY --from=ru-build /usr/local/share/uhd/rfnoc/ . +COPY --from=ru-base /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2 index dd5ed8ba2e..20b41d2066 100644 --- a/docker/Dockerfile.lteUE.rhel8.2 +++ b/docker/Dockerfile.lteUE.rhel8.2 @@ -25,18 +25,10 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS lte-ue-base + FROM ran-build:latest AS lte-ue-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --UE --ninja -w USRP --verbose-ci - RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \ python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \ cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh @@ -82,10 +74,9 @@ COPY --from=lte-ue-build \ /oai-ran/targets/bin/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libSIMU.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ -COPY --from=lte-ue-build \ +COPY --from=lte-ue-base \ /lib64/libconfig.so.9 \ /lib64/libblas.so.3 \ /lib64/liblapack.so.3 \ @@ -104,12 +95,13 @@ COPY --from=lte-ue-build \ /lib64/ # Now we are copying from builder-image the UHD files. -COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 -COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin +COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=lte-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib +COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin WORKDIR /usr/local/share/uhd/rfnoc -COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ . +COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.nrUE.rhel8.2 b/docker/Dockerfile.nrUE.rhel8.2 index e7b41c293b..4aa9cdc597 100644 --- a/docker/Dockerfile.nrUE.rhel8.2 +++ b/docker/Dockerfile.nrUE.rhel8.2 @@ -25,18 +25,11 @@ # #--------------------------------------------------------------------- +FROM ran-base:latest AS nr-ue-base + FROM ran-build:latest AS nr-ue-build -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . - -#run build_oai to build the target image -RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --nrUE --ninja -w USRP --verbose-ci && \ - cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh +RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh #start from scratch for target executable FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue @@ -84,10 +77,9 @@ COPY --from=nr-ue-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - /usr/local/lib/libprotobuf-c.so.1 \ ./ -COPY --from=nr-ue-build \ +COPY --from=nr-ue-base \ /lib64/libconfig.so.9 \ /lib64/libblas.so.3 \ /lib64/liblapack.so.3 \ @@ -107,12 +99,13 @@ COPY --from=nr-ue-build \ /lib64/ # Now we are copying from builder-image the UHD files. -COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin -COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 -COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin +COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=nr-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib +COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin WORKDIR /usr/local/share/uhd/rfnoc -COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ . +COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.phySim.rhel8.2 b/docker/Dockerfile.phySim.rhel8.2 index f35856ac7a..e2750f6f0c 100644 --- a/docker/Dockerfile.phySim.rhel8.2 +++ b/docker/Dockerfile.phySim.rhel8.2 @@ -25,11 +25,7 @@ # #--------------------------------------------------------------------- -FROM ran-build:develop AS phy-sim-build - -RUN rm -Rf /oai-ran -WORKDIR /oai-ran -COPY . . +FROM ran-base:latest AS phy-sim-build #run build_oai to build the target image RUN /bin/sh oaienv && \ diff --git a/docker/Dockerfile.ran.rhel7.oc4-4 b/docker/Dockerfile.ran.rhel7.oc4-4 index e32fa9b36d..2f0423801a 100644 --- a/docker/Dockerfile.ran.rhel7.oc4-4 +++ b/docker/Dockerfile.ran.rhel7.oc4-4 @@ -26,7 +26,7 @@ #--------------------------------------------------------------------- -FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-build +FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-base # Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps # It is pre-requisite diff --git a/docker/Dockerfile.ran.rhel8.2.oc4-4 b/docker/Dockerfile.ran.rhel8.2.oc4-4 index 127d66fccb..93af2b0e37 100644 --- a/docker/Dockerfile.ran.rhel8.2.oc4-4 +++ b/docker/Dockerfile.ran.rhel8.2.oc4-4 @@ -26,7 +26,7 @@ #--------------------------------------------------------------------- -FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build +FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base # Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps # It is pre-requisite From 953029ac5c1cec47e9f2a168e4d083b379153785 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 17:16:56 +0100 Subject: [PATCH 12/28] improve test results post to git --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 2 +- ci-scripts/ran_dashboard/Hdashboard.py | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 1213c48a16..40bdfce726 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -387,7 +387,7 @@ pipeline { steps { script { dir ('ci-scripts/ran_dashboard') { - sh "python3 Hdashboard.py testevent ${params.eNB_MR}" + sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${StatusForDb} " } } } diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 54a789b2e7..7ddda8b83c 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -507,28 +507,37 @@ class Dashboard: s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css') - def PostGitNote(self,singlemr): + def PostGitNote(self,mr,jobname,buildurl,status): gl = gitlab.Gitlab.from_config('OAI') project_id = 223 project = gl.projects.get(project_id) editable_mr = project.mergerequests.get(int(singlemr)) mr_notes = editable_mr.notes.list() - mr_note = editable_mr.notes.create({'body': 'Test Results for your MR are updated (End to End LTE/NSA/SA/2x2/OAIUE)'}) + mr_note = editable_mr.notes.create({ + 'body': 'Completed Test : '+jobname+' , status : '+status+'\n'+\ + buildurl+'\n'+\ + 'Consolidated Test Results (End to End LTE/NSA/SA/2x2/OAIUE)' + }) editable_mr.save() def main(): + #call from Jenkinsfile : sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${StatusForDb} " + #individual MR test results + test dashboard, event based (end of jenkins pipeline) if len(sys.argv)>1: if sys.argv[1]=="testevent" : mr=sys.argv[2] + jobname=sys.argv[3] + buildurl=sys.argv[4] + status=sys.argv[5] htmlDash=Dashboard() htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') htmlDash.Build('Tests','0000','/tmp/Tests_index.html') htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') - htmlDash.PostGitNote(mr) + htmlDash.PostGitNote(mr,jobname,buildurl,status) #test and MR status dash boards, cron based else: htmlDash=Dashboard() From 4cebb0e229db7ca9362caef754fc59baf1c3fc7f Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 18:23:22 +0100 Subject: [PATCH 13/28] fix incorrect variable name --- ci-scripts/ran_dashboard/Hdashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 7ddda8b83c..633184d8c5 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -511,7 +511,7 @@ class Dashboard: gl = gitlab.Gitlab.from_config('OAI') project_id = 223 project = gl.projects.get(project_id) - editable_mr = project.mergerequests.get(int(singlemr)) + editable_mr = project.mergerequests.get(int(mr)) mr_notes = editable_mr.notes.list() mr_note = editable_mr.notes.create({ 'body': 'Completed Test : '+jobname+' , status : '+status+'\n'+\ From f2f2f6e13fc61de908426eaa0655d681165f8b44 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 19:35:06 +0100 Subject: [PATCH 14/28] improve post to git --- ci-scripts/ran_dashboard/Hdashboard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 633184d8c5..a5e39e812e 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -514,9 +514,9 @@ class Dashboard: editable_mr = project.mergerequests.get(int(mr)) mr_notes = editable_mr.notes.list() mr_note = editable_mr.notes.create({ - 'body': 'Completed Test : '+jobname+' , status : '+status+'\n'+\ - buildurl+'\n'+\ - 'Consolidated Test Results (End to End LTE/NSA/SA/2x2/OAIUE)' + 'body': 'Completed Test : '+jobname+' , status : '+status+'
'+\ + 'Link to this test : '+buildurl+'
'+\ + 'Consolidated Test Results (All End-to-End LTE/NSA/SA/2x2/OAIUE)' }) editable_mr.save() From 3166289ef5c29f85f05fd62962fa675ca02321ba Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 8 Dec 2021 20:27:47 +0100 Subject: [PATCH 15/28] add dbhost conditional statement for test results --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 40bdfce726..c0f59e63a6 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -383,6 +383,9 @@ pipeline { } } stage ("Result Update"){ + when { + expression { params.DataBaseHost != "none" } + } agent {label DataBaseHost} steps { script { From ae5b65efa74167a116629d0ab1975278ffe050b8 Mon Sep 17 00:00:00 2001 From: mjoang Date: Wed, 8 Dec 2021 22:27:46 -0500 Subject: [PATCH 16/28] handle the boundary case when tx_req_body->pdu_length > 0 --- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 960eec3067..fdb783fc65 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -189,7 +189,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ if (scheduled_response->tx_request) { for (int j=0; jtx_request->number_of_pdus; j++) { fapi_nr_tx_request_body_t *tx_req_body = &scheduled_response->tx_request->tx_request_body[j]; - if (tx_req_body->pdu_index == i) { + if ((tx_req_body->pdu_index == i) && (tx_req_body->pdu_length > 0)) { LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid); memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length); harq_process_ul_ue->status = ACTIVE; From 42c2fe5b756fb7d0d854d0777ead4c09f419eb82 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Dec 2021 16:53:15 +0100 Subject: [PATCH 17/28] CI: build intermediary compilation image Change the python script such that we first build the ran-base image (renamed from ran-build, as it does not build anything), followed by the ran-build image compiling all dependencies, and the generate the independent target container images. --- ci-scripts/cls_containerize.py | 71 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 8ee6113628..c09e42b49e 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -177,7 +177,8 @@ class Containerize(): self.dockerfileprefix = '.rhel8.2' self.cliBuildOptions = '--no-cache --disable-compression' - imageNames = [] + # we always build the ran-build image with all targets + imageNames = [('ran-build', 'build')] result = re.search('eNB', self.imageKind) # Creating a tupple with the imageName and the DockerFile prefix pattern on obelix if result is not None: @@ -197,8 +198,6 @@ class Containerize(): imageNames.append(('oai-physim', 'phySim')) if self.host == 'Ubuntu': imageNames.append(('oai-lte-ru', 'lteRU')) - if len(imageNames) == 0: - imageNames.append(('oai-enb', 'eNB')) # Workaround for some servers, we need to erase completely the workspace if self.forcedWorkspaceCleanup: @@ -215,37 +214,37 @@ class Containerize(): mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5) mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5) - sharedimage = 'ran-build' - sharedTag = 'develop' - forceSharedImageBuild = False + baseImage = 'ran-base' + baseTag = 'develop' + forceBaseImageBuild = False imageTag = 'develop' if (self.ranAllowMerge): imageTag = 'ci-temp' if self.ranTargetBranch == 'develop': - mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5) + mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.base' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5) result = re.search('index', mySSH.getBefore()) if result is not None: - forceSharedImageBuild = True - sharedTag = 'ci-temp' + forceBaseImageBuild = True + baseTag = 'ci-temp' else: - forceSharedImageBuild = True + forceBaseImageBuild = True # Let's remove any previous run artifacts if still there mySSH.command(self.cli + ' image prune --force', '\$', 30) - if forceSharedImageBuild: - mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30) + if forceBaseImageBuild: + mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30) for image,pattern in imageNames: mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30) - # Build the shared image only on Push Events (not on Merge Requests) - # On when the shared image docker file is being modified. - if forceSharedImageBuild: - mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600) - # First verify if the shared image was properly created. + # Build the base image only on Push Events (not on Merge Requests) + # On when the base image docker file is being modified. + if forceBaseImageBuild: + mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + baseImage + ' --tag ' + baseImage + ':' + baseTag + ' --file docker/Dockerfile.base' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-base.log 2>&1', '\$', 1600) + # First verify if the base image was properly created. status = True - mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + sharedTag, '\$', 5) + mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + baseImage + ':' + baseTag, '\$', 5) if mySSH.getBefore().count('o such image') != 0: - logging.error('\u001B[1m Could not build properly ran-build\u001B[0m') + logging.error('\u001B[1m Could not build properly ran-base\u001B[0m') status = False else: result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore()) @@ -253,20 +252,20 @@ class Containerize(): imageSize = float(result.group('size')) imageSize = imageSize / 1000 if imageSize < 1000: - logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m') - self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' kbytes' + logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m') + self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' kbytes' else: imageSize = imageSize / 1000 if imageSize < 1000: - logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m') - self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Mbytes' + logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m') + self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Mbytes' else: imageSize = imageSize / 1000 - logging.debug('\u001B[1m ran-build size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m') - self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Gbytes' + logging.debug('\u001B[1m ran-base size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m') + self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Gbytes' else: - logging.debug('ran-build size is unknown') - # If the shared image failed, no need to continue + logging.debug('ran-base size is unknown') + # If the base image failed, no need to continue if not status: # Recover the name of the failed container? mySSH.command(self.cli + ' ps --quiet --filter "status=exited" -n1 | xargs ' + self.cli + ' rm -f', '\$', 5) @@ -278,16 +277,18 @@ class Containerize(): sys.exit(1) else: # Recover build logs, for the moment only possible when build is successful - mySSH.command(self.cli + ' create --name test ' + sharedimage + ':' + sharedTag, '\$', 5) - mySSH.command('mkdir -p cmake_targets/log/ran-build', '\$', 5) - mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-build', '\$', 5) + mySSH.command(self.cli + ' create --name test ' + baseImage + ':' + baseTag, '\$', 5) + mySSH.command('mkdir -p cmake_targets/log/ran-base', '\$', 5) + mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-base', '\$', 5) mySSH.command(self.cli + ' rm -f test', '\$', 5) # Build the target image(s) for image,pattern in imageNames: - # the archived Dockerfiles have "ran-build:latest" as base image + # the archived Dockerfiles have "ran-base:latest" as base image # we need to update them with proper tag - mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + sharedTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) + mySSH.command('sed -i -e "s#' + baseImage + ':latest#' + baseImage + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) + if image != 'ran-build': + mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200) # split the log mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5) @@ -318,7 +319,7 @@ class Containerize(): logging.debug('\u001B[1m ' + image + ' size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m') self.allImagesSize[image] = str(round(imageSize,1)) + ' Gbytes' else: - logging.debug('ran-build size is unknown') + logging.debug('ran-base size is unknown') self.allImagesSize[image] = 'unknown' # Now pruning dangling images in between target builds mySSH.command(self.cli + ' image prune --force', '\$', 30) @@ -342,8 +343,8 @@ class Containerize(): #Trying to identify the errors and warnings for each built images imageNames1 = imageNames - shared = ('ran-build','ran') - imageNames1.insert(0, shared) + base = ('ran-base','ran') + imageNames1.insert(0, base) for image,pattern in imageNames1: files = {} file_list = [f for f in os.listdir('build_log_' + self.testCase_id + '/' + image) if os.path.isfile(os.path.join('build_log_' + self.testCase_id + '/' + image, f)) and f.endswith('.txt')] From 11727f9d6a0935eb8a031b8b29bd4ae017803ca8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Dec 2021 16:54:36 +0100 Subject: [PATCH 18/28] Docker documentation update --- docker/README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/docker/README.md b/docker/README.md index 3966196bb1..85f553c721 100644 --- a/docker/README.md +++ b/docker/README.md @@ -29,12 +29,18 @@ For all platforms, the strategy for building docker/podman images is the same: -* First we create a common shared image that contains: +* First we create a common shared image `ran-base` that contains: - the latest source files (by using the `COPY` function) - all the means to build an OAI RAN executable * all packages, compilers, ... * especially UHD is installed -* Then from this shared image (`ran-build`) we can build target images for: +* Then, from the `ran-base` shared image, we create a shared image `ran-build` + in which all targets are compiled: + - eNB + - gNB + - lte-UE + - nr-UE +* Then from the `ran-build` shared image we can build target images for: - eNB - gNB - lte-UE @@ -58,7 +64,8 @@ Dockerfiles are named with the following naming convention: `Dockerfile.${target Targets can be: -- `ran` for an image named `ran-build` (the shared image) +- `base` for an image named `ran-base` (shared image) +- `ran` for an image named `ran-build` (shared image) - `eNB` for an image named `oai-enb` - `gNB` for an image named `oai-gnb` - `lteUE` for an image named `oai-lte-ue` @@ -85,9 +92,11 @@ For more details in build within a Openshift Cluster, see [OpenShift README](../ * `docker-ce` installed * Pulling `ubuntu:bionic` from DockerHub -## 3.2. Building the shared image ## +## 3.2. Building the shared images ## -This can be done starting `2020.w41` tag on the `develop` branch, or any branch that includes that tag. +Note: This can be done starting `2020.XX` tag on the `develop` branch, or any branch that includes that tag. + +There are two shared images: one that has all dependencies, and a second that compiles all targets (eNB, gNB, [nr]UE). ```bash git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git @@ -98,21 +107,25 @@ git checkout develop In our Eurecom/OSA environment we need to pass a GIT proxy. ```bash -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . +docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . ``` if you don't need it, do NOT pass any value: ```bash -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 . +docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 . ``` -After a while: +After building both: ```bash docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE -ran-build latest ccb721bc0b57 1 minute ago 4.06GB +ran-build latest f2633a7f5102 1 minute ago 6.81GB +ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB + ... ``` @@ -131,7 +144,8 @@ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE oai-enb latest 25ddbd8b7187 1 minute ago 516MB 875ea3b05b60 8 minutes ago 8.18GB -ran-build latest ccb721bc0b57 1 hour ago 4.06GB +ran-build latest f2633a7f5102 1 hour ago 6.81GB +ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB ``` Do not forget to remove the temporary image: From bf11d345c92a813199d517737a03200b15929dd0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Dec 2021 12:05:45 +0100 Subject: [PATCH 19/28] Clean up of Ubuntu 18 Docker files --- docker/Dockerfile.eNB.ubuntu18 | 22 +++++++++------------- docker/Dockerfile.gNB.ubuntu18 | 22 +++++++++------------- docker/Dockerfile.lteRU.ubuntu18 | 20 ++++++++------------ docker/Dockerfile.lteUE.ubuntu18 | 22 +++++++++------------- docker/Dockerfile.nrUE.ubuntu18 | 22 +++++++++------------- 5 files changed, 44 insertions(+), 64 deletions(-) diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18 index 4e79813621..23cea729ca 100644 --- a/docker/Dockerfile.eNB.ubuntu18 +++ b/docker/Dockerfile.eNB.ubuntu18 @@ -67,17 +67,16 @@ COPY --from=enb-build \ /oai-ran/docker/scripts/entrypoint.sh \ ./ -WORKDIR /usr/local/lib/ COPY --from=enb-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \ - ./ + /usr/local/lib/ # Now we are copying from builder-image the UHD files. COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin @@ -86,7 +85,6 @@ COPY --from=enb-base \ /usr/local/lib/libprotobuf-c.so.1 \ /usr/local/lib/ COPY --from=enb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin -WORKDIR /usr/lib/x86_64-linux-gnu COPY --from=enb-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ @@ -95,11 +93,9 @@ COPY --from=enb-base \ /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \ - ./ + /usr/lib/x86_64-linux-gnu/ -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for eNB diff --git a/docker/Dockerfile.gNB.ubuntu18 b/docker/Dockerfile.gNB.ubuntu18 index 2d5bc754a1..66c5d7703f 100644 --- a/docker/Dockerfile.gNB.ubuntu18 +++ b/docker/Dockerfile.gNB.ubuntu18 @@ -66,20 +66,19 @@ COPY --from=gnb-build \ /oai-ran/docker/scripts/entrypoint.sh \ ./ -WORKDIR /usr/local/lib/ COPY --from=gnb-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/libldpc.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - ./ + /usr/local/lib/ # Now we are copying from builder-image the UHD files. COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin @@ -88,7 +87,6 @@ COPY --from=gnb-base \ /usr/local/lib/libprotobuf-c.so.1 \ /usr/local/lib/ COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin -WORKDIR /usr/lib/x86_64-linux-gnu COPY --from=gnb-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ @@ -97,11 +95,9 @@ COPY --from=gnb-base \ /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \ - ./ + /usr/lib/x86_64-linux-gnu/ -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for gNB diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18 index c9c076dd76..1f1c903a15 100644 --- a/docker/Dockerfile.lteRU.ubuntu18 +++ b/docker/Dockerfile.lteRU.ubuntu18 @@ -62,22 +62,20 @@ COPY --from=ru-build \ /oai-ran/docker/scripts/entrypoint.sh \ ./ -WORKDIR /usr/local/lib/ COPY --from=ru-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - ./ + /usr/local/lib/ # Now we are copying from builder-image the UHD files. COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin COPY --from=ru-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin -WORKDIR /usr/lib/x86_64-linux-gnu COPY --from=ru-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ @@ -85,11 +83,9 @@ COPY --from=ru-base \ /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \ - ./ + /usr/lib/x86_64-linux-gnu/ -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for RRU diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18 index c6c7060df5..70394d8a4b 100644 --- a/docker/Dockerfile.lteUE.ubuntu18 +++ b/docker/Dockerfile.lteUE.ubuntu18 @@ -71,17 +71,16 @@ COPY --from=lte-ue-build \ /oai-ran/targets/bin/usim \ ./ -WORKDIR /usr/local/lib/ COPY --from=lte-ue-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libSIMU.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - ./ + /usr/local/lib/ # Now we are copying from builder-image the UHD files. COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin @@ -91,7 +90,6 @@ COPY --from=lte-ue-base \ /usr/local/lib/ COPY --from=lte-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin -WORKDIR /usr/lib/x86_64-linux-gnu COPY --from=lte-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ @@ -100,11 +98,9 @@ COPY --from=lte-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \ - ./ + /usr/lib/x86_64-linux-gnu/ -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for UE diff --git a/docker/Dockerfile.nrUE.ubuntu18 b/docker/Dockerfile.nrUE.ubuntu18 index 63b0b7f498..021e8d39cf 100644 --- a/docker/Dockerfile.nrUE.ubuntu18 +++ b/docker/Dockerfile.nrUE.ubuntu18 @@ -69,20 +69,19 @@ COPY --from=nr-ue-build \ WORKDIR /opt/oai-nr-ue/etc COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf . -WORKDIR /usr/local/lib/ COPY --from=nr-ue-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/libldpc.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - ./ + /usr/local/lib/ # Now we are copying from builder-image the UHD files. COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin @@ -92,7 +91,6 @@ COPY --from=nr-ue-base \ /usr/local/lib/ COPY --from=nr-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin -WORKDIR /usr/lib/x86_64-linux-gnu COPY --from=nr-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \ @@ -101,11 +99,9 @@ COPY --from=nr-ue-base \ /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \ /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \ - ./ + /usr/lib/x86_64-linux-gnu/ -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig WORKDIR /opt/oai-nr-ue From 28da113c0ff59223130ffe6b5a0394e6153479f8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Dec 2021 12:11:47 +0100 Subject: [PATCH 20/28] Clean up RHEL 8.2 docker files --- docker/Dockerfile.eNB.rhel8.2 | 19 ++++++++----------- docker/Dockerfile.gNB.rhel8.2 | 19 ++++++++----------- docker/Dockerfile.lteRU.rhel8.2 | 17 +++++++---------- docker/Dockerfile.lteUE.rhel8.2 | 19 ++++++++----------- docker/Dockerfile.nrUE.rhel8.2 | 19 ++++++++----------- docker/Dockerfile.phySim.rhel8.2 | 3 +-- 6 files changed, 40 insertions(+), 56 deletions(-) diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2 index b92a57ce85..23b0f38c18 100644 --- a/docker/Dockerfile.eNB.rhel8.2 +++ b/docker/Dockerfile.eNB.rhel8.2 @@ -60,17 +60,16 @@ COPY --from=enb-build \ /oai-ran/docker/scripts/entrypoint.sh \ ./ -WORKDIR /usr/local/lib/ COPY --from=enb-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \ - ./ + /usr/local/lib/ COPY --from=enb-base \ /lib64/libconfig.so.9 \ @@ -99,9 +98,7 @@ COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oa WORKDIR /usr/local/share/uhd/rfnoc COPY --from=enb-base /usr/local/share/uhd/rfnoc/ . -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for eNB diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index 7a69ec42a2..c53b3e75e2 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -62,20 +62,19 @@ COPY --from=gnb-build \ /oai-ran/docker/scripts/entrypoint.sh \ ./ -WORKDIR /usr/local/lib/ COPY --from=gnb-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/libldpc.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - ./ + /usr/local/lib/ COPY --from=gnb-base \ /lib64/libconfig.so.9 \ @@ -105,9 +104,7 @@ COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oa WORKDIR /usr/local/share/uhd/rfnoc COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ . -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for gNB diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2 index 226530fe86..5addbca655 100644 --- a/docker/Dockerfile.lteRU.rhel8.2 +++ b/docker/Dockerfile.lteRU.rhel8.2 @@ -57,15 +57,14 @@ COPY --from=ru-build \ /oai-ran/docker/scripts/entrypoint.sh \ . -WORKDIR /usr/local/lib/ COPY --from=ru-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - ./ + /usr/local/lib/ COPY --from=ru-base \ /lib64/libconfig.so.9 \ @@ -93,9 +92,7 @@ COPY --from=ru-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai WORKDIR /usr/local/share/uhd/rfnoc COPY --from=ru-base /usr/local/share/uhd/rfnoc/ . -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for RRU diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2 index 20b41d2066..a836e114a8 100644 --- a/docker/Dockerfile.lteUE.rhel8.2 +++ b/docker/Dockerfile.lteUE.rhel8.2 @@ -64,17 +64,16 @@ COPY --from=lte-ue-build \ /oai-ran/targets/bin/usim \ ./ -WORKDIR /usr/local/lib/ COPY --from=lte-ue-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libSIMU.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ - ./ + /usr/local/lib/ COPY --from=lte-ue-base \ /lib64/libconfig.so.9 \ @@ -103,9 +102,7 @@ COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt WORKDIR /usr/local/share/uhd/rfnoc COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ . -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for UE diff --git a/docker/Dockerfile.nrUE.rhel8.2 b/docker/Dockerfile.nrUE.rhel8.2 index 4aa9cdc597..819a61e94c 100644 --- a/docker/Dockerfile.nrUE.rhel8.2 +++ b/docker/Dockerfile.nrUE.rhel8.2 @@ -64,20 +64,19 @@ COPY --from=nr-ue-build \ WORKDIR /opt/oai-nr-ue/etc COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf . -WORKDIR /usr/local/lib/ COPY --from=nr-ue-build \ - /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 \ - /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 \ - /oai-ran/targets/bin/librfsimulator.so.Rel15 \ - /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 \ - /oai-ran/targets/bin/libcoding.so \ - /oai-ran/targets/bin/libparams_libconfig.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \ + /oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \ + /oai-ran/cmake_targets/ran_build/build/librfsimulator.so \ + /oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \ + /oai-ran/cmake_targets/ran_build/build/libcoding.so \ + /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ /oai-ran/cmake_targets/ran_build/build/libldpc.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ - ./ + /usr/local/lib/ COPY --from=nr-ue-base \ /lib64/libconfig.so.9 \ @@ -107,9 +106,7 @@ COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/ WORKDIR /usr/local/share/uhd/rfnoc COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ . -RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ - /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ - /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig # Copy the relevant configuration files for eNB diff --git a/docker/Dockerfile.phySim.rhel8.2 b/docker/Dockerfile.phySim.rhel8.2 index e2750f6f0c..0e76a12805 100644 --- a/docker/Dockerfile.phySim.rhel8.2 +++ b/docker/Dockerfile.phySim.rhel8.2 @@ -69,7 +69,6 @@ COPY --from=phy-sim-build \ /oai-ran/targets/bin/smallblocktest.Rel15 \ ./ -WORKDIR /usr/local/lib/ COPY --from=phy-sim-build \ /oai-ran/targets/bin/libcoding.so \ /lib64/liblapacke.so.3 \ @@ -86,7 +85,7 @@ COPY --from=phy-sim-build \ /oai-ran/cmake_targets/phy_simulators/build/libSIMU.so \ /oai-ran/cmake_targets/phy_simulators/build/libldpc.so \ /oai-ran/cmake_targets/phy_simulators/build/libldpc_orig.so \ - ./ + /usr/local/lib/ RUN ldconfig From 465c1f4747cf6fe645aedb406eb81dcb67d761c1 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 9 Dec 2021 14:26:43 +0100 Subject: [PATCH 21/28] change git post appearance --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 2 +- ci-scripts/ran_dashboard/Hdashboard.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index c0f59e63a6..a3939d832d 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -390,7 +390,7 @@ pipeline { steps { script { dir ('ci-scripts/ran_dashboard') { - sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${StatusForDb} " + sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} " } } } diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index a5e39e812e..e68bc94970 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -507,23 +507,23 @@ class Dashboard: s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css') - def PostGitNote(self,mr,jobname,buildurl,status): + def PostGitNote(self,mr,jobname,buildurl,buildid,status): gl = gitlab.Gitlab.from_config('OAI') project_id = 223 project = gl.projects.get(project_id) editable_mr = project.mergerequests.get(int(mr)) mr_notes = editable_mr.notes.list() mr_note = editable_mr.notes.create({ - 'body': 'Completed Test : '+jobname+' , status : '+status+'
'+\ - 'Link to this test : '+buildurl+'
'+\ - 'Consolidated Test Results (All End-to-End LTE/NSA/SA/2x2/OAIUE)' + 'body': 'Completed Test : '+jobname+', status: '+status+', '+\ + '('+buildid+')
'+\ + 'Consolidated Test Results' }) editable_mr.save() def main(): - #call from Jenkinsfile : sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${StatusForDb} " + #call from Jenkinsfile : sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} " #individual MR test results + test dashboard, event based (end of jenkins pipeline) if len(sys.argv)>1: @@ -531,13 +531,14 @@ def main(): mr=sys.argv[2] jobname=sys.argv[3] buildurl=sys.argv[4] - status=sys.argv[5] + buildid=sys.argv[5] + status=sys.argv[6] htmlDash=Dashboard() htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') htmlDash.Build('Tests','0000','/tmp/Tests_index.html') htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') - htmlDash.PostGitNote(mr,jobname,buildurl,status) + htmlDash.PostGitNote(mr,jobname,buildurl,buildid,status) #test and MR status dash boards, cron based else: htmlDash=Dashboard() From a315ffed2cb979b4d34d2e0ee57ff956bc7f8d97 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 14 Dec 2021 14:46:40 +0100 Subject: [PATCH 22/28] fix when build is not a listed mr --- ci-scripts/ran_dashboard/Hdashboard.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index e68bc94970..97020d1041 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -61,7 +61,9 @@ class Dashboard: self.git = self.__getGitData(cmd) #git data from Gitlab self.tests = self.__loadCfg('ran_dashboard_cfg.yaml') #tests table setup from yaml self.db = self.__loadFromDB() #test results from database - + self.mr_list=[] #mr list in string format + for x in range(len(self.git)): + self.mr_list.append(str(self.git[x]['iid'])) def __loadCfg(self,yaml_file): with open(yaml_file,'r') as f: @@ -534,11 +536,14 @@ def main(): buildid=sys.argv[5] status=sys.argv[6] htmlDash=Dashboard() - htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') - htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') - htmlDash.Build('Tests','0000','/tmp/Tests_index.html') - htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') - htmlDash.PostGitNote(mr,jobname,buildurl,buildid,status) + if mr in self.mr_list: + htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') + htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') + htmlDash.Build('Tests','0000','/tmp/Tests_index.html') + htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html') + htmlDash.PostGitNote(mr,jobname,buildurl,buildid,status) + else: + print("Not a Merge Request => this build is for testing/debug purpose, no report to git") #test and MR status dash boards, cron based else: htmlDash=Dashboard() From 64216210d7e8cf7dc4fec5f37b2004f530a9cd6d Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 15 Dec 2021 08:02:01 +0100 Subject: [PATCH 23/28] bugfix : use the instance attribute correctly --- ci-scripts/ran_dashboard/Hdashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran_dashboard/Hdashboard.py b/ci-scripts/ran_dashboard/Hdashboard.py index 97020d1041..0cfae97c76 100644 --- a/ci-scripts/ran_dashboard/Hdashboard.py +++ b/ci-scripts/ran_dashboard/Hdashboard.py @@ -536,7 +536,7 @@ def main(): buildid=sys.argv[5] status=sys.argv[6] htmlDash=Dashboard() - if mr in self.mr_list: + if mr in htmlDash.mr_list: htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html') htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html') htmlDash.Build('Tests','0000','/tmp/Tests_index.html') From 16b2bfab89422b006920512e4075f97a066a0311 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 17 Dec 2021 09:49:58 +0100 Subject: [PATCH 24/28] updating checker for real time issue and ping rttavg --- ci-scripts/cls_oaicitest.py | 20 +++++++++++++++++--- ci-scripts/main.py | 5 +++++ ci-scripts/ran.py | 4 +++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 3a218b17b8..b8b99a053b 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -126,6 +126,7 @@ class OaiCiTest(): self.desc = '' self.ping_args = '' self.ping_packetloss_threshold = '' + self.ping_rttavg_threshold ='' self.iperf_args = '' self.iperf_packetloss_threshold = '' self.iperf_profile = '' @@ -1632,6 +1633,7 @@ class OaiCiTest(): min_msg = 'RTT(Min) : ' + rtt_min + ' ms' avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms' max_msg = 'RTT(Max) : ' + rtt_max + ' ms' + lock.acquire() logging.debug('\u001B[1;37;44m ping result (' + UE_IPAddress + ') \u001B[0m') logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m') @@ -1658,17 +1660,29 @@ class OaiCiTest(): ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_1'])) + 'ms \n' #building html message - qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg + qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg + + #checking packet loss compliance packetLossOK = True if packetloss is not None: if float(packetloss) > float(self.ping_packetloss_threshold): qMsg += '\nPacket Loss too high' - logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m') + logging.debug('\u001B[1;37;41m Packet Loss too high; Target: '+ self.ping_packetloss_threshold + '%\u001B[0m') packetLossOK = False elif float(packetloss) > 0: qMsg += '\nPacket Loss is not 0%' logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m') - if (packetLossOK): + + #checking RTT avg compliance + rttavgOK = True + if self.ping_rttavg_threshold != '': + if float(rtt_avg)>float(self.ping_rttavg_threshold): + ping_rttavg_error_msg = 'RTT(Avg) too high: ' + rtt_avg + ' ms; Target: '+ self.ping_rttavg_threshold+ ' ms' + qMsg += '\n'+ping_rttavg_error_msg + logging.debug('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m') + rttavgOK = False + + if packetLossOK and rttavgOK: statusQueue.put(0) else: statusQueue.put(-1) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index e9acdc9152..ddf9bb531e 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -295,6 +295,11 @@ def GetParametersFromXML(action): CiTestObj.ue_id = "" else: CiTestObj.ue_id = ue_id + ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') + if (ping_rttavg_threshold is None): + CiTestObj.ping_rttavg_threshold = "" + else: + CiTestObj.ping_rttavg_threshold = ping_rttavg_threshold elif action == 'Iperf': CiTestObj.iperf_args = test.findtext('iperf_args') diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 207e62bf9c..95066d168d 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -752,6 +752,7 @@ class RANManagement(): msgLine = 0 foundSegFault = False foundRealTimeIssue = False + foundRealTimeIssue_cnt = 0 rrcSetupComplete = 0 rrcReleaseRequest = 0 rrcReconfigRequest = 0 @@ -890,6 +891,7 @@ class RANManagement(): result = re.search('LLL', str(line)) if result is not None and not exitSignalReceived: foundRealTimeIssue = True + foundRealTimeIssue_cnt += 1 if foundAssertion and (msgLine < 3): msgLine += 1 msgAssertion += str(line) @@ -1258,7 +1260,7 @@ class RANManagement(): global_status = CONST.ENB_PROCESS_ASSERTION if foundRealTimeIssue: logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m') - htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n' + htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues! COUNT = '+ str(foundRealTimeIssue_cnt) +' lines\n' if rlcDiscardBuffer > 0: rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)' logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m') From 902c8d1ae3a3acf10a3714546eb10fc391b59417 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 17 Dec 2021 10:22:14 +0100 Subject: [PATCH 25/28] update lte2x2 and nsa tests with new pass/fail criteria --- ci-scripts/xml_files/container_nsa_b200_quectel.xml | 4 ++++ ci-scripts/xml_files/fr1_lte_2x2_quectel.xml | 6 ++++-- ci-scripts/xml_files/fr1_nsa_quectel.xml | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index cc8312d7a3..0af0d9bd70 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -39,6 +39,8 @@ 050001 070000 070001 + 050000 + 050001 010002 000001 030202 @@ -103,6 +105,7 @@ idefix -c 20 1 + 15 @@ -111,6 +114,7 @@ idefix -c 100 -i 0.2 1 + 15 diff --git a/ci-scripts/xml_files/fr1_lte_2x2_quectel.xml b/ci-scripts/xml_files/fr1_lte_2x2_quectel.xml index 03d474aef0..ae7a4c92be 100644 --- a/ci-scripts/xml_files/fr1_lte_2x2_quectel.xml +++ b/ci-scripts/xml_files/fr1_lte_2x2_quectel.xml @@ -87,14 +87,16 @@ Ping: 20 pings nrmodule2_quectel -c 20 - 5 + 1 + 40 Ping Ping: 100 pings, size 1024 nrmodule2_quectel -c 100 -s 1024 -i 0,2 - 5 + 1 + 30 diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 2b64b9bbe5..6414f09b6b 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -38,6 +38,8 @@ 000001 070001 000001 + 050000 + 050001 010002 080001 080000 @@ -98,6 +100,7 @@ idefix -c 20 1 + 15 @@ -106,6 +109,7 @@ idefix -c 100 -i 0.2 1 + 15 From cd4208dfb9427439772dae9da12143d42c9f6b20 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 17 Dec 2021 11:02:23 +0100 Subject: [PATCH 26/28] updating SA tests --- ci-scripts/xml_files/fr1_sa_quectel.xml | 6 ++++-- ci-scripts/xml_files/fr1_sa_quectel_stages.xml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci-scripts/xml_files/fr1_sa_quectel.xml b/ci-scripts/xml_files/fr1_sa_quectel.xml index 0564e49c5c..4db5bb64a5 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel.xml @@ -85,7 +85,8 @@ Ping: 20pings in 20sec nrmodule2_quectel -c 20 - 5 + 1 + 15 @@ -93,7 +94,8 @@ Ping: 100pings in 20sec nrmodule2_quectel -c 100 -i 0,2 - 5 + 1 + 15 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml index 3301efc221..a9922bec52 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml @@ -92,7 +92,8 @@ Ping: 20pings in 20sec nrmodule2_quectel -c 20 - 5 + 1 + 15 From 43eb8e40ac687ccf11be8c638f2efd01e6aa6643 Mon Sep 17 00:00:00 2001 From: mjoang Date: Fri, 17 Dec 2021 13:50:29 -0500 Subject: [PATCH 27/28] enable running thread in parallel for RFSIM. --- executables/nr-uesoftmodem.c | 13 ++++------ .../nfapi/public_inc/fapi_nr_ue_constants.h | 2 +- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 24 ++++++++++--------- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 4 ++-- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index ad5ea982c9..5431fc1331 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -233,20 +233,15 @@ nrUE_params_t *get_nrUE_params(void) { /* initialie thread pools used for NRUE processing paralleliation */ void init_tpools(uint8_t nun_dlsch_threads) { char *params = NULL; - if (IS_SOFTMODEM_RFSIM) { - params = calloc(1,2); - memcpy(params,"N",1); - } - else { - params = calloc(1,(NR_RX_NB_TH*NR_NB_TH_SLOT*3)+1); - for (int i=0; iul_config; int pdu_done = 0; pthread_mutex_lock(&ul_config->mutex_ul_config); + LOG_D(PHY, "%d.%d ul S ul_config %p pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_done, ul_config->number_pdus); + for (i = 0; i < ul_config->number_pdus; ++i){ AssertFatal(ul_config->ul_config_list[i].pdu_type <= FAPI_NR_UL_CONFIG_TYPES,"pdu_type %d out of bounds\n",ul_config->ul_config_list[i].pdu_type); @@ -167,7 +169,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu; /* PUCCH */ fapi_nr_ul_config_pucch_pdu *pucch_config_pdu; - LOG_D(PHY, "%d.%d ul B %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul B ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); switch (pdu_type){ @@ -193,9 +195,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid); memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length); harq_process_ul_ue->status = ACTIVE; - ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more pdu_done++; - LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } @@ -219,9 +221,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ memcpy((void*)&(pucch_vars->pucch_pdu[j]), (void*)pucch_config_pdu, sizeof(fapi_nr_ul_config_pucch_pdu)); pucch_vars->active[j] = true; found = true; - ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more pdu_done++; - LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } @@ -233,20 +235,20 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ // prach config pdu prach_config_pdu = &ul_config->ul_config_list[i].prach_config_pdu; memcpy((void*)&(PHY_vars_UE_g[module_id][cc_id]->prach_vars[gNB_id]->prach_pdu), (void*)prach_config_pdu, sizeof(fapi_nr_ul_config_prach_pdu)); - ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more pdu_done++; - LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; - case (FAPI_NR_UL_CONFIG_TYPE_NONE): + case (FAPI_NR_UL_CONFIG_TYPE_DONE): pdu_done++; // count the no of pdu processed - LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; default: - ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_NONE; // not handle it any more + ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more pdu_done++; // count the no of pdu processed - LOG_D(PHY, "%d.%d ul A %p t %d pdu %d %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); + LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus); break; } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index bd427ee1ef..c0c78adbba 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -62,7 +62,7 @@ static ssb_list_info_t ssb_list; void fill_ul_config(fapi_nr_ul_config_request_t *ul_config, frame_t frame_tx, int slot_tx, uint8_t pdu_type){ // clear ul_config for new frame/slot if ((ul_config->slot != slot_tx || ul_config->sfn != frame_tx) && ul_config->number_pdus != 0) { - LOG_D(MAC, "%d.%d %d.%d f clear ul %p t %d pdu %d\n", frame_tx, slot_tx, ul_config->sfn, ul_config->slot, ul_config, pdu_type, ul_config->number_pdus); + LOG_D(MAC, "%d.%d %d.%d f clear ul_config %p t %d pdu %d\n", frame_tx, slot_tx, ul_config->sfn, ul_config->slot, ul_config, pdu_type, ul_config->number_pdus); ul_config->number_pdus = 0; memset(ul_config->ul_config_list, 0, sizeof(ul_config->ul_config_list)); } @@ -1026,7 +1026,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in } pthread_mutex_unlock(&ul_config->mutex_ul_config); // avoid double lock - fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, rx_frame, rx_slot, ul_info->thread_id); + fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, frame_tx, slot_tx, ul_info->thread_id); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){ mac->if_module->scheduled_response(&scheduled_response); } From 619a2c7d3a7d834713ab33b5fd6e73ab8e39136e Mon Sep 17 00:00:00 2001 From: mjoang Date: Fri, 17 Dec 2021 14:44:14 -0500 Subject: [PATCH 28/28] fix compilation warning. --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index c0c78adbba..8f4840c57e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -937,8 +937,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in } else if (ul_info) { int cc_id = ul_info->cc_id; - frame_t rx_frame = ul_info->frame_rx; - slot_t rx_slot = ul_info->slot_rx; + //frame_t rx_frame = ul_info->frame_rx; + //slot_t rx_slot = ul_info->slot_rx; frame_t frame_tx = ul_info->frame_tx; slot_t slot_tx = ul_info->slot_tx; module_id_t mod_id = ul_info->module_id;