From aff31d45b40f9038d967abbdd287eb9b78b217ca Mon Sep 17 00:00:00 2001 From: francescomani Date: Sun, 3 Aug 2025 10:25:00 +0200 Subject: [PATCH 001/112] formatting --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f8c842706c..e5f2939df8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -429,32 +429,28 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, NR_ControlResourceSet_t *coreset, NR_ServingCellConfigCommon_t *scc, NR_BWP_t *bwp, - NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) { - - int sps; - NR_sched_pdcch_t pdcch; - + NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) +{ AssertFatal(*ss->controlResourceSetId == coreset->controlResourceSetId, "coreset id in SS %ld does not correspond to the one in coreset %ld", *ss->controlResourceSetId, coreset->controlResourceSetId); + int sps; + NR_sched_pdcch_t pdcch; if (bwp) { // This is not for SIB1 - if(coreset->controlResourceSetId == 0){ - pdcch.BWPSize = gNB_mac->cset0_bwp_size; + if(coreset->controlResourceSetId == 0) { + pdcch.BWPSize = gNB_mac->cset0_bwp_size; pdcch.BWPStart = gNB_mac->cset0_bwp_start; - } - else { - pdcch.BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE); + } else { + pdcch.BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE); pdcch.BWPStart = NRRIV2PRBOFFSET(bwp->locationAndBandwidth, MAX_BWP_SIZE); } pdcch.SubcarrierSpacing = bwp->subcarrierSpacing; - pdcch.CyclicPrefix = (bwp->cyclicPrefix==NULL) ? 0 : *bwp->cyclicPrefix; - + pdcch.CyclicPrefix = (bwp->cyclicPrefix == NULL) ? 0 : *bwp->cyclicPrefix; //AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored"); sps = bwp->cyclicPrefix == NULL ? 14 : 12; - } - else { - AssertFatal(type0_PDCCH_CSS_config!=NULL,"type0_PDCCH_CSS_config is null,bwp %p\n",bwp); + } else { + AssertFatal(type0_PDCCH_CSS_config != NULL, "type0_PDCCH_CSS_config is null,bwp %p\n", bwp); pdcch.BWPSize = type0_PDCCH_CSS_config->num_rbs; pdcch.BWPStart = type0_PDCCH_CSS_config->cset_start_rb; pdcch.SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch; @@ -462,15 +458,15 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, sps = 14; } - AssertFatal(ss->monitoringSymbolsWithinSlot!=NULL,"ss->monitoringSymbolsWithinSlot is null\n"); - AssertFatal(ss->monitoringSymbolsWithinSlot->buf!=NULL,"ss->monitoringSymbolsWithinSlot->buf is null\n"); + AssertFatal(ss->monitoringSymbolsWithinSlot != NULL, "ss->monitoringSymbolsWithinSlot is null\n"); + BIT_STRING_t *symbolsInSlot = ss->monitoringSymbolsWithinSlot; + AssertFatal(symbolsInSlot->buf != NULL, "ss->monitoringSymbolsWithinSlot->buf is null\n"); // for SPS=14 8 MSBs in positions 13 downto 6 - uint16_t monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | - (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps)); + int monitoringSymbolsWithinSlot = (symbolsInSlot->buf[0] << (sps - 8)) | (symbolsInSlot->buf[1] >> (16 - sps)); - for (int i=0; i>(sps-1-i))&1) { + for (int i = 0; i < sps; i++) { + if ((monitoringSymbolsWithinSlot >> (sps - 1 - i)) & 1) { pdcch.StartSymbolIndex=i; break; } From 7f4397a091f2da284fb416091fafd4a2cc7a956f Mon Sep 17 00:00:00 2001 From: francescomani Date: Sun, 3 Aug 2025 10:35:46 +0200 Subject: [PATCH 002/112] workaround to take into account SS0 1st symbol depending on SSB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index e5f2939df8..9828531c35 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -467,7 +467,7 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, for (int i = 0; i < sps; i++) { if ((monitoringSymbolsWithinSlot >> (sps - 1 - i)) & 1) { - pdcch.StartSymbolIndex=i; + pdcch.StartSymbolIndex = ss->searchSpaceId == 0 ? i + type0_PDCCH_CSS_config->first_symbol_index : i; break; } } From 88ec5fb239a9de6395e5c9eea9f00f38228c5276 Mon Sep 17 00:00:00 2001 From: francescomani Date: Sun, 3 Aug 2025 10:41:16 +0200 Subject: [PATCH 003/112] highlighting UE LOG with sync SSC printed --- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index d5c2514634..da70fd50e8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -147,7 +147,7 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc, 1, 1); } - LOG_I(PHY, "Initial sync: pbch decoded sucessfully, ssb index %d\n", *ssb_index); + LOG_A(PHY, "Initial sync: pbch decoded sucessfully, ssb index %d\n", *ssb_index); return true; } } From 350cf8d6ef93b34bf564326d414722b58bd1ef28 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Sun, 3 Aug 2025 11:09:32 -0400 Subject: [PATCH 004/112] Fix PUCCH 2 DMRS in UE for start RB not multiple of 4 --- openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c | 27 ++++++++++++------------- openair1/PHY/defs_nr_common.h | 2 ++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index c73af09eef..3fcbe2a2f3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -491,7 +491,7 @@ static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit, uint16_t rnti, uint1 const int roundedSz = (M_bit + 31) / 32; uint32_t *seq = gold_cache((rnti << 15) + n_id, roundedSz); #ifdef DEBUG_NR_PUCCH_TX - printf("\t\t [nr_pucch2_3_4_scrambling] gold sequence s=%x, M_bit %d\n",s,M_bit); + printf("\t\t [nr_pucch2_3_4_scrambling] gold sequence s=%x, M_bit %d\n", *seq, M_bit); #endif uint8_t *btildep = btilde; @@ -718,9 +718,10 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, temp_x2 *= 14UL * nr_slot_tx + l + startingSymbolIndex + 1; temp_x2 *= 2UL * pucch_pdu->dmrs_scrambling_id + 1; temp_x2 = (temp_x2 + 2ULL * pucch_pdu->dmrs_scrambling_id) % (1UL << 31); - uint idxGold = startingPRB >> 2; - uint32_t *seq = gold_cache(temp_x2, idxGold + pucch_pdu->prb_size); - int m = 0; + uint32_t idxGold = startingPRB * NR_PUCCH_DMRS_RB * DMRS_MOD_ORDER / 32; + uint32_t m = (startingPRB * NR_PUCCH_DMRS_RB * DMRS_MOD_ORDER) % 32; + const int seq_sz = ((startingPRB + pucch_pdu->prb_size) * NR_PUCCH_DMRS_RB * DMRS_MOD_ORDER + 31) / 32; + uint32_t *seq = gold_cache(temp_x2, seq_sz); for (int rb=0; rbprb_size; rb++) { //startingPRB = startingPRB + rb; const bool nb_rb_is_even = frame_parms->N_RB_DL & 1; @@ -757,15 +758,14 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, txdataF[0][re_offset] = d[outSample + k]; #ifdef DEBUG_NR_PUCCH_TX printf( - "\t [nr_generate_pucch2] (n=%d,i=%d) mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " + "\t [nr_generate_pucch2] (n=%d) mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " "\tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n", n, - i, amp, frame_parms->ofdm_symbol_size, frame_parms->N_RB_DL, frame_parms->first_carrier_offset, - i + k, + k, re_offset, l, n, @@ -776,20 +776,19 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, } if (n%3 == 1) { // mapping DM-RS signal according to TS38.211 subclause 6.4.1.3.2 - txdataF[0][re_offset].r = (int16_t)(baseVal * (1 - (2 * ((uint8_t)((seq[idxGold] >> (2 * m)) & 1))))); - txdataF[0][re_offset].i = (int16_t)(baseVal * (1 - (2 * ((uint8_t)((seq[idxGold] >> (2 * m + 1)) & 1))))); - m++; + txdataF[0][re_offset].r = (int16_t)(baseVal * (1 - (2 * ((uint8_t)((seq[idxGold] >> (m)) & 1))))); + txdataF[0][re_offset].i = (int16_t)(baseVal * (1 - (2 * ((uint8_t)((seq[idxGold] >> (m + 1)) & 1))))); + m += 2; #ifdef DEBUG_NR_PUCCH_TX printf( - "\t [nr_generate_pucch2] (n=%d,i=%d) mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " + "\t [nr_generate_pucch2] (n=%d) mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d " "\tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n", n, - i, amp, frame_parms->ofdm_symbol_size, frame_parms->N_RB_DL, frame_parms->first_carrier_offset, - i + kk, + kk, re_offset, l, n, @@ -804,7 +803,7 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, outSample += 8; - if (m % 16 == 0) { + if (m % 32 == 0) { idxGold++; m = 0; } diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index d125e382ff..67f7470d29 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -91,6 +91,8 @@ #define PBCH_MAX_RE_PER_SYMBOL (20 * 12) +#define NR_PUCCH_DMRS_RB 4 + typedef enum { NR_MU_0=0, NR_MU_1, From 39c6cb203c0b49e0c471828a6df869a32dd03949 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Sun, 3 Aug 2025 11:12:59 -0400 Subject: [PATCH 005/112] Not include DC for CSI IM measurement DC subcarrier has a significantly higher energy compared to other CSI IM resource elements. This causes the average interference + noise estimation to be higher than CSI-RS signal power making the CQI 0. With a third-party gnb that schedules PDSCH based on CQI, the UE never receives DL DCI once it starts sending CSI reports. --- openair1/PHY/NR_UE_TRANSPORT/csi_rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index 764fbbabc6..bb576460f6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -782,6 +782,8 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, LOG_I(NR_PHY, "(ant_rx %i, sc %i) real %i, imag %i\n", ant_rx, sc, rx_signal[sc].r, rx_signal[sc].i); #endif + if (sc == 0) // skip DC for noise power estimation + continue; sum_re += rx_signal[sc].r; sum_im += rx_signal[sc].i; sum2_re += rx_signal[sc].r * rx_signal[sc].r; From acf6b957b304618e9c96264290bcd8b8fb5f31d5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 29 Jun 2025 21:29:56 +0200 Subject: [PATCH 006/112] Refactor post processor into post_process_ulsch() Introduce an array with information on FAPI structures to save resource allocation into. It's in nr_mac_gNB.h because the next commit reuses this for all preprocessors. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 438 +++++++++--------- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 11 + 2 files changed, 224 insertions(+), 225 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index e0638e97cf..f6badf62eb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2356,6 +2356,217 @@ nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti return pusch_pdu; } +static void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch, NR_UE_info_t *UE, NR_sched_pusch_t *sched_pusch) +{ + frame_t frame = pusch->frame; + slot_t slot = pusch->slot; + + NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels[0].ServingCellConfigCommon; + NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; + NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; + + /* the UE now has the grant for the request */ + sched_ctrl->SR = false; + + int8_t harq_id = sched_pusch->ul_harq_pid; + if (harq_id < 0) { + /* PP has not selected a specific HARQ Process, get a new one */ + harq_id = sched_ctrl->available_ul_harq.head; + AssertFatal(harq_id >= 0, "no free HARQ process available for UE %04x\n", UE->rnti); + remove_front_nr_list(&sched_ctrl->available_ul_harq); + sched_pusch->ul_harq_pid = harq_id; + } else { + /* PP selected a specific HARQ process. Check whether it will be a new + * transmission or a retransmission, and remove from the corresponding + * list */ + if (sched_ctrl->ul_harq_processes[harq_id].round == 0) + remove_nr_list(&sched_ctrl->available_ul_harq, harq_id); + else + remove_nr_list(&sched_ctrl->retrans_ul_harq, harq_id); + } + NR_UE_ul_harq_t *cur_harq = &sched_ctrl->ul_harq_processes[harq_id]; + DevAssert(!cur_harq->is_waiting); + if (nr_mac->radio_config.disable_harq) { + finish_nr_ul_harq(sched_ctrl, harq_id); + } else { + add_tail_nr_list(&sched_ctrl->feedback_ul_harq, harq_id); + cur_harq->feedback_slot = sched_pusch->slot; + cur_harq->is_waiting = true; + } + + /* Statistics */ + AssertFatal(cur_harq->round < nr_mac->ul_bler.harq_round_max, "Indexing ulsch_rounds[%d] is out of bounds\n", cur_harq->round); + UE->mac_stats.ul.rounds[cur_harq->round]++; + if (cur_harq->round == 0) { + UE->mac_stats.ulsch_total_bytes_scheduled += sched_pusch->tb_size; + /* Save information on MCS, TBS etc for the current initial transmission + * so we have access to it when retransmitting */ + cur_harq->sched_pusch = *sched_pusch; + /* save which time allocation and nrOfLayers have been used, to be used on + * retransmissions */ + cur_harq->sched_pusch.time_domain_allocation = sched_pusch->time_domain_allocation; + cur_harq->sched_pusch.nrOfLayers = sched_pusch->nrOfLayers; + cur_harq->sched_pusch.tpmi = sched_pusch->tpmi; + sched_ctrl->sched_ul_bytes += sched_pusch->tb_size; + UE->mac_stats.ul.total_rbs += sched_pusch->rbSize; + + } else { + UE->mac_stats.ul.total_rbs_retx += sched_pusch->rbSize; + } + UE->mac_stats.ul.current_bytes = sched_pusch->tb_size; + UE->mac_stats.ul.current_rbs = sched_pusch->rbSize; + sched_ctrl->last_ul_frame = sched_pusch->frame; + sched_ctrl->last_ul_slot = sched_pusch->slot; + + LOG_D(NR_MAC, + "ULSCH/PUSCH: %4d.%2d RNTI %04x UL sched %4d.%2d DCI L %d start %2d RBS %3d startSymbol %2d nb_symbol %2d dmrs_pos %x MCS " + "Table %2d MCS %2d nrOfLayers %2d num_dmrs_cdm_grps_no_data %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d est %6d sched " + "%6d est BSR %6d TPC %d\n", + frame, + slot, + UE->rnti, + sched_pusch->frame, + sched_pusch->slot, + sched_ctrl->aggregation_level, + sched_pusch->rbStart, + sched_pusch->rbSize, + sched_pusch->tda_info.startSymbolIndex, + sched_pusch->tda_info.nrOfSymbols, + sched_pusch->dmrs_info.ul_dmrs_symb_pos, + current_BWP->mcs_table, + sched_pusch->mcs, + sched_pusch->nrOfLayers, + sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data, + sched_pusch->tb_size, + harq_id, + cur_harq->round, + nr_get_rv(cur_harq->round % 4), + cur_harq->ndi, + sched_ctrl->estimated_ul_buffer, + sched_ctrl->sched_ul_bytes, + sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, + sched_ctrl->tpc0); + + /* PUSCH in a later slot, but corresponding DCI now! */ + const int index = ul_buffer_index(sched_pusch->frame, + sched_pusch->slot, + nr_mac->frame_structure.numb_slots_frame, + nr_mac->UL_tti_req_ahead_size); + nfapi_nr_ul_tti_request_t *req = &nr_mac->UL_tti_req_ahead[0][index]; + if (req->SFN != sched_pusch->frame || req->Slot != sched_pusch->slot) + LOG_W(NR_MAC, + "%d.%d future UL_tti_req's frame.slot %d.%d does not match PUSCH %d.%d\n", + frame, + slot, + req->SFN, + req->Slot, + sched_pusch->frame, + sched_pusch->slot); + AssertFatal(req->n_pdus < sizeof(req->pdus_list) / sizeof(req->pdus_list[0]), + "Invalid UL_tti_req_ahead->n_pdus %d\n", + req->n_pdus); + + req->pdus_list[req->n_pdus].pdu_type = NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE; + req->pdus_list[req->n_pdus].pdu_size = sizeof(nfapi_nr_pusch_pdu_t); + nfapi_nr_pusch_pdu_t *pusch_pdu = prepare_pusch_pdu(req, + UE, + scc, + sched_pusch, + current_BWP->transform_precoding, + harq_id, + cur_harq->round, + current_BWP->pusch_Config && current_BWP->pusch_Config->frequencyHopping, + UE->rnti); + req->n_pdus += 1; + + // Calculate the normalized tx_power for PHR + long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; + int tbs_bits = pusch_pdu->pusch_data.tb_size << 3; + sched_pusch->phr_txpower_calc = compute_ph_factor(current_BWP->scs, + tbs_bits, + sched_pusch->rbSize, + sched_pusch->nrOfLayers, + sched_pusch->tda_info.nrOfSymbols, + sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, + deltaMCS, + false); + + /* a PDCCH PDU groups DCIs per BWP and CORESET. Save a pointer to each + * allocated PDCCH so we can easily allocate UE's DCIs independent of any + * CORESET order */ + NR_SearchSpace_t *ss = sched_ctrl->search_space; + NR_ControlResourceSet_t *coreset = sched_ctrl->coreset; + const int coresetid = coreset->controlResourceSetId; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu = pusch->pdcch_pdu_coreset[coresetid]; + if (!pdcch_pdu) { + nfapi_nr_ul_dci_request_pdus_t *ul_dci_request_pdu = &pusch->ul_dci_req->ul_dci_pdu_list[pusch->ul_dci_req->numPdus]; + memset(ul_dci_request_pdu, 0, sizeof(nfapi_nr_ul_dci_request_pdus_t)); + ul_dci_request_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; + ul_dci_request_pdu->PDUSize = (uint8_t)(4 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); + pdcch_pdu = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15; + pusch->ul_dci_req->numPdus += 1; + nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch); + pusch->pdcch_pdu_coreset[coresetid] = pdcch_pdu; + } + + LOG_D(NR_MAC, "Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %04x\n", frame, slot, sched_ctrl->cce_index, UE->rnti); + + /* Fill PDCCH DL DCI PDU */ + nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu, + scc, + ss, + coreset, + sched_ctrl->aggregation_level, + sched_ctrl->cce_index, + UE->UE_beam_index, + UE->rnti); + pdcch_pdu->numDlDci++; + + dci_pdu_rel15_t uldci_payload; + memset(&uldci_payload, 0, sizeof(uldci_payload)); + if (current_BWP->dci_format == NR_UL_DCI_FORMAT_0_1) + LOG_D(NR_MAC_DCI, + "add ul dci harq %d for %d.%d %d.%d round %d\n", + harq_id, + frame, + slot, + sched_pusch->frame, + sched_pusch->slot, + sched_ctrl->ul_harq_processes[harq_id].round); + + // If nrOfLayers is the same as in srs_feedback, we use the best TPMI, i.e. the one in srs_feedback. + // Otherwise, we use the valid TPMI that we saved in the first transmission. + int *tpmi = NULL; + if (pusch_pdu->nrOfLayers != (sched_ctrl->srs_feedback.ul_ri + 1)) + tpmi = &sched_pusch->tpmi; + config_uldci(&UE->sc_info, + pusch_pdu, + &uldci_payload, + &sched_ctrl->srs_feedback, + tpmi, + sched_pusch->time_domain_allocation, + UE->UE_sched_ctrl.tpc0, + cur_harq->ndi, + current_BWP, + ss->searchSpaceType->present); + + // Reset TPC to 0 dB to not request new gain multiple times before computing new value for SNR + UE->UE_sched_ctrl.tpc0 = 1; + + fill_dci_pdu_rel15(&UE->sc_info, + &UE->current_DL_BWP, + current_BWP, + dci_pdu, + &uldci_payload, + current_BWP->dci_format, + TYPE_C_RNTI_, + current_BWP->bwp_id, + ss, + coreset, + UE->pdsch_HARQ_ACK_Codebook, + nr_mac->cset0_bwp_size); +} + static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t slot) { gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; @@ -2442,21 +2653,14 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_ ul_dci_req->SFN = frame; ul_dci_req->Slot = slot; - /* a PDCCH PDU groups DCIs per BWP and CORESET. Save a pointer to each - * allocated PDCCH so we can easily allocate UE's DCIs independent of any - * CORESET order */ - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_coreset[MAX_NUM_CORESET] = {0}; + post_process_pusch_t pusch = { frame, slot, ul_dci_req }; - - NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels[0].ServingCellConfigCommon; NR_UEs_t *UE_info = &nr_mac->UE_info; UE_iterator(UE_info->connected_ue_list, UE) { NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; if (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) continue; - NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; - UE->mac_stats.ul.current_bytes = 0; UE->mac_stats.ul.current_rbs = 0; @@ -2467,223 +2671,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_ if (sched_pusch->rbSize <= 0) continue; - uint16_t rnti = UE->rnti; - sched_ctrl->SR = false; - int8_t harq_id = sched_pusch->ul_harq_pid; - if (harq_id < 0) { - /* PP has not selected a specific HARQ Process, get a new one */ - harq_id = sched_ctrl->available_ul_harq.head; - AssertFatal(harq_id >= 0, - "no free HARQ process available for UE %04x\n", - UE->rnti); - remove_front_nr_list(&sched_ctrl->available_ul_harq); - sched_pusch->ul_harq_pid = harq_id; - } else { - /* PP selected a specific HARQ process. Check whether it will be a new - * transmission or a retransmission, and remove from the corresponding - * list */ - if (sched_ctrl->ul_harq_processes[harq_id].round == 0) - remove_nr_list(&sched_ctrl->available_ul_harq, harq_id); - else - remove_nr_list(&sched_ctrl->retrans_ul_harq, harq_id); - } - NR_UE_ul_harq_t *cur_harq = &sched_ctrl->ul_harq_processes[harq_id]; - DevAssert(!cur_harq->is_waiting); - if (nr_mac->radio_config.disable_harq) { - finish_nr_ul_harq(sched_ctrl, harq_id); - } else { - add_tail_nr_list(&sched_ctrl->feedback_ul_harq, harq_id); - cur_harq->feedback_slot = sched_pusch->slot; - cur_harq->is_waiting = true; - } - - /* Statistics */ - AssertFatal(cur_harq->round < nr_mac->ul_bler.harq_round_max, "Indexing ulsch_rounds[%d] is out of bounds\n", cur_harq->round); - UE->mac_stats.ul.rounds[cur_harq->round]++; - if (cur_harq->round == 0) { - UE->mac_stats.ulsch_total_bytes_scheduled += sched_pusch->tb_size; - /* Save information on MCS, TBS etc for the current initial transmission - * so we have access to it when retransmitting */ - cur_harq->sched_pusch = *sched_pusch; - /* save which time allocation and nrOfLayers have been used, to be used on - * retransmissions */ - cur_harq->sched_pusch.time_domain_allocation = sched_pusch->time_domain_allocation; - cur_harq->sched_pusch.nrOfLayers = sched_pusch->nrOfLayers; - cur_harq->sched_pusch.tpmi = sched_pusch->tpmi; - sched_ctrl->sched_ul_bytes += sched_pusch->tb_size; - UE->mac_stats.ul.total_rbs += sched_pusch->rbSize; - - } else { - LOG_D(NR_MAC, - "%d.%2d UL retransmission RNTI %04x sched %d.%2d HARQ PID %d round %d NDI %d\n", - frame, - slot, - rnti, - sched_pusch->frame, - sched_pusch->slot, - harq_id, - cur_harq->round, - cur_harq->ndi); - UE->mac_stats.ul.total_rbs_retx += sched_pusch->rbSize; - } - UE->mac_stats.ul.current_bytes = sched_pusch->tb_size; - UE->mac_stats.ul.current_rbs = sched_pusch->rbSize; - sched_ctrl->last_ul_frame = sched_pusch->frame; - sched_ctrl->last_ul_slot = sched_pusch->slot; - - LOG_D(NR_MAC, - "ULSCH/PUSCH: %4d.%2d RNTI %04x UL sched %4d.%2d DCI L %d start %2d RBS %3d startSymbol %2d nb_symbol %2d dmrs_pos %x MCS Table %2d MCS %2d nrOfLayers %2d num_dmrs_cdm_grps_no_data %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d est %6d sched %6d est BSR %6d TPC %d\n", - frame, - slot, - rnti, - sched_pusch->frame, - sched_pusch->slot, - sched_ctrl->aggregation_level, - sched_pusch->rbStart, - sched_pusch->rbSize, - sched_pusch->tda_info.startSymbolIndex, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.ul_dmrs_symb_pos, - current_BWP->mcs_table, - sched_pusch->mcs, - sched_pusch->nrOfLayers, - sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data, - sched_pusch->tb_size, - harq_id, - cur_harq->round, - nr_get_rv(cur_harq->round % 4), - cur_harq->ndi, - sched_ctrl->estimated_ul_buffer, - sched_ctrl->sched_ul_bytes, - sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, - sched_ctrl->tpc0); - - /* PUSCH in a later slot, but corresponding DCI now! */ - const int index = ul_buffer_index(sched_pusch->frame, - sched_pusch->slot, - nr_mac->frame_structure.numb_slots_frame, - nr_mac->UL_tti_req_ahead_size); - nfapi_nr_ul_tti_request_t *future_ul_tti_req = &nr_mac->UL_tti_req_ahead[0][index]; - if (future_ul_tti_req->SFN != sched_pusch->frame || future_ul_tti_req->Slot != sched_pusch->slot) - LOG_W(NR_MAC, - "%d.%d future UL_tti_req's frame.slot %d.%d does not match PUSCH %d.%d\n", - frame, slot, - future_ul_tti_req->SFN, - future_ul_tti_req->Slot, - sched_pusch->frame, - sched_pusch->slot); - AssertFatal(future_ul_tti_req->n_pdus < - sizeof(future_ul_tti_req->pdus_list) / sizeof(future_ul_tti_req->pdus_list[0]), - "Invalid future_ul_tti_req->n_pdus %d\n", future_ul_tti_req->n_pdus); - - future_ul_tti_req->pdus_list[future_ul_tti_req->n_pdus].pdu_type = NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE; - future_ul_tti_req->pdus_list[future_ul_tti_req->n_pdus].pdu_size = sizeof(nfapi_nr_pusch_pdu_t); - nfapi_nr_pusch_pdu_t *pusch_pdu = prepare_pusch_pdu(future_ul_tti_req, - UE, - scc, - sched_pusch, - current_BWP->transform_precoding, - harq_id, - cur_harq->round, - current_BWP->pusch_Config && current_BWP->pusch_Config->frequencyHopping, - rnti); - future_ul_tti_req->n_pdus += 1; - - LOG_D(NR_MAC, - "%4d.%2d Scheduling UE specific PUSCH for sched %d.%d, ul_tti_req %d.%d\n", - frame, - slot, - sched_pusch->frame, - sched_pusch->slot, - future_ul_tti_req->SFN, - future_ul_tti_req->Slot); - - - // Calacualte the normalized tx_power for PHR - long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; - int tbs_bits = pusch_pdu->pusch_data.tb_size << 3; - sched_pusch->phr_txpower_calc = compute_ph_factor(current_BWP->scs, - tbs_bits, - sched_pusch->rbSize, - sched_pusch->nrOfLayers, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, - deltaMCS, - false); - - /* look up the PDCCH PDU for this BWP and CORESET. If it does not exist, - * create it */ - NR_SearchSpace_t *ss = sched_ctrl->search_space; - NR_ControlResourceSet_t *coreset = sched_ctrl->coreset; - const int coresetid = coreset->controlResourceSetId; - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu = pdcch_pdu_coreset[coresetid]; - if (!pdcch_pdu) { - nfapi_nr_ul_dci_request_pdus_t *ul_dci_request_pdu = &ul_dci_req->ul_dci_pdu_list[ul_dci_req->numPdus]; - memset(ul_dci_request_pdu, 0, sizeof(nfapi_nr_ul_dci_request_pdus_t)); - ul_dci_request_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; - ul_dci_request_pdu->PDUSize = (uint8_t)(4+sizeof(nfapi_nr_dl_tti_pdcch_pdu)); - pdcch_pdu = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15; - ul_dci_req->numPdus += 1; - nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch); - pdcch_pdu_coreset[coresetid] = pdcch_pdu; - } - - LOG_D(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %04x\n", frame,slot,sched_ctrl->cce_index,rnti); - - /* Fill PDCCH DL DCI PDU */ - nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu, - scc, - ss, - coreset, - sched_ctrl->aggregation_level, - sched_ctrl->cce_index, - UE->UE_beam_index, - rnti); - pdcch_pdu->numDlDci++; - - dci_pdu_rel15_t uldci_payload; - memset(&uldci_payload, 0, sizeof(uldci_payload)); - if (current_BWP->dci_format == NR_UL_DCI_FORMAT_0_1) - LOG_D(NR_MAC_DCI, - "add ul dci harq %d for %d.%d %d.%d round %d\n", - harq_id, - frame, - slot, - sched_pusch->frame, - sched_pusch->slot, - sched_ctrl->ul_harq_processes[harq_id].round); - - // If nrOfLayers is the same as in srs_feedback, we use the best TPMI, i.e. the one in srs_feedback. - // Otherwise, we use the valid TPMI that we saved in the first transmission. - int *tpmi = NULL; - if (pusch_pdu->nrOfLayers != (sched_ctrl->srs_feedback.ul_ri + 1)) - tpmi = &sched_pusch->tpmi; - config_uldci(&UE->sc_info, - pusch_pdu, - &uldci_payload, - &sched_ctrl->srs_feedback, - tpmi, - sched_pusch->time_domain_allocation, - UE->UE_sched_ctrl.tpc0, - cur_harq->ndi, - current_BWP, - ss->searchSpaceType->present); - - // Reset TPC to 0 dB to not request new gain multiple times before computing new value for SNR - UE->UE_sched_ctrl.tpc0 = 1; - - fill_dci_pdu_rel15(&UE->sc_info, - &UE->current_DL_BWP, - current_BWP, - dci_pdu, - &uldci_payload, - current_BWP->dci_format, - TYPE_C_RNTI_, - current_BWP->bwp_id, - ss, - coreset, - UE->pdsch_HARQ_ACK_Codebook, - nr_mac->cset0_bwp_size); + post_process_ulsch(nr_mac, &pusch, UE, sched_pusch); memset(sched_pusch, 0, sizeof(*sched_pusch)); } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 84be6f4b5a..38ce8c2080 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -797,6 +797,17 @@ typedef struct { #define UE_iterator(BaSe, VaR) NR_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++))) +typedef struct { + /// current frame for DCI + frame_t frame; + /// current slot for DCI + slot_t slot; + /// FAPI UL_DCI.request in which allocations are to be made + nfapi_nr_ul_dci_request_t *ul_dci_req; + /// group PDCCH PDU per CORESET + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_coreset[MAX_NUM_CORESET]; +} post_process_pusch_t; + typedef void (*nr_pp_impl_dl)(module_id_t mod_id, frame_t frame, slot_t slot); typedef bool (*nr_pp_impl_ul)(module_id_t mod_id, frame_t frame, slot_t slot); From fcebec09adce9c25efee1c792f9bb49884a533b8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 09:20:31 +0200 Subject: [PATCH 007/112] Read TX power from HARQ.sched_pusch A later commit will remove sched_ctrl->sched_pusch. Instead, the TX power is also stored for each HARQ process (as they contain sched_pusch). Read it from there, which should have the same effect. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index f6badf62eb..50958e0643 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -660,6 +660,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, rnti_t rnti, uint8_t *sdu, const uint32_t sdu_len, + uint8_t harq_pid, const uint16_t timing_advance, const uint8_t ul_cqi, const uint16_t rssi) @@ -725,9 +726,11 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, LOG_A(NR_MAC, "%4d.%2d PUSCH with TC_RNTI 0x%04x received correctly\n", frame, slot, rnti); NR_UE_sched_ctrl_t *UE_scheduling_control = &UE->UE_sched_ctrl; + DevAssert(harq_pid >= 0 && harq_pid < 8); if (ul_cqi != 0xff) { - UE_scheduling_control->tpc0 = nr_get_tpc(target_snrx10, ul_cqi, 30, UE_scheduling_control->sched_pusch.phr_txpower_calc); - UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640 - UE_scheduling_control->sched_pusch.phr_txpower_calc * 10; + NR_UE_ul_harq_t *harq = &UE_scheduling_control->ul_harq_processes[harq_pid]; + UE_scheduling_control->tpc0 = nr_get_tpc(target_snrx10, ul_cqi, 30, harq->sched_pusch.phr_txpower_calc); + UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640 - harq->sched_pusch.phr_txpower_calc * 10; } if (timing_advance != 0xffff) UE_scheduling_control->ta_update = timing_advance; @@ -943,7 +946,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, } handle_nr_ul_harq(gNB_mac, UE, frameP, slotP, current_rnti, harq_pid, sduP == NULL); } else { - nr_rx_ra_sdu(gnb_mod_idP, CC_idP, frameP, slotP, current_rnti, sduP, sdu_lenP, timing_advance, ul_cqi, rssi); + nr_rx_ra_sdu(gnb_mod_idP, CC_idP, frameP, slotP, current_rnti, sduP, sdu_lenP, harq_pid, timing_advance, ul_cqi, rssi); } } From 243e956ee9793df6b98f5cadf9421c7085193f64 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 10:46:56 +0200 Subject: [PATCH 008/112] Remove unused parameter from sched_pusch --- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 38ce8c2080..ea7d80a214 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -403,7 +403,6 @@ typedef struct NR_pusch_dmrs { typedef struct NR_sched_pusch { int frame; int slot; - int mu; /// RB allocation within active uBWP uint16_t rbSize; From f3068caa3774e121fb815ee2e9dbd3a6bc970f93 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 10:38:44 +0200 Subject: [PATCH 009/112] Store selected MCS in UE iterator PF uses MCS and average throughput to decide which UE to schedule. Thus, the first loop selects the MCS, and the second does the main UE allocation after sorting by priority, depending on the MCS. A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t. Thus, we cannot rely on sched_ctrl to store the MCS in the first loop, and look it up from there in the second. Instead, store it as part of the UE iterator data, and take it from there. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 50958e0643..aaabf7847e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1839,6 +1839,7 @@ static uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF typedef struct UEsched_s { float coef; NR_UE_info_t * UE; + int selected_mcs; } UEsched_t; static int comparator(const void *p, const void *q) { @@ -1964,12 +1965,12 @@ static void pf_ul(module_id_t module_id, const NR_bler_options_t *bo = &nrmac->ul_bler; const int max_mcs_table = (current_BWP->mcs_table == 0 || current_BWP->mcs_table == 2) ? 28 : 27; const int max_mcs = min(bo->max_mcs, max_mcs_table); /* no per-user maximum MCS yet */ + int selected_mcs; if (bo->harq_round_max == 1) { - sched_pusch->mcs = max_mcs; - sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; + selected_mcs = sched_ctrl->ul_bler_stats.mcs = max_mcs; } else { - sched_pusch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); - LOG_D(NR_MAC, "%d.%d starting mcs %d bler %f\n", frame, slot, sched_pusch->mcs, sched_ctrl->ul_bler_stats.bler); + selected_mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); + LOG_D(NR_MAC, "%d.%d starting mcs %d bler %f\n", frame, slot, selected_mcs, sched_ctrl->ul_bler_stats.bler); } /* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled * based on data to transmit) */ @@ -2032,6 +2033,7 @@ static void pf_ul(module_id_t module_id, fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; + sched_pusch->mcs = selected_mcs; update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm); sched_pusch->rbStart = rbStart; sched_pusch->rbSize = min_rb; @@ -2077,7 +2079,7 @@ static void pf_ul(module_id_t module_id, /* Create UE_sched for UEs eligibale for new data transmission*/ /* Calculate coefficient*/ - const uint32_t tbs = ul_pf_tbs[current_BWP->mcs_table][sched_pusch->mcs]; + const uint32_t tbs = ul_pf_tbs[current_BWP->mcs_table][selected_mcs]; float coeff_ue = (float) tbs / UE->ul_thr_ue; LOG_D(NR_MAC, "[UE %04x][%4d.%2d] b %d, ul_thr_ue %f, tbs %d, coeff_ue %f\n", UE->rnti, @@ -2089,6 +2091,7 @@ static void pf_ul(module_id_t module_id, coeff_ue); UE_sched[curUE].coef = coeff_ue; UE_sched[curUE].UE = UE; + UE_sched[curUE].selected_mcs = selected_mcs; curUE++; } @@ -2192,6 +2195,7 @@ static void pf_ul(module_id_t module_id, /* Calculate the current scheduling bytes */ const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0); + sched_pusch->mcs = iterator->selected_mcs; /* adjust rbSize and MCS according to PHR and BPRE */ if(sched_ctrl->pcmax != 0 || sched_ctrl->ph != 0) // verify if the PHR related parameter have been initialized nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, sched_pusch, current_BWP, min_rb, B, &max_rbSize, &sched_pusch->mcs); From 81b66fae5e7fb6f9090aec83d26af07ba57dac7d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 10:51:56 +0200 Subject: [PATCH 010/112] UL harq PID: similar to parent, reduce scope of sched_pusch --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index aaabf7847e..4007d0edea 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1826,6 +1826,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, sched_pusch->bwp_info = bwp_info; sched_pusch->rbStart = rbStart; + sched_pusch->ul_harq_pid = harq_pid; /* no need to recompute the TBS, it will be the same */ /* Mark the corresponding RBs as used */ @@ -1908,9 +1909,9 @@ static void pf_ul(module_id_t module_id, uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; /* Check if retransmission is necessary */ - sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head; - LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n", UE->rnti, sched_pusch->ul_harq_pid); - if (sched_pusch->ul_harq_pid >= 0) { + int ul_harq_pid = sched_ctrl->retrans_ul_harq.head; + LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n", UE->rnti, ul_harq_pid); + if (ul_harq_pid >= 0) { /* Allocate retransmission*/ const int tda = get_ul_tda(nrmac, sched_frame, sched_slot); bool r = allocate_ul_retransmission(nrmac, @@ -1920,7 +1921,7 @@ static void pf_ul(module_id_t module_id, &n_rb_sched[beam.idx], dci_beam.idx, UE, - sched_pusch->ul_harq_pid, + ul_harq_pid, scc, tda); if (!r) { @@ -1936,6 +1937,7 @@ static void pf_ul(module_id_t module_id, remainUEs[beam.idx]--; continue; } + DevAssert(ul_harq_pid == -1); // all other allocations must be new ones /* skip this UE if there are no free HARQ processes. This can happen e.g. * if the UE disconnected in L2sim, in which case the gNB is not notified @@ -2040,6 +2042,7 @@ static void pf_ul(module_id_t module_id, sched_pusch->bwp_info = bwp_info; sched_pusch->frame = sched_frame; sched_pusch->slot = sched_slot; + sched_pusch->ul_harq_pid = -1; // new transmission sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm, sched_pusch->R, sched_pusch->rbSize, @@ -2236,6 +2239,7 @@ static void pf_ul(module_id_t module_id, sched_pusch->bwp_info = bwp_info; sched_pusch->frame = sched_frame; sched_pusch->slot = sched_slot; + sched_pusch->ul_harq_pid = -1; // new transmission LOG_D(NR_MAC, "rbSize %d (max_rbSize %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n", rbSize, From 5b39baacc3cfd0d8e034c75ef4d3def506278b2b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 11:02:59 +0200 Subject: [PATCH 011/112] Refactor inactivity-based PUSCH allocation Write a single NR_sched_pusch_t structure in a single statement (where possible). Assign to sched_ctrl->sched_pusch in one place, where the post-processing functionality will be called in a follow-up commit. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 104 +++++++++--------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 4007d0edea..afa7bb5a68 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1879,7 +1879,6 @@ static void pf_ul(module_id_t module_id, LOG_D(NR_MAC,"pf_ul: preparing UL scheduling for UE %04x\n",UE->rnti); NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; const NR_mac_dir_stats_t *stats = &UE->mac_stats.ul; /* Calculate throughput */ @@ -1995,29 +1994,21 @@ static void pf_ul(module_id_t module_id, continue; } - sched_pusch->nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); - sched_pusch->time_domain_allocation = get_ul_tda(nrmac, sched_frame, sched_slot); - sched_pusch->tda_info = get_ul_tda_info(current_BWP, + int tda = get_ul_tda(nrmac, sched_frame, sched_slot); + NR_tda_info_t tda_info = get_ul_tda_info(current_BWP, sched_ctrl->coreset->controlResourceSetId, sched_ctrl->search_space->searchSpaceType->present, TYPE_C_RNTI_, - sched_pusch->time_domain_allocation); - AssertFatal(sched_pusch->tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - sched_pusch->dmrs_info = get_ul_dmrs_params(scc, current_BWP, &sched_pusch->tda_info, sched_pusch->nrOfLayers); + tda); + AssertFatal(tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); int rbStart = 0; // wrt BWP start - LOG_D(NR_MAC, - "Looking for min_rb %d RBs, starting at %d num_dmrs_cdm_grps_no_data %d\n", - min_rb, - rbStart, - sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data); - bwp_info_t bwp_info = get_pusch_bwp_start_size(UE); - const uint32_t bwpStart = bwp_info.bwpStart; - const uint32_t bwpSize = bwp_info.bwpSize; - const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); - while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) + LOG_D(NR_MAC, "Looking for min_rb %d RBs, starting at %d\n", min_rb, rbStart); + bwp_info_t bi = get_pusch_bwp_start_size(UE); + const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); + while (rbStart < bi.bwpSize && (rballoc_mask[rbStart + bi.bwpStart] & slbitmap)) rbStart++; - if (rbStart + min_rb > bwpSize) { + if (rbStart + min_rb > bi.bwpSize) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate continuous UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", UE->rnti, @@ -2025,7 +2016,7 @@ static void pf_ul(module_id_t module_id, slot, rbStart, min_rb, - bwpSize); + bi.bwpSize); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_per_frame, beam.new_beam); reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); continue; @@ -2034,47 +2025,58 @@ static void pf_ul(module_id_t module_id, sched_ctrl->cce_index = CCEIndex; fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; - sched_pusch->mcs = selected_mcs; - update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm); - sched_pusch->rbStart = rbStart; - sched_pusch->rbSize = min_rb; - sched_pusch->bwp_info = bwp_info; - sched_pusch->frame = sched_frame; - sched_pusch->slot = sched_slot; - sched_pusch->ul_harq_pid = -1; // new transmission - sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm, - sched_pusch->R, - sched_pusch->rbSize, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, - 0, // nb_rb_oh - 0, - sched_pusch->nrOfLayers) >> 3; + int nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); + NR_sched_pusch_t sched = { + .frame = sched_frame, + .slot = sched_slot, + .rbSize = min_rb, + .rbStart = rbStart, + .mcs = selected_mcs, + // R, Qm, tb_size below + .ul_harq_pid = -1, // new transmission + .nrOfLayers = nrOfLayers, + // tpmi in post-process + .time_domain_allocation = tda, + .tda_info = tda_info, + .dmrs_info = get_ul_dmrs_params(scc, current_BWP, &tda_info, nrOfLayers), + .bwp_info = bi, + // phr_txpower_calc below + }; + update_ul_ue_R_Qm(sched.mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched.R, &sched.Qm); + sched.tb_size = nr_compute_tbs(sched.Qm, + sched.R, + sched.rbSize, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + 0, // nb_rb_oh + 0, + sched.nrOfLayers) + >> 3; long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; - sched_pusch->phr_txpower_calc = compute_ph_factor(current_BWP->scs, - sched_pusch->tb_size << 3, - sched_pusch->rbSize, - sched_pusch->nrOfLayers, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, - deltaMCS, - false); + sched.phr_txpower_calc = compute_ph_factor(current_BWP->scs, + sched.tb_size << 3, + sched.rbSize, + sched.nrOfLayers, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + deltaMCS, + false); + sched_ctrl->sched_pusch = sched; LOG_D(NR_MAC, "pf_ul %d.%d UE %x Scheduling PUSCH (no data) nrb %d mcs %d tbs %d bits phr_txpower %d\n", frame, slot, UE->rnti, - sched_pusch->rbSize, - sched_pusch->mcs, - sched_pusch->tb_size << 3, - sched_pusch->phr_txpower_calc); + sched.rbSize, + sched.mcs, + sched.tb_size << 3, + sched.phr_txpower_calc); /* Mark the corresponding RBs as used */ - n_rb_sched[beam.idx] -= sched_pusch->rbSize; - for (int rb = bwpStart; rb < sched_ctrl->sched_pusch.rbSize; rb++) - rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] |= slbitmap; + n_rb_sched[beam.idx] -= sched.rbSize; + for (int rb = bi.bwpStart; rb < sched.rbSize; rb++) + rballoc_mask[rb + sched.rbStart] |= slbitmap; remainUEs[beam.idx]--; continue; From a469f420857141563588c5cacc3ad0f674b6af63 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 11:32:45 +0200 Subject: [PATCH 012/112] Refactor retransmission's NR_sched_pusch_t usage Avoid to overwrite the existing retInfo. Instead, create a new NR_sched_pusch_t and assign to sched_ctrl->sched_pusch in one place. A follow-up commit will directly trigger the post processor here. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index afa7bb5a68..c5f74fe25e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1712,7 +1712,9 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, { const int CC_id = 0; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; + /* Get previous PUSCH field info */ + const NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; + NR_sched_pusch_t new_sched = *retInfo; // potential new allocation NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; int rbStart = 0; // wrt BWP start @@ -1721,7 +1723,6 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, const uint32_t bwpStart = bwp_info.bwpStart; const uint8_t nrOfLayers = retInfo->nrOfLayers; LOG_D(NR_MAC,"retInfo->time_domain_allocation = %d, tda = %d\n", retInfo->time_domain_allocation, tda); - LOG_D(NR_MAC,"tbs %d\n",retInfo->tb_size); NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, sched_ctrl->coreset->controlResourceSetId, sched_ctrl->search_space->searchSpaceType->present, @@ -1730,6 +1731,13 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, if (!tda_info.valid_tda) return false; + /* mark when retransmission will happen */ + int slots_frame = nrmac->frame_structure.numb_slots_frame; + new_sched.frame = (frame + (slot + tda_info.k2 + get_NTN_Koffset(scc)) / slots_frame) % MAX_FRAME_NUMBER; + new_sched.slot = (slot + tda_info.k2 + get_NTN_Koffset(scc)) % slots_frame; + new_sched.bwp_info = bwp_info; + DevAssert(new_sched.ul_harq_pid == harq_pid); + bool reuse_old_tda = (retInfo->tda_info.startSymbolIndex == tda_info.startSymbolIndex) && (retInfo->tda_info.nrOfSymbols <= tda_info.nrOfSymbols); if (reuse_old_tda && nrOfLayers == retInfo->nrOfLayers) { /* Check the resource is enough for retransmission */ @@ -1746,6 +1754,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, bwpSize); return false; } + new_sched.rbStart = rbStart; LOG_D(NR_MAC, "Retransmission keeping TDA %d and TBS %d\n", tda, retInfo->tb_size); } else { NR_pusch_dmrs_t dmrs_info = get_ul_dmrs_params(scc, ul_bwp, &tda_info, nrOfLayers); @@ -1782,11 +1791,12 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, LOG_D(NR_MAC, "Retransmission with TDA %d->%d and TBS %d -> %d\n", retInfo->time_domain_allocation, tda, retInfo->tb_size, new_tbs); /* we can allocate it. Overwrite the time_domain_allocation, the number * of RBs, and the new TB size. The rest is done below */ - retInfo->tb_size = new_tbs; - retInfo->rbSize = new_rbSize; - retInfo->time_domain_allocation = tda; - retInfo->dmrs_info = dmrs_info; - retInfo->tda_info = tda_info; + new_sched.rbSize = new_rbSize; + new_sched.rbStart = rbStart; + new_sched.tb_size = new_tbs; + new_sched.time_domain_allocation = tda; + new_sched.tda_info = tda_info; + new_sched.dmrs_info = dmrs_info; } /* Find a free CCE */ @@ -1808,31 +1818,22 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, sched_ctrl->cce_index = CCEIndex; fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam_idx); - int slots_frame = nrmac->frame_structure.numb_slots_frame; - retInfo->frame = (frame + (slot + tda_info.k2 + get_NTN_Koffset(scc)) / slots_frame) % MAX_FRAME_NUMBER; - retInfo->slot = (slot + tda_info.k2 + get_NTN_Koffset(scc)) % slots_frame; - /* Get previous PSUCH field info */ - sched_ctrl->sched_pusch = *retInfo; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; + // signal new allocation + sched_ctrl->sched_pusch = new_sched; LOG_D(NR_MAC, "%4d.%2d Allocate UL retransmission RNTI %04x sched %4d.%2d (%d RBs)\n", frame, slot, UE->rnti, - sched_pusch->frame, - sched_pusch->slot, - sched_pusch->rbSize); - - sched_pusch->bwp_info = bwp_info; - sched_pusch->rbStart = rbStart; - sched_pusch->ul_harq_pid = harq_pid; - /* no need to recompute the TBS, it will be the same */ + new_sched.frame, + new_sched.slot, + new_sched.rbSize); /* Mark the corresponding RBs as used */ - n_rb_sched -= sched_pusch->rbSize; - for (int rb = bwpStart; rb < sched_ctrl->sched_pusch.rbSize; rb++) - rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] |= SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); + n_rb_sched -= new_sched.rbSize; + for (int rb = bwpStart; rb < new_sched.rbSize; rb++) + rballoc_mask[rb + new_sched.rbStart] |= SL_to_bitmap(new_sched.tda_info.startSymbolIndex, new_sched.tda_info.nrOfSymbols); return true; } From 4772dd889ebf1323c7278ea2409a37d15603855d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 11:51:23 +0200 Subject: [PATCH 013/112] Refactor ULSCH main allocation procedure Write a single NR_sched_pusch_t structure in a single statement (where possible). Assign to sched_ctrl->sched_pusch in one place, where the post-processing functionality will be called in a follow-up commit. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 118 +++++++++--------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c5f74fe25e..493c2a37e0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2108,7 +2108,6 @@ static void pf_ul(module_id_t module_id, while (iterator->UE != NULL) { NR_UE_UL_BWP_t *current_BWP = &iterator->UE->current_UL_BWP; NR_UE_sched_ctrl_t *sched_ctrl = &iterator->UE->UE_sched_ctrl; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, sched_frame, sched_slot, iterator->UE->UE_beam_index, slots_per_frame); if (beam.idx < 0) { @@ -2152,33 +2151,28 @@ static void pf_ul(module_id_t module_id, LOG_D(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n", frame, slot, iterator->UE->rnti); - - sched_pusch->nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); - sched_pusch->time_domain_allocation = get_ul_tda(nrmac, sched_frame, sched_slot); - sched_pusch->tda_info = get_ul_tda_info(current_BWP, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_, - sched_pusch->time_domain_allocation); - AssertFatal(sched_pusch->tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - sched_pusch->dmrs_info = get_ul_dmrs_params(scc, current_BWP, &sched_pusch->tda_info, sched_pusch->nrOfLayers); + int tda = get_ul_tda(nrmac, sched_frame, sched_slot); + NR_tda_info_t tda_info = get_ul_tda_info(current_BWP, + sched_ctrl->coreset->controlResourceSetId, + sched_ctrl->search_space->searchSpaceType->present, + TYPE_C_RNTI_, + tda); + AssertFatal(tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); const int index = ul_buffer_index(sched_frame, sched_slot, slots_per_frame, nrmac->vrb_map_UL_size); uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; + /* find maximum amount of RBs that we can schedule starting from first free RB */ int rbStart = 0; - const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); - bwp_info_t bwp_info = get_pusch_bwp_start_size(iterator->UE); - const uint32_t bwpStart = bwp_info.bwpStart; - const uint32_t bwpSize = bwp_info.bwpSize; - while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) + const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); + bwp_info_t bi = get_pusch_bwp_start_size(iterator->UE); + while (rbStart < bi.bwpSize && (rballoc_mask[rbStart + bi.bwpStart] & slbitmap)) rbStart++; - sched_pusch->rbStart = rbStart; uint16_t max_rbSize = 1; - while (rbStart + max_rbSize < bwpSize && !(rballoc_mask[rbStart + bwpStart + max_rbSize] & slbitmap)) + while (rbStart + max_rbSize < bi.bwpSize && !(rballoc_mask[rbStart + bi.bwpStart + max_rbSize] & slbitmap)) max_rbSize++; - if (rbStart + min_rb > bwpSize || max_rbSize < min_rb) { + if (rbStart + min_rb > bi.bwpSize || max_rbSize < min_rb) { reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, iterator->UE->UE_beam_index, slots_per_frame, beam.new_beam); LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", @@ -2187,7 +2181,7 @@ static void pf_ul(module_id_t module_id, slot, rbStart, min_rb, - bwpSize); + bi.bwpSize); iterator++; continue; } else @@ -2197,72 +2191,82 @@ static void pf_ul(module_id_t module_id, rbStart, min_rb, max_rbSize, - bwpSize); + bi.bwpSize); + + int nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); + NR_sched_pusch_t sched = { + .frame = sched_frame, + .slot = sched_slot, + // rbSize set further below + .rbStart = rbStart, + .mcs = iterator->selected_mcs, + // R, Qm, tb_size set further below + .ul_harq_pid = -1, // new transmission + .nrOfLayers = nrOfLayers, + // tpmi in post-process + .time_domain_allocation = tda, + .tda_info = tda_info, + .dmrs_info = get_ul_dmrs_params(scc, current_BWP, &tda_info, nrOfLayers), + .bwp_info = bi, + // phr_txpower_calc below + }; /* Calculate the current scheduling bytes */ const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0); - sched_pusch->mcs = iterator->selected_mcs; /* adjust rbSize and MCS according to PHR and BPRE */ if(sched_ctrl->pcmax != 0 || sched_ctrl->ph != 0) // verify if the PHR related parameter have been initialized - nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, sched_pusch, current_BWP, min_rb, B, &max_rbSize, &sched_pusch->mcs); + nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, &sched, current_BWP, min_rb, B, &max_rbSize, &sched.mcs); - if (sched_pusch->mcs < sched_ctrl->ul_bler_stats.mcs) - sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; /* force estimated MCS down */ + if (sched.mcs < sched_ctrl->ul_bler_stats.mcs) + sched_ctrl->ul_bler_stats.mcs = sched.mcs; /* force estimated MCS down */ - update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm); - uint16_t rbSize = 0; - uint32_t TBS = 0; - nr_find_nb_rb(sched_pusch->Qm, - sched_pusch->R, + update_ul_ue_R_Qm(sched.mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched.R, &sched.Qm); + nr_find_nb_rb(sched.Qm, + sched.R, current_BWP->transform_precoding, - sched_pusch->nrOfLayers, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, + sched.nrOfLayers, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, B, min_rb, max_rbSize, - &TBS, - &rbSize); + &sched.tb_size, + &sched.rbSize); // Calacualte the normalized tx_power for PHR long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; - int tbs_bits = TBS << 3; + int tbs_bits = sched.tb_size << 3; - sched_pusch->phr_txpower_calc = compute_ph_factor(current_BWP->scs, - tbs_bits, - rbSize, - sched_pusch->nrOfLayers, - sched_pusch->tda_info.nrOfSymbols, - sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, - deltaMCS, - false); + sched.phr_txpower_calc = compute_ph_factor(current_BWP->scs, + tbs_bits, + sched.rbSize, + sched.nrOfLayers, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + deltaMCS, + false); - sched_pusch->rbSize = rbSize; - sched_pusch->tb_size = TBS; - sched_pusch->bwp_info = bwp_info; - sched_pusch->frame = sched_frame; - sched_pusch->slot = sched_slot; - sched_pusch->ul_harq_pid = -1; // new transmission LOG_D(NR_MAC, "rbSize %d (max_rbSize %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n", - rbSize, + sched.rbSize, max_rbSize, - sched_pusch->tb_size, + sched.tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B, sched_ctrl->cce_index, - sched_pusch->dmrs_info.num_dmrs_symb, - sched_pusch->dmrs_info.N_PRB_DMRS); + sched.dmrs_info.num_dmrs_symb, + sched.dmrs_info.N_PRB_DMRS); /* Mark the corresponding RBs as used */ sched_ctrl->cce_index = CCEIndex; fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); - n_rb_sched[beam.idx] -= sched_pusch->rbSize; - for (int rb = bwpStart; rb < sched_ctrl->sched_pusch.rbSize; rb++) - rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] |= slbitmap; + sched_ctrl->sched_pusch = sched; + n_rb_sched[beam.idx] -= sched.rbSize; + for (int rb = bi.bwpStart; rb < sched.rbSize; rb++) + rballoc_mask[rb + sched.rbStart] |= slbitmap; /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ remainUEs[beam.idx]--; From d71cec79586c266c3a691ee719de8632bcc60ba1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 12:08:13 +0200 Subject: [PATCH 014/112] Refactor ULSCH phy-test scheduler Write a single NR_sched_pusch_t structure in a single statement (where possible). Assign to sched_ctrl->sched_pusch later, where the post-processing functionality will be called in a follow-up commit. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 81 +++++++++---------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index a470c48bc4..deaae2affb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -232,6 +232,11 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo return false; } + const int bw = ul_bwp->BWPSize; + const int BWPStart = ul_bwp->BWPStart; + uint16_t rbStart = 0; + uint16_t rbSize = min(bw, target_ul_bw); + NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList = get_ul_tdalist(ul_bwp, sched_ctrl->coreset->controlResourceSetId, sched_ctrl->search_space->searchSpaceType->present, @@ -259,17 +264,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo if (!is_xlsch_in_slot(ulsch_slot_bitmap, slot_period)) return false; - uint16_t rbStart = 0; - uint16_t rbSize; - - const int bw = ul_bwp->BWPSize; - const int BWPStart = ul_bwp->BWPStart; - - if (target_ul_bw>bw) - rbSize = bw; - else - rbSize = target_ul_bw; - NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, sched_ctrl->coreset->controlResourceSetId, sched_ctrl->search_space->searchSpaceType->present, @@ -277,8 +271,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo tda); if (!tda_info.valid_tda) return false; - sched_ctrl->sched_pusch.tda_info = tda_info; - sched_ctrl->sched_pusch.time_domain_allocation = tda; // TODO implement beam procedures for phy-test mode int beam = 0; @@ -292,9 +284,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo } } - sched_ctrl->sched_pusch.slot = sched_slot; - sched_ctrl->sched_pusch.frame = sched_frame; - int CCEIndex = get_cce_index(nr_mac, CC_id, slot, UE->rnti, &sched_ctrl->aggregation_level, @@ -311,40 +300,44 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo sched_ctrl->cce_index = CCEIndex; - const int mcs = target_ul_mcs; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; - sched_pusch->mcs = mcs; - sched_ctrl->ul_bler_stats.mcs = mcs; /* for logging output */ - sched_pusch->rbStart = rbStart; - sched_pusch->rbSize = rbSize; - /* get the PID of a HARQ process awaiting retransmission, or -1 for "any new" */ - sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head; + NR_sched_pusch_t sched = { + .frame = sched_frame, + .slot = sched_slot, + .rbSize = rbSize, + .rbStart = rbStart, + .mcs = target_ul_mcs, + // R, Qm, tb_size set further below + // PID of a HARQ process awaiting retransmission, or -1 for "any new" + .ul_harq_pid = sched_ctrl->retrans_ul_harq.head, + .nrOfLayers = target_ul_Nl, + // tpmi in post-process + .time_domain_allocation = tda, + .tda_info = tda_info, + .dmrs_info = get_ul_dmrs_params(scc, ul_bwp, &tda_info, target_ul_Nl), + .bwp_info = get_pusch_bwp_start_size(UE), + }; + sched_ctrl->ul_bler_stats.mcs = sched.mcs; /* for logging output */ /* Calculate TBS from MCS */ - sched_pusch->nrOfLayers = target_ul_Nl; - sched_pusch->R = nr_get_code_rate_ul(mcs, ul_bwp->mcs_table); - sched_pusch->Qm = nr_get_Qm_ul(mcs, ul_bwp->mcs_table); + sched.R = nr_get_code_rate_ul(sched.mcs, ul_bwp->mcs_table); + sched.Qm = nr_get_Qm_ul(sched.mcs, ul_bwp->mcs_table); if (ul_bwp->pusch_Config->tp_pi2BPSK - && ((ul_bwp->mcs_table == 3 && mcs < 2) || (ul_bwp->mcs_table == 4 && mcs < 6))) { - sched_pusch->R >>= 1; - sched_pusch->Qm <<= 1; + && ((ul_bwp->mcs_table == 3 && sched.mcs < 2) || (ul_bwp->mcs_table == 4 && sched.mcs < 6))) { + sched.R >>= 1; + sched.Qm <<= 1; } - NR_pusch_dmrs_t dmrs = get_ul_dmrs_params(scc, - ul_bwp, - &tda_info, - sched_pusch->nrOfLayers); - sched_ctrl->sched_pusch.dmrs_info = dmrs; + sched.tb_size = nr_compute_tbs(sched.Qm, + sched.R, + sched.rbSize, + tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + 0, // nb_rb_oh + 0, + sched.nrOfLayers /* NrOfLayers */) + >> 3; - sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm, - sched_pusch->R, - sched_pusch->rbSize, - tda_info.nrOfSymbols, - dmrs.N_PRB_DMRS * dmrs.num_dmrs_symb, - 0, // nb_rb_oh - 0, - sched_pusch->nrOfLayers /* NrOfLayers */) - >> 3; + sched_ctrl->sched_pusch = sched; /* mark the corresponding RBs as used */ fill_pdcch_vrb_map(nr_mac, From dd9803020227a230a799f22b29c167beedc0f842 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 17:23:52 +0200 Subject: [PATCH 015/112] Refactor to call post-processor in place Remove sched_ctrl->sched_ulsch, and call the post-processing function post_process_ulsch() in the places where sched_ctrl->sched_ulsch has been assigned. This will have two effects: - it is not necessary to have the final loop over all UEs, which might be costly especially towards many UEs. - till now, there is only a single sched_ulsch; however, a later commit will allow to schedule multiple PUSCH transmissions from a single (DL) slot. This would require to make sched_ctrl->sched_ulsch, and also iterate through all sched_ulsch. In this new scheme, we can simply call post_process_ulsch() multiple times, which is simpler (and therefore, implicitly handleded as of this commit). --- .../RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 27 +++--- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 1 - .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 92 ++++++++----------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 4 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 9 +- 6 files changed, 62 insertions(+), 73 deletions(-) diff --git a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c index 5a451cff01..13b6306a1c 100644 --- a/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c +++ b/openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c @@ -66,7 +66,7 @@ bool read_mac_sm(void* data) } if (is_ul_slot(rd->slot, &RC.nrmac[mod_id]->frame_structure)) { rd->ul_curr_tbs = UE->mac_stats.ul.current_bytes; - rd->ul_sched_rb = sched_ctrl->sched_pusch.rbSize; + rd->ul_sched_rb = UE->mac_stats.ul.current_rbs; } rd->rnti = UE->rnti; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index deaae2affb..6323ab4c6a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -208,9 +208,11 @@ uint32_t target_ul_mcs = 9; uint32_t target_ul_bw = 50; uint32_t target_ul_Nl = 1; uint64_t ulsch_slot_bitmap = (1 << 8); -bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slot) +void nr_ul_preprocessor_phytest(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch) { - gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; + int frame = pp_pusch->frame; + int slot = pp_pusch->slot; + /* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */ NR_COMMON_channels_t *cc = nr_mac->common_channels; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; @@ -219,7 +221,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo AssertFatal(nr_mac->UE_info.connected_ue_list[1] == NULL, "cannot handle more than one UE\n"); if (UE == NULL) - return false; + return; const int CC_id = 0; @@ -229,7 +231,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo /* return if all UL HARQ processes wait for feedback */ if (sched_ctrl->retrans_ul_harq.head == -1 && sched_ctrl->available_ul_harq.head == -1) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] UE has no free UL HARQ process, skipping\n", UE->rnti, frame, slot); - return false; + return; } const int bw = ul_bwp->BWPSize; @@ -243,7 +245,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo TYPE_C_RNTI_); const int temp_tda = get_ul_tda(nr_mac, frame, slot); if (temp_tda < 0) - return false; + return; AssertFatal(temp_tda < tdaList->list.count, "time domain assignment %d >= %d\n", temp_tda, tdaList->list.count); const int mu = ul_bwp->scs; int K2 = get_K2(tdaList, temp_tda, mu, scc); @@ -252,17 +254,18 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo const int sched_slot = (slot + K2) % slots_frame; const int tda = get_ul_tda(nr_mac, sched_frame, sched_slot); if (tda < 0) - return false; + return; AssertFatal(tda < tdaList->list.count, "time domain assignment %d >= %d\n", tda, tdaList->list.count); + /* check if slot is UL, and that slot is 8 (assuming K2=6 because of UE * limitations). Note that if K2 or the TDD configuration is changed, below * conditions might exclude each other and never be true */ int slot_period = sched_slot % nr_mac->frame_structure.numb_slots_period; if (!is_xlsch_in_slot(ulsch_slot_bitmap, slot_period)) - return false; + return; NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, sched_ctrl->coreset->controlResourceSetId, @@ -270,7 +273,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo TYPE_C_RNTI_, tda); if (!tda_info.valid_tda) - return false; + return; // TODO implement beam procedures for phy-test mode int beam = 0; @@ -280,7 +283,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo for (int i = rbStart; i < rbStart + rbSize; ++i) { if ((vrb_map_UL[i+BWPStart] & SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols)) != 0) { LOG_E(MAC, "%4d.%2d RB %d is already reserved, cannot schedule UE\n", frame, slot, i); - return false; + return; } } @@ -295,7 +298,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo 0); if (CCEIndex < 0) { LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PUSCH\n", __func__); - return false; + return; } sched_ctrl->cce_index = CCEIndex; @@ -337,7 +340,8 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo sched.nrOfLayers /* NrOfLayers */) >> 3; - sched_ctrl->sched_pusch = sched; + /* save allocation to FAPI structures */ + post_process_ulsch(nr_mac, pp_pusch, UE, &sched); /* mark the corresponding RBs as used */ fill_pdcch_vrb_map(nr_mac, @@ -349,5 +353,4 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo for (int rb = rbStart; rb < rbStart + rbSize; rb++) vrb_map_UL[rb+BWPStart] |= SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); - return true; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f8c842706c..a6de5b987d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2692,7 +2692,6 @@ NR_UE_info_t *get_new_nr_ue_inst(uid_allocator_t *uia, rnti_t rnti, NR_CellGroup /* set illegal time domain allocation to force recomputation of all fields */ sched_ctrl->sched_pdsch.time_domain_allocation = -1; - sched_ctrl->sched_pusch.time_domain_allocation = -1; /* Set default BWPs */ AssertFatal(UE->sc_info.n_ul_bwp <= NR_MAX_NUM_BWP, "uplinkBWP_ToAddModList has %d BWP!\n", UE->sc_info.n_ul_bwp); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 493c2a37e0..4e8bce0392 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1700,17 +1700,18 @@ static void nr_ue_max_mcs_min_rb(int mu, } static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, - frame_t frame, - slot_t slot, - uint16_t *rballoc_mask, - int *n_rb_sched, - int dci_beam_idx, - NR_UE_info_t* UE, - int harq_pid, - const NR_ServingCellConfigCommon_t *scc, - const int tda) + post_process_pusch_t *pp_pusch, + uint16_t *rballoc_mask, + int *n_rb_sched, + int dci_beam_idx, + NR_UE_info_t *UE, + int harq_pid, + const NR_ServingCellConfigCommon_t *scc, + const int tda) { const int CC_id = 0; + int frame = pp_pusch->frame; + int slot = pp_pusch->slot; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; /* Get previous PUSCH field info */ const NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; @@ -1820,7 +1821,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam_idx); // signal new allocation - sched_ctrl->sched_pusch = new_sched; + post_process_ulsch(nrmac, pp_pusch, UE, &new_sched); LOG_D(NR_MAC, "%4d.%2d Allocate UL retransmission RNTI %04x sched %4d.%2d (%d RBs)\n", frame, @@ -1848,9 +1849,8 @@ static int comparator(const void *p, const void *q) { return ((UEsched_t*)p)->coef < ((UEsched_t*)q)->coef; } -static void pf_ul(module_id_t module_id, - frame_t frame, - int slot, +static void pf_ul(gNB_MAC_INST *nrmac, + post_process_pusch_t *pp_pusch, frame_t sched_frame, int sched_slot, NR_UE_info_t *UE_list[], @@ -1859,7 +1859,8 @@ static void pf_ul(module_id_t module_id, int n_rb_sched[num_beams]) { const int CC_id = 0; - gNB_MAC_INST *nrmac = RC.nrmac[module_id]; + int frame = pp_pusch->frame; + int slot = pp_pusch->slot; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; int slots_per_frame = nrmac->frame_structure.numb_slots_frame; const int min_rb = nrmac->min_grant_prb; @@ -1880,13 +1881,16 @@ static void pf_ul(module_id_t module_id, LOG_D(NR_MAC,"pf_ul: preparing UL scheduling for UE %04x\n",UE->rnti); NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; - const NR_mac_dir_stats_t *stats = &UE->mac_stats.ul; + NR_mac_dir_stats_t *stats = &UE->mac_stats.ul; /* Calculate throughput */ const float a = 0.01f; const uint32_t b = stats->current_bytes; UE->ul_thr_ue = (1 - a) * UE->ul_thr_ue + a * b; + stats->current_bytes = 0; + stats->current_rbs = 0; + int total_rem_ues = 0; for (int i = 0; i < num_beams; i++) total_rem_ues += remainUEs[i]; @@ -1915,8 +1919,7 @@ static void pf_ul(module_id_t module_id, /* Allocate retransmission*/ const int tda = get_ul_tda(nrmac, sched_frame, sched_slot); bool r = allocate_ul_retransmission(nrmac, - frame, - slot, + pp_pusch, rballoc_mask, &n_rb_sched[beam.idx], dci_beam.idx, @@ -2063,7 +2066,8 @@ static void pf_ul(module_id_t module_id, sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, deltaMCS, false); - sched_ctrl->sched_pusch = sched; + /* save allocation to FAPI structures */ + post_process_ulsch(nrmac, pp_pusch, UE, &sched); LOG_D(NR_MAC, "pf_ul %d.%d UE %x Scheduling PUSCH (no data) nrb %d mcs %d tbs %d bits phr_txpower %d\n", frame, @@ -2263,7 +2267,9 @@ static void pf_ul(module_id_t module_id, sched_ctrl->cce_index = CCEIndex; fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); - sched_ctrl->sched_pusch = sched; + /* save allocation to FAPI structures */ + post_process_ulsch(nrmac, pp_pusch, iterator->UE, &sched); + n_rb_sched[beam.idx] -= sched.rbSize; for (int rb = bi.bwpStart; rb < sched.rbSize; rb++) rballoc_mask[rb + sched.rbStart] |= slbitmap; @@ -2374,7 +2380,7 @@ nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti return pusch_pdu; } -static void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch, NR_UE_info_t *UE, NR_sched_pusch_t *sched_pusch) +void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch, NR_UE_info_t *UE, NR_sched_pusch_t *sched_pusch) { frame_t frame = pusch->frame; slot_t slot = pusch->slot; @@ -2585,12 +2591,14 @@ static void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch nr_mac->cset0_bwp_size); } -static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t slot) +static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch) { - gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; + int frame = pp_pusch->frame; + int slot = pp_pusch->slot; + // no UEs if (nr_mac->UE_info.connected_ue_list[0] == NULL) - return false; + return; NR_COMMON_channels_t *cc = nr_mac->common_channels; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; @@ -2603,7 +2611,7 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER; const int sched_slot = (slot + K2) % slots_frame; if (!is_ul_slot(sched_slot, &nr_mac->frame_structure)) - return false; + return; int num_beams = nr_mac->beam_info.beam_allocation ? nr_mac->beam_info.beams_per_period : 1; int bw = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; @@ -2618,8 +2626,7 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); /* proportional fair scheduling algorithm */ - pf_ul(module_id, frame, slot, sched_frame, sched_slot, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len); - return true; + pf_ul(nr_mac, pp_pusch, sched_frame, sched_slot, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len); } nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) @@ -2659,38 +2666,15 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_ /* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */ NR_SCHED_ENSURE_LOCKED(&nr_mac->sched_lock); + ul_dci_req->SFN = frame; + ul_dci_req->Slot = slot; + post_process_pusch_t pusch = { .frame = frame, .slot = slot, .ul_dci_req = ul_dci_req, .pdcch_pdu_coreset = {NULL}, }; + /* Uplink data ONLY can be scheduled when the current slot is downlink slot, * because we have to schedule the DCI0 first before schedule uplink data */ if (!is_dl_slot(slot, &nr_mac->frame_structure)) { LOG_D(NR_MAC, "Current slot %d is NOT DL slot, cannot schedule DCI0 for UL data\n", slot); return; } - bool do_sched = nr_mac->pre_processor_ul(module_id, frame, slot); - if (!do_sched) - return; - - ul_dci_req->SFN = frame; - ul_dci_req->Slot = slot; - post_process_pusch_t pusch = { frame, slot, ul_dci_req }; - - NR_UEs_t *UE_info = &nr_mac->UE_info; - UE_iterator(UE_info->connected_ue_list, UE) { - NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - if (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) - continue; - - UE->mac_stats.ul.current_bytes = 0; - UE->mac_stats.ul.current_rbs = 0; - - /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in - * every TTI are pre-populated by the preprocessor and used below */ - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; - LOG_D(NR_MAC,"UE %04x : sched_pusch->rbSize %d\n",UE->rnti,sched_pusch->rbSize); - if (sched_pusch->rbSize <= 0) - continue; - - post_process_ulsch(nr_mac, &pusch, UE, sched_pusch); - - memset(sched_pusch, 0, sizeof(*sched_pusch)); - } + nr_mac->pre_processor_ul(nr_mac, &pusch); } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 66a9262f22..2c9e1a2a43 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -149,7 +149,7 @@ uint16_t nr_mac_compute_RIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs); void nr_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slot); /* \brief UL preprocessor for phytest: schedules UE_id 0 with fixed MCS on a * fixed set of resources */ -bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slot); +void nr_ul_preprocessor_phytest(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch); void handle_nr_uci_pucch_0_1(module_id_t mod_id, frame_t frame, @@ -498,4 +498,6 @@ void prepare_du_configuration_update(gNB_MAC_INST *mac, const NR_BCCH_DL_SCH_Message_t *sib1); void nr_mac_clean_cellgroup(NR_CellGroupConfig_t *cell_group); + +void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch, NR_UE_info_t *UE, NR_sched_pusch_t *sched_pusch); #endif /*__LAYER2_NR_MAC_PROTO_H__*/ diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index ea7d80a214..1778d0507f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -598,9 +598,6 @@ typedef struct { NR_sched_pucch_t *sched_pucch; int sched_pucch_size; - /// Sched PUSCH: scheduling decisions, copied into HARQ and cleared every TTI - NR_sched_pusch_t sched_pusch; - /// Sched SRS: scheduling decisions NR_sched_srs_t sched_srs; @@ -807,8 +804,12 @@ typedef struct { nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_coreset[MAX_NUM_CORESET]; } post_process_pusch_t; +/* forward declaration to use in nr_pp_impl_dl */ +struct gNB_MAC_INST_s; +typedef struct gNB_MAC_INST_s gNB_MAC_INST; + typedef void (*nr_pp_impl_dl)(module_id_t mod_id, frame_t frame, slot_t slot); -typedef bool (*nr_pp_impl_ul)(module_id_t mod_id, frame_t frame, slot_t slot); +typedef void (*nr_pp_impl_ul)(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch); typedef struct f1_config_t { f1ap_setup_req_t *setup_req; From 7ee8e8eaba7fd620f23d8bd329d023dbdf161b95 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 7 Jul 2025 12:26:55 +0200 Subject: [PATCH 016/112] Fix bug: only sort relevant part of list This reduces the amount of elements to compare. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 4e8bce0392..95a410373e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1869,7 +1869,7 @@ static void pf_ul(gNB_MAC_INST *nrmac, int remainUEs[num_beams]; for (int i = 0; i < num_beams; i++) remainUEs[i] = max_num_ue; - int curUE = 0; + int numUE = 0; /* Loop UE_list to calculate throughput and coeff */ UE_iterator(UE_list, UE) { @@ -2099,13 +2099,13 @@ static void pf_ul(gNB_MAC_INST *nrmac, UE->ul_thr_ue, tbs, coeff_ue); - UE_sched[curUE].coef = coeff_ue; - UE_sched[curUE].UE = UE; - UE_sched[curUE].selected_mcs = selected_mcs; - curUE++; + UE_sched[numUE].coef = coeff_ue; + UE_sched[numUE].UE = UE; + UE_sched[numUE].selected_mcs = selected_mcs; + numUE++; } - qsort(UE_sched, sizeofArray(UE_sched), sizeof(UEsched_t), comparator); + qsort(UE_sched, numUE, sizeof(UEsched_t), comparator); UEsched_t *iterator=UE_sched; /* Loop UE_sched to find max coeff and allocate transmission */ From 62e4025bc8464ae516898cea806700aae49d8706 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 14:12:41 +0200 Subject: [PATCH 017/112] Integrate inactivity scheduling into main allocation loop Scheduling for inactivity only deviates in details from the main scheduling logic: we simply allocate a fixed number of RBs instead of making it dependent of data. In this commit, add an additional flag to sort UEs that are scheduled for inactivity in front of "normal" UEs (with traffic). Then, schedule those UEs by limiting/fixing the amount of RBs to schedule to min_grant_prb. Update the comparator() to properly sort UEs based on this flag and the coefficient by applying a consistent logic of -1/0/1 (see man qsort) for smaller/equal/larger. The inactivity flag, if set, will always have higher priority over the coefficient to schedule these UEs first, as was the case prior to this commit. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 198 ++++++------------ 1 file changed, 63 insertions(+), 135 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 95a410373e..ecb4887c53 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1841,12 +1841,27 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, static uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient typedef struct UEsched_s { float coef; + bool sched_inactive; NR_UE_info_t * UE; int selected_mcs; } UEsched_t; -static int comparator(const void *p, const void *q) { - return ((UEsched_t*)p)->coef < ((UEsched_t*)q)->coef; +static int comparator(const void *p, const void *q) +{ + const UEsched_t *pp = p; + const UEsched_t *qq = q; + if (pp->sched_inactive && qq->sched_inactive) + return 0; + else if (pp->sched_inactive) + return -1; + else if (qq->sched_inactive) + return 1; + /* both UEs are !sched_inactive */ + if (pp->coef < qq->coef) + return 1; + else if (pp->coef > qq->coef) + return -1; + return 0; } static void pf_ul(gNB_MAC_INST *nrmac, @@ -1977,129 +1992,23 @@ static void pf_ul(gNB_MAC_INST *nrmac, selected_mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); LOG_D(NR_MAC, "%d.%d starting mcs %d bler %f\n", frame, slot, selected_mcs, sched_ctrl->ul_bler_stats.bler); } - /* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled - * based on data to transmit) */ - if (B == 0 && do_sched) { - /* if no data, pre-allocate 5RB */ - /* Find a free CCE */ - int CCEIndex = get_cce_index(nrmac, - CC_id, slot, UE->rnti, - &sched_ctrl->aggregation_level, - dci_beam.idx, - sched_ctrl->search_space, - sched_ctrl->coreset, - &sched_ctrl->sched_pdcch, - false, - sched_ctrl->pdcch_cl_adjust); - if (CCEIndex < 0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI (BSR 0)\n", UE->rnti, frame, slot); - reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_per_frame, beam.new_beam); - reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); - continue; - } - - int tda = get_ul_tda(nrmac, sched_frame, sched_slot); - NR_tda_info_t tda_info = get_ul_tda_info(current_BWP, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_, - tda); - AssertFatal(tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - - int rbStart = 0; // wrt BWP start - LOG_D(NR_MAC, "Looking for min_rb %d RBs, starting at %d\n", min_rb, rbStart); - bwp_info_t bi = get_pusch_bwp_start_size(UE); - const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); - while (rbStart < bi.bwpSize && (rballoc_mask[rbStart + bi.bwpStart] & slbitmap)) - rbStart++; - if (rbStart + min_rb > bi.bwpSize) { - LOG_D(NR_MAC, - "[UE %04x][%4d.%2d] could not allocate continuous UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", - UE->rnti, - frame, - slot, - rbStart, - min_rb, - bi.bwpSize); - reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_per_frame, beam.new_beam); - reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); - continue; - } - - sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); - - int nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); - NR_sched_pusch_t sched = { - .frame = sched_frame, - .slot = sched_slot, - .rbSize = min_rb, - .rbStart = rbStart, - .mcs = selected_mcs, - // R, Qm, tb_size below - .ul_harq_pid = -1, // new transmission - .nrOfLayers = nrOfLayers, - // tpmi in post-process - .time_domain_allocation = tda, - .tda_info = tda_info, - .dmrs_info = get_ul_dmrs_params(scc, current_BWP, &tda_info, nrOfLayers), - .bwp_info = bi, - // phr_txpower_calc below - }; - update_ul_ue_R_Qm(sched.mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched.R, &sched.Qm); - sched.tb_size = nr_compute_tbs(sched.Qm, - sched.R, - sched.rbSize, - sched.tda_info.nrOfSymbols, - sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, - 0, // nb_rb_oh - 0, - sched.nrOfLayers) - >> 3; - long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; - - sched.phr_txpower_calc = compute_ph_factor(current_BWP->scs, - sched.tb_size << 3, - sched.rbSize, - sched.nrOfLayers, - sched.tda_info.nrOfSymbols, - sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, - deltaMCS, - false); - /* save allocation to FAPI structures */ - post_process_ulsch(nrmac, pp_pusch, UE, &sched); - LOG_D(NR_MAC, - "pf_ul %d.%d UE %x Scheduling PUSCH (no data) nrb %d mcs %d tbs %d bits phr_txpower %d\n", - frame, - slot, - UE->rnti, - sched.rbSize, - sched.mcs, - sched.tb_size << 3, - sched.phr_txpower_calc); - - /* Mark the corresponding RBs as used */ - n_rb_sched[beam.idx] -= sched.rbSize; - for (int rb = bi.bwpStart; rb < sched.rbSize; rb++) - rballoc_mask[rb + sched.rbStart] |= slbitmap; - - remainUEs[beam.idx]--; - continue; - } /* Create UE_sched for UEs eligibale for new data transmission*/ /* Calculate coefficient*/ const uint32_t tbs = ul_pf_tbs[current_BWP->mcs_table][selected_mcs]; float coeff_ue = (float) tbs / UE->ul_thr_ue; - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] b %d, ul_thr_ue %f, tbs %d, coeff_ue %f\n", + bool sched_inactive = B == 0 && do_sched; + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] b %d, ul_thr_ue %f, tbs %d, coeff_ue %f, sched_inactive %d\n", UE->rnti, frame, slot, b, UE->ul_thr_ue, tbs, - coeff_ue); + coeff_ue, + sched_inactive); UE_sched[numUE].coef = coeff_ue; + UE_sched[numUE].sched_inactive = sched_inactive; UE_sched[numUE].UE = UE; UE_sched[numUE].selected_mcs = selected_mcs; numUE++; @@ -2172,11 +2081,14 @@ static void pf_ul(gNB_MAC_INST *nrmac, bwp_info_t bi = get_pusch_bwp_start_size(iterator->UE); while (rbStart < bi.bwpSize && (rballoc_mask[rbStart + bi.bwpStart] & slbitmap)) rbStart++; - uint16_t max_rbSize = 1; - while (rbStart + max_rbSize < bi.bwpSize && !(rballoc_mask[rbStart + bi.bwpStart + max_rbSize] & slbitmap)) - max_rbSize++; + /* if it's for inactivity, min_grant_prb is enough, otherwise check what + * would be the maximum */ + uint16_t max_rbSize = iterator->sched_inactive ? min_rb : bi.bwpSize; + uint16_t available_rb = 1; + while (rbStart + available_rb < bi.bwpSize && !(rballoc_mask[rbStart + bi.bwpStart + available_rb] & slbitmap) && available_rb < max_rbSize) + available_rb++; - if (rbStart + min_rb > bi.bwpSize || max_rbSize < min_rb) { + if (rbStart + min_rb > bi.bwpSize || available_rb < min_rb) { reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, iterator->UE->UE_beam_index, slots_per_frame, beam.new_beam); LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", @@ -2190,11 +2102,11 @@ static void pf_ul(gNB_MAC_INST *nrmac, continue; } else LOG_D(NR_MAC, - "allocating UL data for RNTI %04x (rbStart %d, min_rb %d, max_rbSize %d, bwpSize %d)\n", + "allocating UL data for RNTI %04x (rbStart %d, min_rb %d, available_rb %d, bwpSize %d)\n", iterator->UE->rnti, rbStart, min_rb, - max_rbSize, + available_rb, bi.bwpSize); int nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); @@ -2217,25 +2129,41 @@ static void pf_ul(gNB_MAC_INST *nrmac, /* Calculate the current scheduling bytes */ const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0); - /* adjust rbSize and MCS according to PHR and BPRE */ - if(sched_ctrl->pcmax != 0 || sched_ctrl->ph != 0) // verify if the PHR related parameter have been initialized - nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, &sched, current_BWP, min_rb, B, &max_rbSize, &sched.mcs); + /* adjust rbSize and MCS according to PHR and BPRE, only if there is data */ + if((sched_ctrl->pcmax != 0 || sched_ctrl->ph != 0) && B > 0) + nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, &sched, current_BWP, min_rb, B, &available_rb, &sched.mcs); if (sched.mcs < sched_ctrl->ul_bler_stats.mcs) sched_ctrl->ul_bler_stats.mcs = sched.mcs; /* force estimated MCS down */ update_ul_ue_R_Qm(sched.mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched.R, &sched.Qm); - nr_find_nb_rb(sched.Qm, - sched.R, - current_BWP->transform_precoding, - sched.nrOfLayers, - sched.tda_info.nrOfSymbols, - sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, - B, - min_rb, - max_rbSize, - &sched.tb_size, - &sched.rbSize); + if (!iterator->sched_inactive) { + // this UE has data, find optimal number of RB for data and in range + // [min_rb,available_rb] + nr_find_nb_rb(sched.Qm, + sched.R, + current_BWP->transform_precoding, + sched.nrOfLayers, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + B, + min_rb, + available_rb, + &sched.tb_size, + &sched.rbSize); + } else { + // this UE is scheduled due to SR or inactivity and no data + sched.rbSize = min_rb; + sched.tb_size = nr_compute_tbs(sched.Qm, + sched.R, + sched.rbSize, + sched.tda_info.nrOfSymbols, + sched.dmrs_info.N_PRB_DMRS * sched.dmrs_info.num_dmrs_symb, + 0, // nb_rb_oh + 0, + sched.nrOfLayers) + >> 3; + } // Calacualte the normalized tx_power for PHR long *deltaMCS = current_BWP->pusch_Config ? current_BWP->pusch_Config->pusch_PowerControl->deltaMCS : NULL; @@ -2251,9 +2179,9 @@ static void pf_ul(gNB_MAC_INST *nrmac, false); LOG_D(NR_MAC, - "rbSize %d (max_rbSize %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n", + "rbSize %d (available_rb %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n", sched.rbSize, - max_rbSize, + available_rb, sched.tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, From 8cded62df0aad41a7b2db68ab867bceebeecbc76 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 13 Jun 2025 17:20:23 +0200 Subject: [PATCH 018/112] Refactor TDA allocation Make it simpler to see, in function nr_rrc_config_ul_tda(), which UL TDAs we allocate for a UE. --- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 55 ++++++-------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index eba1152cd0..6e111ded06 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1048,58 +1048,34 @@ void nr_rrc_config_dl_tda(struct NR_PDSCH_TimeDomainResourceAllocationList *pdsc } } -static struct NR_PUSCH_TimeDomainResourceAllocation *set_TimeDomainResourceAllocation(const int k2, uint8_t index, int ul_symb) +static struct NR_PUSCH_TimeDomainResourceAllocation *set_TimeDomainResourceAllocation(const int k2, long sliv) { struct NR_PUSCH_TimeDomainResourceAllocation *puschTdrAlloc = calloc_or_fail(1, sizeof(*puschTdrAlloc)); puschTdrAlloc->k2 = calloc_or_fail(1, sizeof(*puschTdrAlloc->k2)); *puschTdrAlloc->k2 = k2; puschTdrAlloc->mappingType = NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB; - switch (index) { - case 0: - puschTdrAlloc->startSymbolAndLength = get_SLIV(0, 13); - break; - case 1: - puschTdrAlloc->startSymbolAndLength = get_SLIV(0, 12); - break; - case 2: - // UL TDA index 2 for mixed slot (TDD) - puschTdrAlloc->startSymbolAndLength = - get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); // starting in fist ul symbol til the last but one - break; - case 3: { - // UL TDA index 3 for msg3 in the mixed slot (TDD) - int no_mix_slot = ul_symb < 3 ? 1 : 0; // we need at least 2 symbols for scheduling Msg3 - *puschTdrAlloc->k2 += no_mix_slot; - if (no_mix_slot) - puschTdrAlloc->startSymbolAndLength = get_SLIV(0, 13); // full allocation if there is no mixed slot - else - puschTdrAlloc->startSymbolAndLength = - get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); // starting in fist ul symbol til the last but one - } - break; - default: - break; - } + puschTdrAlloc->startSymbolAndLength = sliv; return puschTdrAlloc; } void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) { - //TODO change to accomodate for SRS - - const NR_PUSCH_TimeDomainResourceAllocationList_t *tda = + NR_PUSCH_TimeDomainResourceAllocationList_t *tda_list = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; - AssertFatal(tda->list.count == 0, "already have pusch_TimeDomainAllocationList members\n"); + AssertFatal(tda_list->list.count == 0, "already have pusch_TimeDomainAllocationList members\n"); const int k2 = min_fb_delay; + int mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; - struct NR_SetupRelease_PUSCH_ConfigCommon *pusch_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon; // UL TDA index 0 is basic slot configuration starting in symbol 0 til the last but one symbol - asn1cSeqAdd(&pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list, set_TimeDomainResourceAllocation(k2, 0, 0)); + NR_PUSCH_TimeDomainResourceAllocation_t *tda; + tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 13)); + asn1cSeqAdd(&tda_list->list, tda); // UL TDA index 1 in case of SRS - asn1cSeqAdd(&pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list, set_TimeDomainResourceAllocation(k2, 1, 0)); + tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 12)); + asn1cSeqAdd(&tda_list->list, tda); if (scc->tdd_UL_DL_ConfigurationCommon) { int ul_symb = 0; @@ -1117,21 +1093,24 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) } if (ul_symb>1) { // UL TDA index 2 for mixed slot (TDD) - asn1cSeqAdd(&pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list, - set_TimeDomainResourceAllocation(k2, 2, ul_symb)); + long sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); + tda = set_TimeDomainResourceAllocation(k2, sliv); + asn1cSeqAdd(&tda_list->list, tda); } // UL TDA index 3 for msg3 in the mixed slot (TDD) int tdd_period_idx = get_tdd_period_idx(scc->tdd_UL_DL_ConfigurationCommon); int nb_periods_per_frame = get_nb_periods_per_frame(tdd_period_idx); int nb_slots_per_period = ((1 << mu) * 10) / nb_periods_per_frame; int k2_msg3 = nb_slots_per_period - get_delta_for_k2(mu); - struct NR_PUSCH_TimeDomainResourceAllocation *puschTdrAllocMsg3 = set_TimeDomainResourceAllocation(k2_msg3, 3, ul_symb); + bool no_mix_slot = ul_symb < 3; // we need at least 2 symbols for scheduling Msg3 + long sliv = no_mix_slot ? get_SLIV(0, 13) : get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); + struct NR_PUSCH_TimeDomainResourceAllocation *puschTdrAllocMsg3 = set_TimeDomainResourceAllocation(k2_msg3, sliv); if (*puschTdrAllocMsg3->k2 < min_fb_delay) *puschTdrAllocMsg3->k2 += nb_slots_per_period; AssertFatal(*puschTdrAllocMsg3->k2 < 33, "Computed k2 for msg3 %ld is larger than the range allowed by RRC (0..32)\n", *puschTdrAllocMsg3->k2); - asn1cSeqAdd(&pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list, puschTdrAllocMsg3); + asn1cSeqAdd(&tda_list->list, puschTdrAllocMsg3); } } From 7cae3c2871651b9f76371f27e417dcd91e394604 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 13 Jun 2025 17:43:12 +0200 Subject: [PATCH 019/112] Comments on func --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index ecb4887c53..bbbd72c378 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -38,6 +38,8 @@ //#define SRS_IND_DEBUG +/* \brief Get the UL TDA for given frame and slot. It identifies the index of + * TDA in the TDA list, as hardcoded in nr_rrc_config_ul_tda(). */ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) { /* we assume that this function is mutex-protected from outside */ @@ -51,7 +53,7 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) int s = get_slot_idx_in_period(slot, fs); tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap; if ((tdd_slot_bitmap[s].num_ul_symbols > 1) && is_mixed_slot(s, fs)) { - return 2; + return 2; // mixed slot, all symbols of mixed minus last } } @@ -59,10 +61,10 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) UE_iterator(nrmac->UE_info.connected_ue_list, UE) { NR_sched_srs_t sched_srs = UE->UE_sched_ctrl.sched_srs; if(sched_srs.srs_scheduled && sched_srs.frame == frame && sched_srs.slot == slot) - return 1; + return 1; // symbols 0--12 } - return 0; // if FDD or not mixed slot in TDD, for now use default TDA (TODO handle CSI-RS slots) + return 0; // symbols 0--13, // if FDD or not mixed slot in TDD, for now use default TDA (TODO handle CSI-RS slots) } bwp_info_t get_pusch_bwp_start_size(NR_UE_info_t *UE) From ac3451c6f75b48315bd4489665bc85294e292858 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 Jul 2025 10:50:46 +0200 Subject: [PATCH 020/112] Select ra_ResponseWindow automatically if not configured If the config file does not specify ra_ResponseWindow, select it to be 10 slots in mu=0, or 20 slots for all others. This should give us enough flexibility to allocate Msg2 without running out of the response window. The next commit will remove most ra_ResponseWindow options in configs. --- openair2/GNB_APP/RRC_nr_paramsvalues.h | 2 +- openair2/GNB_APP/gnb_config.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/openair2/GNB_APP/RRC_nr_paramsvalues.h b/openair2/GNB_APP/RRC_nr_paramsvalues.h index 44774342e5..1525c31b9a 100644 --- a/openair2/GNB_APP/RRC_nr_paramsvalues.h +++ b/openair2/GNB_APP/RRC_nr_paramsvalues.h @@ -228,7 +228,7 @@ {GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,.defint64val=-118,TYPE_INT64,0/*75*/},\ {GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,.defint64val=NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0/*76*/},\ {GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,.defint64val=NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0/*77*/},\ -{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,.defint64val=NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0/*78*/},\ +{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,.defint64val=-1,TYPE_INT64,0/*78*/},\ {GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSBPR,NULL,0,.uptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present,.defuintval=NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one,TYPE_UINT,0/*79*/},\ {GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSB,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one,.defint64val=NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n64,TYPE_INT64,0 /*80*/}, \ {GNB_CONFIG_STRING_RACONTENTIONRESOLUTIONTIMER,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer,.defint64val=NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64,TYPE_INT64,0/*81*/},\ diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index f01b5968f7..8f162ff1ce 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -575,6 +575,14 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap) rach_ConfigCommon->msg3_transformPrecoder = NULL; } + // by default, select ra_ResponseWindow automatically + if (rach_ConfigCommon->rach_ConfigGeneric.ra_ResponseWindow < 0) { + int mu = *scc->ssbSubcarrierSpacing; + // will select: mu=0 => 4 (10 slots), mu=1 => 5 (20 slots), mu>=3 => 7 (80 slots) + rach_ConfigCommon->rach_ConfigGeneric.ra_ResponseWindow = min(NR_RACH_ConfigGeneric__ra_ResponseWindow_sl80, NR_RACH_ConfigGeneric__ra_ResponseWindow_sl10 + mu); + } + DevAssert(rach_ConfigCommon->rach_ConfigGeneric.ra_ResponseWindow >= 0); + // prepare DL Allocation lists nr_rrc_config_dl_tda(dlcc->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList, frame_type, From 41d14b571c80c43a77078e83d8c115547b8748c5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 Jul 2025 10:37:01 +0200 Subject: [PATCH 021/112] Remove most ra_ResponseWindow config options Since the parent commit, the ra_ResponseWindow will be chosen automatically. Correspondingly, remove most ra_ResponseWindow options from configuration files in the repository. One problem in some mu=1 configs is that the ra_ResponseWindow=4 (10 slots), which might be overly restrictive if the L1 slot ahead is somewhat close to 10 (e.g., 6), in which case we might not be always able to allocate Msg2 in time. A notable exception here is gnb-vnf.sa.band66.u0.25prb.nfapi.conf, in which we still provide it (1) since it uses a non-standard configuration of a ra_ResponseWindow longer than 10ms (see also issue #916 for more information) and (2) as an example. --- ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf | 3 --- ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf | 3 --- ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf | 3 --- .../conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf | 3 --- ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf | 3 --- .../conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf | 3 --- .../conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf | 3 --- .../conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf | 3 --- .../conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf | 3 --- .../conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf | 3 --- ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf | 3 --- .../conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf | 3 --- .../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf | 3 --- ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf | 3 --- ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf | 3 --- ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf | 3 --- ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf | 3 --- .../conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf | 3 --- .../gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf | 3 --- ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf | 3 --- .../conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf | 3 --- .../conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml | 3 --- ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf | 3 --- .../conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf | 3 --- .../conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf | 3 --- .../gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf | 3 --- .../conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf | 3 --- ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf | 3 --- ci-scripts/conf_files/untested/benetel-5g.conf | 3 --- .../untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf | 3 --- .../untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf | 3 --- .../untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf | 3 --- .../conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf | 3 --- .../conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf | 3 --- .../untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf | 3 --- .../untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 3 --- .../untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf | 3 --- .../untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf | 3 --- .../untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf | 3 --- .../untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf | 3 --- doc/nfapi.md | 5 +++-- doc/testing_gnb_w_cots_ue_resources/gnb.conf | 3 --- targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf | 3 --- .../CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf | 3 --- targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf | 3 --- .../CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf | 3 --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 3 --- targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf | 3 --- .../CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf | 3 --- .../CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf | 3 --- .../CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf | 3 --- ...-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf | 3 --- .../gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf | 3 --- .../CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf | 3 --- .../CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.nfapi.conf | 3 --- .../PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf | 3 --- .../CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf | 3 --- .../CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf | 3 --- .../CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf | 3 --- .../CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf | 3 --- .../CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf | 3 --- .../CONF/gnb.sa.band257.u3.32prb.usrpx410.conf | 3 --- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 3 --- .../CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf | 3 --- .../CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf | 3 --- .../CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf | 3 --- .../CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf | 3 --- .../CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb.sa.band66.u0.25prb.rfsim.conf | 3 --- .../CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf | 3 --- .../CONF/gnb.sa.band77.162prb.usrpn310.4x4.conf | 3 --- .../CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf | 3 --- .../CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf | 3 --- .../CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf | 3 --- .../CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf | 3 --- .../CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf | 3 --- .../CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf | 3 --- .../gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf | 3 --- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf | 3 --- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf | 3 --- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf | 3 --- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.2pattern.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf | 3 --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml | 3 --- .../CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf | 3 --- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.189PRB.rfsim.conf | 3 --- .../CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf | 3 --- .../CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf | 3 --- .../CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf | 3 --- .../CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf | 3 --- .../CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf | 3 --- .../CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf | 3 --- 126 files changed, 3 insertions(+), 377 deletions(-) diff --git a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf index 2af3185ffc..173c9b3f73 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf index fce5e6dc6e..d2798cbccc 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf index 66e721ef84..f829996433 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf b/ci-scripts/conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf index ba156df849..814518f3b1 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf index 37223d712c..585d639f9f 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf @@ -97,9 +97,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf index b1d2d6d724..e69fee4722 100644 --- a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf index e49f8c422a..eb7c1e01e2 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf index 691fb86393..f36619e58a 100644 --- a/ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf index bb0388f113..caa3381365 100644 --- a/ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf index 67f1272563..586492e93f 100644 --- a/ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf index bbe3168aa2..d71be72f17 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf @@ -78,9 +78,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf index a7900e5e41..1637e89521 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf b/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf index d08d900098..4d674d34b4 100644 --- a/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf +++ b/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf b/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf index 7fbaac5f5b..fd8c3ec68c 100644 --- a/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf +++ b/ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf index d5b1695d5c..6471c7bd02 100644 --- a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf index 6c8ee24c1b..95384a0ae1 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf index b0647e8e5f..23a8b34c3a 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index 74ab33a28d..b066c27810 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf index 4e7042c2e4..b1da98b85b 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf @@ -79,9 +79,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf index 5567d233d4..3c51a977d8 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf @@ -86,9 +86,6 @@ gNBs = ( # powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - # ra_ReponseWindow - # 1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf index 396d83cd9d..7b0d176b3d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf index 9627a48d87..c297e40311 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf index 12a86c3e64..c54af1a4bb 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - #ra_ReponseWindow - #1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf index e4f7d91900..0808c4b43d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml index 7b75481634..6240b62104 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml @@ -72,9 +72,6 @@ gNBs: #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep: 1 - #ra_ReponseWindow - #1,2,4,8,10,20,40,80 - ra_ResponseWindow: 5 #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf index 4f546e7f30..263a8444ba 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf index ba06b69dd2..ee59af2d80 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf @@ -78,9 +78,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf index 05e6c5c67d..59142efec8 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf @@ -98,9 +98,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf index aa7e011ef2..74e3f6e45f 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf @@ -99,9 +99,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf index e6baa257bc..4a3d2852c4 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index 6a3c31e71a..8d6a0e90cd 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf index a9ef28fa5b..cd949fe8d0 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf index fc90aa6a88..4a0fa03c60 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf index 3bfe9ede51..4b46b8ca33 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf index 83495e1c5d..0057d9b75f 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf @@ -78,9 +78,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/benetel-5g.conf b/ci-scripts/conf_files/untested/benetel-5g.conf index 9bd8ed126e..35eda8f6d6 100644 --- a/ci-scripts/conf_files/untested/benetel-5g.conf +++ b/ci-scripts/conf_files/untested/benetel-5g.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf index ae1b335a27..73e7ad0151 100644 --- a/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf b/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf index 27358d99af..dda8cc11c4 100644 --- a/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf +++ b/ci-scripts/conf_files/untested/episci/gnb_band78.sa.fr1.106PRB.2x2.l2sim.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf index 978b8e22ec..9ca5210ec6 100644 --- a/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf +++ b/ci-scripts/conf_files/untested/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf index 43e11c6c40..e442987316 100644 --- a/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/untested/gNB_SA_n78_106PRB.2x2_usrpn310.conf @@ -98,9 +98,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; diff --git a/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf index 4e8c55851e..9a9732f807 100644 --- a/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/untested/gNB_SA_n78_133PRB.2x2_usrpn310.conf @@ -94,9 +94,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; diff --git a/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf index 4ffcf8fa3a..b1b94da121 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -103,9 +103,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; diff --git a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index dfd0996a05..b9c29636be 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -77,9 +77,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf index a8a45e8a68..6a63b00e6f 100644 --- a/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf index 29cc65e17b..18228fde1d 100644 --- a/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/untested/gnb.sa.band66.fr1.106PRB.usrpn300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf b/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf index 85bc18fa17..62f5c042be 100644 --- a/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf +++ b/ci-scripts/conf_files/untested/gnb.sa.band78.fr1.51PRB.usrpb210.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf index 0ff2cfa2e2..dd4a55c6a7 100644 --- a/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/untested/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -79,9 +79,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/doc/nfapi.md b/doc/nfapi.md index 41a3770be4..73aaf2e770 100644 --- a/doc/nfapi.md +++ b/doc/nfapi.md @@ -95,8 +95,9 @@ can proceed as follows: - in `vnf.conf` * modify `MACRLCs` section to configure south-bound nFAPI transport * delete `L1s`, `RUs`, and radio-specific sections. - * in `gNBs` section, increase the `ra_ResponseWindow` by one to extend the RA - window: this is necessary because the PNF triggers the scheduler in the VNF + * in `gNBs` section, select a sufficiently large `ra_ResponseWindow` if a UE + does not connect with a message that the response window timed out: + this is necessary because the PNF triggers the scheduler in the VNF in advance, which might make the RA window more likely to run out - copy `monolithic.conf`, which will be your PNF file (`pnf.conf`) - in `pnf.conf` diff --git a/doc/testing_gnb_w_cots_ue_resources/gnb.conf b/doc/testing_gnb_w_cots_ue_resources/gnb.conf index 44d339c951..c9cc393abc 100755 --- a/doc/testing_gnb_w_cots_ue_resources/gnb.conf +++ b/doc/testing_gnb_w_cots_ue_resources/gnb.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index ef39165e42..de96c77bcb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf index f44a412b3c..12f56ca617 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf index 3c0feb2ddc..0a8c5f802e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf index fa2dca082f..a77a65ab0a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf index 8ded185653..565e83c6a8 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf index 260c844b25..8de8f20cfb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf index 67ea04255c..07c0f76f6e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf index ea1e70fa87..d794e222cb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf index 58adeb991e..e83011d03a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf index 227f06bd8b..10812dc846 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf index d863f36409..ddd31a810e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf index 0dcd0b95e4..77863ab39a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf index ef95a53a7d..ffc7b1b21c 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf index 554b886010..58bcdc1d37 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - #ra_ReponseWindow - #1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf index b3d3775208..e6805d7a92 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index dd9b571b33..1a31985d8b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index 49108d242b..c0786bd56a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf index 1246e44b2b..82973bef95 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index e4f2fb8699..bcd16eda2a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf index 7dfbb5ee95..295a7ab6f1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf index ad610601a0..27a0fc0a84 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf index 8107c5ffc6..f681e5723a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 167ad9b802..4054d851c2 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf index 02b1e89b88..ee35c48e89 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf index c2e28725bd..9d6787d6b1 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf index c5c84c9919..87d7fdbc4a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf index a267d2e864..f0de3e3ab1 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf @@ -88,9 +88,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf index 28f9baf6f8..2fc9481739 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf @@ -88,9 +88,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf index 18f885945f..7b78314f8d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf @@ -88,9 +88,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf index 3221813bef..5f03792795 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf index c7d8cb3269..a69417fa45 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf index bb4aed3dfe..aea3176456 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf index aa7c380e51..7b88ad23c4 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf @@ -105,9 +105,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.nfapi.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.nfapi.conf index 7cfc66748b..b5a124cf1a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.nfapi.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.nfapi.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf index 5f2293cfb9..e104f82131 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf index b958ed809d..d9eb5e9fa7 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf @@ -114,9 +114,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf index a7010921bb..15c9684706 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf @@ -118,9 +118,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf index e270dd690d..f30c2d445f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf index dd3307d32c..a6ca5decbe 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf index 7c2c3805ee..c811f0d64e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf index b720d6d720..3a472ff7a2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf index 667b15b10f..933cddfcb9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index a5e9841772..42ac3185f0 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -79,9 +79,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf index b72ca5dc32..a02394b5b2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf index 1d9693edb1..6b460b0b59 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf index b666616764..afd7e6d96f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf @@ -96,9 +96,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf index 013ca6663b..6b9b104bc0 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf @@ -100,9 +100,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf index c9dfd6c58a..560b33b0e9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf @@ -100,9 +100,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.u0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.u0.25prb.rfsim.conf index f51bb977e0..9458c2b272 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.u0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.u0.25prb.rfsim.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf index 7622e508bc..753670a9eb 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.162prb.usrpn310.4x4.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.162prb.usrpn310.4x4.conf index ba427f747e..1890e60516 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.162prb.usrpn310.4x4.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.162prb.usrpn310.4x4.conf @@ -88,9 +88,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf index ce2a75d529..38580730f2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf @@ -84,9 +84,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index 55a78fd901..d55bc6dbda 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf index f4c31e3ee7..5bfce9a2d9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf @@ -85,9 +85,6 @@ gNBs = ( # powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - # ra_ReponseWindow - # 1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf index fcda4d3cc0..f6e571078e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf @@ -85,9 +85,6 @@ gNBs = ( # powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - # ra_ReponseWindow - # 1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf index 8c419177d5..3dc33707f3 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf index b66012c619..75fe0e6fdd 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf index 6fa4c200dc..be35562fd7 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index 3d584fdaba..d8ca02a3be 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -87,9 +87,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 3; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf index bd4cd59f06..38f399c67f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf @@ -85,9 +85,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf index 43f6f9cef8..3c9780130f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 2; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf index b6c940c78b..13617fb578 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf index b4aa830dd5..ddf866b0fd 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.2pattern.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.2pattern.conf index 89a1bb23c6..e29998478e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.2pattern.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.2pattern.conf @@ -78,9 +78,6 @@ gNBs = # powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; - # ra_ReponseWindow - # 1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf index d2f9dc0005..641c2228a4 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 7f7054db31..7f750d7259 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -81,9 +81,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml index 01c40ca3d7..605b56be93 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml @@ -76,9 +76,6 @@ gNBs: #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep: 1 - #ra_ReponseWindow - #1,2,4,8,10,20,40,80 - ra_ResponseWindow: 5 #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf index 46964ad72d..373ea830e0 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml index 87ad6080a0..8608ccd290 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml @@ -76,9 +76,6 @@ gNBs: #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep: 1 - #ra_ReponseWindow - #1,2,4,8,10,20,40,80 - ra_ResponseWindow: 4 #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf index 129b687c1a..30e95f83ec 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.189PRB.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.189PRB.rfsim.conf index 5270587271..22047cf06c 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.189PRB.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.189PRB.rfsim.conf @@ -86,9 +86,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf index 9802cc0acd..09117464b0 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf @@ -82,9 +82,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf index d3852e236a..1398020417 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf @@ -80,9 +80,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf index fbc77bf957..c51a969208 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; #one (0..15) 4,8,12,16,...60,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf index f0ea334f7e..d64bd8e472 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf @@ -118,9 +118,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf index 143345f275..f04fcc8efc 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf @@ -83,9 +83,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf index c8c1582584..bc8af31818 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf @@ -117,9 +117,6 @@ gNBs = #powerRampingStep # 0=dB0,1=dB2,2=dB4,3=dB6 powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; From 961a646dc756cba52c5c299e4f77563e89fcbec8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 8 Jul 2025 11:54:38 +0200 Subject: [PATCH 022/112] Remove dedicated Msg3 TDA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A dedicated Msg3 TDA is simply not necessary: get_feasible_msg3_tda() already iterates through all TDAs to find a suitable one for Msg3, and takes things such as parameter Δ already into account. The only prerequisite is that the ra_ResponseWindow is long enough. In some configurations, Msg3 TDA ensured that Msg2 still happened during ra_ResponseWindow, while Msg3 was outside of it. This is not necessarily the case anymore, unless ra_ResponseWindow is long enough. For the normal user, removing ra_ResponseWindow from the config will be enough. --- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 6e111ded06..d780cf4fe7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1066,8 +1066,6 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) const int k2 = min_fb_delay; - int mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; - // UL TDA index 0 is basic slot configuration starting in symbol 0 til the last but one symbol NR_PUSCH_TimeDomainResourceAllocation_t *tda; tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 13)); @@ -1097,20 +1095,6 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) tda = set_TimeDomainResourceAllocation(k2, sliv); asn1cSeqAdd(&tda_list->list, tda); } - // UL TDA index 3 for msg3 in the mixed slot (TDD) - int tdd_period_idx = get_tdd_period_idx(scc->tdd_UL_DL_ConfigurationCommon); - int nb_periods_per_frame = get_nb_periods_per_frame(tdd_period_idx); - int nb_slots_per_period = ((1 << mu) * 10) / nb_periods_per_frame; - int k2_msg3 = nb_slots_per_period - get_delta_for_k2(mu); - bool no_mix_slot = ul_symb < 3; // we need at least 2 symbols for scheduling Msg3 - long sliv = no_mix_slot ? get_SLIV(0, 13) : get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); - struct NR_PUSCH_TimeDomainResourceAllocation *puschTdrAllocMsg3 = set_TimeDomainResourceAllocation(k2_msg3, sliv); - if (*puschTdrAllocMsg3->k2 < min_fb_delay) - *puschTdrAllocMsg3->k2 += nb_slots_per_period; - AssertFatal(*puschTdrAllocMsg3->k2 < 33, - "Computed k2 for msg3 %ld is larger than the range allowed by RRC (0..32)\n", - *puschTdrAllocMsg3->k2); - asn1cSeqAdd(&tda_list->list, puschTdrAllocMsg3); } } From 66023f6a8d25ce71bb7b6fcb3f80c3b05bc7f0e5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 7 Jul 2025 18:44:41 +0200 Subject: [PATCH 023/112] Refactor get_feasible_msg3_tda() Simplify the code. Consider any slot for Msg3, and check that the TDA fits in a given slot (as before). --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 55856c0738..37a1460b1c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1013,18 +1013,10 @@ static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc, if (fs->frame_type == TDD && !is_ul_slot(temp_slot, fs)) continue; - const tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap; int s = get_slot_idx_in_period(temp_slot, fs); - // check if enough symbols in case of mixed slot + const tdd_bitmap_t *bm = &fs->period_cfg.tdd_slot_bitmap[s]; bool is_mixed = is_mixed_slot(s, fs); - // if the mixed slot has not enough symbols, skip - if (is_mixed && tdd_slot_bitmap[s].num_ul_symbols < 3) - continue; - - uint16_t slot_mask = - is_mixed ? SL_to_bitmap(NR_NUMBER_OF_SYMBOLS_PER_SLOT - tdd_slot_bitmap[s].num_ul_symbols, - tdd_slot_bitmap[s].num_ul_symbols) - : 0x3fff; + uint16_t slot_mask = is_mixed ? SL_to_bitmap(NR_NUMBER_OF_SYMBOLS_PER_SLOT - bm->num_ul_symbols, bm->num_ul_symbols) : 0x3fff; long startSymbolAndLength = tda_list->list.array[i]->startSymbolAndLength; int start, nr; SLIV2SL(startSymbolAndLength, &start, &nr); From 626fce4f44d52229c8b9c2e2caa879ca34daefd1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 1 Jul 2025 12:25:42 +0200 Subject: [PATCH 024/112] config_frame_structure(): make const --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 2 +- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 3770d2c6ec..ff6775df96 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -76,7 +76,7 @@ bool is_dl_slot(const slot_t slot, const frame_structure_t *fs); bool is_mixed_slot(const slot_t slot, const frame_structure_t *fs); int get_tdd_period_idx(NR_TDD_UL_DL_ConfigCommon_t *tdd); void config_frame_structure(int mu, - NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, + const NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, uint8_t tdd_period, uint8_t frame_type, frame_structure_t *fs); diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c index 8720cbce8b..b9f41a64a3 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c @@ -98,7 +98,7 @@ int get_tdd_period_idx(NR_TDD_UL_DL_ConfigCommon_t *tdd) * * @return Number of slots in the configured TDD period */ -static uint8_t set_tdd_bmap_period(NR_TDD_UL_DL_Pattern_t *pattern, tdd_period_config_t *pc, int8_t curr_total_slot) +static uint8_t set_tdd_bmap_period(const NR_TDD_UL_DL_Pattern_t *pattern, tdd_period_config_t *pc, int8_t curr_total_slot) { int8_t n_dl_slot = pattern->nrofDownlinkSlots; int8_t n_ul_slot = pattern->nrofUplinkSlots; @@ -154,7 +154,7 @@ static uint8_t set_tdd_bmap_period(NR_TDD_UL_DL_Pattern_t *pattern, tdd_period_c * * @return void */ -static void config_tdd_patterns(NR_TDD_UL_DL_ConfigCommon_t *tdd, frame_structure_t *fs) +static void config_tdd_patterns(const NR_TDD_UL_DL_ConfigCommon_t *tdd, frame_structure_t *fs) { int num_of_patterns = 1; uint8_t nb_slots_p2 = 0; @@ -188,7 +188,7 @@ static void config_tdd_patterns(NR_TDD_UL_DL_ConfigCommon_t *tdd, frame_structur * @param fs pointer to the frame structure to update */ void config_frame_structure(int mu, - NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, + const NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, uint8_t tdd_period, uint8_t frame_type, frame_structure_t *fs) From f23b6541322f667fecd919a6ad2e470ed006a106 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 10:56:20 +0200 Subject: [PATCH 025/112] Remove auto-test options in build_oai --- cmake_targets/build_oai | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 292e8d0575..a5eee3fe23 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -38,8 +38,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf HW="" VERBOSE_COMPILE=0 -RUN_GROUP=0 -TEST_CASE_GROUP="" BUILD_DIR=ran_build BUILD_DOXYGEN=0 DISABLE_HARDWARE_DEPENDENCY="False" @@ -99,10 +97,6 @@ Options: Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g, oran_fhlib_5g_mplane, WLS -P | --phy_simulators Makes the unitary tests Layer 1 simulators --s | --check - runs a set of auto-tests based on simulators and several compilation tests ---run-group - runs only specified test cases specified here. This flag is only valid with -s -V | --vcd Adds a debgging facility to the binary files: GUI with major internal synchronization events --verbose-compile @@ -319,15 +313,6 @@ function main() { TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim" echo_info "Will compile dlsim, ulsim, ..." shift;; - -s | --check) - OAI_TEST=1 - echo_info "Will run auto-tests" - shift;; - --run-group) - RUN_GROUP=1 - TEST_CASE_GROUP=$2 - echo_info "executing test cases only in group: $TEST_CASE_GROUP" - shift 2;; -V | --vcd) echo_info "Setting gtk-wave output" CMAKE_CMD="$CMAKE_CMD -DENABLE_VCD_FIFO=True" @@ -517,26 +502,7 @@ function main() { fi fi - - ############## - # Auto-tests # - ############## - if [ "$OAI_TEST" = "1" ] ; then - echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log " - echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml " - echo_info "You can hit CTRL-C at any time to terminate the autotests..." - rm -fr $OPENAIR_DIR/cmake_targets/autotests/log - mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log - if [ "$RUN_GROUP" -eq "1" ]; then - $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log - else - $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log - fi - wait - else - echo_success "BUILD SHOULD BE SUCCESSFUL" - fi - + echo_success "BUILD SHOULD BE SUCCESSFUL" } main "$@" From 20f938d5ae069edd04a3ffb73f90920daa9dbaef Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 11:34:58 +0200 Subject: [PATCH 026/112] Remove useless Doxygen variable --- cmake_targets/build_oai | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index a5eee3fe23..a6112cbf85 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -39,7 +39,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf HW="" VERBOSE_COMPILE=0 BUILD_DIR=ran_build -BUILD_DOXYGEN=0 DISABLE_HARDWARE_DEPENDENCY="False" CMAKE_BUILD_TYPE="RelWithDebInfo" CMAKE_CMD="$CMAKE" @@ -323,9 +322,8 @@ function main() { shift;; --build-doxygen) CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON" - TARGET_LIST="$TARGET_LIST doc" - BUILD_DOXYGEN=1 - echo_info "Will build doxygen support" + TARGET_LIST="$TARGET_LIST doc" + echo_info "Will build Doxygen documentation: $DIR/$BUILD_DIR/build/doc/html/index.html" shift;; --enable-LTTNG) CMAKE_CMD="$CMAKE_CMD -DENABLE_LTTNG=ON -DT_TRACER=OFF" @@ -484,12 +482,6 @@ function main() { echo_info "Running \"$CMAKE_CMD\"" eval $CMAKE_CMD compilations $BUILD_DIR all.txt "$TARGET_LIST" "${BUILD_TOOL_OPT}" - ################### - # Doxygen Support # - ################### - if [ "$BUILD_DOXYGEN" = "1" ] ; then - echo_info "Built Doxygen based documentation. The documentation file is located here: $DIR/$BUILD_DIR/build/doc/html/index.html" - fi if [ "$UE" = 1 ] ; then echo_info "Generate LTE USIM default sim content UE specific part" From f3dab10de66198efb04185e4b17885da85b98bbe Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 11:39:07 +0200 Subject: [PATCH 027/112] Remove UE_AUTOTEST_TRACE CMake option This only triggers the build of some dedicated logs that contain information that is logged already, anyways. --- CMakeLists.txt | 1 - cmake_targets/build_oai | 6 ------ openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c | 7 ------- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 7 ------- openair1/SCHED_UE/phy_procedures_lte_ue.c | 7 ------- 5 files changed, 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 667ad2a8b3..898b387237 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,7 +280,6 @@ endif() add_boolean_option(TRACE_ASN1C_ENC_DEC OFF "Enable ASN1 encoder/decoder debug traces via OAI logging system" ON) add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ON) add_boolean_option(ENABLE_LTTNG False "Activate the LTTNG tracer, a debugging/monitoring framework" ON) -add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs" ON) add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace" ON) add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index a6112cbf85..3b43d69911 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -110,8 +110,6 @@ Options: Disables the T tracer. --disable-hardware-dependency Disable HW dependency during installation ---ue-autotest-trace - Enable specific traces for UE autotest framework --ue-trace Enable traces for UE debugging --ue-timing @@ -338,10 +336,6 @@ function main() { echo_info "Disabling hardware dependency for compiling software" DISABLE_HARDWARE_DEPENDENCY="True" shift 1;; - --ue-autotest-trace) - CMAKE_CMD="$CMAKE_CMD -DUE_AUTOTEST_TRACE=True" - echo_info "Enabling autotest specific trace for UE" - shift 1;; --ue-trace) CMAKE_CMD="$CMAKE_CMD -DUE_DEBUG_TRACE=False" echo_info "Enabling UE trace for debug" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c index 2b8a725787..e4a34eb376 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c @@ -482,13 +482,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) { LOG_I(PHY, "[UE%d] In synch, rx_offset %d samples\n",ue->Mod_id, ue->rx_offset); if (ue->UE_scan_carrier == 0) { -#if UE_AUTOTEST_TRACE - LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n", - ue->Mod_id, - ue->proc.proc_rxtx[0].frame_rx, - ue->rx_offset, - ue->common_vars.freq_offset ); -#endif // send sync status to higher layers later when timing offset converge to target timing generate_pcfich_reg_mapping(frame_parms); generate_phich_reg_mapping(frame_parms); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index e31d0491bc..b95c7b8f79 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1205,13 +1205,6 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n", ue->Mod_id,frame_rx,ue->total_TBS[gNB_id], ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0); - -#if UE_AUTOTEST_TRACE - if ((frame_rx % 100 == 0)) { - LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, frame_rx); - } -#endif - } #ifdef EMOS diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 0b336fdce6..0e4c59dc0e 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -4320,13 +4320,6 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue, LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n", ue->Mod_id,frame_rx,ue->total_TBS[eNB_id], ue->total_TBS_last[eNB_id],(float) ue->bitrate[eNB_id]/1000.0); -#if UE_AUTOTEST_TRACE - - if ((frame_rx % 100 == 0)) { - LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[eNB_id]/1000.0, frame_rx); - } - -#endif } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); From a42d8183ca34ec3255a93ec73c94f39e1a50a10e Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 8 Aug 2025 12:32:14 +0200 Subject: [PATCH 028/112] fix a T trace --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 216ab788d3..1fe2b6967b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1635,6 +1635,7 @@ schedule_ulsch_rnti(module_id_t module_idP, T_INT(subframeP), T_INT(harq_pid), T_INT(mcs), + T_INT(UE_template_ptr->pre_first_nb_rb_ul), T_INT(rb_table[rb_table_index]), T_INT(UE_template_ptr->TBS_UL[harq_pid]), T_INT(ndi)); From a6ccdd1340ae439fe04a7f679f77cc6c36105535 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 8 Aug 2025 14:58:14 +0200 Subject: [PATCH 029/112] NR UE: fix pdcch llr_size calculation in nr_rx_pdcch() --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index bf2d91bdc8..ba641f1d0d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -348,7 +348,7 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, const int antRx = frame_parms->nb_antennas_rx; // Pointer to llrs, 4-bit resolution. - int32_t llr_size = (rel15->coreset.duration-rel15->coreset.StartSymbolIndex) * n_rb * RE_PER_RB_OUT_DMRS; + int32_t llr_size = (rel15->coreset.duration + rel15->coreset.StartSymbolIndex) * n_rb * RE_PER_RB_OUT_DMRS; c16_t llr[llr_size]; LOG_D(NR_PHY_DCI, From cb5de9afbba9bb0b863a11ed7735284129f05375 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 5 Aug 2025 08:21:49 +0000 Subject: [PATCH 030/112] fix(LDPCImplementation.md): Remove libconfig logs libconfig log do not display anymore by default so we may better not show them in the documentation to avoid any misunderstanding. --- openair1/PHY/CODING/DOC/LDPCImplementation.md | 86 +++---------------- 1 file changed, 13 insertions(+), 73 deletions(-) diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index d537a8a299..deaf0d16b1 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -17,12 +17,6 @@ loading default `libldpc.so`: ``` ./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 -....................... -[CONFIG] loader.ldpc.shlibversion set to default value "" -[LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (2 to default value) -shlib_path libldpc.so -[LOADER] library libldpc.so successfully loaded -........................ ``` `libldpc.so` has its decoder implemented in [nrLDPC_coding_segment_decoder.c](file://../nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c).\ @@ -42,18 +36,9 @@ Linking C shared module libldpc_aal.so At runtime, to successfully use LDPC accelerators (e.g., Xilinx T2/Intel ACCs), you will need to install the corresponding drivers and tools. Please refer to the dedicated documentation at [LDPC_OFFLOAD_SETUP.md](file://../../../../doc/LDPC_OFFLOAD_SETUP.md). -`./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev 01:00.0 --nrLDPC_coding_aal.dpdk_core_list 0-1` - -``` - -....................... -[CONFIG] loader.ldpc.shlibversion set to default value "" -[LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value) -[CONFIG] shlibversion set to _aal from command line -[CONFIG] loader.ldpc 1 options set from command line -shlib_path libldpc_aal.so -[LOADER] library libldpc_aal.so successfully loaded -........................ +<<<<<<< HEAD +``` +./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev 01:00.0 --nrLDPC_coding_aal.dpdk_core_list 0-1 ``` `libldpc_aal.so` has its decoder and its encoder implemented in [nrLDPC_coding_aal.c](file://../nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c). @@ -72,18 +57,9 @@ ninja ldpc_xdma At runtime, to successfully use the xdma, you need to install vendor specific drivers and tools.\ Please refer to the dedicated documentation at [LDPC_XDMA_OFFLOAD_SETUP.md](file://../../../../doc/LDPC_XDMA_OFFLOAD_SETUP.md). -`./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _xdma --nrLDPC_coding_xdma.num_threads_prepare 2` - -``` -....................... -[CONFIG] loader.ldpc.shlibversion set to default value "" -[LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value) -[CONFIG] shlibversion set to _xdma from command line -[CONFIG] loader.ldpc 1 options set from command line -shlib_path libldpc_xdma.so -[LOADER] library libldpc_xdma.so successfully loaded -........................ -``` +``` +./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _xdma --nrLDPC_coding_xdma.num_threads_prepare 2 +``` `libldpc_xdma.so` has its decoder implemented in [nrLDPC_coding_xdma.c](file://../nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c).\ Its encoder is implemented in [nrLDPC_coding_segment_encoder.c](file://../nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c). @@ -125,13 +101,6 @@ loading `libldpc_orig.so` instead of `libldpc.so`: ``` ./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _orig -....................... -[CONFIG] loader.ldpc.shlibversion set to default value "" -[LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value) -[CONFIG] shlibversion set to _orig from command line -[CONFIG] loader.ldpc 1 options set from command line -[LOADER] library libldpc_orig.so successfully loaded -........................ ``` loading `libldpc_cl.so` instead of `libldpc.so`: @@ -160,11 +129,12 @@ Built target ldpc_cl At runtime, to successfully use hardware acceleration via OpenCL, you need to install vendor specific packages which deliver the required drivers and tools to make use of their GPU (Nvidia, Intel...) , fpga (Xilinx, Intel) or CPU (Intel, AMD, ARM...) through OpenCL. -`./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _cl` +``` +./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _cl +``` ``` ------------------------------------------------ -[LOADER] library libldpc_cl.so successfully loaded [HW] Platform 0, OpenCL profile FULL_PROFILE [HW] Platform 0, OpenCL version OpenCL 2.1 LINUX [HW] Device 0 is available @@ -195,13 +165,12 @@ At runtime, to successfully use hardware acceleration via OpenCL, you need to in ----------------------------------------------------------------- ``` -`./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --loader.ldpc.shlibversion _cl --log_config.hw_log_level info` +``` +./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --loader.ldpc.shlibversion _cl --log_config.hw_log_level inf +``` ``` ............................................................ -[CONFIG] segment_shlibversion set to _cl from command line -[CONFIG] loader.ldpc 1 options set from command line -[LOADER] library libldpc_cl.so successfully loaded [HW] Platform 0, OpenCL profile FULL_PROFILE [HW] Platform 0, OpenCL version OpenCL 2.1 LINUX [HW] Device 0 is available @@ -240,22 +209,6 @@ Loading libldpc_cuda.so, the cuda implementation of the ldpc decoder: ``` $ ./ldpctest -v _cuda -ldpctest -v _cuda -Initializing random number generator, seed 0 -block length 8448: -n_trials 1: -SNR0 -2.000000: -[CONFIG] get parameters from cmdline , debug flags: 0x00400000 -[CONFIG] log_config: 2/3 parameters successfully set -[CONFIG] log_config: 53/53 parameters successfully set -[CONFIG] log_config: 53/53 parameters successfully set -[CONFIG] log_config: 16/16 parameters successfully set -[CONFIG] log_config: 16/16 parameters successfully set -log init done -[CONFIG] loader: 2/2 parameters successfully set -[CONFIG] loader.ldpc: 2/2 parameters successfully set -[LOADER] library libldpc_cuda.so successfully loaded -................................... ``` @@ -266,20 +219,7 @@ Loading libldpc_cl.so, the opencl implementation of the ldpc decoder: ``` $ ./ldpctest -v _cl -Initializing random number generator, seed 0 -block length 8448: -n_trials 1: -SNR0 -2.000000: -[CONFIG] get parameters from cmdline , debug flags: 0x00400000 -[CONFIG] log_config: 2/3 parameters successfully set -[CONFIG] log_config: 53/53 parameters successfully set -[CONFIG] log_config: 53/53 parameters successfully set -[CONFIG] log_config: 16/16 parameters successfully set -[CONFIG] log_config: 16/16 parameters successfully set -log init done -[CONFIG] loader: 2/2 parameters successfully set -[CONFIG] loader.ldpc: 1/2 parameters successfully set -[LOADER] library libldpc_cl.so successfully loaded +................................ [HW] Platform 0, OpenCL profile FULL_PROFILE [HW] Platform 0, OpenCL version OpenCL 2.1 LINUX [HW] Device 0 is available From eb3bd33fd4a8e120d20f4c46c67989bdcd3495ae Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 5 Aug 2025 08:26:30 +0000 Subject: [PATCH 031/112] feat(LDPCImplementation.md): Remove ldpc_cl logs Recommended: Remove logs of a library that is not working as far as we know. Pop this commit if this seems not necessary. --- openair1/PHY/CODING/DOC/LDPCImplementation.md | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index deaf0d16b1..8a2237f3e6 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -133,74 +133,10 @@ At runtime, to successfully use hardware acceleration via OpenCL, you need to in ./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _cl ``` -``` ------------------------------------------------- -[HW] Platform 0, OpenCL profile FULL_PROFILE -[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX -[HW] Device 0 is available -[HW] Device 0, type 2 = 0x00000002: cpu -[HW] Device 0, number of Compute Units: 8 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 8192 -[HW] Device 0, max Work Items size for dimension: 1 8192 -[HW] Device 0, max Work Items size for dimension: 2 8192 -[New Thread 0x7fffcc258700 (LWP 3945123)] -[New Thread 0x7fffc3e57700 (LWP 3945124)] -[New Thread 0x7fffcbe57700 (LWP 3945125)] -[New Thread 0x7fffcba56700 (LWP 3945126)] -[New Thread 0x7fffcb254700 (LWP 3945128)] -[New Thread 0x7fffcb655700 (LWP 3945127)] -[New Thread 0x7fffcae53700 (LWP 3945129)] -[HW] Platform 1, OpenCL profile FULL_PROFILE -[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3 -[New Thread 0x7fffc965a700 (LWP 3945130)] -[Thread 0x7fffc965a700 (LWP 3945130) exited] -[HW] Device 0 is available -[HW] Device 0, type 4 = 0x00000004: gpu -[HW] Device 0, number of Compute Units: 20 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 512 -[HW] Device 0, max Work Items size for dimension: 1 512 -[HW] Device 0, max Work Items size for dimension: 2 512 ------------------------------------------------------------------ -``` - ``` ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --loader.ldpc.shlibversion _cl --log_config.hw_log_level inf ``` -``` -............................................................ -[HW] Platform 0, OpenCL profile FULL_PROFILE -[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX -[HW] Device 0 is available -[HW] Device 0, type 2 = 0x00000002: cpu -[HW] Device 0, number of Compute Units: 8 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 8192 -[HW] Device 0, max Work Items size for dimension: 1 8192 -[HW] Device 0, max Work Items size for dimension: 2 8192 -[New Thread 0x7fffecccc700 (LWP 3945413)] -[New Thread 0x7fffec8cb700 (LWP 3945415)] -[New Thread 0x7fffec4ca700 (LWP 3945414)] -[New Thread 0x7fffdf7fd700 (LWP 3945417)] -[New Thread 0x7fffdfbfe700 (LWP 3945418)] -[New Thread 0x7fffdffff700 (LWP 3945416)] -[New Thread 0x7fffd73fc700 (LWP 3945419)] -[HW] Platform 1, OpenCL profile FULL_PROFILE -[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3 -[New Thread 0x7fffde105700 (LWP 3945420)] -[Thread 0x7fffde105700 (LWP 3945420) exited] -[HW] Device 0 is available -[HW] Device 0, type 4 = 0x00000004: gpu -[HW] Device 0, number of Compute Units: 20 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 512 -[HW] Device 0, max Work Items size for dimension: 1 512 -[HW] Device 0, max Work Items size for dimension: 2 512 ------------------------------------------------------------- -``` - A mechanism to select ldpc implementation is also available in the `ldpctest` phy simulator via the `-v` option, which can be used to specify the version of the ldpc shared library to be used. #### Examples of ldpc shared lib selection when running ldpctest: @@ -211,38 +147,14 @@ Loading libldpc_cuda.so, the cuda implementation of the ldpc decoder: $ ./ldpctest -v _cuda ``` - Loading libldpc_cl.so, the opencl implementation of the ldpc decoder: `make ldpc_cl` - ``` $ ./ldpctest -v _cl -................................ -[HW] Platform 0, OpenCL profile FULL_PROFILE -[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX -[HW] Device 0 is available -[HW] Device 0, type 2 = 0x00000002: cpu -[HW] Device 0, number of Compute Units: 8 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 8192 -[HW] Device 0, max Work Items size for dimension: 1 8192 -[HW] Device 0, max Work Items size for dimension: 2 8192 -[HW] Platform 1, OpenCL profile FULL_PROFILE -[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3 -[HW] Device 0 is available -[HW] Device 0, type 4 = 0x00000004: gpu -[HW] Device 0, number of Compute Units: 20 -[HW] Device 0, max Work Items dimension: 3 -[HW] Device 0, max Work Items size for dimension: 0 512 -[HW] Device 0, max Work Items size for dimension: 1 512 -[HW] Device 0, max Work Items size for dimension: 2 512 -................................ ``` - - ### LDPC libraries The prototypes for the functions of the interface are defined in [nrLDPC_defs.h](file://nrLDPC_defs.h) as typedefs. Libraries implementing the LDPC algorithms must be named `libldpc<_version>.so`, they must implement four functions with the names and types: From d702bcd657370fe2de01c7529084d2c968f7e586 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 7 Aug 2025 09:06:51 +0000 Subject: [PATCH 032/112] fix(LDPCdecoder): Cleanup segment decoder interface Variables 'harq_pid', 'ulsch_id' and 'C' of the segment decoder interface were not used any more by the implementations and set to zero by all the callers. Then it is more relevant and compliant to remove them. --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 3 --- .../nrLDPC_coding_segment_decoder.c | 3 +-- .../PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c | 3 --- .../CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c | 3 --- .../nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu | 3 --- openair1/PHY/CODING/nrLDPC_defs.h | 16 +++++++--------- 6 files changed, 8 insertions(+), 23 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 0e0493dcc6..97b39beaf8 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -352,9 +352,6 @@ one_measurement_t test_ldpc(short max_iterations, set_abort(&dec_abort, false); n_iter = ldpc_toCompare.LDPCdecoder(&decParams[j], - 0, - 0, - 0, (int8_t *)channel_output_fixed[j], (int8_t *)estimated_output[j], &decoder_profiler, diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index c7bb47c581..3fece46ac8 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -215,8 +215,7 @@ static void nr_process_decode_segment(void *arg) ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// pl =====> llrProcBuf ////////////////////////////////// - int decodeIterations = - LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode); + int decodeIterations = LDPCdecoder(p_decoderParms, l, llrProcBuf, p_procTime, rdata->abort_decode); if (decodeIterations < p_decoderParms->numMaxIter) { memcpy(rdata->c, llrProcBuf, K >> 3); diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c index e2ed7fce10..d3b9a58da1 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c @@ -170,9 +170,6 @@ int32_t LDPCshutdown() } int32_t LDPCdecoder(t_nrLDPC_dec_params* p_decParams, - uint8_t harq_pid, - uint8_t ulsch_id, - uint8_t C, int8_t* p_llr, int8_t* p_out, t_nrLDPC_time_stats* p_profiler, diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c index 1766c0f072..49e3c80791 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c @@ -339,9 +339,6 @@ int32_t LDPCinit() } int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, - uint8_t harq_pid, - uint8_t ulsch_id, - uint8_t C, int8_t *p_llr, int8_t *p_out, t_nrLDPC_time_stats *time_decoder, diff --git a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu index aa85716947..9752631fb8 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu +++ b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu @@ -506,9 +506,6 @@ extern "C" void LDPCshutdown() } extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, - uint8_t harq_pid, - uint8_t ulsch_id, - uint8_t C, int8_t *p_llr, int8_t *p_out, t_nrLDPC_time_stats *, diff --git a/openair1/PHY/CODING/nrLDPC_defs.h b/openair1/PHY/CODING/nrLDPC_defs.h index 2298400078..9abb048d83 100644 --- a/openair1/PHY/CODING/nrLDPC_defs.h +++ b/openair1/PHY/CODING/nrLDPC_defs.h @@ -29,7 +29,7 @@ \brief LDPC encoder parameter structure \var n_segments number of segments in the transport block \var first_seg index of the first segment of the subset to encode - within the transport block + within the transport block \var gen_code flag to generate parity check code 0 -> encoding 1 -> generate parity check code with AVX2 @@ -52,8 +52,8 @@ */ typedef struct { unsigned int n_segments; // optim8seg - unsigned int first_seg; // optim8segmulti - unsigned char gen_code; //orig + unsigned int first_seg; // optim8segmulti + unsigned char gen_code; // orig time_stats_t *tinput; time_stats_t *tprep; time_stats_t *tparity; @@ -75,22 +75,20 @@ typedef struct { typedef int32_t(LDPC_initfunc_t)(void); typedef int32_t(LDPC_shutdownfunc_t)(void); + // decoder interface /** \brief LDPC decoder API type definition \param p_decParams LDPC decoder parameters \param p_llr Input LLRs \param p_llrOut Output vector - \param p_profiler LDPC profiler statistics + \param time_stats time statistics + \param ab structure shared between tasks to stop all the tasks if one fails */ - typedef int32_t(LDPC_decoderfunc_t)(t_nrLDPC_dec_params *p_decParams, - uint8_t harq_pid, - uint8_t ulsch_id, - uint8_t C, int8_t *p_llr, int8_t *p_out, - t_nrLDPC_time_stats *, + t_nrLDPC_time_stats *time_stats, decode_abort_t *ab); typedef int32_t(LDPC_encoderfunc_t)(uint8_t **, uint8_t *, encoder_implemparams_t *); From 8d2df31d7b75a6ddbbec57d3987ffbe8fc132b9e Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 7 Aug 2025 09:48:02 +0000 Subject: [PATCH 033/112] feat(LDPCImplementation.md): Add short introduction and TOC --- openair1/PHY/CODING/DOC/LDPCImplementation.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index 8a2237f3e6..dd820b2a9b 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -1,4 +1,8 @@ # LDPC coding implementation +This document gives an overview of the different LDPC coding implementations (functional or not) available with Open Air Interface. + +[[_TOC_]] + The LDPC encoder and decoder are implemented in a shared library, dynamically loaded at run-time using the [oai shared library loader](file://../../../../common/utils/DOC/loader.md). Two types of library are available with two different interfaces. There are libraries implementing the encoder and decoder of slots and libraries implementing the encoder and decoder of code segments. From 37bf1deb7d07113702e5886f4202693f9a8a417c Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 7 Aug 2025 09:49:19 +0000 Subject: [PATCH 034/112] fix(nrLDPC_decoder_LYC): apply clang-format --- .../nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu index 9752631fb8..961fa36579 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu +++ b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu @@ -32,10 +32,13 @@ #include "bgs/BG2_I6" #include "bgs/BG2_I7" #define MAX_ITERATION 2 -#define MC 1 +#define MC 1 typedef void decode_abort_t; -#define cudaCheck(ans) { cudaAssert((ans), __FILE__, __LINE__); } +#define cudaCheck(ans) \ + { \ + cudaAssert((ans), __FILE__, __LINE__); \ + } inline void cudaAssert(cudaError_t code, const char *file, int line) { if (code != cudaSuccess) { @@ -44,23 +47,23 @@ inline void cudaAssert(cudaError_t code, const char *file, int line) } } -typedef struct{ +typedef struct { char x; char y; short value; } h_element; #include "bgs/BG1_compact_in_C.h" -__device__ char dev_const_llr[68*384]; -__device__ char dev_dt [46*68*384]; -__device__ char dev_llr[68*384]; -__device__ unsigned char dev_tmp[68*384]; +__device__ char dev_const_llr[68 * 384]; +__device__ char dev_dt[46 * 68 * 384]; +__device__ char dev_llr[68 * 384]; +__device__ unsigned char dev_tmp[68 * 384]; -h_element h_compact1 [46*23] = {}; -h_element h_compact2 [68*30] = {}; +h_element h_compact1[46 * 23] = {}; +h_element h_compact2[68 * 30] = {}; -__device__ h_element dev_h_compact1[46*23]; // used in kernel 1 -__device__ h_element dev_h_compact2[68*30]; // used in kernel 2 +__device__ h_element dev_h_compact1[46 * 23]; // used in kernel 1 +__device__ h_element dev_h_compact2[68 * 30]; // used in kernel 2 // __device__ __constant__ h_element dev_h_compact1[46*23]; // used in kernel 1 // __device__ __constant__ h_element dev_h_compact2[68*30]; // used in kernel 2 @@ -82,13 +85,13 @@ __global__ void warmup() // warm up gpu for time measurement } -extern "C" -void warmup_for_GPU(){ +extern "C" void warmup_for_GPU() +{ warmup<<<20, 1024>>>(); } -extern "C" -void set_compact_BG(int Zc,short BG){ +extern "C" void set_compact_BG(int Zc, short BG) +{ int row, col; if (BG == 1) { row = 46; @@ -162,7 +165,6 @@ void set_compact_BG(int Zc,short BG){ // return 0; } - // Kernel 1 __global__ void ldpc_cnp_kernel_1st_iter(/*char * dev_llr,*/ int BG, int row, int col, int Zc) { @@ -303,8 +305,7 @@ __global__ void ldpc_cnp_kernel(/*char * dev_llr, char * dev_dt,*/ int BG, int r } // Kernel 2: VNP processing -__global__ void -ldpc_vnp_kernel_normal(/*char * dev_llr, char * dev_dt, char * dev_const_llr,*/ int BG, int row, int col, int Zc) +__global__ void ldpc_vnp_kernel_normal(/*char * dev_llr, char * dev_dt, char * dev_const_llr,*/ int BG, int row, int col, int Zc) { int iMCW = blockIdx.y; int iBlkCol = blockIdx.x; @@ -344,7 +345,6 @@ ldpc_vnp_kernel_normal(/*char * dev_llr, char * dev_dt, char * dev_const_llr,*/ dev_llr[iMCW * col * Zc + iCol] = APP; } - __global__ void pack_decoded_bit(/*char *dev, unsigned char *host,*/ int col, int Zc) { __shared__ unsigned char tmp[128]; @@ -440,8 +440,8 @@ void read_BG(int BG, int *h, int row, int col) */ } -extern "C" -void init_LLR_DMA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out){ +extern "C" void init_LLR_DMA(t_nrLDPC_dec_params *p_decParams, int8_t *p_llr, int8_t *p_out) +{ uint16_t Zc = p_decParams->Z; uint8_t BG = p_decParams->BG; uint8_t col; @@ -456,11 +456,11 @@ void init_LLR_DMA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out cudaDeviceSynchronize(); } -using namespace std ; +using namespace std; /* from here: entry points in decoder shared lib */ -extern "C" -int ldpc_autoinit(void) { // called by the library loader +extern "C" int ldpc_autoinit(void) +{ // called by the library loader /*int devices = 0; cudaError_t err = cudaGetDeviceCount(&devices); @@ -493,7 +493,7 @@ int ldpc_autoinit(void) { // called by the library loader } */ warmup_for_GPU(); - return 0; + return 0; } extern "C" int32_t LDPCinit() @@ -505,11 +505,11 @@ extern "C" void LDPCshutdown() { } -extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, - int8_t *p_llr, - int8_t *p_out, - t_nrLDPC_time_stats *, - decode_abort_t *ab) +extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, + int8_t *p_llr, + int8_t *p_out, + t_nrLDPC_time_stats *, + decode_abort_t *ab) { set_compact_BG(p_decParams->Z, p_decParams->BG); init_LLR_DMA(p_decParams, p_llr, p_out); @@ -526,7 +526,7 @@ extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, } // alloc memory - unsigned char* hard_decision = (unsigned char*)p_out; + unsigned char *hard_decision = (unsigned char *)p_out; // gpu int memorySize_llr_cuda = col * Zc * sizeof(char) * MC; cudaCheck(cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda)); @@ -560,7 +560,7 @@ extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, dim3 pack_block(pack, MC, 1); pack_decoded_bit<<>>(/*dev_llr,*/ /*dev_tmp,*/ col, Zc); - cudaCheck(cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length / 8) * sizeof(unsigned char))); + cudaCheck(cudaMemcpyFromSymbol((void *)hard_decision, (const void *)dev_tmp, (block_length / 8) * sizeof(unsigned char))); cudaDeviceSynchronize(); return MAX_ITERATION; From a2c03f26e9999e0bfc560b79993aaba5af96fd96 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 7 Aug 2025 09:50:20 +0000 Subject: [PATCH 035/112] fix(nrLDPC_decoder_CL): Apply clang-format --- .../CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c | 746 ++++++++++-------- 1 file changed, 416 insertions(+), 330 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c index 49e3c80791..c8d83479a7 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c @@ -18,22 +18,21 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ - /*! \file nrLDPC_decoder_CL.c -* \brief ldpc decoder, openCL implementaion -* \author Francois TABURET -* \date 2021 -* \version 1.0 -* \note initial implem - translation of cuda version -*/ - +/*! \file nrLDPC_decoder_CL.c + * \brief ldpc decoder, openCL implementaion + * \author Francois TABURET + * \date 2021 + * \version 1.0 + * \note initial implem - translation of cuda version + */ #define MAX_ITERATION 2 -#define MC 1 +#define MC 1 -#define MAX_OCLDEV 10 +#define MAX_OCLDEV 10 #define MAX_OCLRUNTIME 5 -typedef struct{ +typedef struct { char x; char y; short value; @@ -51,16 +50,16 @@ typedef struct{ #include "assertions.h" #include "common/utils/LOG/log.h" -#define CLSETKERNELARG(A,B,C,D) \ -rt=clSetKernelArg(A,B,C,D) ;\ -AssertFatal(rt == CL_SUCCESS, "Error %d setting kernel argument index %d\n" , (int)rt, B); +#define CLSETKERNELARG(A, B, C, D) \ + rt = clSetKernelArg(A, B, C, D); \ + AssertFatal(rt == CL_SUCCESS, "Error %d setting kernel argument index %d\n", (int)rt, B); #include "../nrLDPC_decoder_LYC/bgs/BG1_compact_in_C.h" -typedef struct{ +typedef struct { cl_uint max_CU; cl_uint max_WID; - size_t *max_WIS; + size_t *max_WIS; } ocldev_t; typedef struct { @@ -70,7 +69,7 @@ typedef struct { cl_kernel pack_decoded_bit; } oclkernels_t; -typedef struct{ +typedef struct { cl_uint num_devices; cl_device_id devices[MAX_OCLDEV]; ocldev_t ocldev[MAX_OCLDEV]; @@ -81,250 +80,305 @@ typedef struct{ cl_mem dev_const_llr; cl_mem dev_llr; cl_mem dev_dt; - cl_mem dev_tmp; + cl_mem dev_tmp; oclkernels_t kernels[MAX_OCLDEV]; cl_command_queue queue[MAX_OCLDEV]; } oclruntime_t; -typedef struct{ +typedef struct { oclruntime_t runtime[MAX_OCLRUNTIME]; } ocl_t; - - ocl_t ocl; +void set_compact_BG(int Zc, short BG) +{ + cl_uint rt; + int row, col; + if (BG == 1) { + row = 46; + col = 68; + } else { + row = 42; + col = 52; + } + int compact_row = 30; + int compact_col = 19; + if (BG == 2) { + compact_row = 10, compact_col = 23; + } + int memorySize_h_compact1 = row * compact_col * sizeof(h_element); + int memorySize_h_compact2 = compact_row * col * sizeof(h_element); + int lift_index = 0; + short lift_set[][9] = {{2, 4, 8, 16, 32, 64, 128, 256}, + {3, 6, 12, 24, 48, 96, 192, 384}, + {5, 10, 20, 40, 80, 160, 320}, + {7, 14, 28, 56, 112, 224}, + {9, 18, 36, 72, 144, 288}, + {11, 22, 44, 88, 176, 352}, + {13, 26, 52, 104, 208}, + {15, 30, 60, 120, 240}, + {0}}; -void set_compact_BG(int Zc,short BG){ - cl_uint rt; - int row,col; - if(BG == 1){ - row = 46; - col = 68; - } - else{ - row = 42; - col = 52; - } - int compact_row = 30; - int compact_col = 19; - if(BG==2){compact_row = 10, compact_col = 23;} - int memorySize_h_compact1 = row * compact_col * sizeof(h_element); - int memorySize_h_compact2 = compact_row * col * sizeof(h_element); - int lift_index = 0; - short lift_set[][9] = { - {2,4,8,16,32,64,128,256}, - {3,6,12,24,48,96,192,384}, - {5,10,20,40,80,160,320}, - {7,14,28,56,112,224}, - {9,18,36,72,144,288}, - {11,22,44,88,176,352}, - {13,26,52,104,208}, - {15,30,60,120,240}, - {0} - }; - - for(int i = 0; lift_set[i][0] != 0; i++){ - for(int j = 0; lift_set[i][j] != 0; j++){ - if(Zc == lift_set[i][j]){ - lift_index = i; - break; - } - } - } - printf("\nZc = %d BG = %d\n",Zc,BG); - ocl.runtime[0].dev_h_compact1 = clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact1, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact1 for platform %i \n" , (int)rt, 0); - ocl.runtime[0].dev_h_compact2 = clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact2, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact2 for platform %i \n" , (int)rt, 0); - h_element *h1; - h_element *h2; - switch(lift_index){ - case 0: - h1 = host_h_compact1_I0; - h2 = host_h_compact2_I0; - break; - case 1: - h1 = host_h_compact1_I1; - h2 = host_h_compact2_I1; - break; - case 2: - h1 = host_h_compact1_I2; - h2 = host_h_compact2_I2; - break; - case 3: - h1 = host_h_compact1_I3; - h2 = host_h_compact2_I3; - break; - case 4: - h1 = host_h_compact1_I4; - h2 = host_h_compact2_I4; - break; - case 5: - h1 = host_h_compact1_I5; - h2 = host_h_compact2_I5; - break; - case 6: - h1 = host_h_compact1_I6; - h2 = host_h_compact2_I6; - break; - case 7: - h1 = host_h_compact1_I7; - h2 = host_h_compact2_I7; - break; - default: - AssertFatal(0, "Invalid lift_index value %i\n" , lift_index); - break; - } - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_h_compact1, CL_TRUE, 0,memorySize_h_compact1, h1, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact1 memory to pltf %i dev %i\n" , (int)rt, 0,0); - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_h_compact2, CL_TRUE, 0,memorySize_h_compact2, h2, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact2 memory to pltf %i dev %i\n" , (int)rt, 0,0); - // return 0; + for (int i = 0; lift_set[i][0] != 0; i++) { + for (int j = 0; lift_set[i][j] != 0; j++) { + if (Zc == lift_set[i][j]) { + lift_index = i; + break; + } + } + } + printf("\nZc = %d BG = %d\n", Zc, BG); + ocl.runtime[0].dev_h_compact1 = + clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact1, NULL, (cl_int *)&rt); + AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact1 for platform %i \n", (int)rt, 0); + ocl.runtime[0].dev_h_compact2 = + clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact2, NULL, (cl_int *)&rt); + AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact2 for platform %i \n", (int)rt, 0); + h_element *h1; + h_element *h2; + switch (lift_index) { + case 0: + h1 = host_h_compact1_I0; + h2 = host_h_compact2_I0; + break; + case 1: + h1 = host_h_compact1_I1; + h2 = host_h_compact2_I1; + break; + case 2: + h1 = host_h_compact1_I2; + h2 = host_h_compact2_I2; + break; + case 3: + h1 = host_h_compact1_I3; + h2 = host_h_compact2_I3; + break; + case 4: + h1 = host_h_compact1_I4; + h2 = host_h_compact2_I4; + break; + case 5: + h1 = host_h_compact1_I5; + h2 = host_h_compact2_I5; + break; + case 6: + h1 = host_h_compact1_I6; + h2 = host_h_compact2_I6; + break; + case 7: + h1 = host_h_compact1_I7; + h2 = host_h_compact2_I7; + break; + default: + AssertFatal(0, "Invalid lift_index value %i\n", lift_index); + break; + } + rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], + ocl.runtime[0].dev_h_compact1, + CL_TRUE, + 0, + memorySize_h_compact1, + h1, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact1 memory to pltf %i dev %i\n", (int)rt, 0, 0); + rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], + ocl.runtime[0].dev_h_compact2, + CL_TRUE, + 0, + memorySize_h_compact2, + h2, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact2 memory to pltf %i dev %i\n", (int)rt, 0, 0); + // return 0; } -void cl_error_callback(const char* errinfo, const void* private_info, size_t cb, void* user_data) { +void cl_error_callback(const char *errinfo, const void *private_info, size_t cb, void *user_data) +{ oclruntime_t *runtime = (oclruntime_t *)user_data; - LOG_E(HW,"OpenCL accelerator error %s\n", errinfo ); + LOG_E(HW, "OpenCL accelerator error %s\n", errinfo); } -char *clutil_getstrdev(int intdev) { - static char retstring[255]=""; - char *retptr=retstring; - retptr+=sprintf(retptr,"0x%08x: ",(uint32_t)intdev); +char *clutil_getstrdev(int intdev) +{ + static char retstring[255] = ""; + char *retptr = retstring; + retptr += sprintf(retptr, "0x%08x: ", (uint32_t)intdev); if (intdev & CL_DEVICE_TYPE_CPU) - retptr+=sprintf(retptr,"%s","cpu "); + retptr += sprintf(retptr, "%s", "cpu "); if (intdev & CL_DEVICE_TYPE_GPU) - retptr+=sprintf(retptr,"%s","gpu "); + retptr += sprintf(retptr, "%s", "gpu "); if (intdev & CL_DEVICE_TYPE_ACCELERATOR) - retptr+=sprintf(retptr,"%s","acc "); + retptr += sprintf(retptr, "%s", "acc "); return retstring; } -void get_CompilErr(cl_program program, int pltf) { - - // Determine the size of the log - size_t log_size; - for(int i=0; i0 , "clGetPlatformIDs: no cl compatible platform found\n"); - for (int i=0 ; i<(int)num_platforms_found ; i++) { - char stringval[255]; - rt = clGetPlatformInfo(platforms[i],CL_PLATFORM_PROFILE, sizeof(stringval),stringval,NULL); - AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo PROFILE error %d\n" , (int)rt); - LOG_I(HW,"Platform %i, OpenCL profile %s\n", i,stringval ); - rt = clGetPlatformInfo(platforms[i],CL_PLATFORM_VERSION, sizeof(stringval),stringval,NULL); - AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo VERSION error %d\n" , (int)rt); - LOG_I(HW,"Platform %i, OpenCL version %s\n", i,stringval ); - rt = clGetDeviceIDs(platforms[i],CL_DEVICE_TYPE_ALL, sizeof(ocl.runtime[i].devices)/sizeof(cl_device_id),ocl.runtime[i].devices,&(ocl.runtime[i].num_devices)); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceIDs error %d\n" , (int)rt); - int devok=0; - for (int j=0; j 0, "clGetPlatformIDs: no cl compatible platform found\n"); + for (int i = 0; i < (int)num_platforms_found; i++) { + char stringval[255]; + rt = clGetPlatformInfo(platforms[i], CL_PLATFORM_PROFILE, sizeof(stringval), stringval, NULL); + AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo PROFILE error %d\n", (int)rt); + LOG_I(HW, "Platform %i, OpenCL profile %s\n", i, stringval); + rt = clGetPlatformInfo(platforms[i], CL_PLATFORM_VERSION, sizeof(stringval), stringval, NULL); + AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo VERSION error %d\n", (int)rt); + LOG_I(HW, "Platform %i, OpenCL version %s\n", i, stringval); + rt = clGetDeviceIDs(platforms[i], + CL_DEVICE_TYPE_ALL, + sizeof(ocl.runtime[i].devices) / sizeof(cl_device_id), + ocl.runtime[i].devices, + &(ocl.runtime[i].num_devices)); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceIDs error %d\n", (int)rt); + int devok = 0; + for (int j = 0; j < ocl.runtime[i].num_devices; j++) { + cl_bool abool; + rt = clGetDeviceInfo(ocl.runtime[i].devices[j], CL_DEVICE_AVAILABLE, sizeof(abool), &abool, NULL); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_AVAILABLE error %d\n", (int)rt); + LOG_I(HW, "Device %i is %s available\n", j, (abool == CL_TRUE ? "" : "not")); + cl_device_type devtype; + rt = clGetDeviceInfo(ocl.runtime[i].devices[j], CL_DEVICE_TYPE, sizeof(cl_device_type), &devtype, NULL); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_TYPE error %d\n", (int)rt); + LOG_I(HW, "Device %i, type %d = %s\n", j, (int)devtype, clutil_getstrdev(devtype)); + rt = clGetDeviceInfo(ocl.runtime[i].devices[j], + CL_DEVICE_MAX_COMPUTE_UNITS, + sizeof(ocl.runtime[i].ocldev[j].max_CU), + &(ocl.runtime[i].ocldev[j].max_CU), + NULL); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_COMPUTE_UNITS error %d\n", (int)rt); + LOG_I(HW, "Device %i, number of Compute Units: %d\n", j, ocl.runtime[i].ocldev[j].max_CU); + rt = clGetDeviceInfo(ocl.runtime[i].devices[j], + CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, + sizeof(ocl.runtime[i].ocldev[j].max_WID), + &(ocl.runtime[i].ocldev[j].max_WID), + NULL); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_DIMENSIONS error %d\n", (int)rt); + LOG_I(HW, "Device %i, max Work Items dimension: %d\n", j, ocl.runtime[i].ocldev[j].max_WID); + ocl.runtime[i].ocldev[j].max_WIS = (size_t *)malloc(ocl.runtime[i].ocldev[j].max_WID * sizeof(size_t)); + rt = clGetDeviceInfo(ocl.runtime[i].devices[j], + CL_DEVICE_MAX_WORK_ITEM_SIZES, + sizeof(ocl.runtime[i].ocldev[j].max_WID) * sizeof(size_t), + ocl.runtime[i].ocldev[j].max_WIS, + NULL); + AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_SIZES error %d\n", (int)rt); + for (int k = 0; k < ocl.runtime[i].ocldev[j].max_WID; k++) + LOG_I(HW, "Device %i, max Work Items size for dimension: %d %u\n", j, k, (uint32_t)ocl.runtime[i].ocldev[j].max_WIS[k]); + devok++; + } + if (devok > 0) { + ocl.runtime[i].context = clCreateContext(NULL, + ocl.runtime[i].num_devices, + ocl.runtime[i].devices, + cl_error_callback, + &(ocl.runtime[i]), + (cl_int *)&rt); + AssertFatal(rt == CL_SUCCESS, "Error %d creating context for platform %i\n", (int)rt, i); + for (int dev = 0; dev < ocl.runtime[i].num_devices; dev++) { + ocl.runtime[i].queue[dev] = + clCreateCommandQueueWithProperties(ocl.runtime[i].context, ocl.runtime[i].devices[dev], 0, (cl_int *)&rt); + AssertFatal(rt == CL_SUCCESS, "Error %d creating command queue for platform %i device %i\n", (int)rt, i, dev); } - if (devok >0) { - ocl.runtime[i].context = clCreateContext(NULL, ocl.runtime[i].num_devices, ocl.runtime[i].devices, cl_error_callback, &(ocl.runtime[i]), (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating context for platform %i\n" , (int)rt, i); - for(int dev=0; dev0, "No openCL device available to accelerate ldpc\n"); - return 0; + AssertFatal(context_ok > 0, "No openCL device available to accelerate ldpc\n"); + return 0; } int32_t LDPCshutdown() @@ -344,119 +398,151 @@ int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, t_nrLDPC_time_stats *time_decoder, decode_abort_t *ab) { - uint16_t Zc = p_decParams->Z; - uint8_t BG = p_decParams->BG; -// uint8_t numMaxIter = p_decParams->numMaxIter; - int block_length = p_decParams->Kprime; -// e_nrLDPC_outMode outMode = p_decParams->outMode; - uint8_t row,col; - if(BG == 1){ - row = 46; - col = 68; - } - else{ - row = 42; - col = 52; - } + uint16_t Zc = p_decParams->Z; + uint8_t BG = p_decParams->BG; + // uint8_t numMaxIter = p_decParams->numMaxIter; + int block_length = p_decParams->Kprime; + // e_nrLDPC_outMode outMode = p_decParams->outMode; + uint8_t row, col; + if (BG == 1) { + row = 46; + col = 68; + } else { + row = 42; + col = 52; + } -// alloc memory -// unsigned char *hard_decision = (unsigned char*)p_out; -// gpu - int memorySize_llr = col * Zc * sizeof(char) * MC; -// cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) ); -// cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) ); + // alloc memory + // unsigned char *hard_decision = (unsigned char*)p_out; + // gpu + int memorySize_llr = col * Zc * sizeof(char) * MC; + // cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) ); + // cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) ); set_compact_BG(p_decParams->Z, p_decParams->BG); int rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_const_llr, CL_TRUE, 0, memorySize_llr, p_llr, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read only memory in pltf %i dev %i\n" , (int)rt, 0,0); - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_llr, CL_TRUE, 0, - memorySize_llr, p_llr, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read-write memory in pltf %i dev %i\n" , (int)rt, 0,0); -// Define CUDA kernel dimension -// int blockSizeX = Zc; -// dim3 dimGridKernel1(row, MC, 1); // dim of the thread blocks -// dim3 dimBlockKernel1(blockSizeX, 1, 1); + AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read only memory in pltf %i dev %i\n", (int)rt, 0, 0); + rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_llr, CL_TRUE, 0, memorySize_llr, p_llr, 0, NULL, NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read-write memory in pltf %i dev %i\n", (int)rt, 0, 0); + // Define CUDA kernel dimension + // int blockSizeX = Zc; + // dim3 dimGridKernel1(row, MC, 1); // dim of the thread blocks + // dim3 dimBlockKernel1(blockSizeX, 1, 1); -// dim3 dimGridKernel2(col, MC, 1); -// dim3 dimBlockKernel2(blockSizeX, 1, 1); -// cudaDeviceSynchronize(); + // dim3 dimGridKernel2(col, MC, 1); + // dim3 dimBlockKernel2(blockSizeX, 1, 1); + // cudaDeviceSynchronize(); -// lauch kernel - size_t global_item_sizek0[2] = {row*Zc,MC}; // Process the entire lists - size_t global_item_sizek1[2] = {col*Zc,MC}; // Process the entire lists - size_t local_item_sizek[2] = {128,1}; // Divide work items into groups of 128 - - for(int ii = 0; ii < MAX_ITERATION; ii++){ - // first kernel - if(ii == 0){ -// ldpc_cnp_kernel_1st_iter -// <<>> -// ( BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 3, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 4, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 5, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 6, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, NULL, - global_item_sizek0, local_item_sizek, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel_1st \n" , (int)rt); - }else{ -// ldpc_cnp_kernel -// <<>> -// ( BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 3, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 4, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 5, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 6, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].cnp_kernel, 2, NULL, - global_item_sizek0, local_item_sizek, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel\n" , (int)rt); - } - // second kernel -// ldpc_vnp_kernel_normal -// <<>> -// // (dev_llr, dev_const_llr,BG, row, col, Zc); -// (BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_const_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 3, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact2)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 4, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 5, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 6, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 7, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, NULL, - global_item_sizek1, local_item_sizek, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing vnp_kernel_normal \n" , (int)rt); - } - -// int pack = (block_length/128)+1; -// dim3 pack_block(pack, MC, 1); -// pack_decoded_bit<<>>( col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_tmp)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 2, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 3, sizeof(int), (void *)&(Zc)); - - // Execute the OpenCL kernel on the list - size_t global_item_size[2] = {block_length,MC}; // Process the entire lists - size_t local_item_size[2] = {128,1}; // Divide work items into groups of 128 - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].pack_decoded_bit, 2, NULL, - global_item_size, local_item_size, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing pack_decoded_bit \n" , (int)rt); -// cudaCheck( cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char)) ); -// cudaDeviceSynchronize(); - - rt = clEnqueueReadBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_tmp, CL_TRUE, 0, - (block_length/8)*sizeof(unsigned char) , p_llr, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to pltf %i dev %i\n" , (int)rt, 0,0); - return MAX_ITERATION; - + // lauch kernel + size_t global_item_sizek0[2] = {row * Zc, MC}; // Process the entire lists + size_t global_item_sizek1[2] = {col * Zc, MC}; // Process the entire lists + size_t local_item_sizek[2] = {128, 1}; // Divide work items into groups of 128 + + for (int ii = 0; ii < MAX_ITERATION; ii++) { + // first kernel + if (ii == 0) { + // ldpc_cnp_kernel_1st_iter + // <<>> + // ( BG, row, col, Zc); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 3, sizeof(int), (void *)&(BG)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 4, sizeof(int), (void *)&(row)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 5, sizeof(int), (void *)&(col)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 6, sizeof(int), (void *)&(Zc)); + rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], + ocl.runtime[0].kernels[0].cnp_kernel_1st, + 2, + NULL, + global_item_sizek0, + local_item_sizek, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel_1st \n", (int)rt); + } else { + // ldpc_cnp_kernel + // <<>> + // ( BG, row, col, Zc); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 3, sizeof(int), (void *)&(BG)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 4, sizeof(int), (void *)&(row)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 5, sizeof(int), (void *)&(col)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 6, sizeof(int), (void *)&(Zc)); + rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], + ocl.runtime[0].kernels[0].cnp_kernel, + 2, + NULL, + global_item_sizek0, + local_item_sizek, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel\n", (int)rt); + } + // second kernel + // ldpc_vnp_kernel_normal + // <<>> + // // (dev_llr, dev_const_llr,BG, row, col, Zc); + // (BG, row, col, Zc); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_const_llr)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 3, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact2)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 4, sizeof(int), (void *)&(BG)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 5, sizeof(int), (void *)&(row)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 6, sizeof(int), (void *)&(col)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 7, sizeof(int), (void *)&(Zc)); + rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], + ocl.runtime[0].kernels[0].vnp_kernel_normal, + 2, + NULL, + global_item_sizek1, + local_item_sizek, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d enqueing vnp_kernel_normal \n", (int)rt); + } + + // int pack = (block_length/128)+1; + // dim3 pack_block(pack, MC, 1); + // pack_decoded_bit<<>>( col, Zc); + CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_tmp)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 2, sizeof(int), (void *)&(col)); + CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 3, sizeof(int), (void *)&(Zc)); + + // Execute the OpenCL kernel on the list + size_t global_item_size[2] = {block_length, MC}; // Process the entire lists + size_t local_item_size[2] = {128, 1}; // Divide work items into groups of 128 + rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], + ocl.runtime[0].kernels[0].pack_decoded_bit, + 2, + NULL, + global_item_size, + local_item_size, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d enqueing pack_decoded_bit \n", (int)rt); + // cudaCheck( cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char)) ); + // cudaDeviceSynchronize(); + + rt = clEnqueueReadBuffer(ocl.runtime[0].queue[0], + ocl.runtime[0].dev_tmp, + CL_TRUE, + 0, + (block_length / 8) * sizeof(unsigned char), + p_llr, + 0, + NULL, + NULL); + AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to pltf %i dev %i\n", (int)rt, 0, 0); + return MAX_ITERATION; } -#endif //NRLDPC_KERNEL_SOURCE +#endif // NRLDPC_KERNEL_SOURCE From 4de0e54a3a51c716b5af17e90ebac0cafc36efb8 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 8 Aug 2025 17:40:29 +0200 Subject: [PATCH 036/112] NR UE: further simplify and optimize the usage of the PDCCH LLR array The initial version of this patch was provided by "Laurent THOMAS " --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index ba641f1d0d..b4e2c413cf 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -70,11 +70,10 @@ // after removing the 3 DMRS RE, the RB contains 9 RE with PDCCH #define RE_PER_RB_OUT_DMRS 9 -static void nr_pdcch_demapping_deinterleaving(c16_t *llr, +static void nr_pdcch_demapping_deinterleaving(uint32_t coreset_nbr_rb, + c16_t llr[][coreset_nbr_rb * RE_PER_RB_OUT_DMRS], c16_t *e_rx, uint8_t coreset_time_dur, - uint8_t start_symbol, - uint32_t coreset_nbr_rb, uint8_t reg_bundle_size_L, uint8_t coreset_interleaver_size_R, uint8_t n_shift, @@ -168,15 +167,14 @@ static void nr_pdcch_demapping_deinterleaving(c16_t *llr, } int rb_count = 0; - const int data_sc = RE_PER_RB_OUT_DMRS; // 9 sub-carriers with data per PRB for (int c_id = 0; c_id < number_of_candidates; c_id++) { - for (int symbol_idx = start_symbol; symbol_idx < start_symbol + coreset_time_dur; symbol_idx++) { + for (int symbol_idx = 0; symbol_idx < coreset_time_dur; symbol_idx++) { for (int cce_count = 0; cce_count < L[c_id]; cce_count++) { for (int k = 0; k < NR_NB_REG_PER_CCE / reg_bundle_size_L; k++) { // loop over REG bundles int f = f_bundle_j_list_ord[c_id][k + NR_NB_REG_PER_CCE * cce_count / reg_bundle_size_L]; - c16_t *in = llr + (f * B_rb + symbol_idx * coreset_nbr_rb) * data_sc; + c16_t *in = llr[symbol_idx] + f * B_rb * RE_PER_RB_OUT_DMRS; // loop over the RBs of the bundle - memcpy(e_rx + data_sc * rb_count, in, B_rb * data_sc * sizeof(*e_rx)); + memcpy(e_rx + RE_PER_RB_OUT_DMRS * rb_count, in, B_rb * RE_PER_RB_OUT_DMRS * sizeof(*e_rx)); rb_count += B_rb; } } @@ -347,18 +345,18 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset); const int antRx = frame_parms->nb_antennas_rx; - // Pointer to llrs, 4-bit resolution. - int32_t llr_size = (rel15->coreset.duration + rel15->coreset.StartSymbolIndex) * n_rb * RE_PER_RB_OUT_DMRS; - c16_t llr[llr_size]; + // Pointer to llrs + const int symb_size = n_rb * RE_PER_RB_OUT_DMRS; + c16_t llr[rel15->coreset.duration][symb_size]; LOG_D(NR_PHY_DCI, "pdcch coreset: freq %x, n_rb %d, rb_offset %d\n", rel15->coreset.frequency_domain_resource[0], n_rb, rb_offset); - for (int s = rel15->coreset.StartSymbolIndex; s < rel15->coreset.StartSymbolIndex + rel15->coreset.duration; s++) { + for (int s = 0; s < rel15->coreset.duration; s++) { LOG_D(NR_PHY_DCI, "in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n"); - const int arraySz = ceil_mod(n_rb * RE_PER_RB_OUT_DMRS, 32); + const int arraySz = ceil_mod(symb_size, 32); __attribute__((aligned(32))) c16_t rxdataF_ext[antRx][arraySz]; __attribute__((aligned(32))) c16_t pdcch_dl_ch_estimates_ext[antRx][arraySz]; nr_pdcch_extract_rbs_single(ue->frame_parms.samples_per_slot_wCP, @@ -369,7 +367,7 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, arraySz, rxdataF_ext, pdcch_dl_ch_estimates_ext, - s, + rel15->coreset.StartSymbolIndex + s, frame_parms, rel15->coreset.frequency_domain_resource, rel15->BWPStart); @@ -396,20 +394,19 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, antRx, log2_maxh); // log2_maxh+I0_shift - UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), antRx, n_rb * RE_PER_RB_OUT_DMRS, 0); + UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), antRx, symb_size, 0); if (antRx > 1) nr_pdcch_detection_mrc(arraySz, rxdataF_comp); - nr_pdcch_llr(n_rb * RE_PER_RB_OUT_DMRS, rxdataF_comp[0], llr + s * n_rb * RE_PER_RB_OUT_DMRS); + nr_pdcch_llr(symb_size, rxdataF_comp[0], llr[s]); } - UEscopeCopy(ue, pdcchLlr, llr, sizeof(c16_t), 1, llr_size, 0); + UEscopeCopy(ue, pdcchLlr, llr, sizeof(c16_t), 1, rel15->coreset.duration * symb_size, 0); - nr_pdcch_demapping_deinterleaving(llr, + nr_pdcch_demapping_deinterleaving(n_rb, + llr, pdcch_e_rx, rel15->coreset.duration, - rel15->coreset.StartSymbolIndex, - n_rb, rel15->coreset.RegBundleSize, rel15->coreset.InterleaverSize, rel15->coreset.ShiftIndex, From eb6c195c9b12ccde3475a68d065877026336f08b Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Sat, 9 Aug 2025 07:37:35 +0200 Subject: [PATCH 037/112] NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The acceleration magnitude on the orbital path can be calculated as: t = 2 * pi * r / v omega = 2 * pi / t = v / r acceleration = omega² * r = v² / r Where t is the orbital period, r is the orbital radius, v is the orbital velocity, omega is the angular velocity. The acceleration direction is from the SAT position towards the earth center. To calculate the acceleration towards the UE, this is projected on the direction from the SAT to the UE. --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 17 +++++++++++++++-- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 7 +++++++ openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index f79a5628b7..73bb02a575 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -289,8 +289,17 @@ static void calculate_ue_sat_ta(const position_t *position_params, // calculate SAT velocity towards UE double velocity = (vel_sat.X * dir_sat_ue.X + vel_sat.Y * dir_sat_ue.Y + vel_sat.Z * dir_sat_ue.Z) / distance; + // calculate SAT acceleration towards UE + const double radius_2 = pos_sat.X * pos_sat.X + pos_sat.Y * pos_sat.Y + pos_sat.Z * pos_sat.Z; + const double vel_sat_2 = vel_sat.X * vel_sat.X + vel_sat.Y * vel_sat.Y + vel_sat.Z * vel_sat.Z; + const double acceleration = + -(pos_sat.X * dir_sat_ue.X + pos_sat.Y * dir_sat_ue.Y + pos_sat.Z * dir_sat_ue.Z) * vel_sat_2 / (radius_2 * distance); + + LOG_D(NR_MAC, "Satellite velocity towards UE: %f m/s, acceleration towards UE: %f m/s²\n", velocity, acceleration); + ntn_ta->N_UE_TA_adj = (2 * distance / SPEED_OF_LIGHT) * 1e3; // in ms ntn_ta->N_UE_TA_drift = (2 * -velocity / SPEED_OF_LIGHT) * 1e6; // in µs/s + ntn_ta->N_UE_TA_drift_variant = (2 * acceleration / SPEED_OF_LIGHT) * 1e6; // in µs/s² } // populate ntn_ta structure from mac @@ -321,10 +330,12 @@ static void configure_ntn_ta(module_id_t module_id, LOG_W(NR_MAC, "NR UE currently supports only ephemerisInfo_r17 of type positionVelocity_r17\n"); ntn_ta->N_UE_TA_adj = 0; ntn_ta->N_UE_TA_drift = 0; + ntn_ta->N_UE_TA_drift_variant = 0; } } else { // Need R - Release if not present ntn_ta->N_UE_TA_adj = 0; ntn_ta->N_UE_TA_drift = 0; + ntn_ta->N_UE_TA_drift_variant = 0; } // handle cellSpecificKoffset_r17 @@ -356,7 +367,8 @@ static void configure_ntn_ta(module_id_t module_id, ntn_ta->ntn_params_changed = true; LOG_D(NR_MAC, - "SIB19 Rxd. Epoch SFN: %d, Epoch Subframe: %d, k_offset: %ldms, N_Common_Ta: %fms, drift: %fµs/s, variant %fµs/s², N_UE_TA: %fms, drift: %fµs/s\n", + "SIB19 Rxd. Epoch SFN: %d, Epoch Subframe: %d, k_offset: %ldms, N_Common_Ta: %fms, drift: %fµs/s, variant %fµs/s², " + "N_UE_TA: %fms, drift: %fµs/s, variant %fµs/s²\n", ntn_ta->epoch_sfn, ntn_ta->epoch_subframe, ntn_ta->cell_specific_k_offset, @@ -364,7 +376,8 @@ static void configure_ntn_ta(module_id_t module_id, ntn_ta->N_common_ta_drift, ntn_ta->N_common_ta_drift_variant, ntn_ta->N_UE_TA_adj, - ntn_ta->N_UE_TA_drift); + ntn_ta->N_UE_TA_drift, + ntn_ta->N_UE_TA_drift_variant); } static void config_common_ue(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommon_t *scc, int cc_idP) diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 9abe9751cb..2d88708bfe 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -541,6 +541,8 @@ typedef struct ntn_timing_advance_components { double N_UE_TA_adj; // drift rate of N_UE_TA in µs/s double N_UE_TA_drift; + // change rate of N_UE_TA drift in µs/s² + double N_UE_TA_drift_variant; // cell scheduling offset expressed in terms of 15kHz SCS long cell_specific_k_offset; @@ -674,5 +676,10 @@ static inline double get_total_TA_drift(const ntn_timing_advance_componets_t *nt return ntn_ta->N_common_ta_drift + ntn_ta->N_UE_TA_drift; } +static inline double get_total_TA_drift_variant(const ntn_timing_advance_componets_t *ntn_ta) +{ + return ntn_ta->N_common_ta_drift_variant + ntn_ta->N_UE_TA_drift_variant; +} + /*@}*/ #endif /*__LAYER2_MAC_DEFS_H__ */ diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 76836834f0..b95597a0ba 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -2854,7 +2854,7 @@ static void schedule_ntn_config_command(fapi_nr_dl_config_request_t *dl_config, ntn_config_command_pdu->cell_specific_k_offset = mac->ntn_ta.cell_specific_k_offset; ntn_config_command_pdu->ntn_total_time_advance_ms = get_total_TA_ms(&mac->ntn_ta); ntn_config_command_pdu->ntn_total_time_advance_drift = get_total_TA_drift(&mac->ntn_ta); - ntn_config_command_pdu->ntn_total_time_advance_drift_variant = mac->ntn_ta.N_common_ta_drift_variant; + ntn_config_command_pdu->ntn_total_time_advance_drift_variant = get_total_TA_drift_variant(&mac->ntn_ta); dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_NTN_CONFIG_PARAMS; dl_config->number_pdus += 1; From b9bed5838e5bd64cdf6770fda7f9db24e09bfe45 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Mon, 11 Aug 2025 08:38:06 +0000 Subject: [PATCH 038/112] feat(ldpc_cl): Remove ldpc_cl --- openair1/PHY/CODING/CMakeLists.txt | 13 - openair1/PHY/CODING/DOC/LDPCImplementation.md | 44 -- .../CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c | 548 ------------------ .../nrLDPC_decoder_kernels_CL.c | 292 ---------- 4 files changed, 897 deletions(-) delete mode 100644 openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c delete mode 100644 openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.c diff --git a/openair1/PHY/CODING/CMakeLists.txt b/openair1/PHY/CODING/CMakeLists.txt index e31857a4d5..5b7508fc29 100644 --- a/openair1/PHY/CODING/CMakeLists.txt +++ b/openair1/PHY/CODING/CMakeLists.txt @@ -32,19 +32,6 @@ add_dependencies(nr_ulschsim ldpc ldpc_orig) add_dependencies(nr_dlsim ldpc ldpc_orig) add_dependencies(nr_dlschsim ldpc ldpc_orig) -add_custom_target(nrLDPC_decoder_kernels_CL - COMMAND gcc nrLDPC_decoder/nrLDPC_decoder_CL.c -dD -DNRLDPC_KERNEL_SOURCE -E -o ${CMAKE_CURRENT_BINARY_DIR}/nrLDPC_decoder_kernels_CL.clc - SOURCES nrLDPC_decoder/nrLDPC_decoder_CL.c - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) -add_library(ldpc_cl MODULE - nrLDPC_decoder/nrLDPC_decoder_CL.c - nrLDPC_encoder/ldpc_encoder_optim8segmulti.c -) -set_target_properties(ldpc_cl PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -target_link_libraries(ldpc_cl PRIVATE ldpc_segment OpenCL) -add_dependencies(ldpc_cl nrLDPC_decoder_kernels_CL) - ############################################## # Base CUDA setting ############################################## diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index dd820b2a9b..0e4a630f4b 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -107,40 +107,6 @@ loading `libldpc_orig.so` instead of `libldpc.so`: ./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _orig ``` -loading `libldpc_cl.so` instead of `libldpc.so`: - -`make ldpc_cl` - -This command creates the `libldpc_cl.so` shared library. To perform this build successfully, only the OpenCL header `/usr/include/CL/opencl.h` and library `/usr/lib/x86_64-linux-gnu/libOpenCL.so` are required, they implement OpenCL API support which is not hardware dependent. - -``` -Scanning dependencies of target nrLDPC_decoder_kernels_CL -Built target nrLDPC_decoder_kernels_CL -Scanning dependencies of target ldpc_cl -Building C object CMakeFiles/ldpc_cl.dir/usr/local/oai/oai-develop/openairinterface5g/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c.o -In file included from /usr/include/CL/cl.h:32, - from /usr/include/CL/opencl.h:38, - from /usr/local/oai/oai-develop/openairinterface5g/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c:49: -/usr/include/CL/cl_version.h:34:9: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2) - #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)") - ^~~~~~~ - -Building C object CMakeFiles/ldpc_cl.dir/usr/local/oai/oai-develop/openairinterface5g/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c.o -Linking C shared module libldpc_cl.so -Built target ldpc_cl - -``` - -At runtime, to successfully use hardware acceleration via OpenCL, you need to install vendor specific packages which deliver the required drivers and tools to make use of their GPU (Nvidia, Intel...) , fpga (Xilinx, Intel) or CPU (Intel, AMD, ARM...) through OpenCL. - -``` -./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --log_config.gtpu_log_level info --loader.ldpc.shlibversion _cl -``` - -``` -./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --loader.ldpc.shlibversion _cl --log_config.hw_log_level inf -``` - A mechanism to select ldpc implementation is also available in the `ldpctest` phy simulator via the `-v` option, which can be used to specify the version of the ldpc shared library to be used. #### Examples of ldpc shared lib selection when running ldpctest: @@ -151,14 +117,6 @@ Loading libldpc_cuda.so, the cuda implementation of the ldpc decoder: $ ./ldpctest -v _cuda ``` -Loading libldpc_cl.so, the opencl implementation of the ldpc decoder: - -`make ldpc_cl` - -``` -$ ./ldpctest -v _cl -``` - ### LDPC libraries The prototypes for the functions of the interface are defined in [nrLDPC_defs.h](file://nrLDPC_defs.h) as typedefs. Libraries implementing the LDPC algorithms must be named `libldpc<_version>.so`, they must implement four functions with the names and types: @@ -169,6 +127,4 @@ Libraries implementing the LDPC algorithms must be named `libldpc<_version>.so`, `libldpc_cuda.so` has been tested with the `ldpctest` executable, usage from the softmodem's has to be tested. -`libldpc_cl.so` is under development. - [oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home) diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c deleted file mode 100644 index c8d83479a7..0000000000 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c +++ /dev/null @@ -1,548 +0,0 @@ -/* - * 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.0 (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 - */ -/*! \file nrLDPC_decoder_CL.c - * \brief ldpc decoder, openCL implementaion - * \author Francois TABURET - * \date 2021 - * \version 1.0 - * \note initial implem - translation of cuda version - */ - -#define MAX_ITERATION 2 -#define MC 1 - -#define MAX_OCLDEV 10 -#define MAX_OCLRUNTIME 5 - -typedef struct { - char x; - char y; - short value; -} h_element; - -#ifdef NRLDPC_KERNEL_SOURCE -#include "nrLDPC_decoder_kernels_CL.c" -#else -/* uses HW component id for log messages ( --log_config.hw_log_level ) */ -#include -#include -#include -#include -#include "openair1/PHY/CODING/nrLDPC_extern.h" -#include "assertions.h" -#include "common/utils/LOG/log.h" - -#define CLSETKERNELARG(A, B, C, D) \ - rt = clSetKernelArg(A, B, C, D); \ - AssertFatal(rt == CL_SUCCESS, "Error %d setting kernel argument index %d\n", (int)rt, B); - -#include "../nrLDPC_decoder_LYC/bgs/BG1_compact_in_C.h" - -typedef struct { - cl_uint max_CU; - cl_uint max_WID; - size_t *max_WIS; -} ocldev_t; - -typedef struct { - cl_kernel cnp_kernel_1st; - cl_kernel cnp_kernel; - cl_kernel vnp_kernel_normal; - cl_kernel pack_decoded_bit; -} oclkernels_t; - -typedef struct { - cl_uint num_devices; - cl_device_id devices[MAX_OCLDEV]; - ocldev_t ocldev[MAX_OCLDEV]; - cl_context context; - cl_program program; - cl_mem dev_h_compact1; - cl_mem dev_h_compact2; - cl_mem dev_const_llr; - cl_mem dev_llr; - cl_mem dev_dt; - cl_mem dev_tmp; - oclkernels_t kernels[MAX_OCLDEV]; - cl_command_queue queue[MAX_OCLDEV]; -} oclruntime_t; - -typedef struct { - oclruntime_t runtime[MAX_OCLRUNTIME]; -} ocl_t; - -ocl_t ocl; - -void set_compact_BG(int Zc, short BG) -{ - cl_uint rt; - int row, col; - if (BG == 1) { - row = 46; - col = 68; - } else { - row = 42; - col = 52; - } - int compact_row = 30; - int compact_col = 19; - if (BG == 2) { - compact_row = 10, compact_col = 23; - } - int memorySize_h_compact1 = row * compact_col * sizeof(h_element); - int memorySize_h_compact2 = compact_row * col * sizeof(h_element); - int lift_index = 0; - short lift_set[][9] = {{2, 4, 8, 16, 32, 64, 128, 256}, - {3, 6, 12, 24, 48, 96, 192, 384}, - {5, 10, 20, 40, 80, 160, 320}, - {7, 14, 28, 56, 112, 224}, - {9, 18, 36, 72, 144, 288}, - {11, 22, 44, 88, 176, 352}, - {13, 26, 52, 104, 208}, - {15, 30, 60, 120, 240}, - {0}}; - - for (int i = 0; lift_set[i][0] != 0; i++) { - for (int j = 0; lift_set[i][j] != 0; j++) { - if (Zc == lift_set[i][j]) { - lift_index = i; - break; - } - } - } - printf("\nZc = %d BG = %d\n", Zc, BG); - ocl.runtime[0].dev_h_compact1 = - clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact1, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact1 for platform %i \n", (int)rt, 0); - ocl.runtime[0].dev_h_compact2 = - clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact2, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact2 for platform %i \n", (int)rt, 0); - h_element *h1; - h_element *h2; - switch (lift_index) { - case 0: - h1 = host_h_compact1_I0; - h2 = host_h_compact2_I0; - break; - case 1: - h1 = host_h_compact1_I1; - h2 = host_h_compact2_I1; - break; - case 2: - h1 = host_h_compact1_I2; - h2 = host_h_compact2_I2; - break; - case 3: - h1 = host_h_compact1_I3; - h2 = host_h_compact2_I3; - break; - case 4: - h1 = host_h_compact1_I4; - h2 = host_h_compact2_I4; - break; - case 5: - h1 = host_h_compact1_I5; - h2 = host_h_compact2_I5; - break; - case 6: - h1 = host_h_compact1_I6; - h2 = host_h_compact2_I6; - break; - case 7: - h1 = host_h_compact1_I7; - h2 = host_h_compact2_I7; - break; - default: - AssertFatal(0, "Invalid lift_index value %i\n", lift_index); - break; - } - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], - ocl.runtime[0].dev_h_compact1, - CL_TRUE, - 0, - memorySize_h_compact1, - h1, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact1 memory to pltf %i dev %i\n", (int)rt, 0, 0); - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], - ocl.runtime[0].dev_h_compact2, - CL_TRUE, - 0, - memorySize_h_compact2, - h2, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact2 memory to pltf %i dev %i\n", (int)rt, 0, 0); - // return 0; -} -void cl_error_callback(const char *errinfo, const void *private_info, size_t cb, void *user_data) -{ - oclruntime_t *runtime = (oclruntime_t *)user_data; - LOG_E(HW, "OpenCL accelerator error %s\n", errinfo); -} - -char *clutil_getstrdev(int intdev) -{ - static char retstring[255] = ""; - char *retptr = retstring; - retptr += sprintf(retptr, "0x%08x: ", (uint32_t)intdev); - if (intdev & CL_DEVICE_TYPE_CPU) - retptr += sprintf(retptr, "%s", "cpu "); - if (intdev & CL_DEVICE_TYPE_GPU) - retptr += sprintf(retptr, "%s", "gpu "); - if (intdev & CL_DEVICE_TYPE_ACCELERATOR) - retptr += sprintf(retptr, "%s", "acc "); - return retstring; -} - -void get_CompilErr(cl_program program, int pltf) -{ - // Determine the size of the log - size_t log_size; - for (int i = 0; i < ocl.runtime[pltf].num_devices; i++) { - clGetProgramBuildInfo(program, ocl.runtime[pltf].devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); - // Allocate memory for the log - char *log = (char *)malloc(log_size); - // Get the log - clGetProgramBuildInfo(program, ocl.runtime[pltf].devices[i], CL_PROGRAM_BUILD_LOG, log_size, log, NULL); - // Print the log - printf("%s\n", log); - free(log); - } -} - -size_t load_source(char **source_str, char *filename) -{ - FILE *fp; - struct stat st; - size_t source_size; - char *src = NULL; - - if (filename == NULL) { - src = "nrLDPC_decoder_kernels_CL.clc"; - } else { - src = filename; - } - fp = fopen(src, "r"); - AssertFatal(fp, "failed to open cl source %s: %s\n", src, strerror(errno)); - - fstat(fileno(fp), &st); - source_size = st.st_size; - *source_str = (char *)malloc(source_size); - source_size = fread(*source_str, 1, source_size, fp); - fclose(fp); - LOG_I(HW, "Loaded kernel sources from %s %u bytes\n", (filename == NULL) ? "embedded cl code" : src, (unsigned int)source_size); - return source_size; -} - -/* from here: entry points in decoder shared lib */ -int ldpc_autoinit(void) -{ // called by the library loader - cl_platform_id platforms[10]; - cl_uint num_platforms_found; - int context_ok = 0; - cl_uint rt = clGetPlatformIDs(sizeof(platforms) / sizeof(cl_platform_id), platforms, &num_platforms_found); - AssertFatal(rt == CL_SUCCESS, "clGetPlatformIDs error %d\n", (int)rt); - AssertFatal(num_platforms_found > 0, "clGetPlatformIDs: no cl compatible platform found\n"); - for (int i = 0; i < (int)num_platforms_found; i++) { - char stringval[255]; - rt = clGetPlatformInfo(platforms[i], CL_PLATFORM_PROFILE, sizeof(stringval), stringval, NULL); - AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo PROFILE error %d\n", (int)rt); - LOG_I(HW, "Platform %i, OpenCL profile %s\n", i, stringval); - rt = clGetPlatformInfo(platforms[i], CL_PLATFORM_VERSION, sizeof(stringval), stringval, NULL); - AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo VERSION error %d\n", (int)rt); - LOG_I(HW, "Platform %i, OpenCL version %s\n", i, stringval); - rt = clGetDeviceIDs(platforms[i], - CL_DEVICE_TYPE_ALL, - sizeof(ocl.runtime[i].devices) / sizeof(cl_device_id), - ocl.runtime[i].devices, - &(ocl.runtime[i].num_devices)); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceIDs error %d\n", (int)rt); - int devok = 0; - for (int j = 0; j < ocl.runtime[i].num_devices; j++) { - cl_bool abool; - rt = clGetDeviceInfo(ocl.runtime[i].devices[j], CL_DEVICE_AVAILABLE, sizeof(abool), &abool, NULL); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_AVAILABLE error %d\n", (int)rt); - LOG_I(HW, "Device %i is %s available\n", j, (abool == CL_TRUE ? "" : "not")); - cl_device_type devtype; - rt = clGetDeviceInfo(ocl.runtime[i].devices[j], CL_DEVICE_TYPE, sizeof(cl_device_type), &devtype, NULL); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_TYPE error %d\n", (int)rt); - LOG_I(HW, "Device %i, type %d = %s\n", j, (int)devtype, clutil_getstrdev(devtype)); - rt = clGetDeviceInfo(ocl.runtime[i].devices[j], - CL_DEVICE_MAX_COMPUTE_UNITS, - sizeof(ocl.runtime[i].ocldev[j].max_CU), - &(ocl.runtime[i].ocldev[j].max_CU), - NULL); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_COMPUTE_UNITS error %d\n", (int)rt); - LOG_I(HW, "Device %i, number of Compute Units: %d\n", j, ocl.runtime[i].ocldev[j].max_CU); - rt = clGetDeviceInfo(ocl.runtime[i].devices[j], - CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, - sizeof(ocl.runtime[i].ocldev[j].max_WID), - &(ocl.runtime[i].ocldev[j].max_WID), - NULL); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_DIMENSIONS error %d\n", (int)rt); - LOG_I(HW, "Device %i, max Work Items dimension: %d\n", j, ocl.runtime[i].ocldev[j].max_WID); - ocl.runtime[i].ocldev[j].max_WIS = (size_t *)malloc(ocl.runtime[i].ocldev[j].max_WID * sizeof(size_t)); - rt = clGetDeviceInfo(ocl.runtime[i].devices[j], - CL_DEVICE_MAX_WORK_ITEM_SIZES, - sizeof(ocl.runtime[i].ocldev[j].max_WID) * sizeof(size_t), - ocl.runtime[i].ocldev[j].max_WIS, - NULL); - AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_SIZES error %d\n", (int)rt); - for (int k = 0; k < ocl.runtime[i].ocldev[j].max_WID; k++) - LOG_I(HW, "Device %i, max Work Items size for dimension: %d %u\n", j, k, (uint32_t)ocl.runtime[i].ocldev[j].max_WIS[k]); - devok++; - } - if (devok > 0) { - ocl.runtime[i].context = clCreateContext(NULL, - ocl.runtime[i].num_devices, - ocl.runtime[i].devices, - cl_error_callback, - &(ocl.runtime[i]), - (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating context for platform %i\n", (int)rt, i); - for (int dev = 0; dev < ocl.runtime[i].num_devices; dev++) { - ocl.runtime[i].queue[dev] = - clCreateCommandQueueWithProperties(ocl.runtime[i].context, ocl.runtime[i].devices[dev], 0, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating command queue for platform %i device %i\n", (int)rt, i, dev); - } - ocl.runtime[i].dev_const_llr = - clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, 68 * 384, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_const_llr for platform %i \n", (int)rt, i); - ocl.runtime[i].dev_llr = - clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_WRITE | CL_MEM_HOST_WRITE_ONLY, 68 * 384, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_llr for platform %i \n", (int)rt, i); - ocl.runtime[i].dev_dt = - clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_WRITE | CL_MEM_HOST_NO_ACCESS, 46 * 68 * 384, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_dt for platform %i \n", (int)rt, i); - ocl.runtime[i].dev_tmp = - clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY, 68 * 384, NULL, (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_tmp for platform %i \n", (int)rt, i); - char *source_str; - size_t source_size = load_source(&source_str, "nrLDPC_decoder_kernels_CL.clc"); - cl_program program = clCreateProgramWithSource(ocl.runtime[i].context, - 1, - (const char **)&source_str, - (const size_t *)&source_size, - (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating program for platform %i \n", (int)rt, i); - rt = clBuildProgram(program, ocl.runtime[i].num_devices, ocl.runtime[i].devices, NULL /* compile options */, NULL, NULL); - if (rt == CL_BUILD_PROGRAM_FAILURE) { - get_CompilErr(program, i); - } - AssertFatal(rt == CL_SUCCESS, "Error %d buildding program for platform %i \n", rt, i); - - for (int dev = 0; dev < ocl.runtime[i].num_devices; dev++) { - ocl.runtime[i].kernels[dev].cnp_kernel_1st = clCreateKernel(program, "ldpc_cnp_kernel_1st_iter", (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, - "Error %d creating kernel %s platform %i, dev %i\n", - (int)rt, - "ldpc_cnp_kernel_1st_iter", - i, - dev); - ocl.runtime[i].kernels[dev].cnp_kernel = clCreateKernel(program, "ldpc_cnp_kernel", (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n", (int)rt, "ldpc_cnp_kernel", i, dev); - ocl.runtime[i].kernels[dev].vnp_kernel_normal = clCreateKernel(program, "ldpc_vnp_kernel_normal", (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, - "Error %d creating kernel %s platform %i, dev %i\n", - (int)rt, - "ldpc_vnp_kernel_normal", - i, - dev); - ocl.runtime[i].kernels[dev].pack_decoded_bit = clCreateKernel(program, "pack_decoded_bit", (cl_int *)&rt); - AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n", (int)rt, "pack_decoded_bit", i, dev); - } - context_ok++; - } - devok = 0; - } - AssertFatal(context_ok > 0, "No openCL device available to accelerate ldpc\n"); - return 0; -} - -int32_t LDPCshutdown() -{ - return 0; -} - -int32_t LDPCinit() -{ - // init_LLR_DMA(p_decParams, p_llr, p_out); - return 0; -} - -int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, - int8_t *p_llr, - int8_t *p_out, - t_nrLDPC_time_stats *time_decoder, - decode_abort_t *ab) -{ - uint16_t Zc = p_decParams->Z; - uint8_t BG = p_decParams->BG; - // uint8_t numMaxIter = p_decParams->numMaxIter; - int block_length = p_decParams->Kprime; - // e_nrLDPC_outMode outMode = p_decParams->outMode; - uint8_t row, col; - if (BG == 1) { - row = 46; - col = 68; - } else { - row = 42; - col = 52; - } - - // alloc memory - // unsigned char *hard_decision = (unsigned char*)p_out; - // gpu - int memorySize_llr = col * Zc * sizeof(char) * MC; - // cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) ); - // cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) ); - set_compact_BG(p_decParams->Z, p_decParams->BG); - - int rt = - clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_const_llr, CL_TRUE, 0, memorySize_llr, p_llr, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read only memory in pltf %i dev %i\n", (int)rt, 0, 0); - rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_llr, CL_TRUE, 0, memorySize_llr, p_llr, 0, NULL, NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read-write memory in pltf %i dev %i\n", (int)rt, 0, 0); - // Define CUDA kernel dimension - // int blockSizeX = Zc; - // dim3 dimGridKernel1(row, MC, 1); // dim of the thread blocks - // dim3 dimBlockKernel1(blockSizeX, 1, 1); - - // dim3 dimGridKernel2(col, MC, 1); - // dim3 dimBlockKernel2(blockSizeX, 1, 1); - // cudaDeviceSynchronize(); - - // lauch kernel - size_t global_item_sizek0[2] = {row * Zc, MC}; // Process the entire lists - size_t global_item_sizek1[2] = {col * Zc, MC}; // Process the entire lists - size_t local_item_sizek[2] = {128, 1}; // Divide work items into groups of 128 - - for (int ii = 0; ii < MAX_ITERATION; ii++) { - // first kernel - if (ii == 0) { - // ldpc_cnp_kernel_1st_iter - // <<>> - // ( BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 3, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 4, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 5, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 6, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], - ocl.runtime[0].kernels[0].cnp_kernel_1st, - 2, - NULL, - global_item_sizek0, - local_item_sizek, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel_1st \n", (int)rt); - } else { - // ldpc_cnp_kernel - // <<>> - // ( BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 3, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 4, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 5, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 6, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], - ocl.runtime[0].kernels[0].cnp_kernel, - 2, - NULL, - global_item_sizek0, - local_item_sizek, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel\n", (int)rt); - } - // second kernel - // ldpc_vnp_kernel_normal - // <<>> - // // (dev_llr, dev_const_llr,BG, row, col, Zc); - // (BG, row, col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_const_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 3, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact2)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 4, sizeof(int), (void *)&(BG)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 5, sizeof(int), (void *)&(row)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 6, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 7, sizeof(int), (void *)&(Zc)); - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], - ocl.runtime[0].kernels[0].vnp_kernel_normal, - 2, - NULL, - global_item_sizek1, - local_item_sizek, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing vnp_kernel_normal \n", (int)rt); - } - - // int pack = (block_length/128)+1; - // dim3 pack_block(pack, MC, 1); - // pack_decoded_bit<<>>( col, Zc); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_tmp)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 2, sizeof(int), (void *)&(col)); - CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 3, sizeof(int), (void *)&(Zc)); - - // Execute the OpenCL kernel on the list - size_t global_item_size[2] = {block_length, MC}; // Process the entire lists - size_t local_item_size[2] = {128, 1}; // Divide work items into groups of 128 - rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], - ocl.runtime[0].kernels[0].pack_decoded_bit, - 2, - NULL, - global_item_size, - local_item_size, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d enqueing pack_decoded_bit \n", (int)rt); - // cudaCheck( cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char)) ); - // cudaDeviceSynchronize(); - - rt = clEnqueueReadBuffer(ocl.runtime[0].queue[0], - ocl.runtime[0].dev_tmp, - CL_TRUE, - 0, - (block_length / 8) * sizeof(unsigned char), - p_llr, - 0, - NULL, - NULL); - AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to pltf %i dev %i\n", (int)rt, 0, 0); - return MAX_ITERATION; -} -#endif // NRLDPC_KERNEL_SOURCE diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.c deleted file mode 100644 index 42b25e41c0..0000000000 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.c +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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.0 (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 - */ - -/*! \file PHY/CODING/nrLDPC_decoder_kernels_CL.cl -* \brief kernel functions for ldpc decoder accelerated via openCL -* \author Francois TABURET -* \date 2021 -* \version 1.0 -* \company Nokia BellLabs France -* \email: francois.taburet@nokia-bell-labs.com -* \note initial implem - translation of cuda version -* \warning -*/ - - -//__global char dev_dt [46*68*384]; -//__local char *dev_t; -//__global char dev_llr[68*384]; -//__global unsigned char dev_tmp[68*384]; - - -#define INT32_MAX 2147483647 - -//__constant h_element dev_h_compact1[46*19] = {}; // used in kernel 1 -//__constant h_element dev_h_compact2[68*30] = {}; // used in kernel 2 - -// __device__ __constantant__ h_element dev_h_compact1[46*19]; // used in kernel 1 -// __device__ __constantant__ h_element dev_h_compact2[68*30]; // used in kernel 2 - -// row and col element count -__constant char h_ele_row_bg1_count[46] = { - 19, 19, 19, 19, 3, 8, 9, 7, 10, 9, - 7, 8, 7, 6, 7, 7, 6, 6, 6, 6, - 6, 6, 5, 5, 6, 5, 5, 4, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, - 4, 5, 4, 5, 5, 4}; -__constant char h_ele_col_bg1_count[68] = { - 30, 28, 7, 11, 9, 4, 8, 12, 8, 7, - 12, 10, 12, 11, 10, 7, 10, 10, 13, 7, - 8, 11, 12, 5, 6, 6, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1}; -__constant char h_ele_row_bg2_count[42] = { - 8, 10, 8, 10, 4, 6, 6, 6, 4, 5, - 5, 5, 4, 5, 5, 4, 5, 5, 4, 4, - 4, 4, 3, 4, 4, 3, 5, 3, 4, 3, - 5, 3, 4, 4, 4, 4, 4, 3, 4, 4, - 4, 4}; -__constant char h_ele_col_bg2_count[52] = { - 22, 23, 10, 5, 5, 14, 7, 13, 6, 8, - 9, 16, 9, 12, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1}; - - - -// Kernel 1 -__kernel void ldpc_cnp_kernel_1st_iter( __global char * dev_llr, __global char * dev_dt, __local h_element *dev_h_compact1, int BG, int row, int col, int Zc) -{ -// int iMCW = blockIdx.y; // codeword id -// int iBlkRow = blockIdx.x; // block row in h_base -// int iSubRow = threadIdx.x; // row index in sub_block of h_base -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp %d\n", threadIdx.x); - int iMCW = get_group_id(1); // codeword id - int iBlkRow = get_group_id(0); // block row in h_base - int iBlkCol; // block col in h_base - int iSubRow = get_local_id(0);; // row index in sub_block of h_base - int iCol; // overall col index in h_base - int offsetR; - int shift_t; - -// For 2-min algorithm. - int Q_sign = 0; - int sq; - int Q, Q_abs; - int R_temp; - - int sign = 1; - int rmin1 = INT32_MAX; - int rmin2 = INT32_MAX; - char idx_min = 0; - - h_element h_element_t; - int s = (BG==1)? h_ele_row_bg1_count[iBlkRow]:h_ele_row_bg2_count[iBlkRow]; - offsetR = (iMCW * row*col*Zc) + iBlkRow * Zc + iSubRow; // row*col*Zc = size of dev_dt -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("s: %d, offset %d\n", s, offsetR); -// The 1st recursion - for(int i = 0; i < s; i++) // loop through all the ZxZ sub-blocks in a row - { - h_element_t = dev_h_compact1[i*row+iBlkRow]; // compact_col == row - - iBlkCol = h_element_t.y; - shift_t = h_element_t.value; - - shift_t = (iSubRow + shift_t) % Zc; - iCol = (iMCW * col*Zc) + iBlkCol * Zc + shift_t; // col*Zc = size of llr - Q = dev_llr[iCol]; - Q_abs = (Q>0)? Q : -Q; - sq = Q < 0; -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("i %d, icol %d, Q: %d\n", i, iCol, Q); - // quick version - sign = sign * (1 - sq * 2); - Q_sign |= sq << i; - - if (Q_abs < rmin1){ - rmin2 = rmin1; - rmin1 = Q_abs; - idx_min = i; - } else if (Q_abs < rmin2){ - rmin2 = Q_abs; - } - } - -// if(blockIdx.x == 0 && threadIdx.x == 1)printf("min1 %d, min2 %d, min1_idx %d\n", rmin1, rmin2, idx_min); - -// The 2nd recursion - for(int i = 0; i < s; i++){ - // v0: Best performance so far. 0.75f is the value of alpha. - sq = 1 - 2 * ((Q_sign >> i) & 0x01); - R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2); - // write results to global memory - h_element_t = dev_h_compact1[i*row+iBlkRow]; - int addr_temp = offsetR + h_element_t.y * row * Zc; - dev_dt[addr_temp] = R_temp; -// if(blockIdx.x == 0 && threadIdx.x == 1)printf("R_temp %d, temp_addr %d\n", R_temp, addr_temp); - } -} - -// Kernel_1 -__kernel void ldpc_cnp_kernel( __global char * dev_llr, __global char * dev_dt, __local h_element *dev_h_compact1, int BG, int row, int col, int Zc) -{ -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp\n"); -// int iMCW = blockIdx.y; -// int iBlkRow = blockIdx.x; // block row in h_base // block col in h_base -// int iSubRow = threadIdx.x; // row index in sub_block of h_base - int iMCW = get_group_id(1); - int iBlkRow = get_group_id(0); // block row in h_base - int iBlkCol; // block col in h_base - int iSubRow = get_local_id(0);; // row index in sub_block of h_base - int iCol; // overall col index in h_base - int offsetR; - int shift_t; - -// For 2-min algorithm. - int Q_sign = 0; - int sq; - int Q, Q_abs; - int R_temp; - - int sign = 1; - int rmin1 = INT32_MAX; - int rmin2 = INT32_MAX; - char idx_min = 0; - - h_element h_element_t; - int s = (BG==1)? h_ele_row_bg1_count[iBlkRow]: h_ele_row_bg2_count[iBlkRow]; - offsetR = (iMCW *row*col*Zc) + iBlkRow * Zc + iSubRow; // row * col * Zc = size of dev_dt -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("s: %d, offset %d\n", s, offsetR); -// The 1st recursion - for(int i = 0; i < s; i++) // loop through all the ZxZ sub-blocks in a row - { - h_element_t = dev_h_compact1[i*row+iBlkRow]; - - iBlkCol = h_element_t.y; - shift_t = h_element_t.value; - shift_t = (iSubRow + shift_t) % Zc; - iCol = iBlkCol * Zc + shift_t; - - R_temp = dev_dt[offsetR + iBlkCol * row * Zc]; - - Q = dev_llr[iMCW * (col*Zc) + iCol] - R_temp; - Q_abs = (Q>0)? Q : -Q; -// if(blockIdx.x == 0 && threadIdx.x == 1) printf("i %d, icol %d, Q: %d\n", i, iCol, Q); - sq = Q < 0; - sign = sign * (1 - sq * 2); - Q_sign |= sq << i; - - if (Q_abs < rmin1){ - rmin2 = rmin1; - rmin1 = Q_abs; - idx_min = i; - } else if (Q_abs < rmin2){ - rmin2 = Q_abs; - } - - } - -// if(blockIdx.x == 0 && threadIdx.x == 1)printf("min1 %d, min2 %d, min1_idx %d\n", rmin1, rmin2, idx_min); - -// The 2nd recursion - for(int i = 0; i < s; i ++){ - sq = 1 - 2 * ((Q_sign >> i) & 0x01); - R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2); - - - // write results to global memory - h_element_t = dev_h_compact1[i*row+iBlkRow]; - int addr_temp = h_element_t.y * row * Zc + offsetR; - dev_dt[addr_temp] = R_temp; -// if(blockIdx.x == 0 && threadIdx.x == 1)printf("R_temp %d, temp_addr %d\n", R_temp, addr_temp); - } -} - -// Kernel 2: VNP processing -__kernel void -ldpc_vnp_kernel_normal(__global char * dev_llr, __global char * dev_dt, __global char * dev_const_llr, __local h_element *dev_h_compact2, int BG, int row, int col, int Zc) -{ -// int iMCW = blockIdx.y; -// int iBlkCol = blockIdx.x; -// int iSubCol = threadIdx.x; - int iMCW = get_group_id(1); - int iBlkCol = get_group_id(0); - int iBlkRow; - int iSubCol = get_local_id(0); - int iRow; - int iCol; - - int shift_t, sf; - int APP; - - h_element h_element_t; - - // update all the llr values - iCol = iBlkCol * Zc + iSubCol; - APP = dev_const_llr[iMCW *col*Zc + iCol]; - int offsetDt = iMCW *row*col*Zc + iBlkCol * row * Zc; - int s = (BG==1)? h_ele_col_bg1_count[iBlkCol]:h_ele_col_bg2_count[iBlkCol]; - - for(int i = 0; i < s; i++) - { - h_element_t = dev_h_compact2[i*col+iBlkCol]; - - shift_t = h_element_t.value%Zc; - iBlkRow = h_element_t.x; - - sf = iSubCol - shift_t; - sf = (sf + Zc) % Zc; - - iRow = iBlkRow * Zc + sf; - APP = APP + dev_dt[offsetDt + iRow]; - } - if(APP > SCHAR_MAX) APP = SCHAR_MAX; - if(APP < SCHAR_MIN) APP = SCHAR_MIN; - // write back to device global memory - dev_llr[iMCW *col*Zc + iCol] = APP; -} - - -__kernel void pack_decoded_bit(__global unsigned char * dev_llr, __global unsigned char * dev_tmp, int col, int Zc) -{ -// int iMCW = blockIdx.y; -// int btid = threadIdx.x; - unsigned char tmp[128]; - int iMCW = get_group_id(1); - int btid = get_local_id(0); - int tid = iMCW * col*Zc + get_group_id(0)*128 + btid; - tmp[btid] = 0; - - if(dev_llr[tid] < 0){ - tmp[btid] = 1 << (7-(btid&7)); - } -// __syncthreads(); - - if(btid < 16){ - dev_tmp[iMCW * col*Zc + get_group_id(0)*16+btid] = 0; - for(int i = 0; i < 8; i++){ - dev_tmp[iMCW * col*Zc + get_group_id(0)*16+btid] += tmp[btid*8+i]; - } - } -} From 35361db76b9181f0dde4c38fd93623ac74793d80 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 13:11:12 +0200 Subject: [PATCH 039/112] build_oai: don't redirect compilations to a file Redirecting to a file has the problem that it is difficult in the CI to recover these files. Furthermore, at least with ninja, when running build_oai interactively, the build output will only take some lines (because ninja rewrites lines), so the change should not be that big to users. One CI function would print the entire output from build_oai to the console. Since that output might be long now, do not do this. The file is archived, anyway. --- ci-scripts/cls_native.py | 2 +- cmake_targets/build_oai | 12 +++---- cmake_targets/tools/build_helper | 59 -------------------------------- 3 files changed, 5 insertions(+), 68 deletions(-) diff --git a/ci-scripts/cls_native.py b/ci-scripts/cls_native.py index 3dde286c3a..83c1b14b37 100644 --- a/ci-scripts/cls_native.py +++ b/ci-scripts/cls_native.py @@ -43,7 +43,7 @@ class Native(): ret = ssh.run(f"C_INCLUDE_PATH={DPDK_PATH}/include/ PKG_CONFIG_PATH={DPDK_PATH}/lib64/pkgconfig/ {base}/build_oai {options} > {base}/build_oai.log", timeout=900) success = ret.returncode == 0 logs = ssh.run(f"cat {base}/build_oai.log", silent=True) - logging.debug(f"build finished with code {ret.returncode}, output:\n{logs.stdout}") + logging.debug(f"build finished with code {ret.returncode}") archiveArtifact(ssh, ctx, f'{base}/build_oai.log') diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 3b43d69911..b1b305c596 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -37,7 +37,6 @@ set_openair_env conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf HW="" -VERBOSE_COMPILE=0 BUILD_DIR=ran_build DISABLE_HARDWARE_DEPENDENCY="False" CMAKE_BUILD_TYPE="RelWithDebInfo" @@ -98,8 +97,6 @@ Options: Makes the unitary tests Layer 1 simulators -V | --vcd Adds a debgging facility to the binary files: GUI with major internal synchronization events ---verbose-compile - Shows detailed compilation instructions in makefile --build-doxygen Builds doxygen based documentation. --trace-asn1c-enc-dec @@ -314,10 +311,6 @@ function main() { echo_info "Setting gtk-wave output" CMAKE_CMD="$CMAKE_CMD -DENABLE_VCD_FIFO=True" shift;; - --verbose-compile) - VERBOSE_COMPILE=1 - echo_info "Will compile with verbose instructions" - shift;; --build-doxygen) CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON" TARGET_LIST="$TARGET_LIST doc" @@ -475,7 +468,10 @@ function main() { CMAKE_CMD="$CMAKE_CMD ../../.." echo_info "Running \"$CMAKE_CMD\"" eval $CMAKE_CMD - compilations $BUILD_DIR all.txt "$TARGET_LIST" "${BUILD_TOOL_OPT}" + cmd="$CMAKE --build . --target ${TARGET_LIST} -- ${BUILD_TOOL_OPT}" + echo_info "Running \"${cmd}\"" $green + eval $cmd + ret=$? if [ "$UE" = 1 ] ; then echo_info "Generate LTE USIM default sim content UE specific part" diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index f13dd314ef..2c79659991 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -181,65 +181,6 @@ clean_all_files() { rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build } -################################### -# Compilers -################################### - -#check_warnings: -# print error message if the compilation had warnings -#argument: -# $1: log file -check_warnings() { - #we look for 'warning:' in the compilation log file - #this is how gcc starts a warning - #this is not perfect, we may get false positive - warning_count=`grep "warning:" "$1" | grep -E -v "jobserver unavailable|disabling jobserver mode" | wc -l` - if [ $warning_count -gt 0 ]; then - echo_error "WARNING: $warning_count warnings. See $1" - fi -} - -#check_errors: -# print error message if the compilation had errors -#argument: -# $1: log file -check_errors() { - #we look for 'error:' in the compilation log file - error_count=`grep -c "error:" "$1"` - if [ $error_count -gt 0 ]; then - echo_error "ERROR: $error_count error. See $1" - fi -} - -compilations() { - [[ $# -eq 4 ]] || echo_fatal "compilations " - local dir=$1 - local logfile=$2 - local targets=$3 - local build_tool_opt=$4 - local verbose=$([ "$VERBOSE_COMPILE" == "1" ] && echo "-v" || echo "") - echo cd $OPENAIR_DIR/cmake_targets/$dir/build - cd $OPENAIR_DIR/cmake_targets/$dir/build - cmd="$CMAKE --build . ${verbose} --target ${targets} -- ${build_tool_opt}" - echo_info "Running \"${cmd}\"" $green - echo "Log file for compilation is being written to: $dlog/$logfile" - set +e - { - eval ${cmd} - ret=$? - } > $dlog/$logfile 2>&1 - # Print the errors and warnings for CI purposes - grep -E -A5 -B5 "warning:|error:| Error " $dlog/$logfile || true - check_warnings "$dlog/$logfile" - if [[ $ret -eq 0 ]]; then - echo_success "$targets compiled" - else - check_errors "$dlog/$logfile" - echo_error "compilation of $targets failed" - exit 1 - fi -} - ############################################ # External packages installers ############################################ From b3675be33a8cbc3f31addb911f2740499b49bf0b Mon Sep 17 00:00:00 2001 From: calvin_peyron Date: Fri, 8 Aug 2025 14:10:33 +0200 Subject: [PATCH 040/112] Upgrade CI images to Ubuntu 24 Libboost went from 1.74.0 to 1.83.0 alongside Ubuntu update. GCC version is set as default to be more practical. In Ubuntu22, apt sources were in .list files, in Ubuntu24 they are in .sources files. Add --break-system-packages for pip installation to use same logic as before, see the pip update 23.0.1 (2023-02-17). With Ubuntu24 liboai_device requires libpython3.12 --- ci-scripts/cls_containerize.py | 4 +- ....bionic => Dockerfile.formatting.ubuntu24} | 4 +- ....ubuntu22 => Dockerfile.unittest.ubuntu24} | 2 +- cmake_targets/cross-arm.cmake | 4 +- cmake_targets/tools/build_helper | 2 +- doc/cross-compile.md | 4 +- ...base.ubuntu22 => Dockerfile.base.ubuntu24} | 11 ++---- ...4 => Dockerfile.base.ubuntu24.cross-arm64} | 25 ++++++------ ...ockerfile.build.fhi72.native_arm.ubuntu24} | 6 +-- ...untu22 => Dockerfile.build.fhi72.ubuntu24} | 6 +-- ...ild.ubuntu22 => Dockerfile.build.ubuntu24} | 6 +-- ... => Dockerfile.build.ubuntu24.cross-arm64} | 2 +- ...e.eNB.ubuntu22 => Dockerfile.eNB.ubuntu24} | 28 ++++++------- ...buntu22 => Dockerfile.gNB.aerial.ubuntu24} | 4 +- ...file.gNB.aerial.ubuntu24.sanitize-address} | 4 +- ....ubuntu22 => Dockerfile.gNB.aw2s.ubuntu24} | 4 +- ...ubuntu22 => Dockerfile.gNB.fhi72.ubuntu24} | 6 +-- ...e.gNB.ubuntu22 => Dockerfile.gNB.ubuntu24} | 39 ++++++------------- ...eRU.ubuntu22 => Dockerfile.lteRU.ubuntu24} | 21 +++++----- ...eUE.ubuntu22 => Dockerfile.lteUE.ubuntu24} | 30 ++++++-------- ...p.ubuntu22 => Dockerfile.nr-cuup.ubuntu24} | 22 ++--------- ...nrUE.ubuntu22 => Dockerfile.nrUE.ubuntu24} | 39 ++++++------------- 22 files changed, 101 insertions(+), 172 deletions(-) rename ci-scripts/docker/{Dockerfile.formatting.bionic => Dockerfile.formatting.ubuntu24} (97%) rename ci-scripts/docker/{Dockerfile.unittest.ubuntu22 => Dockerfile.unittest.ubuntu24} (98%) rename docker/{Dockerfile.base.ubuntu22 => Dockerfile.base.ubuntu24} (89%) rename docker/{Dockerfile.base.ubuntu22.cross-arm64 => Dockerfile.base.ubuntu24.cross-arm64} (81%) rename docker/{Dockerfile.build.fhi72.native_arm.ubuntu22 => Dockerfile.build.fhi72.native_arm.ubuntu24} (95%) rename docker/{Dockerfile.build.fhi72.ubuntu22 => Dockerfile.build.fhi72.ubuntu24} (95%) rename docker/{Dockerfile.build.ubuntu22 => Dockerfile.build.ubuntu24} (94%) rename docker/{Dockerfile.build.ubuntu22.cross-arm64 => Dockerfile.build.ubuntu24.cross-arm64} (98%) rename docker/{Dockerfile.eNB.ubuntu22 => Dockerfile.eNB.ubuntu24} (87%) rename docker/{Dockerfile.gNB.aerial.ubuntu22 => Dockerfile.gNB.aerial.ubuntu24} (98%) rename docker/{Dockerfile.gNB.aerial.ubuntu22.sanitize-address => Dockerfile.gNB.aerial.ubuntu24.sanitize-address} (98%) rename docker/{Dockerfile.gNB.aw2s.ubuntu22 => Dockerfile.gNB.aw2s.ubuntu24} (98%) rename docker/{Dockerfile.gNB.fhi72.ubuntu22 => Dockerfile.gNB.fhi72.ubuntu24} (98%) rename docker/{Dockerfile.gNB.ubuntu22 => Dockerfile.gNB.ubuntu24} (79%) rename docker/{Dockerfile.lteRU.ubuntu22 => Dockerfile.lteRU.ubuntu24} (86%) rename docker/{Dockerfile.lteUE.ubuntu22 => Dockerfile.lteUE.ubuntu24} (85%) rename docker/{Dockerfile.nr-cuup.ubuntu22 => Dockerfile.nr-cuup.ubuntu24} (73%) rename docker/{Dockerfile.nrUE.ubuntu22 => Dockerfile.nrUE.ubuntu24} (78%) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 34522d9eef..d3168f60a3 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -298,7 +298,7 @@ class Containerize(): self.host = result.group(0) if self.host == 'Ubuntu': self.cli = 'docker' - self.dockerfileprefix = '.ubuntu22' + self.dockerfileprefix = '.ubuntu24' self.cliBuildOptions = '' elif self.host == 'Red Hat': self.cli = 'sudo podman' @@ -625,7 +625,7 @@ class Containerize(): return False # build ran-unittests image - dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu22" + dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu24" logfile = f'{lSourcePath}/cmake_targets/log/unittest-build.log' ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {logfile}') archiveArtifact(cmd, ctx, logfile) diff --git a/ci-scripts/docker/Dockerfile.formatting.bionic b/ci-scripts/docker/Dockerfile.formatting.ubuntu24 similarity index 97% rename from ci-scripts/docker/Dockerfile.formatting.bionic rename to ci-scripts/docker/Dockerfile.formatting.ubuntu24 index a8d58f511c..2f99a69026 100644 --- a/ci-scripts/docker/Dockerfile.formatting.bionic +++ b/ci-scripts/docker/Dockerfile.formatting.ubuntu24 @@ -21,11 +21,11 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- -FROM ubuntu:bionic AS oai-formatting-check +FROM ubuntu:noble AS oai-formatting-check ARG MERGE_REQUEST ARG SRC_BRANCH diff --git a/ci-scripts/docker/Dockerfile.unittest.ubuntu22 b/ci-scripts/docker/Dockerfile.unittest.ubuntu24 similarity index 98% rename from ci-scripts/docker/Dockerfile.unittest.ubuntu22 rename to ci-scripts/docker/Dockerfile.unittest.ubuntu24 index 627b0d07f7..eb18bc24c4 100644 --- a/ci-scripts/docker/Dockerfile.unittest.ubuntu22 +++ b/ci-scripts/docker/Dockerfile.unittest.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- diff --git a/cmake_targets/cross-arm.cmake b/cmake_targets/cross-arm.cmake index 9480fc0fe0..09d6b25e70 100644 --- a/cmake_targets/cross-arm.cmake +++ b/cmake_targets/cross-arm.cmake @@ -1,8 +1,8 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-11) -set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11) +set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++) set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/aarch64-linux-gnu/pkgconfig") diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index f13dd314ef..dc9678263b 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -323,7 +323,7 @@ check_install_usrp_uhd_driver(){ $SUDO apt-get remove libuhd3.14.1 -y || true $SUDO apt-get remove libuhd3.15.0 -y || true local distribution=$(get_distribution_release) - if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then + if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" || "$distribution" == "ubuntu24.04" ]]; then $SUDO apt-get remove libuhd4.?.? -y || true fi v=$(lsb_release -cs) diff --git a/doc/cross-compile.md b/doc/cross-compile.md index 0a0ce3b1ba..ae8dbe5209 100644 --- a/doc/cross-compile.md +++ b/doc/cross-compile.md @@ -36,8 +36,8 @@ sudo cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" sudo sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list sudo apt update -sudo apt install -y gcc-11-aarch64-linux-gnu \ - g++-11-aarch64-linux-gnu +sudo apt install -y gcc-aarch64-linux-gnu \ + g++-aarch64-linux-gnu sudo apt-get install -y \ libblas-dev:arm64 \ diff --git a/docker/Dockerfile.base.ubuntu22 b/docker/Dockerfile.base.ubuntu24 similarity index 89% rename from docker/Dockerfile.base.ubuntu22 rename to docker/Dockerfile.base.ubuntu24 index ba8707d4db..a1f6daa3c3 100644 --- a/docker/Dockerfile.base.ubuntu22 +++ b/docker/Dockerfile.base.ubuntu24 @@ -21,12 +21,12 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- -FROM ubuntu:jammy AS ran-base +FROM ubuntu:noble AS ran-base ARG NEEDED_GIT_PROXY ARG TARGETARCH ENV DEBIAN_FRONTEND=noninteractive @@ -43,9 +43,6 @@ RUN apt-get update && \ ccache \ psmisc \ git \ - #use gcc-12 to avoid problems of default gcc-11 in FlexRIC - gcc-12 \ - g++-12 \ xxd \ libpcre2-dev \ python3-dev \ @@ -55,8 +52,8 @@ RUN apt-get update && \ # python3-pip for conf template generation python3-pip \ wget && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \ - pip3 install --ignore-installed pyyaml + # --break-system-packages allows externally managed environment in pip + pip3 install --ignore-installed pyyaml --break-system-packages # Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini # it will be copied into target containers, to print exit numbers and handle signals properly diff --git a/docker/Dockerfile.base.ubuntu22.cross-arm64 b/docker/Dockerfile.base.ubuntu24.cross-arm64 similarity index 81% rename from docker/Dockerfile.base.ubuntu22.cross-arm64 rename to docker/Dockerfile.base.ubuntu24.cross-arm64 index 1bcba7bdd6..00c7290f5b 100644 --- a/docker/Dockerfile.base.ubuntu22.cross-arm64 +++ b/docker/Dockerfile.base.ubuntu24.cross-arm64 @@ -21,12 +21,12 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 to cross-compile for ARM64 +# Valid for Ubuntu 24.04 to cross-compile for ARM64 # #--------------------------------------------------------------------- -# Very important, the jammy image shall not be using mirrors. A lot of them do NOT support ARM64. -FROM ubuntu:jammy AS ran-base +# Very important, the noble image shall not be using mirrors. A lot of them do NOT support ARM64. +FROM ubuntu:noble AS ran-base ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris # Specifying a working version of SIMDE for ARM: @@ -37,16 +37,17 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ #enabling arm64 architecture dpkg --add-architecture arm64 && \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ noble main restricted\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble-updates main restricted\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble universe\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble-updates universe\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble multiverse\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble-updates multiverse\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ noble-backports main restricted universe multiverse" \ | tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \ cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" && \ sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \ + sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \ @@ -69,8 +70,8 @@ RUN apt-get update && \ libyaml-cpp-dev:arm64 \ # cross build libs and compilers libc6-dev-i386 \ - gcc-11-aarch64-linux-gnu \ - g++-11-aarch64-linux-gnu && \ + gcc-aarch64-linux-gnu \ + g++-aarch64-linux-gnu && \ apt-get clean # Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini diff --git a/docker/Dockerfile.build.fhi72.native_arm.ubuntu22 b/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 similarity index 95% rename from docker/Dockerfile.build.fhi72.native_arm.ubuntu22 rename to docker/Dockerfile.build.fhi72.native_arm.ubuntu24 index b796122bf3..f9f3dc3a8f 100644 --- a/docker/Dockerfile.build.fhi72.native_arm.ubuntu22 +++ b/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface RAN Build for FHI 7.2 -# Valid for UBUNTU 22.04 +# Valid for UBUNTU 24.04 # #--------------------------------------------------------------------- @@ -94,8 +94,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \ cmake -GNinja -DCMAKE_BUILD_TYPE=Release \ -DXAPP_MULTILANGUAGE=OFF \ -DKPM_VERSION=$KPM_VERSION \ - -DE2AP_VERSION=$E2AP_VERSION \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DCMAKE_CXX_COMPILER=g++-12 .. && \ + -DE2AP_VERSION=$E2AP_VERSION .. && \ ninja && \ ninja install diff --git a/docker/Dockerfile.build.fhi72.ubuntu22 b/docker/Dockerfile.build.fhi72.ubuntu24 similarity index 95% rename from docker/Dockerfile.build.fhi72.ubuntu22 rename to docker/Dockerfile.build.fhi72.ubuntu24 index 4674648285..b60553dc1c 100644 --- a/docker/Dockerfile.build.fhi72.ubuntu22 +++ b/docker/Dockerfile.build.fhi72.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface RAN Build for FHI 7.2 -# Valid for UBUNTU 22.04 +# Valid for UBUNTU 24.04 # #--------------------------------------------------------------------- @@ -83,8 +83,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \ cd openair2/E2AP/flexric/build && \ cmake -GNinja -DCMAKE_BUILD_TYPE=Release \ -DKPM_VERSION=$KPM_VERSION \ - -DE2AP_VERSION=$E2AP_VERSION \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DCMAKE_CXX_COMPILER=g++-12 .. && \ + -DE2AP_VERSION=$E2AP_VERSION .. && \ ninja && \ ninja install diff --git a/docker/Dockerfile.build.ubuntu22 b/docker/Dockerfile.build.ubuntu24 similarity index 94% rename from docker/Dockerfile.build.ubuntu22 rename to docker/Dockerfile.build.ubuntu24 index c11946ecdb..b2cc9c6888 100644 --- a/docker/Dockerfile.build.ubuntu22 +++ b/docker/Dockerfile.build.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -66,8 +66,6 @@ RUN \ cd openair2/E2AP/flexric/build && \ cmake -GNinja -DCMAKE_BUILD_TYPE=Release \ -DKPM_VERSION=$KPM_VERSION \ - -DE2AP_VERSION=$E2AP_VERSION \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DCMAKE_CXX_COMPILER=g++-12 .. && \ + -DE2AP_VERSION=$E2AP_VERSION .. && \ ninja && \ ninja install diff --git a/docker/Dockerfile.build.ubuntu22.cross-arm64 b/docker/Dockerfile.build.ubuntu24.cross-arm64 similarity index 98% rename from docker/Dockerfile.build.ubuntu22.cross-arm64 rename to docker/Dockerfile.build.ubuntu24.cross-arm64 index 78c7a64f64..a7978bb6fa 100644 --- a/docker/Dockerfile.build.ubuntu22.cross-arm64 +++ b/docker/Dockerfile.build.ubuntu24.cross-arm64 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 to cross-compile for ARM64 +# Valid for Ubuntu 24.04 to cross-compile for ARM64 # #--------------------------------------------------------------------- diff --git a/docker/Dockerfile.eNB.ubuntu22 b/docker/Dockerfile.eNB.ubuntu24 similarity index 87% rename from docker/Dockerfile.eNB.ubuntu22 rename to docker/Dockerfile.eNB.ubuntu24 index 44797cd7f5..0071d3abef 100644 --- a/docker/Dockerfile.eNB.ubuntu22 +++ b/docker/Dockerfile.eNB.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS enb-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-enb +FROM ubuntu:noble AS oai-enb ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.74.0 \ - libboost-date-time1.74.0 \ - libboost-filesystem1.74.0 \ - libboost-regex1.74.0 \ - libboost-serialization1.74.0 \ - libboost-thread1.74.0 \ - libboost-system1.74.0 \ - libboost-program-options1.74.0 \ + libboost-chrono1.83.0 \ + libboost-date-time1.83.0 \ + libboost-filesystem1.83.0 \ + libboost-regex1.83.0 \ + libboost-serialization1.83.0 \ + libboost-thread1.83.0 \ + libboost-system1.83.0 \ + libboost-program-options1.83.0 \ tzdata \ libblas3 \ libconfig9 \ @@ -73,18 +73,12 @@ RUN apt-get update && \ apt-get remove -y wget && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - #libasan5 \ # see below + libasan8 \ libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# we select another compile (gcc-12) for compilation, requiring another libasan -# library version. Installing it above would install the wrong version. Hence, -# copy the right version from ran-build. When upgrading to Ubuntu24, install -# the correct one above! -COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ - WORKDIR /opt/oai-enb/bin COPY --from=enb-build \ /oai-ran/cmake_targets/ran_build/build/lte-softmodem ./ diff --git a/docker/Dockerfile.gNB.aerial.ubuntu22 b/docker/Dockerfile.gNB.aerial.ubuntu24 similarity index 98% rename from docker/Dockerfile.gNB.aerial.ubuntu22 rename to docker/Dockerfile.gNB.aerial.ubuntu24 index 07bc569586..40cfbcf185 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu22 +++ b/docker/Dockerfile.gNB.aerial.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -59,7 +59,7 @@ RUN /bin/sh oaienv && \ #start from scratch for target executable -FROM ubuntu:jammy AS oai-gnb-aerial +FROM ubuntu:noble AS oai-gnb-aerial ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe diff --git a/docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address b/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address similarity index 98% rename from docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address rename to docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address index c8d35aee55..998b7bdd0c 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address +++ b/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -58,7 +58,7 @@ RUN /bin/sh oaienv && \ #start from scratch for target executable -FROM ubuntu:jammy AS oai-gnb-aerial +FROM ubuntu:noble AS oai-gnb-aerial ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe diff --git a/docker/Dockerfile.gNB.aw2s.ubuntu22 b/docker/Dockerfile.gNB.aw2s.ubuntu24 similarity index 98% rename from docker/Dockerfile.gNB.aw2s.ubuntu22 rename to docker/Dockerfile.gNB.aw2s.ubuntu24 index 11893171db..ca87176258 100644 --- a/docker/Dockerfile.gNB.aw2s.ubuntu22 +++ b/docker/Dockerfile.gNB.aw2s.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -38,7 +38,7 @@ RUN /bin/sh oaienv && \ ./build_oai -w AW2SORI -t Ethernet #start from scratch for target executable -FROM ubuntu:jammy as oai-gnb-aw2s +FROM ubuntu:noble as oai-gnb-aw2s ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe diff --git a/docker/Dockerfile.gNB.fhi72.ubuntu22 b/docker/Dockerfile.gNB.fhi72.ubuntu24 similarity index 98% rename from docker/Dockerfile.gNB.fhi72.ubuntu22 rename to docker/Dockerfile.gNB.fhi72.ubuntu24 index eb781281ec..c83da9004a 100644 --- a/docker/Dockerfile.gNB.fhi72.ubuntu22 +++ b/docker/Dockerfile.gNB.fhi72.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface 7.2 Fronthaul -# Valid for Ubuntu22.04 +# Valid for Ubuntu24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build-fhi72:latest AS gnb-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-gnb +FROM ubuntu:noble AS oai-gnb ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe @@ -62,7 +62,7 @@ RUN apt-get update && \ libyaml-cpp-dev && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + libasan8 \ libubsan1 \ liblapacke; fi' && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/Dockerfile.gNB.ubuntu22 b/docker/Dockerfile.gNB.ubuntu24 similarity index 79% rename from docker/Dockerfile.gNB.ubuntu22 rename to docker/Dockerfile.gNB.ubuntu24 index ea7b538c41..977c53083d 100644 --- a/docker/Dockerfile.gNB.ubuntu22 +++ b/docker/Dockerfile.gNB.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu20.04 +# Valid for Ubuntu24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS gnb-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-gnb +FROM ubuntu:noble AS oai-gnb ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.74.0 \ - libboost-date-time1.74.0 \ - libboost-filesystem1.74.0 \ - libboost-regex1.74.0 \ - libboost-serialization1.74.0 \ - libboost-thread1.74.0 \ - libboost-system1.74.0 \ - libboost-program-options1.74.0 \ + libboost-chrono1.83.0 \ + libboost-date-time1.83.0 \ + libboost-filesystem1.83.0 \ + libboost-regex1.83.0 \ + libboost-serialization1.83.0 \ + libboost-thread1.83.0 \ + libboost-system1.83.0 \ + libboost-program-options1.83.0 \ tzdata \ libblas3 \ libconfig9 \ @@ -67,29 +67,12 @@ RUN apt-get update && \ libyaml-cpp-dev && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - #libasan5 \ # see below + libasan8 \ libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# we select another compile (gcc-12) for compilation, requiring another libasan -# library version. Installing it above would install the wrong version. Hence, -# copy the right version from ran-build. When upgrading to Ubuntu24, install -# the correct one above! -# note: this dockerfile should work for both x86 and arm, hence the glob below -# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target -# directory needs to be also one of those two, but globs don't work in target -# directories, work around this with mv -COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ -ARG TARGETPLATFORM -RUN case "${TARGETPLATFORM}" in \ - "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ - "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ - *) exit 1 ;; \ - esac; \ - mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 - WORKDIR /opt/oai-gnb/bin COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/nr-softmodem ./ diff --git a/docker/Dockerfile.lteRU.ubuntu22 b/docker/Dockerfile.lteRU.ubuntu24 similarity index 86% rename from docker/Dockerfile.lteRU.ubuntu22 rename to docker/Dockerfile.lteRU.ubuntu24 index 0f5f68932a..80bdaafa9d 100644 --- a/docker/Dockerfile.lteRU.ubuntu22 +++ b/docker/Dockerfile.lteRU.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS ru-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-lte-ru +FROM ubuntu:noble AS oai-lte-ru ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -41,6 +41,14 @@ RUN apt-get update && \ tzdata \ procps \ software-properties-common \ + libboost-chrono1.83.0 \ + libboost-date-time1.83.0 \ + libboost-filesystem1.83.0 \ + libboost-regex1.83.0 \ + libboost-serialization1.83.0 \ + libboost-thread1.83.0 \ + libboost-system1.83.0 \ + libboost-program-options1.83.0 \ libblas3 \ libconfig9 \ net-tools \ @@ -71,15 +79,6 @@ COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin COPY --from=ru-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin -COPY --from=ru-base \ - /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 \ - /usr/lib/x86_64-linux-gnu/ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ ldconfig && \ diff --git a/docker/Dockerfile.lteUE.ubuntu22 b/docker/Dockerfile.lteUE.ubuntu24 similarity index 85% rename from docker/Dockerfile.lteUE.ubuntu22 rename to docker/Dockerfile.lteUE.ubuntu24 index 27623dbd33..5faa43f0ab 100644 --- a/docker/Dockerfile.lteUE.ubuntu22 +++ b/docker/Dockerfile.lteUE.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu20.04 +# Valid for Ubuntu24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS lte-ue-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-lte-ue +FROM ubuntu:noble AS oai-lte-ue ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.74.0 \ - libboost-date-time1.74.0 \ - libboost-filesystem1.74.0 \ - libboost-regex1.74.0 \ - libboost-serialization1.74.0 \ - libboost-thread1.74.0 \ - libboost-system1.74.0 \ - libboost-program-options1.74.0 \ + libboost-chrono1.83.0 \ + libboost-date-time1.83.0 \ + libboost-filesystem1.83.0 \ + libboost-regex1.83.0 \ + libboost-serialization1.83.0 \ + libboost-thread1.83.0 \ + libboost-system1.83.0 \ + libboost-program-options1.83.0 \ tzdata \ liblapacke \ libblas3 \ @@ -59,7 +59,7 @@ RUN apt-get update && \ python3 \ python3-six \ python3-requests \ - libpython3.10 \ + libpython3.12 \ libusb-1.0-0 \ iputils-ping \ iproute2 \ @@ -74,18 +74,12 @@ RUN apt-get update && \ apt-get remove -y wget && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - #libasan5 \ # see below + libasan8 \ libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# we select another compile (gcc-12) for compilation, requiring another libasan -# library version. Installing it above would install the wrong version. Hence, -# copy the right version from ran-build. When upgrading to Ubuntu24, install -# the correct one above! -COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ - WORKDIR /opt/oai-lte-ue/bin COPY --from=lte-ue-build \ /oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \ diff --git a/docker/Dockerfile.nr-cuup.ubuntu22 b/docker/Dockerfile.nr-cuup.ubuntu24 similarity index 73% rename from docker/Dockerfile.nr-cuup.ubuntu22 rename to docker/Dockerfile.nr-cuup.ubuntu24 index 2952afa34b..e33fc508d0 100644 --- a/docker/Dockerfile.nr-cuup.ubuntu22 +++ b/docker/Dockerfile.nr-cuup.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu20.04 +# Valid for Ubuntu24.04 # #--------------------------------------------------------------------- @@ -30,7 +30,7 @@ FROM ran-base:latest AS gnb-base FROM ran-build:latest AS gnb-build -FROM ubuntu:jammy AS oai-nr-cuup +FROM ubuntu:noble AS oai-nr-cuup ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe @@ -45,27 +45,11 @@ RUN apt-get update && \ openssl && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - #libasan5 \ see below + libasan8 \ libubsan1 \ liblapacke; fi' && \ rm -rf /var/lib/apt/lists/* -# we select another compile (gcc-12) for compilation, requiring another libasan -# library version. Installing it above would install the wrong version. Hence, -# copy the right version from ran-build. When upgrading to Ubuntu24, install -# the correct one above! -# note: this dockerfile should work for both x86 and arm, hence the glob below -# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target -# directory needs to be also one of those two, but globs don't work in target -# directories, work around this with mv -COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ -ARG TARGETPLATFORM -RUN case "${TARGETPLATFORM}" in \ - "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ - "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ - *) exit 1 ;; \ - esac; \ - mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 ## Copy E2 SM models COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric diff --git a/docker/Dockerfile.nrUE.ubuntu22 b/docker/Dockerfile.nrUE.ubuntu24 similarity index 78% rename from docker/Dockerfile.nrUE.ubuntu22 rename to docker/Dockerfile.nrUE.ubuntu24 index c3b6592753..061587f04b 100644 --- a/docker/Dockerfile.nrUE.ubuntu22 +++ b/docker/Dockerfile.nrUE.ubuntu24 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 22.04 +# Valid for Ubuntu 24.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS nr-ue-build #start from scratch for target executable -FROM ubuntu:jammy AS oai-nr-ue +FROM ubuntu:noble AS oai-nr-ue ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.74.0 \ - libboost-date-time1.74.0 \ - libboost-filesystem1.74.0 \ - libboost-regex1.74.0 \ - libboost-serialization1.74.0 \ - libboost-thread1.74.0 \ - libboost-system1.74.0 \ - libboost-program-options1.74.0 \ + libboost-chrono1.83.0 \ + libboost-date-time1.83.0 \ + libboost-filesystem1.83.0 \ + libboost-regex1.83.0 \ + libboost-serialization1.83.0 \ + libboost-thread1.83.0 \ + libboost-system1.83.0 \ + libboost-program-options1.83.0 \ tzdata \ liblapacke \ libblas3 \ @@ -68,28 +68,11 @@ RUN apt-get update && \ libyaml-cpp-dev && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - #libasan5 \ # see below + libasan8 \ libubsan1; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# we select another compile (gcc-12) for compilation, requiring another libasan -# library version. Installing it above would install the wrong version. Hence, -# copy the right version from ran-build. When upgrading to Ubuntu24, install -# the correct one above! -# note: this dockerfile should work for both x86 and arm, hence the glob below -# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target -# directory needs to be also one of those two, but globs don't work in target -# directories, work around this with mv -COPY --from=nr-ue-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ -ARG TARGETPLATFORM -RUN case "${TARGETPLATFORM}" in \ - "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ - "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ - *) exit 1 ;; \ - esac; \ - mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 - WORKDIR /opt/oai-nr-ue/bin COPY --from=nr-ue-build \ /oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \ From bc9ae55723407df2e35fc4bf3d4c2a878ac0884a Mon Sep 17 00:00:00 2001 From: calvin_peyron Date: Fri, 8 Aug 2025 14:11:37 +0200 Subject: [PATCH 041/112] Remove redundancy As DEBIAN_FRONTEND has been set as environment variable, there is no need to use DEBIAN_FRONTEND=noninteractive inside RUN lines, it is redundant, hence it has been removed. --- ci-scripts/docker/Dockerfile.cppcheck.xenial | 4 ++-- ci-scripts/docker/Dockerfile.formatting.ubuntu24 | 4 ++-- docker/Dockerfile.base.ubuntu24 | 4 ++-- docker/Dockerfile.base.ubuntu24.cross-arm64 | 6 +++--- docker/Dockerfile.build.fhi72.native_arm.ubuntu24 | 4 ++-- docker/Dockerfile.build.fhi72.ubuntu24 | 4 ++-- docker/Dockerfile.eNB.ubuntu24 | 4 ++-- docker/Dockerfile.gNB.aerial.ubuntu24 | 4 ++-- docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address | 4 ++-- docker/Dockerfile.gNB.aw2s.ubuntu24 | 4 ++-- docker/Dockerfile.gNB.fhi72.ubuntu24 | 4 ++-- docker/Dockerfile.gNB.ubuntu24 | 4 ++-- docker/Dockerfile.lteRU.ubuntu24 | 4 ++-- docker/Dockerfile.lteUE.ubuntu24 | 4 ++-- docker/Dockerfile.nr-cuup.ubuntu24 | 4 ++-- docker/Dockerfile.nrUE.ubuntu24 | 4 ++-- 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ci-scripts/docker/Dockerfile.cppcheck.xenial b/ci-scripts/docker/Dockerfile.cppcheck.xenial index 5a61532346..f2c5856358 100644 --- a/ci-scripts/docker/Dockerfile.cppcheck.xenial +++ b/ci-scripts/docker/Dockerfile.cppcheck.xenial @@ -30,8 +30,8 @@ FROM ubuntu:xenial AS oai-cppcheck ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ build-essential \ vim \ cppcheck diff --git a/ci-scripts/docker/Dockerfile.formatting.ubuntu24 b/ci-scripts/docker/Dockerfile.formatting.ubuntu24 index 2f99a69026..382dcb3514 100644 --- a/ci-scripts/docker/Dockerfile.formatting.ubuntu24 +++ b/ci-scripts/docker/Dockerfile.formatting.ubuntu24 @@ -33,8 +33,8 @@ ARG TARGET_BRANCH ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ gawk \ git diff --git a/docker/Dockerfile.base.ubuntu24 b/docker/Dockerfile.base.ubuntu24 index a1f6daa3c3..959b863368 100644 --- a/docker/Dockerfile.base.ubuntu24 +++ b/docker/Dockerfile.base.ubuntu24 @@ -36,8 +36,8 @@ ENV UHD_VERSION=4.4.0.0 #install developers pkg/repo RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ #gcc needed for build_oai build-essential \ ccache \ diff --git a/docker/Dockerfile.base.ubuntu24.cross-arm64 b/docker/Dockerfile.base.ubuntu24.cross-arm64 index 00c7290f5b..1365df71fe 100644 --- a/docker/Dockerfile.base.ubuntu24.cross-arm64 +++ b/docker/Dockerfile.base.ubuntu24.cross-arm64 @@ -34,7 +34,7 @@ ENV SIMDE_VERSION=389f360a66d4a3bec62b7d71ad8be877487809ba #install developers pkg/repo RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ + apt-get upgrade --yes && \ #enabling arm64 architecture dpkg --add-architecture arm64 && \ echo "deb [arch=arm64] http://ports.ubuntu.com/ noble main restricted\n" \ @@ -49,8 +49,8 @@ RUN apt-get update && \ sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \ sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ build-essential \ psmisc \ git \ diff --git a/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 b/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 index f9f3dc3a8f..96f50fa485 100644 --- a/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 +++ b/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 @@ -32,8 +32,8 @@ ARG KPM_VERSION=KPM_V3_00 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ meson \ wget \ xz-utils \ diff --git a/docker/Dockerfile.build.fhi72.ubuntu24 b/docker/Dockerfile.build.fhi72.ubuntu24 index b60553dc1c..7b3ade05b0 100644 --- a/docker/Dockerfile.build.fhi72.ubuntu24 +++ b/docker/Dockerfile.build.fhi72.ubuntu24 @@ -32,8 +32,8 @@ ARG KPM_VERSION=KPM_V3_00 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ meson \ wget \ xz-utils \ diff --git a/docker/Dockerfile.eNB.ubuntu24 b/docker/Dockerfile.eNB.ubuntu24 index 0071d3abef..31e0adce30 100644 --- a/docker/Dockerfile.eNB.ubuntu24 +++ b/docker/Dockerfile.eNB.ubuntu24 @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ diff --git a/docker/Dockerfile.gNB.aerial.ubuntu24 b/docker/Dockerfile.gNB.aerial.ubuntu24 index 40cfbcf185..c31025e039 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu24 +++ b/docker/Dockerfile.gNB.aerial.ubuntu24 @@ -64,8 +64,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ diff --git a/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address b/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address index 998b7bdd0c..c2bbe7ac88 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address +++ b/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address @@ -63,8 +63,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ diff --git a/docker/Dockerfile.gNB.aw2s.ubuntu24 b/docker/Dockerfile.gNB.aw2s.ubuntu24 index ca87176258..70c3046508 100644 --- a/docker/Dockerfile.gNB.aw2s.ubuntu24 +++ b/docker/Dockerfile.gNB.aw2s.ubuntu24 @@ -43,8 +43,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ procps \ libsctp1 \ tzdata \ diff --git a/docker/Dockerfile.gNB.fhi72.ubuntu24 b/docker/Dockerfile.gNB.fhi72.ubuntu24 index c83da9004a..fb9d1d43f7 100644 --- a/docker/Dockerfile.gNB.fhi72.ubuntu24 +++ b/docker/Dockerfile.gNB.fhi72.ubuntu24 @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ pkg-config \ diff --git a/docker/Dockerfile.gNB.ubuntu24 b/docker/Dockerfile.gNB.ubuntu24 index 977c53083d..86fa6d8cbe 100644 --- a/docker/Dockerfile.gNB.ubuntu24 +++ b/docker/Dockerfile.gNB.ubuntu24 @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ diff --git a/docker/Dockerfile.lteRU.ubuntu24 b/docker/Dockerfile.lteRU.ubuntu24 index 80bdaafa9d..de7107f7fd 100644 --- a/docker/Dockerfile.lteRU.ubuntu24 +++ b/docker/Dockerfile.lteRU.ubuntu24 @@ -36,8 +36,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ tzdata \ procps \ software-properties-common \ diff --git a/docker/Dockerfile.lteUE.ubuntu24 b/docker/Dockerfile.lteUE.ubuntu24 index 5faa43f0ab..2b088ddf55 100644 --- a/docker/Dockerfile.lteUE.ubuntu24 +++ b/docker/Dockerfile.lteUE.ubuntu24 @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ diff --git a/docker/Dockerfile.nr-cuup.ubuntu24 b/docker/Dockerfile.nr-cuup.ubuntu24 index e33fc508d0..2c3c58e7e3 100644 --- a/docker/Dockerfile.nr-cuup.ubuntu24 +++ b/docker/Dockerfile.nr-cuup.ubuntu24 @@ -36,8 +36,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ libsctp1 \ libconfig9 \ iproute2 \ diff --git a/docker/Dockerfile.nrUE.ubuntu24 b/docker/Dockerfile.nrUE.ubuntu24 index 061587f04b..94876e9e14 100644 --- a/docker/Dockerfile.nrUE.ubuntu24 +++ b/docker/Dockerfile.nrUE.ubuntu24 @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + apt-get upgrade --yes && \ + apt-get install --yes \ software-properties-common \ procps \ libsctp1 \ From 52107508837d762196f83354c0c936bba346f539 Mon Sep 17 00:00:00 2001 From: Calvin Peyron Date: Wed, 25 Jun 2025 10:40:52 +0200 Subject: [PATCH 042/112] Fix warning tmp may be uninitialized leads to error --- openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c | 2 +- openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c index 12cbe867a4..5a80f04a21 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c @@ -997,7 +997,7 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y, #elif defined(__arm__) || defined(__aarch64__) int16x8_t *yp128; // int16x8_t tmp128[(n+8)>>3]; - int16x8_t tmp, zeros=vdupq_n_s16(0); + int16x8_t tmp = {}, zeros = {}; const uint16_t __attribute__ ((aligned (16))) _Powers[8]= { 1, 2, 4, 8, 16, 32, 64, 128}; uint16x8_t Powers= vld1q_u16(_Powers); diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c index 0180bed149..63ec8ade8e 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c @@ -930,7 +930,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y, #elif defined(__arm__) || defined(__aarch64__) int8x16_t *yp128; int8x16_t tmp128[(n+8)>>3]; - int8x16_t tmp, zeros=vdupq_n_s8(0); + int8x16_t tmp = {}, zeros = {}; const uint8_t __attribute__ ((aligned (16))) _Powers[16]= { 1, 2, 4, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128 }; // Set the powers of 2 (do it once for all, if applicable) From 3a1be4895f655db815971e644583885a9c499157 Mon Sep 17 00:00:00 2001 From: Calvin Peyron Date: Thu, 26 Jun 2025 08:48:14 +0200 Subject: [PATCH 043/112] Rename ubuntuXX to ubuntu --- ci-scripts/cls_containerize.py | 6 +-- ci-scripts/cls_static_code_analysis.py | 2 +- ....ubuntu24 => Dockerfile.formatting.ubuntu} | 0 ...st.ubuntu24 => Dockerfile.unittest.ubuntu} | 0 .../local_common_overrides/build_images.yaml | 8 ++-- doc/Aerial_FAPI_Split_Tutorial.md | 4 +- doc/README.md | 2 +- doc/TESTBenches.md | 42 +++++++++---------- doc/cross-compile.md | 4 +- ...e.base.ubuntu24 => Dockerfile.base.ubuntu} | 0 ...m64 => Dockerfile.base.ubuntu.cross-arm64} | 0 ... Dockerfile.build.fhi72.native_arm.ubuntu} | 0 ...ubuntu24 => Dockerfile.build.fhi72.ubuntu} | 0 ...build.ubuntu24 => Dockerfile.build.ubuntu} | 0 ...64 => Dockerfile.build.ubuntu.cross-arm64} | 0 ...ile.eNB.ubuntu24 => Dockerfile.eNB.ubuntu} | 0 ....ubuntu24 => Dockerfile.gNB.aerial.ubuntu} | 0 ...erfile.gNB.aerial.ubuntu.sanitize-address} | 0 ...2s.ubuntu24 => Dockerfile.gNB.aw2s.ubuntu} | 0 ...2.ubuntu24 => Dockerfile.gNB.fhi72.ubuntu} | 0 ...ile.gNB.ubuntu24 => Dockerfile.gNB.ubuntu} | 0 ...lteRU.ubuntu24 => Dockerfile.lteRU.ubuntu} | 0 ...lteUE.ubuntu24 => Dockerfile.lteUE.ubuntu} | 0 ...uup.ubuntu24 => Dockerfile.nr-cuup.ubuntu} | 0 ...e.nrUE.ubuntu24 => Dockerfile.nrUE.ubuntu} | 0 docker/README.md | 16 +++---- tools/docker-dev-env/README.md | 2 +- tools/docker-dev-env/bootstrap.sh | 2 +- 28 files changed, 44 insertions(+), 44 deletions(-) rename ci-scripts/docker/{Dockerfile.formatting.ubuntu24 => Dockerfile.formatting.ubuntu} (100%) rename ci-scripts/docker/{Dockerfile.unittest.ubuntu24 => Dockerfile.unittest.ubuntu} (100%) rename docker/{Dockerfile.base.ubuntu24 => Dockerfile.base.ubuntu} (100%) rename docker/{Dockerfile.base.ubuntu24.cross-arm64 => Dockerfile.base.ubuntu.cross-arm64} (100%) rename docker/{Dockerfile.build.fhi72.native_arm.ubuntu24 => Dockerfile.build.fhi72.native_arm.ubuntu} (100%) rename docker/{Dockerfile.build.fhi72.ubuntu24 => Dockerfile.build.fhi72.ubuntu} (100%) rename docker/{Dockerfile.build.ubuntu24 => Dockerfile.build.ubuntu} (100%) rename docker/{Dockerfile.build.ubuntu24.cross-arm64 => Dockerfile.build.ubuntu.cross-arm64} (100%) rename docker/{Dockerfile.eNB.ubuntu24 => Dockerfile.eNB.ubuntu} (100%) rename docker/{Dockerfile.gNB.aerial.ubuntu24 => Dockerfile.gNB.aerial.ubuntu} (100%) rename docker/{Dockerfile.gNB.aerial.ubuntu24.sanitize-address => Dockerfile.gNB.aerial.ubuntu.sanitize-address} (100%) rename docker/{Dockerfile.gNB.aw2s.ubuntu24 => Dockerfile.gNB.aw2s.ubuntu} (100%) rename docker/{Dockerfile.gNB.fhi72.ubuntu24 => Dockerfile.gNB.fhi72.ubuntu} (100%) rename docker/{Dockerfile.gNB.ubuntu24 => Dockerfile.gNB.ubuntu} (100%) rename docker/{Dockerfile.lteRU.ubuntu24 => Dockerfile.lteRU.ubuntu} (100%) rename docker/{Dockerfile.lteUE.ubuntu24 => Dockerfile.lteUE.ubuntu} (100%) rename docker/{Dockerfile.nr-cuup.ubuntu24 => Dockerfile.nr-cuup.ubuntu} (100%) rename docker/{Dockerfile.nrUE.ubuntu24 => Dockerfile.nrUE.ubuntu} (100%) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index d3168f60a3..a4e1ddea8b 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -298,7 +298,7 @@ class Containerize(): self.host = result.group(0) if self.host == 'Ubuntu': self.cli = 'docker' - self.dockerfileprefix = '.ubuntu24' + self.dockerfileprefix = '.ubuntu' self.cliBuildOptions = '' elif self.host == 'Red Hat': self.cli = 'sudo podman' @@ -337,7 +337,7 @@ class Containerize(): imageNames.append(('oai-gnb', 'gNB.fhi72', 'oai-gnb-fhi72', '')) result = re.search('build_cross_arm64', self.imageKind) if result is not None: - self.dockerfileprefix = '.ubuntu22.cross-arm64' + self.dockerfileprefix = '.ubuntu.cross-arm64' result = re.search('native_arm', self.imageKind) if result is not None: imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', '')) @@ -625,7 +625,7 @@ class Containerize(): return False # build ran-unittests image - dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu24" + dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu" logfile = f'{lSourcePath}/cmake_targets/log/unittest-build.log' ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {logfile}') archiveArtifact(cmd, ctx, logfile) diff --git a/ci-scripts/cls_static_code_analysis.py b/ci-scripts/cls_static_code_analysis.py index 8b0ec05352..62e9416082 100644 --- a/ci-scripts/cls_static_code_analysis.py +++ b/ci-scripts/cls_static_code_analysis.py @@ -212,7 +212,7 @@ class StaticCodeAnalysis(): logDir = f'{lSourcePath}/cmake_targets/log/' cmd.run(f'mkdir -p {logDir}') cmd.run('docker image rm oai-formatting-check:latest') - cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.bionic {lSourcePath} > {logDir}/oai-formatting-check.txt 2>&1') + cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.ubuntu {lSourcePath} > {logDir}/oai-formatting-check.txt 2>&1') cmd.run('docker image rm oai-formatting-check:latest') cmd.run('docker image prune --force') diff --git a/ci-scripts/docker/Dockerfile.formatting.ubuntu24 b/ci-scripts/docker/Dockerfile.formatting.ubuntu similarity index 100% rename from ci-scripts/docker/Dockerfile.formatting.ubuntu24 rename to ci-scripts/docker/Dockerfile.formatting.ubuntu diff --git a/ci-scripts/docker/Dockerfile.unittest.ubuntu24 b/ci-scripts/docker/Dockerfile.unittest.ubuntu similarity index 100% rename from ci-scripts/docker/Dockerfile.unittest.ubuntu24 rename to ci-scripts/docker/Dockerfile.unittest.ubuntu diff --git a/ci-scripts/yaml_files/local_common_overrides/build_images.yaml b/ci-scripts/yaml_files/local_common_overrides/build_images.yaml index a771289ae4..d738ccb2ff 100644 --- a/ci-scripts/yaml_files/local_common_overrides/build_images.yaml +++ b/ci-scripts/yaml_files/local_common_overrides/build_images.yaml @@ -3,7 +3,7 @@ services: image: ran-base build: context: ../../../ - dockerfile: docker/Dockerfile.base.ubuntu22 + dockerfile: docker/Dockerfile.base.ubuntu tags: - ran-base @@ -11,7 +11,7 @@ services: image: ran-build build: context: ../../../ - dockerfile: docker/Dockerfile.build.ubuntu22 + dockerfile: docker/Dockerfile.build.ubuntu tags: - ran-build depends_on: @@ -22,7 +22,7 @@ services: image: gnb-local build: context: ../../../ - dockerfile: docker/Dockerfile.gNB.ubuntu22 + dockerfile: docker/Dockerfile.gNB.ubuntu tags: - gnb-local depends_on: @@ -35,7 +35,7 @@ services: image: ue-local build: context: ../../../ - dockerfile: docker/Dockerfile.nrUE.ubuntu22 + dockerfile: docker/Dockerfile.nrUE.ubuntu tags: - ue-local depends_on: diff --git a/doc/Aerial_FAPI_Split_Tutorial.md b/doc/Aerial_FAPI_Split_Tutorial.md index 1d8132e38d..4192a8689f 100644 --- a/doc/Aerial_FAPI_Split_Tutorial.md +++ b/doc/Aerial_FAPI_Split_Tutorial.md @@ -213,8 +213,8 @@ With the nvIPC sources in the project directory, the docker image can be built. In order to build the target image (`oai-gnb-aerial`), first you should build a common shared image (`ran-base`) ```bash ~$ cd ~/openairinterface5g/ -~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu22 --tag ran-base:latest -~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu22 --tag oai-gnb-aerial:latest +~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu --tag ran-base:latest +~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu --tag oai-gnb-aerial:latest ``` diff --git a/doc/README.md b/doc/README.md index 40f838750a..f3e30b57ce 100644 --- a/doc/README.md +++ b/doc/README.md @@ -138,4 +138,4 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs. - [formatting](../tools/formatting/README.md) is a clang-format error detection tool - [iwyu](../tools/iwyu/README.md) is a tool to detect `#include` errors -- [docker-dev-env](../tools/docker-dev-env/README.md) is a ubuntu22 docker development environment +- [docker-dev-env](../tools/docker-dev-env/README.md) is a ubuntu24 docker development environment diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md index 2e0a26b2f9..f6a77c2d09 100644 --- a/doc/TESTBenches.md +++ b/doc/TESTBenches.md @@ -88,8 +88,8 @@ information on how the images are built. - [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/) ~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE - orion: Cross-compilation from Intel to ARM - - base image from `Dockerfile.base.ubuntu22.cross-arm64` - - build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images) + - base image from `Dockerfile.base.ubuntu.cross-arm64` + - build image from `Dockerfile.build.ubuntu.cross-arm64` (no target images) - [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/) ~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE - bellatrix @@ -112,29 +112,29 @@ information on how the images are built. - build image from `Dockerfile.clang.rhel9` (compilation only, artifacts not used currently) - [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/) ~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE - - run formatting check from `ci-scripts/docker/Dockerfile.formatting.bionic` + - run formatting check from `ci-scripts/docker/Dockerfile.formatting.ubuntu` - obelix: Ubuntu 22 image build using docker (Note: builds U22 images while pipeline is named U18!) - - base image from `Dockerfile.base.ubuntu22` - - build image from `Dockerfile.build.ubuntu22`, followed by - - target image from `Dockerfile.eNB.ubuntu22` - - target image from `Dockerfile.gNB.ubuntu22` - - target image from `Dockerfile.nr-cuup.ubuntu22` - - target image from `Dockerfile.nrUE.ubuntu22` - - target image from `Dockerfile.lteUE.ubuntu22` - - target image from `Dockerfile.lteRU.ubuntu22` - - target image from `Dockerfile.gNB.aerial.ubuntu22` - - build image from `Dockerfile.build.fhi72.ubuntu22`, followed by - - target image from `Dockerfile.gNB.fhi72.ubuntu22` - - build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu22`, and run them + - base image from `Dockerfile.base.ubuntu` + - build image from `Dockerfile.build.ubuntu`, followed by + - target image from `Dockerfile.eNB.ubuntu` + - target image from `Dockerfile.gNB.ubuntu` + - target image from `Dockerfile.nr-cuup.ubuntu` + - target image from `Dockerfile.nrUE.ubuntu` + - target image from `Dockerfile.lteUE.ubuntu` + - target image from `Dockerfile.lteRU.ubuntu` + - target image from `Dockerfile.gNB.aerial.ubuntu` + - build image from `Dockerfile.build.fhi72.ubuntu`, followed by + - target image from `Dockerfile.gNB.fhi72.ubuntu` + - build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu`, and run them - [RAN-Ubuntu-ARM-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/) ~BUILD-ONLY ~4G-LTE ~5G-NR - gracehopper3-oai: ARM Ubuntu 22 image build using docker - - base image from `Dockerfile.base.ubuntu22` - - build image from `Dockerfile.build.ubuntu22`, followed by - - target image from `Dockerfile.gNB.ubuntu22` - - target image from `Dockerfile.nr-cuup.ubuntu22` - - target image from `Dockerfile.nrUE.ubuntu22` - - target image from `Dockerfile.gNB.aerial.ubuntu22` + - base image from `Dockerfile.base.ubuntu` + - build image from `Dockerfile.build.ubuntu`, followed by + - target image from `Dockerfile.gNB.ubuntu` + - target image from `Dockerfile.nr-cuup.ubuntu` + - target image from `Dockerfile.nrUE.ubuntu` + - target image from `Dockerfile.gNB.aerial.ubuntu` #### Image Test pipelines diff --git a/doc/cross-compile.md b/doc/cross-compile.md index ae8dbe5209..79c4bae761 100644 --- a/doc/cross-compile.md +++ b/doc/cross-compile.md @@ -97,5 +97,5 @@ ninja params_libconfig coding rfsimulator # Further information You can do the above steps using docker, see dockerfiles -`docker/Dockerfile.base.ubuntu22.cross-arm64` and -`docker/Dockerfile.build.ubuntu22.cross-arm64` for more information. +`docker/Dockerfile.base.ubuntu.cross-arm64` and +`docker/Dockerfile.build.ubuntu.cross-arm64` for more information. diff --git a/docker/Dockerfile.base.ubuntu24 b/docker/Dockerfile.base.ubuntu similarity index 100% rename from docker/Dockerfile.base.ubuntu24 rename to docker/Dockerfile.base.ubuntu diff --git a/docker/Dockerfile.base.ubuntu24.cross-arm64 b/docker/Dockerfile.base.ubuntu.cross-arm64 similarity index 100% rename from docker/Dockerfile.base.ubuntu24.cross-arm64 rename to docker/Dockerfile.base.ubuntu.cross-arm64 diff --git a/docker/Dockerfile.build.fhi72.native_arm.ubuntu24 b/docker/Dockerfile.build.fhi72.native_arm.ubuntu similarity index 100% rename from docker/Dockerfile.build.fhi72.native_arm.ubuntu24 rename to docker/Dockerfile.build.fhi72.native_arm.ubuntu diff --git a/docker/Dockerfile.build.fhi72.ubuntu24 b/docker/Dockerfile.build.fhi72.ubuntu similarity index 100% rename from docker/Dockerfile.build.fhi72.ubuntu24 rename to docker/Dockerfile.build.fhi72.ubuntu diff --git a/docker/Dockerfile.build.ubuntu24 b/docker/Dockerfile.build.ubuntu similarity index 100% rename from docker/Dockerfile.build.ubuntu24 rename to docker/Dockerfile.build.ubuntu diff --git a/docker/Dockerfile.build.ubuntu24.cross-arm64 b/docker/Dockerfile.build.ubuntu.cross-arm64 similarity index 100% rename from docker/Dockerfile.build.ubuntu24.cross-arm64 rename to docker/Dockerfile.build.ubuntu.cross-arm64 diff --git a/docker/Dockerfile.eNB.ubuntu24 b/docker/Dockerfile.eNB.ubuntu similarity index 100% rename from docker/Dockerfile.eNB.ubuntu24 rename to docker/Dockerfile.eNB.ubuntu diff --git a/docker/Dockerfile.gNB.aerial.ubuntu24 b/docker/Dockerfile.gNB.aerial.ubuntu similarity index 100% rename from docker/Dockerfile.gNB.aerial.ubuntu24 rename to docker/Dockerfile.gNB.aerial.ubuntu diff --git a/docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address b/docker/Dockerfile.gNB.aerial.ubuntu.sanitize-address similarity index 100% rename from docker/Dockerfile.gNB.aerial.ubuntu24.sanitize-address rename to docker/Dockerfile.gNB.aerial.ubuntu.sanitize-address diff --git a/docker/Dockerfile.gNB.aw2s.ubuntu24 b/docker/Dockerfile.gNB.aw2s.ubuntu similarity index 100% rename from docker/Dockerfile.gNB.aw2s.ubuntu24 rename to docker/Dockerfile.gNB.aw2s.ubuntu diff --git a/docker/Dockerfile.gNB.fhi72.ubuntu24 b/docker/Dockerfile.gNB.fhi72.ubuntu similarity index 100% rename from docker/Dockerfile.gNB.fhi72.ubuntu24 rename to docker/Dockerfile.gNB.fhi72.ubuntu diff --git a/docker/Dockerfile.gNB.ubuntu24 b/docker/Dockerfile.gNB.ubuntu similarity index 100% rename from docker/Dockerfile.gNB.ubuntu24 rename to docker/Dockerfile.gNB.ubuntu diff --git a/docker/Dockerfile.lteRU.ubuntu24 b/docker/Dockerfile.lteRU.ubuntu similarity index 100% rename from docker/Dockerfile.lteRU.ubuntu24 rename to docker/Dockerfile.lteRU.ubuntu diff --git a/docker/Dockerfile.lteUE.ubuntu24 b/docker/Dockerfile.lteUE.ubuntu similarity index 100% rename from docker/Dockerfile.lteUE.ubuntu24 rename to docker/Dockerfile.lteUE.ubuntu diff --git a/docker/Dockerfile.nr-cuup.ubuntu24 b/docker/Dockerfile.nr-cuup.ubuntu similarity index 100% rename from docker/Dockerfile.nr-cuup.ubuntu24 rename to docker/Dockerfile.nr-cuup.ubuntu diff --git a/docker/Dockerfile.nrUE.ubuntu24 b/docker/Dockerfile.nrUE.ubuntu similarity index 100% rename from docker/Dockerfile.nrUE.ubuntu24 rename to docker/Dockerfile.nrUE.ubuntu diff --git a/docker/README.md b/docker/README.md index 36ec65698a..2249fb9c25 100644 --- a/docker/README.md +++ b/docker/README.md @@ -78,7 +78,7 @@ Targets can be: The currently-supported OS are: - `rhel9` for Red Hat Enterprise Linux and Openshift Universal Base Image -- `ubuntu22` for Ubuntu 22.04 LTS +- `ubuntu` for Ubuntu 24.04 LTS - `rocky` for Rocky-Linux 9 For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md). @@ -99,11 +99,11 @@ There are two shared images: one that has all dependencies, and a second that co git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git cd openairinterface5g # default branch is develop, to change use git checkout -docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu22 . +docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu . # if you want use USRP, AW2S and RFSimulator radios -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu . # if you want to use front-haul 7.2 and RFSimulator radios -docker build --tag ran-build-fhi72:latest --file docker/Dockerfile.build.fhi72.ubuntu22 . +docker build --tag ran-build-fhi72:latest --file docker/Dockerfile.build.fhi72.ubuntu . ``` After building: @@ -126,7 +126,7 @@ This is only available for the Ubuntu version of Dockerfiles. You can, for example, create a `sanitizer` version of the ran-build image. ```bash -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu --build-arg "BUILD_OPTION=--sanitize" . ``` Currently the `--sanitize` option for `build_oai` enables: @@ -152,13 +152,13 @@ You can also use this docker build arguments to pass any available option(s) on For example, the eNB: ```bash -docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu22 . +docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu . ``` To build gNB/DU with 7.2 fronthaul support: ```bash -docker build --target oai-gnb-fhi72 --tag oai-gnb-fhi72:latest --file docker/Dockerfile.gNB.fhi72.ubuntu22 . +docker build --target oai-gnb-fhi72 --tag oai-gnb-fhi72:latest --file docker/Dockerfile.gNB.fhi72.ubuntu . ``` After a while: @@ -182,7 +182,7 @@ Note that the steps are identical for `rocky-linux`. If you have used the sanitizer option, then you should also pass it when building the target image: ```bash -docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" . +docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu --build-arg "BUILD_OPTION=--sanitize" . ``` Normally the target image will be around 200 Mbytes bigger. diff --git a/tools/docker-dev-env/README.md b/tools/docker-dev-env/README.md index 5dcb15eb5c..63bd598725 100644 --- a/tools/docker-dev-env/README.md +++ b/tools/docker-dev-env/README.md @@ -2,7 +2,7 @@ ## Description -This contains bash scripts for managing a ubuntu22 dockerized development enviroment for OAI. No need to install any +This contains bash scripts for managing a ubuntu24 dockerized development enviroment for OAI. No need to install any tools on host machines except for docker - `bootstrap.sh` - build development environment image and install the following bash aliases in `~/.bash_aliases`: diff --git a/tools/docker-dev-env/bootstrap.sh b/tools/docker-dev-env/bootstrap.sh index 8c21554dcf..e56be3fa91 100755 --- a/tools/docker-dev-env/bootstrap.sh +++ b/tools/docker-dev-env/bootstrap.sh @@ -11,7 +11,7 @@ fi if ! docker images | grep -q "ran-base"; then echo "ran-base:latest image not found. Building the image..." - docker build -f ../../docker/Dockerfile.base.ubuntu22 -t ran-base:latest ../../ + docker build -f ../../docker/Dockerfile.base.ubuntu -t ran-base:latest ../../ else echo "ran-base:latest image found." fi From 12cf0155251bd96cd58fe85cc0f5ee75c48f76bf Mon Sep 17 00:00:00 2001 From: calvin_peyron Date: Thu, 24 Jul 2025 14:37:42 +0200 Subject: [PATCH 044/112] "as" should be in capital letters --- docker/Dockerfile.gNB.aw2s.ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.gNB.aw2s.ubuntu b/docker/Dockerfile.gNB.aw2s.ubuntu index 70c3046508..b55977dfab 100644 --- a/docker/Dockerfile.gNB.aw2s.ubuntu +++ b/docker/Dockerfile.gNB.aw2s.ubuntu @@ -38,7 +38,7 @@ RUN /bin/sh oaienv && \ ./build_oai -w AW2SORI -t Ethernet #start from scratch for target executable -FROM ubuntu:noble as oai-gnb-aw2s +FROM ubuntu:noble AS oai-gnb-aw2s ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe From c137020ca2199ed76af064a4de67f3c6fd4a614a Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 22 Apr 2025 12:34:53 +0200 Subject: [PATCH 045/112] remove fixed size H_awgn_mimo that may cause segfault in simulator in case of more than 4 antennas --- radio/rfsimulator/simulator.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/radio/rfsimulator/simulator.c b/radio/rfsimulator/simulator.c index ebc4f5016f..f7e035d375 100644 --- a/radio/rfsimulator/simulator.c +++ b/radio/rfsimulator/simulator.c @@ -991,15 +991,15 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest if (t->poll_telnetcmdq) t->poll_telnetcmdq(t->telnetcmd_qid, t); - for (int a = 0; a < nbAnt; a++) { // loop over number of Rx antennas + for (int a_rx = 0; a_rx < nbAnt; a_rx++) { // loop over number of Rx antennas if (ptr->channel_model != NULL) { // apply a channel model if (num_chanmod_channels == 0) { memset(temp_array, 0, sizeof(temp_array)); } num_chanmod_channels++; rxAddInput(ptr->circularBuf, - temp_array[a], - a, + temp_array[a_rx], + a_rx, ptr->channel_model, nsamps, t->nextRxTstamp, @@ -1008,7 +1008,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest } else { // no channel modeling int nbAnt_tx = ptr->th.nbAnt; // number of Tx antennas int firstIndex = (CirSize + t->nextRxTstamp - t->chan_offset) % CirSize; - sample_t *out = (sample_t *)samplesVoid[a]; + sample_t *out = (sample_t *)samplesVoid[a_rx]; if (nbAnt_tx == 1 && t->nb_cnx == 1) { // optimized for 1 Tx and 1 UE sample_t *firstSample = (sample_t *)&(ptr->circularBuf[firstIndex]); if (firstIndex + nsamps > CirSize) { @@ -1020,16 +1020,16 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest } } else { // SIMD (with simde) optimization might be added here later - double H_awgn_mimo[4][4] = {{1.0, 0.2, 0.1, 0.05}, // rx 0 - {0.2, 1.0, 0.2, 0.1}, // rx 1 - {0.1, 0.2, 1.0, 0.2}, // rx 2 - {0.05, 0.1, 0.2, 1.0}}; // rx 3 - - LOG_D(HW, "nbAnt_tx %d\n", nbAnt_tx); + LOG_D(HW, "nbAnt_tx %d nbAnt %d\n", nbAnt_tx, nbAnt); + double H_awgn_mimo_coeff[nbAnt_tx]; + for (int a_tx = 0; a_tx < nbAnt_tx; a_tx++) { + uint32_t ant_diff = abs(a_tx - a_rx); + H_awgn_mimo_coeff[a_tx] = ant_diff ? (0.2 / ant_diff) : 1.0; + } for (int i = 0; i < nsamps; i++) { // loop over nsamps for (int a_tx = 0; a_tx < nbAnt_tx; a_tx++) { // sum up signals from nbAnt_tx antennas - out[i].r += (short)(ptr->circularBuf[((firstIndex + i) * nbAnt_tx + a_tx) % CirSize].r * H_awgn_mimo[a][a_tx]); - out[i].i += (short)(ptr->circularBuf[((firstIndex + i) * nbAnt_tx + a_tx) % CirSize].i * H_awgn_mimo[a][a_tx]); + out[i].r += (short)(ptr->circularBuf[((firstIndex + i) * nbAnt_tx + a_tx) % CirSize].r * H_awgn_mimo_coeff[a_tx]); + out[i].i += (short)(ptr->circularBuf[((firstIndex + i) * nbAnt_tx + a_tx) % CirSize].i * H_awgn_mimo_coeff[a_tx]); } // end for a_tx } // end for i (number of samps) } // end of 1 tx antenna optimization From e2c4033b577c1848a22d8f4ddee91ad64e18ca3a Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 7 Aug 2025 12:16:11 +0200 Subject: [PATCH 046/112] When a client connects, we need to start the send/receive loop but the first reception is void data --- radio/rfsimulator/simulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/rfsimulator/simulator.c b/radio/rfsimulator/simulator.c index f7e035d375..1a5c94f698 100644 --- a/radio/rfsimulator/simulator.c +++ b/radio/rfsimulator/simulator.c @@ -181,7 +181,7 @@ static buffer_t *allocCirBuf(rfsimulator_state_t *bridge, int sock) ptr->conn_sock = sock; ptr->lastReceivedTS = 0; ptr->headerMode = true; - ptr->trashingPacket = false; + ptr->trashingPacket = true; ptr->transferPtr = (char *)&ptr->th; ptr->remainToTransfer = sizeof(samplesBlockHeader_t); int sendbuff = SEND_BUFF_SIZE; @@ -980,7 +980,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest for (int sock = 0; sock < MAX_FD_RFSIMU; sock++) { buffer_t *ptr = &t->buf[sock]; - if (ptr->circularBuf) { + if (ptr->circularBuf && !ptr->trashingPacket) { bool reGenerateChannel = false; // fixme: when do we regenerate From c3e7fe47e6ab45a8c708b4c84a02f77f8594f2e3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Aug 2025 18:37:32 +0200 Subject: [PATCH 047/112] Remove unused Amarisoft CI XML file --- ci-scripts/xml_files/sa_cn5g_asue_start.xml | 47 --------------------- 1 file changed, 47 deletions(-) delete mode 100644 ci-scripts/xml_files/sa_cn5g_asue_start.xml diff --git a/ci-scripts/xml_files/sa_cn5g_asue_start.xml b/ci-scripts/xml_files/sa_cn5g_asue_start.xml deleted file mode 100644 index a9d3a88d5d..0000000000 --- a/ci-scripts/xml_files/sa_cn5g_asue_start.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - cn5g-start-tab - CN5G-Start - log-in - -100000 -000100 - - - - - - Initialize_5GCN - Initialize 5G Core - --type start-mini-as-ue --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap - - - - Custom_Command - Reboot USRP - asterix - ssh root@172.21.19.14 reboot ; sleep 45 - - - From 08428381d61253b05749eec58d9d51654b81db3d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Aug 2025 13:44:36 +0200 Subject: [PATCH 048/112] CI AW2S: modify configuration to have RedCap UEs connect --- ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf index 3bfe9ede51..c56f0e51b5 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -153,6 +153,11 @@ gNBs = ); + RedCap: { + cellBarredRedCap1Rx_r17 = 1; + cellBarredRedCap2Rx_r17 = 1; + intraFreqReselectionRedCap_r17 = 0; + } # ------- SCTP definitions SCTP : From 4a41df2788f2182baf8d8aebd18906ec7311db04 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Aug 2025 13:52:34 +0200 Subject: [PATCH 049/112] Make some Amarisoft UEs RedCap UEs Change the parameters to be redcap (release: 17, redcap: "redcap") on some UEs, and modify the path to the updated configuration. Specifically, make UE 1 normal (no RedCap), UE 2 RedCap, UEs 3&4 normal, UEs 5&6 RedCap, etc. RedCap UEs should now only be able to connect if the gNB is handling Redcap UEs, which is done in the parent commit. --- ci-scripts/as_ue/aw2s-multi-00102-20.cfg | 40 ++++++++++++++---------- ci-scripts/ci_infra.yaml | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ci-scripts/as_ue/aw2s-multi-00102-20.cfg b/ci-scripts/as_ue/aw2s-multi-00102-20.cfg index c02a6b357d..5c8872d9ae 100644 --- a/ci-scripts/as_ue/aw2s-multi-00102-20.cfg +++ b/ci-scripts/as_ue/aw2s-multi-00102-20.cfg @@ -46,7 +46,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -61,8 +61,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -76,7 +77,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -91,7 +92,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -106,8 +107,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -121,8 +123,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -136,7 +139,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -151,7 +154,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -166,7 +169,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -181,8 +184,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -196,8 +200,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -211,8 +216,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -226,7 +232,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -241,7 +247,7 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", apn:"oai", attach_pdn_type:"ipv4", @@ -256,8 +262,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], @@ -271,8 +278,9 @@ allow dynamic UE creation from remote API */ "sim_algo":"milenage", "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, + as_release: 17, ue_category: "nr", + redcap: "redcap", apn:"oai", attach_pdn_type:"ipv4", default_nssai: [ { sst: 1, }, ], diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml index 804852c937..9d39e9a781 100644 --- a/ci-scripts/ci_infra.yaml +++ b/ci-scripts/ci_infra.yaml @@ -147,7 +147,7 @@ ltebox-nepes: amarisoft_ue: Host: amariue - InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz/aw2s-multi-00102-20.cfg & + InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz_redcap/aw2s-multi-00102-20.cfg & TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2 NetworkScript: ip netns exec ue1 ip a show dev pdn0 amarisoft_ue_2x2: From 3b573798878839a5ae7ef65a05b8ed1eea880ce8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Aug 2025 17:12:03 +0200 Subject: [PATCH 050/112] CI AW2S-Amarisoft: verify RedCap'edness of a UE Since the parent commit, UE 1 is normal (no RedCap), UE 2 is RedCap. Verify that the gNB agrees with that and detects the second UE as RedCap by analyzing some logs. The first check is a bit elaborate, but basically is [ $(docker logs | grep XYZ | wc -l) -eq 0 ] ^ ^ ^ ^ ^ 1 2 3 4 5 (1) is the if statement, that compares (4) the number of occurrences (3) of "RedCap" in the (2) docker logs (5) to being equal to Note for all UEs which number, and whether it is RedCap (so this need to be kept in sync with the Amarisoft UE sim configuration file in use!). --- .../xml_files/container_sa_aw2s_asue.xml | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml index 88ab941e31..f6a2bde823 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -32,7 +32,9 @@ 120000 102000 102001 + 302001 102002 + 302002 102003 102004 102005 @@ -92,91 +94,105 @@ Attach_UE - Attach UE + Attach UE 1 amarisoft_ue_1 + + Custom_Command + Verify UE 1 is normal (no RedCap) + avra + [ $(docker logs oai-gnb-aw2s | grep -E "UE with RNTI [0-9a-f]{4} is RedCap" | wc -l) -eq 0 ] + + Attach_UE - Attach UE + Attach (RedCap) UE 2 amarisoft_ue_2 + + Custom_Command + Verify UE 2 is RedCap + avra + [ $(docker logs oai-gnb-aw2s | grep -m1 -E "UE with RNTI [0-9a-f]{4} is RedCap" | wc -l) -eq 1 ] + + Attach_UE - Attach UE + Attach UE 3 amarisoft_ue_3 Attach_UE - Attach UE + Attach UE 4 amarisoft_ue_4 Attach_UE - Attach UE + Attach (RedCap) UE 5 amarisoft_ue_5 Attach_UE - Attach UE + Attach (RedCap) UE 6 amarisoft_ue_6 Attach_UE - Attach UE + Attach UE 7 amarisoft_ue_7 Attach_UE - Attach UE + Attach UE 8 amarisoft_ue_8 Attach_UE - Attach UE + Attach UE 9 amarisoft_ue_9 Attach_UE - Attach UE + Attach (RedCap) UE 10 amarisoft_ue_10 Attach_UE - Attach UE + Attach (RedCap) UE 11 amarisoft_ue_11 Attach_UE - Attach UE + Attach (RedCap) UE 12 amarisoft_ue_12 Attach_UE - Attach UE + Attach UE 13 amarisoft_ue_13 Attach_UE - Attach UE + Attach UE 14 amarisoft_ue_14 Attach_UE - Attach UE + Attach (RedCap) UE 15 amarisoft_ue_15 @@ -233,7 +249,7 @@ Attach_UE - Attach UE + Attach (RedCap) UE 16 amarisoft_ue_16 From 4b85f353694ded16ba13d92ef14758e3bcfe7395 Mon Sep 17 00:00:00 2001 From: francescomani Date: Sat, 26 Jul 2025 11:36:31 +0200 Subject: [PATCH 051/112] add option to directly send the beam index to L1 via FAPI without look-up table (for 7.2 split) --- doc/analog_beamforming.md | 4 +++- openair2/GNB_APP/MACRLC_nr_paramdef.h | 2 +- openair2/GNB_APP/gnb_config.c | 7 +++++-- openair2/LAYER2/NR_MAC_gNB/config.c | 12 +++++------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 4 ++-- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 18 +++++++++++------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 7 +++++++ 8 files changed, 35 insertions(+), 21 deletions(-) diff --git a/doc/analog_beamforming.md b/doc/analog_beamforming.md index 4ff208343e..45f93bf44c 100644 --- a/doc/analog_beamforming.md +++ b/doc/analog_beamforming.md @@ -17,11 +17,13 @@ Analog beamforming implementation also allows to enable distributed antenna syst A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf) In the `MACRLC` section of configuration files, there are three new parameters: `set_analog_beamforming`, `beam_duration` and `beams_per_period`. The explanation of these parameters is here provided: -- `set_analog_beamforming` can be set to 1 or 0 to activate or desactivate analog beamforming (default value is 0) +- `set_analog_beamforming` can be set a value equal to 1 or 2 to activate or 0 to desactivate analog beamforming (default value is 0) - `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1) - `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1) - `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted +Setting analog beamforming to 1 or 2 changes the way FAPI beam index is treated. By setting 1, we instruct L1 to look up in Hi-PHY preconfigured DBM beam index. By setting 2, we instruct L2 to directly signal to Lo-PHY the beam index (e.g. over 7.2x fronthaul). + DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted. # Implementation in OAI scheduler diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index c1382d7b70..a6299b10cc 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -141,7 +141,7 @@ {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS_F1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_S_SHM_PREFIX, NULL, 0, .strptr=NULL, .defstrval="nvipc", TYPE_STRING, 0}, \ {CONFIG_STRING_MACRLC_TRANSPORT_S_POLL_CORE, NULL, 0, .i8ptr=NULL, .defintval=-1, TYPE_INT8, 0}, \ - {CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING, HLP_MACRLC_AB, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING, HLP_MACRLC_AB, 0, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAM_DURATION, HLP_MACRLC_BEAM_DURATION, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAMS_PERIOD, HLP_MACRLC_BEAMS_PERIOD, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAM_WEIGHTS_LIST, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY,0}, \ diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 68d34a437a..e2a5f69ce4 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1787,8 +1787,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) LOG_I(NR_PHY, "Copying %d blacklisted PRB to L1 context\n", num_ulprbbl); memcpy(RC.nrmac[j]->ulprbbl, prbbl, MAX_BWP_SIZE * sizeof(prbbl[0])); } - bool ab = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAMFORMING_IDX].u8ptr; - if (ab) { + int ab = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAMFORMING_IDX].u8ptr; + if (ab > 0) { AssertFatal(NFAPI_MODE == NFAPI_MONOLITHIC, "Analog beamforming only supported for monolithic scenario\n"); NR_beam_info_t *beam_info = &RC.nrmac[j]->beam_info; int beams_per_period = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAMS_PERIOD_IDX].u8ptr; @@ -1796,6 +1796,9 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) beam_info->beam_duration = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAM_DURATION_IDX].u8ptr; beam_info->beams_per_period = beams_per_period; beam_info->beam_allocation_size = -1; // to be initialized once we have information on frame configuration + beam_info->beam_mode = ab == 1 ? PRECONFIGURED_BEAM_IDX : LOPHY_BEAM_IDX; + } else { + RC.nrmac[j]->beam_info.beam_mode = NO_BEAM_MODE; } // TODO config_isparamset doesn't seem to work for array types, checking numelt instead int n = MacRLC_ParamList.paramarray[j][MACRLC_BEAMWEIGHTS_IDX].numelt; diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 99e4249bb2..54306c7f35 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -393,9 +393,7 @@ int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed) return ul_slot_idxs[ul_slot_idx_in_period] + period_idx * fs->numb_slots_period; } -static void config_common(gNB_MAC_INST *nrmac, - const nr_mac_config_t *config, - NR_ServingCellConfigCommon_t *scc) +static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR_ServingCellConfigCommon_t *scc) { nfapi_nr_config_request_scf_t *cfg = &nrmac->config[0]; nrmac->common_channels[0].ServingCellConfigCommon = scc; @@ -713,7 +711,7 @@ static void config_common(gNB_MAC_INST *nrmac, cfg->pmi_list = init_DL_MIMO_codebook(nrmac, pdsch_AntennaPorts); int nb_beams = config->nb_bfw[1]; // number of beams - if (nrmac->beam_info.beam_allocation) { + if (nrmac->beam_info.beam_mode == PRECONFIGURED_BEAM_IDX) { LOG_I(NR_MAC, "Configuring analog beamforming in config_request message\n"); cfg->analog_beamforming_ve.num_beams_period_vendor_ext.tl.tag = NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG; cfg->analog_beamforming_ve.num_beams_period_vendor_ext.value = nrmac->beam_info.beams_per_period; @@ -740,7 +738,7 @@ static void config_common(gNB_MAC_INST *nrmac, static void initialize_beam_information(NR_beam_info_t *beam_info, int mu, int slots_per_frame) { - if (!beam_info->beam_allocation) + if (beam_info->beam_mode == NO_BEAM_MODE) return; int size = mu == 0 ? slots_per_frame << 1 : slots_per_frame; @@ -817,7 +815,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c nrmac->vrb_map_UL_size = size; int num_beams = 1; - if(nrmac->beam_info.beam_allocation) + if(nrmac->beam_info.beam_mode != NO_BEAM_MODE) num_beams = nrmac->beam_info.beams_per_period; for (int i = 0; i < num_beams; i++) { nrmac->common_channels[0].vrb_map_UL[i] = calloc(size * MAX_BWP_SIZE, sizeof(uint16_t)); @@ -834,7 +832,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c LOG_D(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n"); config_common(nrmac, config, scc); - fapi_beam_index_allocation(scc, nrmac); + fapi_beam_index_allocation(scc, config, nrmac); if (NFAPI_MODE == NFAPI_MONOLITHIC) { // nothing to be sent in the other cases diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index faaa00ea3f..46ad8069da 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -108,7 +108,7 @@ static void clear_beam_information(NR_beam_info_t *beam_info, int frame, int slo { // for now we use the same logic of UL_tti_req_ahead // reset after 1 frame with the exception of 15kHz - if(!beam_info->beam_allocation) + if (beam_info->beam_mode == NO_BEAM_MODE) return; // initialization done only once AssertFatal(beam_info->beam_allocation_size >= 0, "Beam information not initialized\n"); @@ -179,7 +179,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, slot_t slo for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { int num_beams = 1; - if(gNB->beam_info.beam_allocation) + if(gNB->beam_info.beam_mode != NO_BEAM_MODE) num_beams = gNB->beam_info.beams_per_period; // clear vrb_maps for (int i = 0; i < num_beams; i++) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f8c842706c..61d393090c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3346,8 +3346,10 @@ int get_fapi_beamforming_index(gNB_MAC_INST *mac, int ssb_idx) // TODO this is a placeholder for a possibly more complex function // for now the fapi beam index is the number of SSBs transmitted before ssb_index i -void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST *mac) +void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config, gNB_MAC_INST *mac) { + if (mac->beam_info.beam_mode == NO_BEAM_MODE) + return; int len = 0; uint8_t* buf = NULL; switch (scc->ssb_PositionsInBurst->present) { @@ -3366,11 +3368,13 @@ void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST default : AssertFatal(false, "Invalid configuration\n"); } - int fapi_index = 0; + int index = 0; for (int i = 0; i < len; ++i) { - if ((buf[i / 8] >> (7 - i % 8)) & 0x1) - mac->fapi_beam_index[i] = fapi_index++; - else + if ((buf[i / 8] >> (7 - i % 8)) & 0x1) { + int fapi_index = mac->beam_info.beam_mode == LOPHY_BEAM_IDX ? config->bw_list[index] : index; + mac->fapi_beam_index[i] = fapi_index; + index++; + } else mac->fapi_beam_index[i] = -1; } } @@ -3383,7 +3387,7 @@ static inline int get_beam_index(const NR_beam_info_t *beam_info, int frame, int NR_beam_alloc_t beam_allocation_procedure(NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame) { // if no beam allocation for analog beamforming we always return beam index 0 (no multiple beams) - if (!beam_info->beam_allocation) + if (beam_info->beam_mode == NO_BEAM_MODE) return (NR_beam_alloc_t) {.new_beam = false, .idx = 0}; const int index = get_beam_index(beam_info, frame, slot, slots_per_frame); @@ -3417,7 +3421,7 @@ void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_ void beam_selection_procedures(gNB_MAC_INST *mac, NR_UE_info_t *UE) { // do not perform beam procedures if there is no beam information - if (!mac->beam_info.beam_allocation) + if (mac->beam_info.beam_mode == NO_BEAM_MODE) return; RSRP_report_t *rsrp_report = &UE->UE_sched_ctrl.CSI_report.ssb_rsrp_report; // simple beam switching algorithm -> we select beam with highest RSRP from CSI report diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 66a9262f22..8789906ae0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -451,7 +451,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options, int ul_buffer_index(int frame, int slot, int slots_per_frame, int size); void UL_tti_req_ahead_initialization(gNB_MAC_INST *gNB, int n, int CCid, frame_t frameP, int slotP); -void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST *mac); +void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config, gNB_MAC_INST *mac); int get_fapi_beamforming_index(gNB_MAC_INST *mac, int ssb_idx); NR_beam_alloc_t beam_allocation_procedure(NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame); void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame, bool new_beam); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 84be6f4b5a..1a65d8582a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -787,12 +787,19 @@ typedef struct { uid_allocator_t uid_allocator; } NR_UEs_t; +typedef enum { + NO_BEAM_MODE, + PRECONFIGURED_BEAM_IDX, + LOPHY_BEAM_IDX, +} nr_beam_mode_t; + typedef struct { /// list of allocated beams per period int **beam_allocation; int beam_duration; // in slots int beams_per_period; int beam_allocation_size; + nr_beam_mode_t beam_mode; } NR_beam_info_t; #define UE_iterator(BaSe, VaR) NR_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++))) From 071d28b3c9f2ab05142e0fc62e68bccb972141d0 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 12 Aug 2025 12:28:10 +0200 Subject: [PATCH 052/112] print UE command line parameters also at MAC --- openair2/LAYER2/NR_MAC_gNB/config.c | 37 ++++++++++++++++++++++++++--- openair2/LAYER2/NR_MAC_gNB/main.c | 9 +++---- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 99e4249bb2..69b139cb6e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -393,9 +393,7 @@ int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed) return ul_slot_idxs[ul_slot_idx_in_period] + period_idx * fs->numb_slots_period; } -static void config_common(gNB_MAC_INST *nrmac, - const nr_mac_config_t *config, - NR_ServingCellConfigCommon_t *scc) +static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR_ServingCellConfigCommon_t *scc) { nfapi_nr_config_request_scf_t *cfg = &nrmac->config[0]; nrmac->common_channels[0].ServingCellConfigCommon = scc; @@ -736,6 +734,39 @@ static void config_common(gNB_MAC_INST *nrmac, cfg->num_tlv++; } } + + if (IS_SA_MODE(get_softmodem_params())) { + int bw = frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; + uint64_t bw_khz = (12 * bw) * (15 << mu); + uint64_t carr_dl = (cfg->carrier_config.dl_frequency.value + bw_khz / 2) * 1000; + uint64_t carr_ul = (cfg->carrier_config.uplink_frequency.value + bw_khz / 2) * 1000; + int prb_offset = (frequency_range == FR1) ? + cfg->ssb_table.ssb_offset_point_a.value >> scs : + cfg->ssb_table.ssb_offset_point_a.value >> (scs - 2); + int sc_offset = (frequency_range == FR1) ? + cfg->ssb_table.ssb_subcarrier_offset.value >> scs : + cfg->ssb_table.ssb_subcarrier_offset.value; + if (cfg->carrier_config.dl_frequency.value != cfg->carrier_config.uplink_frequency.value) { + LOG_I(NR_MAC, + "Command line parameters for OAI UE: -C %lu --CO %ld -r %d --numerology %d --band %ld --ssb %d %s\n", + carr_dl, + carr_ul - carr_dl, + bw, + mu, + band, + 12 * prb_offset + sc_offset, + get_softmodem_params()->threequarter_fs ? "-E" : ""); + } else { + LOG_I(NR_MAC, + "Command line parameters for OAI UE: -C %lu -r %d --numerology %d --band %ld --ssb %d %s\n", + carr_dl, + bw, + mu, + band, + 12 * prb_offset + sc_offset, + get_softmodem_params()->threequarter_fs ? "-E" : ""); + } + } } static void initialize_beam_information(NR_beam_info_t *beam_info, int mu, int slots_per_frame) diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index c4f0fad659..3a8ed58e85 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -242,9 +242,6 @@ void mac_top_init_gNB(ngran_node_t node_type, const nr_mac_config_t *config, const nr_rlc_configuration_t *default_rlc_config) { - module_id_t i; - gNB_MAC_INST *nrmac; - AssertFatal(RC.nb_nr_macrlc_inst == 1, "what is the point of calling %s() if you don't need exactly one MAC?\n", __func__); if (RC.nb_nr_macrlc_inst > 0) { @@ -255,7 +252,7 @@ void mac_top_init_gNB(ngran_node_t node_type, RC.nb_nr_macrlc_inst * sizeof(gNB_MAC_INST *), RC.nb_nr_macrlc_inst, sizeof(gNB_MAC_INST)); - for (i = 0; i < RC.nb_nr_macrlc_inst; i++) { + for (module_id_t i = 0; i < RC.nb_nr_macrlc_inst; i++) { RC.nrmac[i] = (gNB_MAC_INST *) malloc16(sizeof(gNB_MAC_INST)); @@ -315,8 +312,8 @@ void mac_top_init_gNB(ngran_node_t node_type, } // Initialize Linked-List for Active UEs - for (i = 0; i < RC.nb_nr_macrlc_inst; i++) { - nrmac = RC.nrmac[i]; + for (module_id_t i = 0; i < RC.nb_nr_macrlc_inst; i++) { + gNB_MAC_INST *nrmac = RC.nrmac[i]; nrmac->if_inst = NR_IF_Module_init(i); memset(&nrmac->UE_info, 0, sizeof(nrmac->UE_info)); } From efccad956ac2ae60f14c0a3241f452285a81c812 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 12 Aug 2025 11:31:08 +0200 Subject: [PATCH 053/112] add gtpu error packet parsing and display --- openair3/ocp-gtpu/gtp_itf.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index fec0f035eb..9e07a44747 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -77,6 +77,14 @@ typedef struct Gtpv1uExtHeader { uint8_t NextExtHeaderType; } __attribute__((packed)) Gtpv1uExtHeaderT; + typedef struct Gtpv1Error { + Gtpv1uMsgHeaderT h; + uint8_t teid_data_i; + teid_t teid; + uint8_t addr_data_i; + uint16_t addr_len; + } __attribute__((packed)) Gtpv1uError; + #pragma pack() // TS 29.281, fig 5.2.1-3 @@ -949,7 +957,21 @@ static int Gtpv1uHandleEchoReq(int h, uint8_t *msgBuf, uint32_t msgBufLen, const static int Gtpv1uHandleError(int h, uint8_t *msgBuf, uint32_t msgBufLen, const struct sockaddr_in *addr) { - LOG_E(GTPU, "Received GTP error indication (error handling is missing/not implemented)\n"); + if (msgBufLen < sizeof(Gtpv1uError)) + LOG_E(GTPU, "Received GTP error indication with truncated size %u (mini size: %lu)\n", msgBufLen,sizeof(Gtpv1uError)+4); + Gtpv1uError *msg = ( Gtpv1uError *)msgBuf; + LOG_E(GTPU, "Received GTP error indication: \n" + " TEID %u (must be 0 from TS 29.281)\n" + " TV id for TEID %u (must be 16)\n" + " TEID in error %u (should be a TEID we sent)\n" + " TV id for GTP addr %u (should be 133)\n" + " len for addr of UPF %u (should be IPv4 or IPv6 len)" + " (TS 29.281 Sec 7.3.1 Error Handling not implemented)\n", + msg->h.teid, + msg->teid_data_i, + msg->teid, + msg->addr_data_i, + msg->addr_len); int rc = GTPNOK; return rc; } From ce06099a99f0d142ecfb6d3d3f0e8ff70cac6062 Mon Sep 17 00:00:00 2001 From: Gabriele Gemmi Date: Tue, 8 Jul 2025 16:28:30 +0000 Subject: [PATCH 054/112] Configuration of FAPI Beamforming PDU for Aerial PBBF --- openair1/PHY/INIT/nr_init.c | 1 + openair2/GNB_APP/gnb_config.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 6 +++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 10 +++++----- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 ++-- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 7a706f61bf..dcdc4ee433 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -110,6 +110,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB) common_vars->analog_bf = cfg->analog_beamforming_ve.analog_bf_vendor_ext.value; LOG_I(PHY, "L1 configured with%s analog beamforming\n", common_vars->analog_bf ? "" : "out"); if (common_vars->analog_bf) { + // True only if nrmac->beam_info.beam_mode == FAPI_ANALOG_BEAM, thus analog_beamforming=2 common_vars->num_beams_period = cfg->analog_beamforming_ve.num_beams_period_vendor_ext.value; LOG_I(PHY, "Max number of concurrent beams: %d\n", common_vars->num_beams_period); } else diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index e2a5f69ce4..5e1914d8ff 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1789,7 +1789,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) } int ab = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAMFORMING_IDX].u8ptr; if (ab > 0) { - AssertFatal(NFAPI_MODE == NFAPI_MONOLITHIC, "Analog beamforming only supported for monolithic scenario\n"); + if (ab == 1) + AssertFatal(NFAPI_MODE == NFAPI_MONOLITHIC, "Analog beamforming only supported for monolithic scenario\n"); NR_beam_info_t *beam_info = &RC.nrmac[j]->beam_info; int beams_per_period = *MacRLC_ParamList.paramarray[j][MACRLC_ANALOG_BEAMS_PERIOD_IDX].u8ptr; beam_info->beam_allocation = malloc16(beams_per_period * sizeof(int *)); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 55856c0738..916b96a6b1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -505,8 +505,8 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP) } } prach_pdu->num_prach_ocas = num_td_occ; - prach_pdu->beamforming.num_prgs = 0; - prach_pdu->beamforming.prg_size = 0; + prach_pdu->beamforming.num_prgs = 1; + prach_pdu->beamforming.prg_size = 273; //n_ra_rb This value doesn't work with Aerial as it bugs prach_pdu->beamforming.dig_bf_interface = num_td_occ; prach_pdu->beamforming.prgs_list[0].dig_bf_interface_list[num_td_occ - 1].beam_idx = beam_index; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 134b43f583..8a81d8ae4f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -79,7 +79,7 @@ static void schedule_ssb(frame_t frame, dl_config_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag = 1; dl_config_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload = payload; dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.num_prgs = 1; - dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.prg_size = 275; //1 PRG of max size for analogue beamforming + dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.prg_size = 20; //SSB is always 20RBs dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.dig_bf_interfaces = 1; dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.prgs_list[0].pm_idx = 0; dl_config_pdu->ssb_pdu.ssb_pdu_rel15.precoding_and_beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index dad58f52f0..ed87d12cd9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -993,10 +993,10 @@ nfapi_nr_dl_tti_pdsch_pdu_rel15_t *prepare_pdsch_pdu(nfapi_nr_dl_tti_request_pdu pdsch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(pdsch_pdu->mcsTable[0], dl_bw_tbslbrm, nl_tbslbrm); pdsch_pdu->maintenance_parms_v3.ldpcBaseGraph = get_BG(sched_pdsch->tb_size << 3, sched_pdsch->R); // Precoding and beamforming - pdsch_pdu->precodingAndBeamforming.num_prgs = 0; + pdsch_pdu->precodingAndBeamforming.num_prgs = 1; pdsch_pdu->precodingAndBeamforming.prg_size = pdsch_pdu->rbSize; - pdsch_pdu->precodingAndBeamforming.dig_bf_interfaces = 0; - pdsch_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = sched_pdsch->pm_index; + pdsch_pdu->precodingAndBeamforming.dig_bf_interfaces = 1; + pdsch_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = sched_pdsch->pm_index; pdsch_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index; return pdsch_pdu; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 61d393090c..c1056906ac 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -824,8 +824,8 @@ nfapi_nr_dl_dci_pdu_t *prepare_dci_pdu(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_ } dci_pdu->beta_PDCCH_1_0 = 0; dci_pdu->powerControlOffsetSS = 1; - dci_pdu->precodingAndBeamforming.num_prgs = 0; - dci_pdu->precodingAndBeamforming.prg_size = 0; + dci_pdu->precodingAndBeamforming.num_prgs = 1; + dci_pdu->precodingAndBeamforming.prg_size = 273; dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1; dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0; dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index; @@ -1249,9 +1249,9 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t *pucch_pdu, pucch_pdu->prb_size=1; } // Beamforming - pucch_pdu->beamforming.num_prgs = 0; - pucch_pdu->beamforming.prg_size = 0; // pucch_pdu->prb_size; - pucch_pdu->beamforming.dig_bf_interface = 0; + pucch_pdu->beamforming.num_prgs = 1; + pucch_pdu->beamforming.prg_size = pucch_pdu->prb_size; + pucch_pdu->beamforming.dig_bf_interface = 1; pucch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index c3ebb5ab9b..d63cea64b6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -465,7 +465,7 @@ static void nr_configure_srs(gNB_MAC_INST *nrmac, if (srs_resource_set->usage == NR_SRS_ResourceSet__usage_beamManagement) { srs_pdu->beamforming.trp_scheme = 0; srs_pdu->beamforming.num_prgs = m_SRS[srs_pdu->config_index]; - srs_pdu->beamforming.prg_size = 1; + srs_pdu->beamforming.prg_size = srs_pdu->srs_parameters_v4.srs_bandwidth_size; } srs_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index; NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index e0638e97cf..708f19d0e9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2311,8 +2311,8 @@ nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti pusch_pdu->pusch_data.tb_size = sched_pusch->tb_size; pusch_pdu->pusch_data.num_cb = 0; // CBG not supported // Beamforming - pusch_pdu->beamforming.num_prgs = 0; - pusch_pdu->beamforming.prg_size = 0; // bwp_size; + pusch_pdu->beamforming.num_prgs = 1; + pusch_pdu->beamforming.prg_size = pusch_pdu->bwp_size; pusch_pdu->beamforming.dig_bf_interface = 1; pusch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index; /* TRANSFORM PRECODING --------------------------------------------------------*/ From 9e34a8ebed62cff3b64cd0bab44284a85f04c1f3 Mon Sep 17 00:00:00 2001 From: Gabriele Gemmi Date: Thu, 31 Jul 2025 03:53:26 +0000 Subject: [PATCH 055/112] Compute DCI prgsize from Coreset --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index c1056906ac..5c7edc3111 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -424,6 +424,27 @@ static NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc, AssertFatal(false, "Couldn't find an adequate SearchSpace for target SearchSpace %d in ServingCellConfigCommon\n", target_ss); } +/// @brief Get CORESET resource block parameters from frequency domain resources bitmap. +/// @param coreset Pointer to the CORESET configuratio +/// @param n_rb Output parameter for total # of RBs in the CORESET +/// @param rb_start Output parameter for the starting resource block index of the CORESET +static void get_coreset_rb_params(const NR_ControlResourceSet_t *coreset, uint16_t *n_rb, uint16_t *rb_start) +{ + *n_rb = 0; + *rb_start = 0; + + for (int i = 0; i < 6; i++) { + for (int t = 0; t < 8; t++) { + if ((coreset->frequencyDomainResources.buf[i] >> (7 - t)) & 1) { + if (*n_rb == 0) { + *rb_start = 48 * i + t * 6; + } + *n_rb += 6; // Each bit represents 6 RBs + } + } + } +} + NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, NR_SearchSpace_t *ss, NR_ControlResourceSet_t *coreset, @@ -496,21 +517,7 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, pdcch.ShiftIndex = 0; } - uint16_t N_rb = 0; // nb of rbs of coreset per symbol - uint16_t rb_start = 0; - for (int i = 0; i < 6; i++) { - for (int t = 0; t < 8; t++) { - if (coreset->frequencyDomainResources.buf[i] >> (7 - t) & 1) { - if (N_rb == 0) { - rb_start = 48 * i + t * 6; - } - N_rb++; - } - } - } - - pdcch.rb_start = rb_start; - pdcch.n_rb = N_rb *= 6; // each bit of frequencyDomainResources represents 6 PRBs + get_coreset_rb_params(coreset, &pdcch.n_rb, &pdcch.rb_start); return pdcch; } @@ -822,10 +829,15 @@ nfapi_nr_dl_dci_pdu_t *prepare_dci_pdu(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_ dci_pdu->ScramblingId = *scc->physCellId; dci_pdu->ScramblingRNTI = 0; } + + uint16_t N_rb = 0; + uint16_t rb_start = 0; + get_coreset_rb_params(coreset, &N_rb, &rb_start); + dci_pdu->beta_PDCCH_1_0 = 0; dci_pdu->powerControlOffsetSS = 1; dci_pdu->precodingAndBeamforming.num_prgs = 1; - dci_pdu->precodingAndBeamforming.prg_size = 273; + dci_pdu->precodingAndBeamforming.prg_size = N_rb; dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1; dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0; dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index; From 8beb382277a55ca00498317e6a5cdeb9f26bea00 Mon Sep 17 00:00:00 2001 From: Gabriele Gemmi Date: Fri, 1 Aug 2025 07:42:04 +0000 Subject: [PATCH 056/112] Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02) --- nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c | 4 ++-- nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c | 6 +++--- nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h | 2 +- nfapi/tests/p7/nr_fapi_ul_tti_request_test.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c index 4945e6da45..fa0ed1bd8f 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c @@ -708,7 +708,7 @@ static uint8_t pack_nr_rx_beamforming_pdu(const nfapi_nr_ul_beamforming_t *beamf uint8_t **ppWritePackedMsg, uint8_t *end) { // Pack RX Beamforming PDU - if (!(push8(beamforming_pdu->trp_scheme, ppWritePackedMsg, end) && push16(beamforming_pdu->num_prgs, ppWritePackedMsg, end) + if (!(push16(beamforming_pdu->num_prgs, ppWritePackedMsg, end) && push16(beamforming_pdu->prg_size, ppWritePackedMsg, end) && push8(beamforming_pdu->dig_bf_interface, ppWritePackedMsg, end))) { return 0; @@ -1033,7 +1033,7 @@ uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, static uint8_t unpack_nr_rx_beamforming_pdu(nfapi_nr_ul_beamforming_t *beamforming_pdu, uint8_t **ppReadPackedMsg, uint8_t *end) { // Unpack RX Beamforming PDU - if (!(pull8(ppReadPackedMsg, &beamforming_pdu->trp_scheme, end) && pull16(ppReadPackedMsg, &beamforming_pdu->num_prgs, end) + if (!(pull16(ppReadPackedMsg, &beamforming_pdu->num_prgs, end) && pull16(ppReadPackedMsg, &beamforming_pdu->prg_size, end) && pull8(ppReadPackedMsg, &beamforming_pdu->dig_bf_interface, end))) { return 0; diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c index fb645707ad..0a858e0be9 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c @@ -214,7 +214,7 @@ bool eq_dl_tti_request(const nfapi_nr_dl_tti_request_t *a, const nfapi_nr_dl_tti static bool eq_ul_tti_beamforming(const nfapi_nr_ul_beamforming_t *a, const nfapi_nr_ul_beamforming_t *b) { - EQ(a->trp_scheme, b->trp_scheme); + // EQ(a->trp_scheme, b->trp_scheme); EQ(a->num_prgs, b->num_prgs); EQ(a->prg_size, b->prg_size); EQ(a->dig_bf_interface, b->dig_bf_interface); @@ -1174,7 +1174,7 @@ void copy_dl_tti_request(const nfapi_nr_dl_tti_request_t *src, nfapi_nr_dl_tti_r static void copy_ul_tti_beamforming(const nfapi_nr_ul_beamforming_t *src, nfapi_nr_ul_beamforming_t *dst) { - dst->trp_scheme = src->trp_scheme; + // dst->trp_scheme = src->trp_scheme; dst->num_prgs = src->num_prgs; dst->prg_size = src->prg_size; dst->dig_bf_interface = src->dig_bf_interface; @@ -2201,7 +2201,7 @@ void dump_dl_tti_request(const nfapi_nr_dl_tti_request_t *msg) static void dump_ul_tti_beamforming(const nfapi_nr_ul_beamforming_t *pdu, int depth) { - INDENTED_PRINTF("TRP Scheme = %d\n", pdu->trp_scheme); + // INDENTED_PRINTF("TRP Scheme = %d\n", pdu->trp_scheme); INDENTED_PRINTF("numPRGs = %d\n", pdu->num_prgs); INDENTED_PRINTF("prgSize = %d\n", pdu->prg_size); INDENTED_PRINTF("digBFInterface = %d\n", pdu->dig_bf_interface); diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index e19dab108c..5bcc551000 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -1212,7 +1212,7 @@ typedef struct typedef struct { - uint8_t trp_scheme; // This field shall be set to 0, to identify that this table is used. + // uint8_t trp_scheme; // This field shall be set to 0, to identify that this table is used. Not part of FAPI 10.02, thus removed uint16_t num_prgs; // Number of PRGs spanning this allocation. Value : 1->275 uint16_t prg_size; // Size in RBs of a precoding resource block group (PRG) – to which the same digital beamforming gets applied. Value: 1->275 uint8_t dig_bf_interface; // Number of logical antenna ports (parallel streams) resulting from the Rx combining. Value: 0->255 diff --git a/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c b/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c index f7087c92ef..90b1625a7e 100644 --- a/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c +++ b/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c @@ -24,7 +24,7 @@ static void fill_ul_tti_request_beamforming(nfapi_nr_ul_beamforming_t *beamforming_pdu) { - beamforming_pdu->trp_scheme = rand8(); + // beamforming_pdu->trp_scheme = rand8(); // not part of 10.02 beamforming_pdu->num_prgs = rand16_range(1, NFAPI_MAX_NUM_PRGS); beamforming_pdu->prg_size = rand16_range(1, 275); beamforming_pdu->dig_bf_interface = rand8_range(1,NFAPI_MAX_NUM_BG_IF); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index d63cea64b6..cabf85f522 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -463,7 +463,7 @@ static void nr_configure_srs(gNB_MAC_INST *nrmac, srs_pdu->srs_parameters_v4.prg_size = 1; srs_pdu->srs_parameters_v4.num_total_ue_antennas = 1 << srs_pdu->num_ant_ports; if (srs_resource_set->usage == NR_SRS_ResourceSet__usage_beamManagement) { - srs_pdu->beamforming.trp_scheme = 0; + // srs_pdu->beamforming.trp_scheme = 0; srs_pdu->beamforming.num_prgs = m_SRS[srs_pdu->config_index]; srs_pdu->beamforming.prg_size = srs_pdu->srs_parameters_v4.srs_bandwidth_size; } From 61a7b6b80e2c52135b2c164adbf73a36f85ecb2a Mon Sep 17 00:00:00 2001 From: Gabriele Gemmi Date: Sat, 2 Aug 2025 21:30:56 +0000 Subject: [PATCH 057/112] compute prgsize from number of RA RB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 916b96a6b1..e4762c3263 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -368,6 +368,8 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP) // prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4 uint16_t RA_sfn_index = -1; frequency_range_t freq_range = get_freq_range_from_arfcn(scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA); + const int mu_pusch = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; + const int16_t n_ra_rb = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch); if (get_nr_prach_sched_from_info(cc->prach_info, config_index, frameP, slotP, mu, freq_range, &RA_sfn_index, cc->frame_type)) { uint16_t format0 = cc->prach_info.format & 0xff; // first column of format from table uint16_t format1 = (cc->prach_info.format >> 8) & 0xff; // second column of format from table @@ -506,7 +508,7 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP) } prach_pdu->num_prach_ocas = num_td_occ; prach_pdu->beamforming.num_prgs = 1; - prach_pdu->beamforming.prg_size = 273; //n_ra_rb This value doesn't work with Aerial as it bugs + prach_pdu->beamforming.prg_size = n_ra_rb; prach_pdu->beamforming.dig_bf_interface = num_td_occ; prach_pdu->beamforming.prgs_list[0].dig_bf_interface_list[num_td_occ - 1].beam_idx = beam_index; @@ -527,8 +529,6 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP) } // block resources in vrb_map_UL - const int mu_pusch = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; - const int16_t n_ra_rb = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch); // mark PRBs as occupied for current and future slots if prach extends beyond current slot int total_prach_slots; uint32_t N_dur = cc->prach_info.N_dur; From 1719375ceafea62734d2ad2f7e28bf7b1245ce71 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 30 Jun 2025 17:44:47 +0200 Subject: [PATCH 058/112] minor refactoring in nfapi_nr_interface_scf --- .../nfapi/public_inc/nfapi_nr_interface_scf.h | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index 5bcc551000..5b84f9f1d4 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -743,31 +743,31 @@ typedef struct { // 3.4.2 -//for pdcch_pdu: +typedef struct { + // Index of the digital beam weight vector pre-stored at cell configuration. + // The vector maps this input port to output TXRUs. Value: 0->65535 + uint16_t beam_idx; +} nfapi_nr_dig_bf_interface_t; -typedef struct -{ - uint16_t beam_idx;//Index of the digital beam weight vector pre-stored at cell configuration. The vector maps this input port to output TXRUs. Value: 0->65535 - -}nfapi_nr_dig_bf_interface_t; - -typedef struct -{ - uint16_t pm_idx;//Index to precoding matrix (PM) pre-stored at cell configuration. Note: If precoding is not used this parameter should be set to 0. Value: 0->65535. - nfapi_nr_dig_bf_interface_t dig_bf_interface_list[NFAPI_MAX_NUM_BG_IF];//max dig_bf_interfaces - -}nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t; +typedef struct { + // Index to precoding matrix (PM) pre-stored at cell configuration. + // Note: If precoding is not used this parameter should be set to 0. Value: 0->65535. + uint16_t pm_idx; + nfapi_nr_dig_bf_interface_t dig_bf_interface_list[NFAPI_MAX_NUM_BG_IF]; // max dig_bf_interfaces +} nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t; //table 3-43 -typedef struct -{ - uint16_t num_prgs;//Number of PRGs spanning this allocation. Value : 1->275 - uint16_t prg_size;//Size in RBs of a precoding resource block group (PRG) – to which same precoding and digital beamforming gets applied. Value: 1->275 - //watchout: dig_bf_interfaces here, in table 3-53 it's dig_bf_interface - uint8_t dig_bf_interfaces;//Number of STD ant ports (parallel streams) feeding into the digBF Value: 0->255 - nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t prgs_list[NFAPI_MAX_NUM_PRGS];//max prg_size - -}nfapi_nr_tx_precoding_and_beamforming_t; +typedef struct { + // Number of PRGs spanning this allocation. Value : 1->275 + uint16_t num_prgs; + // Size in RBs of a precoding resource block group (PRG) to which same precoding and digital beamforming gets applied. + // Value: 1->275 + uint16_t prg_size; + // watchout: dig_bf_interfaces here, in table 3-53 it's dig_bf_interface + uint8_t dig_bf_interfaces; + // Number of STD ant ports (parallel streams) feeding into the digBF Value: 0->255 + nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t prgs_list[NFAPI_MAX_NUM_PRGS]; // max prg_size +} nfapi_nr_tx_precoding_and_beamforming_t; //table 3-37 From ff9a6d97ea94bed9c2600e428a816d59a31aeef1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Aug 2025 08:43:34 +0200 Subject: [PATCH 059/112] gNB MAC doc: add dl/ul_min_mcs Previous commits removed min_grant_mcs and instead introduced dl/ul_min_mcs as a more generic replacement. Fixes: 96b0cae63e61 ("Drop 'min_grant_mcs' configuration parameter ") Fixes: 699afafc6ff7 ("Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters") --- doc/MAC/mac-usage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/MAC/mac-usage.md b/doc/MAC/mac-usage.md index ae4f3a626b..6619f8789c 100644 --- a/doc/MAC/mac-usage.md +++ b/doc/MAC/mac-usage.md @@ -205,17 +205,17 @@ In the `MACRLCs` section of the gNB/DU configuration file: retransmission over initial transmission) to decrease MCS by 1 * `dl_bler_target_lower` (default 0.05): lower threshold of BLER (first round retransmission over initial transmission) to increase MCS by 1 -* `dl_max_mcs` (default 28): maximum MCS to use +* `dl_min_mcs` (default 0): minimum MCS to use for any UE +* `dl_max_mcs` (default 28): maximum MCS to use for any UE * `ul_bler_target_upper` (default 0.15): as `dl_bler_target_upper` * `ul_bler_target_lower` (default 0.05): as `dl_bler_target_lower` +* `ul_min_mcs` (default 0): as `dl_min_mcs` * `ul_max_mcs` (default 28): as `dl_max_mcs` * `dl_harq_round_max` (default 4): maximum number of HARQ rounds, i.e., retransmissions to perform, in DL * `ul_harq_round_max` (default 4): as `dl_harq_round_max` * `min_grant_prb` (default 5): number of PRBs to schedule for UE after activity (see `ulsch_max_frame_inactivity`) or after scheduling request (SR) -* `min_grant_mcs` (default 9): MCS to use for UE after activity (see - `ulsch_max_frame_inactivity`) or after scheduling request (SR) * `identity_precoding_matrix` (default 0=false): flag to enable to use only the identity precoding matrix in DL precoding * `set_analog_beamforming` (default 0=false): flag to enable analog From 3ee41c3fec5ca1b70222ca48c19fb9df88116c52 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Aug 2025 09:13:01 +0200 Subject: [PATCH 060/112] Explain steps to build Dockerfiles without BuildKit The Dockerfiles are reused for building on different architectures (amd64/arm64). They differ, though, on some steps for downloading or installing platform-specific utilities. This is handled automatically when using BuildKit, which is the default in docker versions v23.0+. Older docker versions require some special settings. Explain this in the README. Closes: #973 --- docker/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker/README.md b/docker/README.md index 36ec65698a..ecd0a043a1 100644 --- a/docker/README.md +++ b/docker/README.md @@ -91,6 +91,24 @@ For more details regarding the build on an Openshift Cluster, see [OpenShift REA * `docker-ce` installed * Pulling `ubuntu:jammy` from DockerHub +The docker files in this directory rely on [automatic Docker platform +arguments](https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope) +`TARGETARCH` and `TARGETPLATFORM` to be defined. This is the case when using +[BuildKit](https://docs.docker.com/build/buildkit/), which is automatically +enabled in newer (v23.0+) docker versions. + +If you are running an older version of docker that does not have BuildKit +enabled and do not wish to upgrade to a newer docker version, you have two +possibilities: + +1. [Enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) + when building: `DOCKER_BUILDKIT=1 docker build ...` +2. You should be able to define these variables manually. + - x86: `docker build --build-arg TARGETARCH=amd64 --build-arg + TARGETPLATFORM=linux/amd64 ...` + - arm: `docker build --build-arg TARGETARCH=arm64 --build-arg + TARGETPLATFORM=linux/arm64 ...` + ## 3.2. Building the shared images ## There are two shared images: one that has all dependencies, and a second that compiles all targets (eNB, gNB, [nr]UE). From 5e734238c185fdcfefe710a0382639ddeccfe109 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 Jul 2025 17:44:03 +0200 Subject: [PATCH 061/112] pf_ul(): report if UEs scheduled For the multi-UL slot scheduling functionality in a follow-up commit, it would be important to know if the scheduler allocated any UEs. If pf_ul() allocated for some UEs, we might run it again on a different slot. If on the other hand, no UEs were allocated, there is no point in running it again. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index bbbd72c378..6589d613a6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1866,7 +1866,7 @@ static int comparator(const void *p, const void *q) return 0; } -static void pf_ul(gNB_MAC_INST *nrmac, +static int pf_ul(gNB_MAC_INST *nrmac, post_process_pusch_t *pp_pusch, frame_t sched_frame, int sched_slot, @@ -1887,6 +1887,7 @@ static void pf_ul(gNB_MAC_INST *nrmac, for (int i = 0; i < num_beams; i++) remainUEs[i] = max_num_ue; int numUE = 0; + bool scheduled_something = false; /* Loop UE_list to calculate throughput and coeff */ UE_iterator(UE_list, UE) { @@ -1955,6 +1956,7 @@ static void pf_ul(gNB_MAC_INST *nrmac, /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ remainUEs[beam.idx]--; + scheduled_something = true; continue; } DevAssert(ul_harq_pid == -1); // all other allocations must be new ones @@ -2207,7 +2209,13 @@ static void pf_ul(gNB_MAC_INST *nrmac, /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ remainUEs[beam.idx]--; iterator++; + scheduled_something = true; } + int num_ue_sched = num_beams * max_num_ue; + for (int i = 0; i < num_beams; i++) + num_ue_sched -= remainUEs[i]; + DevAssert((num_ue_sched == 0 && !scheduled_something) || (num_ue_sched > 0 && scheduled_something)); + return num_ue_sched; } nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti_req, From 948c0d5d2c3c3a6799df886654a6a7c6d9a0e56e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 23 Jul 2025 11:22:11 +0200 Subject: [PATCH 062/112] Count and print failed CCE allocations for UL/DL --- doc/MAC/mac-usage.md | 7 +++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 ++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 ++ openair2/LAYER2/NR_MAC_gNB/main.c | 10 ++++++---- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 + 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/MAC/mac-usage.md b/doc/MAC/mac-usage.md index ae4f3a626b..1ed71d30b4 100644 --- a/doc/MAC/mac-usage.md +++ b/doc/MAC/mac-usage.md @@ -79,8 +79,8 @@ Example: UE RNTI 2460 CU-UE-ID 2 in-sync PH 28 dB PCMAX 24 dBm, average RSRP -74 (8 meas) UE 2460: CQI 15, RI 2, PMI (14,1) UE 2460: UL-RI 2 TPMI 0 -UE 2460: dlsch_rounds 32917/5113/1504/560, dlsch_errors 211, pucch0_DTX 1385, BLER 0.19557 MCS (1) 23 -UE 2460: ulsch_rounds 3756/353/182/179, ulsch_errors 170, ulsch_DTX 285, BLER 0.33021 MCS (1) 27 (Qm 8 dB) NPRB 5 SNR 31.0 dB +UE 2460: dlsch_rounds 32917/5113/1504/560, dlsch_errors 211, pucch0_DTX 1385, BLER 0.19557 MCS (1) 23 CCE fail 3 +UE 2460: ulsch_rounds 3756/353/182/179, ulsch_errors 170, ulsch_DTX 285, BLER 0.33021 MCS (1) 27 (Qm 8 dB) NPRB 5 SNR 31.0 dB CCE fail 0 UE 2460: MAC: TX 1530943191 RX 194148 bytes UE 2460: LCID 1: TX 651 RX 3031 bytes UE 2460: LCID 2: TX 0 RX 0 bytes @@ -159,6 +159,9 @@ The fourth and fifth line show HARQ-related information: should be close to the target in the gNB configuration file, `pusch_TargetSNRx10`, which should be around 10 times the value shown in the log +* Both ULSCH/DLSCH `CCE fail`: lists the number of failed CCE attempts. If this + number gets high, it signifies that the scheduler tried to scheduled this UE, + but could not allocate the DCI. In the last lines: * `MAC` shows the amount of MAC PDU bytes scheduled in transmit (`TX`, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index dad58f52f0..186e67f10d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -554,6 +554,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, false, sched_ctrl->pdcch_cl_adjust); if (CCEIndex<0) { + sched_ctrl->dl_cce_fail++; LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find free CCE for DL DCI retransmission\n", UE->rnti, frame, slot); return false; } @@ -806,6 +807,7 @@ static void pf_dl(module_id_t module_id, false, sched_ctrl->pdcch_cl_adjust); if (CCEIndex < 0) { + sched_ctrl->dl_cce_fail++; LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find free CCE for DL DCI\n", rnti, frame, slot); reset_beam_status(&mac->beam_info, frame, slot, iterator->UE->UE_beam_index, slots_per_frame, beam.new_beam); iterator++; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 6589d613a6..41fa85b9ec 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1816,6 +1816,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, sched_ctrl->pdcch_cl_adjust); if (CCEIndex<0) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for retransmission UL DCI UE\n", UE->rnti, frame, slot); + sched_ctrl->ul_cce_fail++; return false; } @@ -2058,6 +2059,7 @@ static int pf_ul(gNB_MAC_INST *nrmac, sched_ctrl->pdcch_cl_adjust); if (CCEIndex < 0) { + sched_ctrl->ul_cce_fail++; reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, iterator->UE->UE_beam_index, slots_per_frame, beam.new_beam); LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI\n", iterator->UE->rnti, frame, slot); diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index c4f0fad659..d40fbe84c7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -168,12 +168,13 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset output += snprintf(output, end - output, - ", dlsch_errors %"PRIu64", pucch0_DTX %d, BLER %.5f MCS (%d) %d\n", + ", dlsch_errors %"PRIu64", pucch0_DTX %d, BLER %.5f MCS (%d) %d CCE fail %d\n", stats->dl.errors, stats->pucch0_DTX, sched_ctrl->dl_bler_stats.bler, UE->current_DL_BWP.mcsTableIdx, - sched_ctrl->dl_bler_stats.mcs); + sched_ctrl->dl_bler_stats.mcs, + sched_ctrl->dl_cce_fail); if (reset_rsrp) { stats->num_rsrp_meas = 0; stats->cumul_rsrp = 0; @@ -187,7 +188,7 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset output += snprintf(output, end - output, - ", ulsch_errors %"PRIu64", ulsch_DTX %d, BLER %.5f MCS (%d) %d (Qm %d deltaMCS %d dB) NPRB %d SNR %d.%d dB\n", + ", ulsch_errors %"PRIu64", ulsch_DTX %d, BLER %.5f MCS (%d) %d (Qm %d deltaMCS %d dB) NPRB %d SNR %d.%d dB CCE fail %d\n", stats->ul.errors, stats->ulsch_DTX, sched_ctrl->ul_bler_stats.bler, @@ -197,7 +198,8 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset UE->mac_stats.deltaMCS, UE->mac_stats.NPRB, sched_ctrl->pusch_snrx10 / 10, - sched_ctrl->pusch_snrx10 % 10); + sched_ctrl->pusch_snrx10 % 10, + sched_ctrl->ul_cce_fail); output += snprintf(output, end - output, "UE %04x: MAC: TX %14"PRIu64" RX %14"PRIu64" bytes\n", diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 1778d0507f..36221906b0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -591,6 +591,7 @@ typedef struct { /// corresponding to the sched_pusch/sched_pdsch structures below int cce_index; uint8_t aggregation_level; + uint32_t dl_cce_fail, ul_cce_fail; /// Array of PUCCH scheduling information /// Its size depends on TDD configuration and max feedback time From 90406c101e6d9c6efa2ca1296435c78c3f66f53e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 1 Jul 2025 13:36:17 +0200 Subject: [PATCH 063/112] Introduce dedicated ul_tda array --- openair2/LAYER2/NR_MAC_gNB/config.c | 25 +++++++++++++++++++++++++ openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 99e4249bb2..f13567b747 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -801,6 +801,28 @@ static void config_sched_ctrlCommon(gNB_MAC_INST *nr_mac) nr_mac->cset0_bwp_size = type0_PDCCH_CSS_config.num_rbs; } +/** + * \brief Initializes the UL TDA information at the scheduler, as used for + * every UE in UL. This just copies the information from the SCC into a smaller + * list. Note that this list should not be modified, as get_ul_tda() and + * nr_rrc_config_ul_tda() are designed to work in sync (get_ul_tda() assumes an + * ordering, output by nr_rrc_config_ul_tda()). + */ +static void init_ul_tda_info(const NR_PUSCH_TimeDomainResourceAllocationList_t *l, seq_arr_t *sa_tda) +{ + DevAssert(l->list.count > 0 && l->list.count <= 16); + DevAssert(seq_arr_size(sa_tda) == 0); + + for (int i = 0; i < l->list.count; ++i) { + NR_PUSCH_TimeDomainResourceAllocation_t *t = l->list.array[i]; + DevAssert(t->k2); + NR_tda_info_t tda = { .mapping_type = typeB, .k2 = *t->k2, .valid_tda = true }; + SLIV2SL(t->startSymbolAndLength, &tda.startSymbolIndex, &tda.nrOfSymbols); + LOG_I(NR_MAC, "TDA index %d: start %d length %d k2 %ld\n", i, tda.startSymbolIndex, tda.nrOfSymbols, tda.k2); + seq_arr_push_back(sa_tda, &tda, sizeof(tda)); + } +} + void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config) { DevAssert(nrmac != NULL); @@ -847,6 +869,9 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c if (IS_SA_MODE(get_softmodem_params())) config_sched_ctrlCommon(nrmac); + + seq_arr_init(&nrmac->ul_tda, sizeof(NR_tda_info_t)); + init_ul_tda_info(scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList, &nrmac->ul_tda); } bool nr_mac_configure_other_sib(gNB_MAC_INST *nrmac, int num_cu_sib, const f1ap_sib_msg_t cu_sib[num_cu_sib]) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 36221906b0..9dcddcef4d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -929,6 +929,10 @@ typedef struct gNB_MAC_INST_s { bool identity_pm; int precoding_matrix_size[NR_MAX_NB_LAYERS]; int fapi_beam_index[MAX_NUM_OF_SSB]; + + /// dedicate UL TDA, common for all UEs + seq_arr_t ul_tda; + nr_mac_rrc_ul_if_t mac_rrc; f1_config_t f1_config; int16_t frame; From 9059c0290ef6438a0b54c181c294223c00262525 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 30 Jun 2025 15:05:11 +0200 Subject: [PATCH 064/112] Provide selected TDA to pf_ul() --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 73 +++++++++---------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 41fa85b9ec..50c4f8c596 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1709,7 +1709,8 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, NR_UE_info_t *UE, int harq_pid, const NR_ServingCellConfigCommon_t *scc, - const int tda) + const int tda, + const NR_tda_info_t *tda_info) { const int CC_id = 0; int frame = pp_pusch->frame; @@ -1726,22 +1727,15 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, const uint32_t bwpStart = bwp_info.bwpStart; const uint8_t nrOfLayers = retInfo->nrOfLayers; LOG_D(NR_MAC,"retInfo->time_domain_allocation = %d, tda = %d\n", retInfo->time_domain_allocation, tda); - NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_, - tda); - if (!tda_info.valid_tda) - return false; /* mark when retransmission will happen */ int slots_frame = nrmac->frame_structure.numb_slots_frame; - new_sched.frame = (frame + (slot + tda_info.k2 + get_NTN_Koffset(scc)) / slots_frame) % MAX_FRAME_NUMBER; - new_sched.slot = (slot + tda_info.k2 + get_NTN_Koffset(scc)) % slots_frame; + new_sched.frame = (frame + (slot + tda_info->k2 + get_NTN_Koffset(scc)) / slots_frame) % MAX_FRAME_NUMBER; + new_sched.slot = (slot + tda_info->k2 + get_NTN_Koffset(scc)) % slots_frame; new_sched.bwp_info = bwp_info; DevAssert(new_sched.ul_harq_pid == harq_pid); - bool reuse_old_tda = (retInfo->tda_info.startSymbolIndex == tda_info.startSymbolIndex) && (retInfo->tda_info.nrOfSymbols <= tda_info.nrOfSymbols); + bool reuse_old_tda = (retInfo->tda_info.startSymbolIndex == tda_info->startSymbolIndex) && (retInfo->tda_info.nrOfSymbols <= tda_info->nrOfSymbols); if (reuse_old_tda && nrOfLayers == retInfo->nrOfLayers) { /* Check the resource is enough for retransmission */ const uint16_t slbitmap = SL_to_bitmap(retInfo->tda_info.startSymbolIndex, retInfo->tda_info.nrOfSymbols); @@ -1760,10 +1754,10 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, new_sched.rbStart = rbStart; LOG_D(NR_MAC, "Retransmission keeping TDA %d and TBS %d\n", tda, retInfo->tb_size); } else { - NR_pusch_dmrs_t dmrs_info = get_ul_dmrs_params(scc, ul_bwp, &tda_info, nrOfLayers); + NR_pusch_dmrs_t dmrs_info = get_ul_dmrs_params(scc, ul_bwp, tda_info, nrOfLayers); /* the retransmission will use a different time domain allocation, check * that we have enough resources */ - const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); + const uint16_t slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols); while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) rbStart++; int rbSize = 0; @@ -1775,7 +1769,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, retInfo->R, UE->current_UL_BWP.transform_precoding, nrOfLayers, - tda_info.nrOfSymbols, + tda_info->nrOfSymbols, dmrs_info.N_PRB_DMRS * dmrs_info.num_dmrs_symb, retInfo->tb_size, 1, /* minimum of 1RB: need to find exact TBS, don't preclude any number */ @@ -1798,7 +1792,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, new_sched.rbStart = rbStart; new_sched.tb_size = new_tbs; new_sched.time_domain_allocation = tda; - new_sched.tda_info = tda_info; + new_sched.tda_info = *tda_info; new_sched.dmrs_info = dmrs_info; } @@ -1869,8 +1863,8 @@ static int comparator(const void *p, const void *q) static int pf_ul(gNB_MAC_INST *nrmac, post_process_pusch_t *pp_pusch, - frame_t sched_frame, - int sched_slot, + int tda, + const NR_tda_info_t *tda_info, NR_UE_info_t *UE_list[], int max_num_ue, int num_beams, @@ -1881,6 +1875,12 @@ static int pf_ul(gNB_MAC_INST *nrmac, int slot = pp_pusch->slot; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; int slots_per_frame = nrmac->frame_structure.numb_slots_frame; + DevAssert(tda_info->valid_tda); + const int k2 = tda_info->k2 + get_NTN_Koffset(scc); + const int sched_frame = (frame + (slot + k2) / slots_per_frame) % MAX_FRAME_NUMBER; + const int sched_slot = (slot + k2) % slots_per_frame; + DevAssert(is_ul_slot(sched_slot, &nrmac->frame_structure)); + const int min_rb = nrmac->min_grant_prb; // UEs that could be scheduled UEsched_t UE_sched[MAX_MOBILES_PER_GNB + 1] = {0}; @@ -1936,7 +1936,6 @@ static int pf_ul(gNB_MAC_INST *nrmac, LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n", UE->rnti, ul_harq_pid); if (ul_harq_pid >= 0) { /* Allocate retransmission*/ - const int tda = get_ul_tda(nrmac, sched_frame, sched_slot); bool r = allocate_ul_retransmission(nrmac, pp_pusch, rballoc_mask, @@ -1945,7 +1944,8 @@ static int pf_ul(gNB_MAC_INST *nrmac, UE, ul_harq_pid, scc, - tda); + tda, + tda_info); if (!r) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] UL retransmission could not be allocated\n", UE->rnti, frame, slot); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_per_frame, beam.new_beam); @@ -2069,21 +2069,12 @@ static int pf_ul(gNB_MAC_INST *nrmac, else LOG_D(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n", frame, slot, iterator->UE->rnti); - - int tda = get_ul_tda(nrmac, sched_frame, sched_slot); - NR_tda_info_t tda_info = get_ul_tda_info(current_BWP, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_, - tda); - AssertFatal(tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - const int index = ul_buffer_index(sched_frame, sched_slot, slots_per_frame, nrmac->vrb_map_UL_size); uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; /* find maximum amount of RBs that we can schedule starting from first free RB */ int rbStart = 0; - const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols); + const uint16_t slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols); bwp_info_t bi = get_pusch_bwp_start_size(iterator->UE); while (rbStart < bi.bwpSize && (rballoc_mask[rbStart + bi.bwpStart] & slbitmap)) rbStart++; @@ -2127,8 +2118,8 @@ static int pf_ul(gNB_MAC_INST *nrmac, .nrOfLayers = nrOfLayers, // tpmi in post-process .time_domain_allocation = tda, - .tda_info = tda_info, - .dmrs_info = get_ul_dmrs_params(scc, current_BWP, &tda_info, nrOfLayers), + .tda_info = *tda_info, + .dmrs_info = get_ul_dmrs_params(scc, current_BWP, tda_info, nrOfLayers), .bwp_info = bi, // phr_txpower_calc below }; @@ -2542,11 +2533,10 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp NR_COMMON_channels_t *cc = nr_mac->common_channels; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - const NR_SIB1_t *sib1 = nr_mac->common_channels[0].sib1 ? nr_mac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL; - NR_ServingCellConfigCommonSIB_t *scc_sib1 = sib1 ? sib1->servingCellConfigCommon : NULL; - AssertFatal(scc || scc_sib1, "We need one serving cell config common\n"); + AssertFatal(scc, "We need one serving cell config common\n"); + const int slots_frame = nr_mac->frame_structure.numb_slots_frame; - // TODO we assume the same K2 for all UEs + // we assume the same K2 for all UEs const int K2 = nr_mac->radio_config.minRXTXTIME + get_NTN_Koffset(scc); const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER; const int sched_slot = (slot + K2) % slots_frame; @@ -2555,9 +2545,6 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp int num_beams = nr_mac->beam_info.beam_allocation ? nr_mac->beam_info.beams_per_period : 1; int bw = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; - int len[num_beams]; - for (int i = 0; i < num_beams; i++) - len[i] = bw; int average_agg_level = 4; // TODO find a better estimation int max_sched_ues = bw / (average_agg_level * NR_NB_REG_PER_CCE); @@ -2565,8 +2552,16 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp // FAPI cannot handle more than MAX_DCI_CORESET DCIs max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); + int tda = get_ul_tda(nr_mac, sched_frame, sched_slot); + /* TODO: iterate over all available UL slots if there are more than DL */ + /* the following supposes that the TDA is the same across all BWPs */ + NR_tda_info_t *tda_info = seq_arr_at(&nr_mac->ul_tda, tda); + + int len[num_beams]; + for (int i = 0; i < num_beams; i++) + len[i] = bw; /* proportional fair scheduling algorithm */ - pf_ul(nr_mac, pp_pusch, sched_frame, sched_slot, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len); + pf_ul(nr_mac, pp_pusch, tda, tda_info, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len); } nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) From 4aea866b6aac83f2056f5abf3ae733b3d6d8eb8d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 Jul 2025 10:27:34 +0200 Subject: [PATCH 065/112] Use k2 to decide which TDA to use For scheduling multiple ULSCH ahead, we will have to use different k2. Hence, we will need to check for k2 in the TDA selection as well. The function get_ul_tda() is renamed to get_num_ul_tda() to reflect that it might return multiple TDAs (not done in this commit, but in a follow-up MR). get_num_ul_tda() also returns a pointer to the first suitable TDA. In the phy-test scheduler, simplify the selection of the TDA to use: do not hardcode a specific K2, but rather, use the first one (with any k2). --- openair2/LAYER2/NR_MAC_gNB/config.c | 6 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 35 ++++++------------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 33 ++++++++++++----- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index f13567b747..2866900f5e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -804,9 +804,9 @@ static void config_sched_ctrlCommon(gNB_MAC_INST *nr_mac) /** * \brief Initializes the UL TDA information at the scheduler, as used for * every UE in UL. This just copies the information from the SCC into a smaller - * list. Note that this list should not be modified, as get_ul_tda() and - * nr_rrc_config_ul_tda() are designed to work in sync (get_ul_tda() assumes an - * ordering, output by nr_rrc_config_ul_tda()). + * list. Note that this list should not be modified, as get_num_ul_tda() and + * nr_rrc_config_ul_tda() are designed to work in sync (get_num_ul_tda() + * assumes an ordering, output by nr_rrc_config_ul_tda()). */ static void init_ul_tda_info(const NR_PUSCH_TimeDomainResourceAllocationList_t *l, seq_arr_t *sa_tda) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6323ab4c6a..00872ade89 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -239,26 +239,19 @@ void nr_ul_preprocessor_phytest(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_p uint16_t rbStart = 0; uint16_t rbSize = min(bw, target_ul_bw); - NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList = get_ul_tdalist(ul_bwp, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_); - const int temp_tda = get_ul_tda(nr_mac, frame, slot); - if (temp_tda < 0) - return; - AssertFatal(temp_tda < tdaList->list.count, "time domain assignment %d >= %d\n", temp_tda, tdaList->list.count); - const int mu = ul_bwp->scs; - int K2 = get_K2(tdaList, temp_tda, mu, scc); + DevAssert(seq_arr_size(&nr_mac->ul_tda) > 0); + const int tda = 0; + NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, + sched_ctrl->coreset->controlResourceSetId, + sched_ctrl->search_space->searchSpaceType->present, + TYPE_C_RNTI_, + tda); + DevAssert(tda_info.valid_tda); + + int K2 = tda_info.k2 + get_NTN_Koffset(scc); int slots_frame = nr_mac->frame_structure.numb_slots_frame; const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER; const int sched_slot = (slot + K2) % slots_frame; - const int tda = get_ul_tda(nr_mac, sched_frame, sched_slot); - if (tda < 0) - return; - AssertFatal(tda < tdaList->list.count, - "time domain assignment %d >= %d\n", - tda, - tdaList->list.count); /* check if slot is UL, and that slot is 8 (assuming K2=6 because of UE * limitations). Note that if K2 or the TDD configuration is changed, below @@ -267,14 +260,6 @@ void nr_ul_preprocessor_phytest(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_p if (!is_xlsch_in_slot(ulsch_slot_bitmap, slot_period)) return; - NR_tda_info_t tda_info = get_ul_tda_info(ul_bwp, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_, - tda); - if (!tda_info.valid_tda) - return; - // TODO implement beam procedures for phy-test mode int beam = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 50c4f8c596..40d9457a23 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -38,9 +38,10 @@ //#define SRS_IND_DEBUG -/* \brief Get the UL TDA for given frame and slot. It identifies the index of - * TDA in the TDA list, as hardcoded in nr_rrc_config_ul_tda(). */ -int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) +/* \brief Get the number of UL TDAs that could be used in frame and slot, reachable + * via specific k2. The output parameter first_idx is a pointer to the first + * suitable TDA, and the function returns the number of suitable TDAs, or 0. */ +int get_num_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot, int k2, const NR_tda_info_t **first_idx) { /* we assume that this function is mutex-protected from outside */ NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock); @@ -48,23 +49,34 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) /* there is a mixed slot only when in TDD */ frame_structure_t *fs = &nrmac->frame_structure; + /* TODO: we assume currently that all UL TDA have same k2, check below */ + NR_tda_info_t *tda_info = seq_arr_at(&nrmac->ul_tda, 0); + if (!tda_info->valid_tda || tda_info->k2 != k2) + return 0; + if (fs->frame_type == TDD) { // if there is uplink symbols in mixed slot int s = get_slot_idx_in_period(slot, fs); tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap; if ((tdd_slot_bitmap[s].num_ul_symbols > 1) && is_mixed_slot(s, fs)) { - return 2; // mixed slot, all symbols of mixed minus last + *first_idx = seq_arr_at(&nrmac->ul_tda, 2); // mixed slot, all symbols of mixed minus last + return 1; } } // Avoid slots with the SRS UE_iterator(nrmac->UE_info.connected_ue_list, UE) { NR_sched_srs_t sched_srs = UE->UE_sched_ctrl.sched_srs; - if(sched_srs.srs_scheduled && sched_srs.frame == frame && sched_srs.slot == slot) - return 1; // symbols 0--12 + if(sched_srs.srs_scheduled && sched_srs.frame == frame && sched_srs.slot == slot) { + *first_idx = seq_arr_at(&nrmac->ul_tda, 1); // symbols 0--12 + return 1; + } } - return 0; // symbols 0--13, // if FDD or not mixed slot in TDD, for now use default TDA (TODO handle CSI-RS slots) + // symbols 0--13, if FDD or not mixed slot in TDD, for now use default TDA + // (TODO handle CSI-RS slots) + *first_idx = seq_arr_at(&nrmac->ul_tda, 0); + return 1; } bwp_info_t get_pusch_bwp_start_size(NR_UE_info_t *UE) @@ -2552,10 +2564,13 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp // FAPI cannot handle more than MAX_DCI_CORESET DCIs max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); - int tda = get_ul_tda(nr_mac, sched_frame, sched_slot); + const NR_tda_info_t *tda_info = NULL; + int n_tda = get_num_ul_tda(nr_mac, sched_frame, sched_slot, nr_mac->radio_config.minRXTXTIME, &tda_info); + DevAssert(n_tda == 1); + int tda = seq_arr_dist(&nr_mac->ul_tda, seq_arr_front(&nr_mac->ul_tda), tda_info); + AssertFatal(tda >= 0 && tda < 16, "illegal TDA index %d\n", tda); /* TODO: iterate over all available UL slots if there are more than DL */ /* the following supposes that the TDA is the same across all BWPs */ - NR_tda_info_t *tda_info = seq_arr_at(&nr_mac->ul_tda, tda); int len[num_beams]; for (int i = 0; i < num_beams; i++) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 2c9e1a2a43..91c0969dde 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -417,7 +417,7 @@ void free_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl); bool add_UE_to_list(int list_size, NR_UE_info_t *list[list_size], NR_UE_info_t *UE); NR_UE_info_t *remove_UE_from_list(int list_size, NR_UE_info_t *list[list_size], rnti_t rnti); int get_dl_tda(const gNB_MAC_INST *nrmac, int slot); -int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot); +int get_num_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot, int k2, const NR_tda_info_t **first_idx); int get_cce_index(const gNB_MAC_INST *nrmac, const int CC_id, From 3102068e71264de3c1fb2db96f2f031da20edaca Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 Jul 2025 12:16:11 +0200 Subject: [PATCH 066/112] Add ULSCH preprocessor slot logic for scheduling multiple slots Add a loop to advance slots as determined by current ("DL") slot, and advance further into the future (for "UL" slots) if TDAs allow. Ensure to schedule all TDAs if it's the last DL slot, to guarantee a previously scheduled TDA will also reoccur (i.e., for guaranteeing that retransmissions can be made). Note that the check for number of UE being zero is removed, as this allows to keep "ul_next" close to the "min_next" slot. This way, we can use fs_get_max(); otherwise, if we did not always execute this loop, they might diverge far from each other, making the logic inside the loop more complicated. This commit introduces a new type "fsn_t" (frame-slot number) that encapsulates a single frame-slot combination in a single struct. The helper functions (in gNB_scheduler_ulsch.c) should be moved to a new file under common/, but we don't do this here to limit the amount of code changes. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 108 +++++++++++++----- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 10 ++ 2 files changed, 88 insertions(+), 30 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 40d9457a23..93db0d1945 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2534,49 +2534,103 @@ void post_process_ulsch(gNB_MAC_INST *nr_mac, post_process_pusch_t *pusch, NR_UE nr_mac->cset0_bwp_size); } +fsn_t fs_add_delta(const frame_structure_t *fs, uint32_t delta, fsn_t fsn) +{ + const int slots_frame = fs->numb_slots_frame; + fsn_t res = { + .f = (fsn.f + (fsn.s + delta) / slots_frame) % MAX_FRAME_NUMBER, + .s = (fsn.s + delta) % slots_frame, + }; + return res; +} +int fs_get_diff(const frame_structure_t *fs, fsn_t a, fsn_t b) +{ + const int slots_frame = fs->numb_slots_frame; + int diff = (a.f * slots_frame + a.s) - (b.f * slots_frame + b.s); + if (diff < -512 * slots_frame) + diff += 1024 * slots_frame; + else if (diff > 512 * slots_frame) + diff -= 1024 * slots_frame; + return diff; +} +fsn_t fs_get_max(const frame_structure_t *fs, fsn_t a, fsn_t b) +{ + if (fs_get_diff(fs, a, b) <= 0) { + return b; + } else { + return a; + } +} + static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch) { int frame = pp_pusch->frame; int slot = pp_pusch->slot; - // no UEs - if (nr_mac->UE_info.connected_ue_list[0] == NULL) - return; - NR_COMMON_channels_t *cc = nr_mac->common_channels; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; AssertFatal(scc, "We need one serving cell config common\n"); + const frame_structure_t *fs = &nr_mac->frame_structure; - const int slots_frame = nr_mac->frame_structure.numb_slots_frame; // we assume the same K2 for all UEs - const int K2 = nr_mac->radio_config.minRXTXTIME + get_NTN_Koffset(scc); - const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER; - const int sched_slot = (slot + K2) % slots_frame; - if (!is_ul_slot(sched_slot, &nr_mac->frame_structure)) - return; + const int koffset = get_NTN_Koffset(scc); + const int min_rxtx = nr_mac->radio_config.minRXTXTIME + koffset; int num_beams = nr_mac->beam_info.beam_allocation ? nr_mac->beam_info.beams_per_period : 1; int bw = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; int average_agg_level = 4; // TODO find a better estimation - int max_sched_ues = bw / (average_agg_level * NR_NB_REG_PER_CCE); + int max_dci = bw / (average_agg_level * NR_NB_REG_PER_CCE); // FAPI cannot handle more than MAX_DCI_CORESET DCIs - max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); + max_dci = min(max_dci, MAX_DCI_CORESET); - const NR_tda_info_t *tda_info = NULL; - int n_tda = get_num_ul_tda(nr_mac, sched_frame, sched_slot, nr_mac->radio_config.minRXTXTIME, &tda_info); - DevAssert(n_tda == 1); - int tda = seq_arr_dist(&nr_mac->ul_tda, seq_arr_front(&nr_mac->ul_tda), tda_info); - AssertFatal(tda >= 0 && tda < 16, "illegal TDA index %d\n", tda); - /* TODO: iterate over all available UL slots if there are more than DL */ - /* the following supposes that the TDA is the same across all BWPs */ + fsn_t current = {frame, slot}; + fsn_t min_next = fs_add_delta(fs, min_rxtx, current); + /* if it's the last DL slot, we should try all TDAs to make sure that the + * scheduler can reach e.g. the next mixed slot. Otherwise, if we don't, we + * might starve HARQ processes that need a retransmission in a specific slot + * but we might not necessarily reach it */ + bool last_dl = (current.s % fs->numb_slots_period) == (fs->period_cfg.num_dl_slots - 1); + fsn_t *next = &nr_mac->ul_next; + while (max_dci > 0) { + /* go to the next UL slot, skipping DL if necessary */ + *next = fs_get_max(fs, *next, min_next); + while (!is_ul_slot(next->s, fs)) + *next = fs_add_delta(fs, 1, *next); + if (!is_dl_slot(current.s, fs)) // if current slot is not DL, nothing to do + break; - int len[num_beams]; - for (int i = 0; i < num_beams; i++) - len[i] = bw; - /* proportional fair scheduling algorithm */ - pf_ul(nr_mac, pp_pusch, tda, tda_info, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len); + /* get a TDA so that next UL scheduling slot can be reached from current, + * and exit if there is no such TDA. Remove koffset, as it is + * "cell-specific", i.e., the UE will add it on the computation. */ + int k2 = fs_get_diff(fs, *next, current) - koffset; + DevAssert(k2 > 0); + const NR_tda_info_t *tda_info = NULL; + int n_tda = get_num_ul_tda(nr_mac, next->f, next->s, k2, &tda_info); + if (n_tda == 0) /* no TDA fulfills this */ + break; + /* TODO: get_num_ul_tda() might indicate multiple TDAs to use (e.g., one + * handling SRS), this will be fixed in a follow-up commit. */ + DevAssert(tda_info->valid_tda); + int tda = seq_arr_dist(&nr_mac->ul_tda, seq_arr_front(&nr_mac->ul_tda), tda_info); + AssertFatal(tda >= 0 && tda < 16, "illegal TDA index %d\n", tda); + + int len[num_beams]; + for (int i = 0; i < num_beams; i++) + len[i] = bw; + /* proportional fair scheduling algorithm */ + int sched = pf_ul(nr_mac, pp_pusch, tda, tda_info, nr_mac->UE_info.connected_ue_list, max_dci, num_beams, len); + LOG_D(NR_MAC, "run pf_ul() at %4d.%2d with tda %d k2 %d (ULSCH at %4d.%2d) scheduled %d last_dl %d\n", frame, slot, tda, k2, next->f, next->s, sched, last_dl); + /* if we did not schedule anything, and it's not the last slot, break. In + * the case we did schedule or it's the last slot (see above!), continue + * advancing till there is no TDA anymore */ + if (sched == 0 && !last_dl) + break; + max_dci -= sched; + + *next = fs_add_delta(fs, 1, *next); + } } nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) @@ -2620,11 +2674,5 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_ ul_dci_req->Slot = slot; post_process_pusch_t pusch = { .frame = frame, .slot = slot, .ul_dci_req = ul_dci_req, .pdcch_pdu_coreset = {NULL}, }; - /* Uplink data ONLY can be scheduled when the current slot is downlink slot, - * because we have to schedule the DCI0 first before schedule uplink data */ - if (!is_dl_slot(slot, &nr_mac->frame_structure)) { - LOG_D(NR_MAC, "Current slot %d is NOT DL slot, cannot schedule DCI0 for UL data\n", slot); - return; - } nr_mac->pre_processor_ul(nr_mac, &pusch); } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 9dcddcef4d..aea5724056 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -828,6 +828,14 @@ typedef struct { uint64_t used_prb_aggregate; } mac_stats_t; +/// helper type to encapsulate a frame/slot combination in a single type. +/// Currently only used in the UL preprocessor. Note: if you use this type +/// further, please refactor it into a common type first. +typedef struct fsn { + frame_t f; + slot_t s; +} fsn_t; + /*! \brief top level eNB MAC structure */ typedef struct gNB_MAC_INST_s { /// Ethernet parameters for northbound midhaul interface @@ -932,6 +940,8 @@ typedef struct gNB_MAC_INST_s { /// dedicate UL TDA, common for all UEs seq_arr_t ul_tda; + /// next UL slot to schedule + fsn_t ul_next; nr_mac_rrc_ul_if_t mac_rrc; f1_config_t f1_config; From cf8099fab19c242996bc32bf0f551d943429245b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 23 Jul 2025 10:50:45 +0200 Subject: [PATCH 067/112] Refactor TDA allocation: scheduler can take advantage of multiple k2 Add multiple TDAs with k2 larger than the min_rxtxtime, to potentially allow to allocate all available slots. For this, nr_rrc_config_ul_tda() inspects the TDD pattern, and allocates as many TDAs as necessary. It also sorts the TDA list, with smaller k2 and larger symbol lengths first. This in turn is now used by get_num_ul_tda() to use a k2 and the slot configuration to find a suitable TDA, assuming a list as sorted in nr_rrc_config_ul_tda(). Note that since get_num_ul_tda() does only inspect the available UL slots, there might be overlap (e.g., when scheduling SRS), which will be fixed in a follow-up commit. Also, TDD pattern 2 is not handled here yet, and a follow-up commit will fix it. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 71 +++++++++++-------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 55 +++++++++++++- 3 files changed, 96 insertions(+), 32 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 93db0d1945..4f55f73db1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -38,45 +38,58 @@ //#define SRS_IND_DEBUG -/* \brief Get the number of UL TDAs that could be used in frame and slot, reachable +/* \brief Get the number of UL TDAs that could be used in slot, reachable * via specific k2. The output parameter first_idx is a pointer to the first * suitable TDA, and the function returns the number of suitable TDAs, or 0. */ -int get_num_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot, int k2, const NR_tda_info_t **first_idx) +int get_num_ul_tda(gNB_MAC_INST *nrmac, int slot, int k2, const NR_tda_info_t **first_idx) { /* we assume that this function is mutex-protected from outside */ NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock); - /* there is a mixed slot only when in TDD */ - frame_structure_t *fs = &nrmac->frame_structure; + const frame_structure_t *fs = &nrmac->frame_structure; + const int slot_period = slot % fs->numb_slots_period; + const tdd_bitmap_t *bm = &fs->period_cfg.tdd_slot_bitmap[slot_period]; + /* For some reason, we only store the number of symbols if it's mixed */ + const int num_ul_symbols = bm->slot_type == TDD_NR_MIXED_SLOT ? bm->num_ul_symbols : 14; + const uint16_t ul_bitmap = SL_to_bitmap(14 - num_ul_symbols, num_ul_symbols); - /* TODO: we assume currently that all UL TDA have same k2, check below */ - NR_tda_info_t *tda_info = seq_arr_at(&nrmac->ul_tda, 0); - if (!tda_info->valid_tda || tda_info->k2 != k2) + *first_idx = NULL; + FOR_EACH_SEQ_ARR(NR_tda_info_t *, tda, &nrmac->ul_tda) { + DevAssert(tda->valid_tda); + // nr_rrc_config_ul_tda() orders by k2, so skip smaller and return for + // bigger ones + if (tda->k2 < k2) + continue; + if (tda->k2 > k2) + break; // there won't be a suitable k2 anymore + + uint16_t tda_bitmap = SL_to_bitmap(tda->startSymbolIndex, tda->nrOfSymbols); + // nr_rrc_config_ul_tda() assures TDAs are from largest to smallest symbol number. + // check that this TDA fits entirely into this slot's mask (slot might be + // smaller in mixed slots)., A mixed slot TDA would be checked last, so a + // full slot TDA will be used for a full UL slot. + if ((tda_bitmap & ul_bitmap) == tda_bitmap) { // if TDA fits entiry + *first_idx = tda; + break; + } + } + if (*first_idx == NULL) /* nothing fit */ return 0; - if (fs->frame_type == TDD) { - // if there is uplink symbols in mixed slot - int s = get_slot_idx_in_period(slot, fs); - tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap; - if ((tdd_slot_bitmap[s].num_ul_symbols > 1) && is_mixed_slot(s, fs)) { - *first_idx = seq_arr_at(&nrmac->ul_tda, 2); // mixed slot, all symbols of mixed minus last - return 1; - } + NR_tda_info_t *end_it = seq_arr_next(&nrmac->ul_tda, *first_idx); + while (end_it != seq_arr_end(&nrmac->ul_tda) && end_it->k2 == k2) { + /* the following TDAs should all fit as long as the k2 is the same */ + uint16_t tda_bitmap = SL_to_bitmap(end_it->startSymbolIndex, end_it->nrOfSymbols); + AssertFatal((tda_bitmap & ul_bitmap) == tda_bitmap, + "TDA should fit inside slot, but is not the case for k2 %ld bitmap 0x%04x\n", + end_it->k2, + tda_bitmap); + end_it = seq_arr_next(&nrmac->ul_tda, end_it); } - // Avoid slots with the SRS - UE_iterator(nrmac->UE_info.connected_ue_list, UE) { - NR_sched_srs_t sched_srs = UE->UE_sched_ctrl.sched_srs; - if(sched_srs.srs_scheduled && sched_srs.frame == frame && sched_srs.slot == slot) { - *first_idx = seq_arr_at(&nrmac->ul_tda, 1); // symbols 0--12 - return 1; - } - } - - // symbols 0--13, if FDD or not mixed slot in TDD, for now use default TDA - // (TODO handle CSI-RS slots) - *first_idx = seq_arr_at(&nrmac->ul_tda, 0); - return 1; + ptrdiff_t diff = seq_arr_dist(&nrmac->ul_tda, *first_idx, end_it); + AssertFatal(diff > 0 && diff <= seq_arr_size(&nrmac->ul_tda), "dist %ld\n", diff); + return diff; } bwp_info_t get_pusch_bwp_start_size(NR_UE_info_t *UE) @@ -2607,7 +2620,7 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp int k2 = fs_get_diff(fs, *next, current) - koffset; DevAssert(k2 > 0); const NR_tda_info_t *tda_info = NULL; - int n_tda = get_num_ul_tda(nr_mac, next->f, next->s, k2, &tda_info); + int n_tda = get_num_ul_tda(nr_mac, next->s, k2, &tda_info); if (n_tda == 0) /* no TDA fulfills this */ break; /* TODO: get_num_ul_tda() might indicate multiple TDAs to use (e.g., one diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 91c0969dde..9caa78bf7e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -417,7 +417,7 @@ void free_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl); bool add_UE_to_list(int list_size, NR_UE_info_t *list[list_size], NR_UE_info_t *UE); NR_UE_info_t *remove_UE_from_list(int list_size, NR_UE_info_t *list[list_size], rnti_t rnti); int get_dl_tda(const gNB_MAC_INST *nrmac, int slot); -int get_num_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot, int k2, const NR_tda_info_t **first_idx); +int get_num_ul_tda(gNB_MAC_INST *nrmac, int slot, int k2, const NR_tda_info_t **first_idx); int get_cce_index(const gNB_MAC_INST *nrmac, const int CC_id, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index d780cf4fe7..22d3b55fa4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1058,6 +1058,29 @@ static struct NR_PUSCH_TimeDomainResourceAllocation *set_TimeDomainResourceAlloc return puschTdrAlloc; } +static int tda_cmp(const void *tda_a, const void *tda_b) +{ + const NR_PUSCH_TimeDomainResourceAllocation_t *a = *(const NR_PUSCH_TimeDomainResourceAllocation_t **)tda_a; + const NR_PUSCH_TimeDomainResourceAllocation_t *b = *(const NR_PUSCH_TimeDomainResourceAllocation_t **)tda_b; + DevAssert(a->k2 && b->k2); + if (*a->k2 < *b->k2) + return -1; // smaller first + if (*a->k2 > *b->k2) + return 1; + // same k2: order from big to small TDA number + int as, al, bs, bl; + SLIV2SL(a->startSymbolAndLength, &as, &al); + SLIV2SL(b->startSymbolAndLength, &bs, &bl); + if (al < bl) + return 1; // bigger first + if (al > bl) + return -1; + return 0; +} + +/* \brief Set up a list of time domain allocations as suitable for the TDD + * pattern. This will be used by get_num_ul_tda(), which requires a specific + * ordering, hence we qsort() the list at the end according to tda_cmp(). */ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) { NR_PUSCH_TimeDomainResourceAllocationList_t *tda_list = @@ -1065,6 +1088,7 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) AssertFatal(tda_list->list.count == 0, "already have pusch_TimeDomainAllocationList members\n"); const int k2 = min_fb_delay; + const int mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; // UL TDA index 0 is basic slot configuration starting in symbol 0 til the last but one symbol NR_PUSCH_TimeDomainResourceAllocation_t *tda; @@ -1089,13 +1113,40 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) } else if (p2) { ul_symb = p1->nrofUplinkSymbols; } - if (ul_symb>1) { + + DevAssert(p2 == NULL); + int N_dl = p1->nrofDownlinkSlots; + int N_ul = p1->nrofUplinkSlots; + int tdd_period_idx = get_tdd_period_idx(scc->tdd_UL_DL_ConfigurationCommon); + int nb_periods_per_frame = get_nb_periods_per_frame(tdd_period_idx); + int nb_slots_per_period = ((1 << mu) * 10) / nb_periods_per_frame; + + // make TDA for the mixed slot + if (ul_symb > 1 && k2 <= N_dl) { // UL TDA index 2 for mixed slot (TDD) long sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); - tda = set_TimeDomainResourceAllocation(k2, sliv); + tda = set_TimeDomainResourceAllocation(k2, sliv); // to be reached from suitable DL slot + asn1cSeqAdd(&tda_list->list, tda); + } else if (ul_symb > 1) { // k2 > N_Dl + long sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); + tda = set_TimeDomainResourceAllocation(nb_slots_per_period, sliv); // to be reached from last DL (mixed) slot, if any asn1cSeqAdd(&tda_list->list, tda); } + + // make TDA for UL slots that are not reachable within k2/min_rxtxtime + if (N_ul > k2) { + // enforce that with k2, we could reach all but one slot (which is mixed + // and taken into account above + AssertFatal(N_dl >= k2 - 1, "cannot fulfil TDD pattern: N_dl %d, k2 %d\n", N_dl, k2); + for (int i = k2 + 1; i <= N_ul; ++i) { + tda = set_TimeDomainResourceAllocation(i, get_SLIV(0, 13)); + asn1cSeqAdd(&tda_list->list, tda); + } + } } + + AssertFatal(tda_list->list.count <= 16, "cannot reach all UL slots with current TDD configuration\n"); + qsort(tda_list->list.array, tda_list->list.count, sizeof(tda_list->list.array), tda_cmp); } static void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time, NR_SubcarrierSpacing_t subcarrierSpacing) From 6ef8dadd886e5ce6874e71dad1acf2718fe2c547 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 4 Aug 2025 11:23:36 +0200 Subject: [PATCH 068/112] Only add SRS TDA if SRS is activated Since the parent commit, the TDA for UL scheduling is dynamically selected, instead of being hardcoded to specific indices. We can thus also omit the SRS TDA if no SRS is configured. Also add SRS-specific TDAs if we schedule further into the future. --- openair2/GNB_APP/gnb_config.c | 6 +++--- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 12 +++++++++--- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 8f162ff1ce..57086db62a 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1165,7 +1165,7 @@ bool is_pattern2_config(paramdef_t *param) return true; } -static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cfg, int minRXTXTIME) +static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cfg, int minRXTXTIME, int do_SRS) { NR_ServingCellConfigCommon_t *scc = calloc_or_fail(1, sizeof(*scc)); uint64_t ssb_bitmap=0xff; @@ -1231,7 +1231,7 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf check_ssb_raster(ssb_freq, *frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing); fix_scc(scc, ssb_bitmap); } - nr_rrc_config_ul_tda(scc, minRXTXTIME); + nr_rrc_config_ul_tda(scc, minRXTXTIME, do_SRS); // the gNB uses the servingCellConfigCommon everywhere, even when it should use the servingCellConfigCommonSIB. // previously (before this commit), the following fields were indirectly populated through get_SIB1_NR(). @@ -1695,7 +1695,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) config.num_agg_level_candidates[PDCCH_AGG_LEVEL8], config.num_agg_level_candidates[PDCCH_AGG_LEVEL16]); - NR_ServingCellConfigCommon_t *scc = get_scc_config(cfg, config.minRXTXTIME); + NR_ServingCellConfigCommon_t *scc = get_scc_config(cfg, config.minRXTXTIME, config.do_SRS); //xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc); NR_ServingCellConfig_t *scd = get_scd_config(cfg); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 22d3b55fa4..2203c0b2b7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1081,7 +1081,7 @@ static int tda_cmp(const void *tda_a, const void *tda_b) /* \brief Set up a list of time domain allocations as suitable for the TDD * pattern. This will be used by get_num_ul_tda(), which requires a specific * ordering, hence we qsort() the list at the end according to tda_cmp(). */ -void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) +void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, int do_SRS) { NR_PUSCH_TimeDomainResourceAllocationList_t *tda_list = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; @@ -1096,8 +1096,10 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) asn1cSeqAdd(&tda_list->list, tda); // UL TDA index 1 in case of SRS - tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 12)); - asn1cSeqAdd(&tda_list->list, tda); + if (do_SRS) { + tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 12)); + asn1cSeqAdd(&tda_list->list, tda); + } if (scc->tdd_UL_DL_ConfigurationCommon) { int ul_symb = 0; @@ -1141,6 +1143,10 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay) for (int i = k2 + 1; i <= N_ul; ++i) { tda = set_TimeDomainResourceAllocation(i, get_SLIV(0, 13)); asn1cSeqAdd(&tda_list->list, tda); + if (do_SRS) { + tda = set_TimeDomainResourceAllocation(k2, get_SLIV(0, 12)); + asn1cSeqAdd(&tda_list->list, tda); + } } } } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h index 51c30c38b6..28993e13cf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h @@ -51,7 +51,7 @@ void nr_rrc_config_dl_tda(struct NR_PDSCH_TimeDomainResourceAllocationList *pdsc frame_type_t frame_type, NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, int curr_bwp); -void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay); +void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, int do_SRS); NR_SearchSpace_t *rrc_searchspace_config(bool is_common, int searchspaceid, int coresetid, From 98cc36430b80d43ba5e1f9d1c9531aed939fb745 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 15 Jul 2025 19:02:28 +0200 Subject: [PATCH 069/112] Schedule SRS longer in advance, cleanup Schedule SRS longer in advance, so that it would also be enough even with big k2 for UL TDA. Remove useless types: we do not use the information on sched_srs anymore, so remove it. Check that the VRB map is free before making allocations. --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 - .../LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 46 ++++++------------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 19 -------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 5 -- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 9 ---- 5 files changed, 14 insertions(+), 67 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index a6de5b987d..8a739e4bc1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2766,8 +2766,6 @@ bool add_connected_nr_ue(gNB_MAC_INST *nr_mac, NR_UE_info_t *UE) NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; sched_ctrl->dl_max_mcs = 28; /* do not limit MCS for individual UEs */ - sched_ctrl->sched_srs.frame = -1; - sched_ctrl->sched_srs.slot = -1; sched_ctrl->pdcch_cl_adjust = 0; reset_srs_stats(UE); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index c3ebb5ab9b..a93b0cb051 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -471,9 +471,13 @@ static void nr_configure_srs(gNB_MAC_INST *nrmac, NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame); AssertFatal(beam.idx >= 0, "Cannot allocate SRS in any available beam\n"); uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][buffer_index * MAX_BWP_SIZE]; - uint64_t mask = SL_to_bitmap(srs_pdu->time_start_position, srs_pdu->num_symbols); - for (int i = 0; i < srs_pdu->bwp_size; ++i) - vrb_map_UL[i + srs_pdu->bwp_start] |= mask; + uint16_t mask = SL_to_bitmap(srs_pdu->time_start_position, srs_pdu->num_symbols); + for (int i = 0; i < srs_pdu->bwp_size; ++i) { + int rb = i + srs_pdu->bwp_start; + uint16_t alloc = vrb_map_UL[rb] & mask; + AssertFatal(nrmac->ulprbbl[rb] != 0 || alloc == 0, "RB %d not free for SRS: alloc 0x%02x for mask 0x%02x\n", rb, alloc, mask); + vrb_map_UL[rb] |= mask; + } } static void nr_fill_nfapi_srs(gNB_MAC_INST *nrmac, @@ -512,9 +516,7 @@ static void nr_fill_nfapi_srs(gNB_MAC_INST *nrmac, *********************************************************************/ void nr_schedule_srs(int module_id, frame_t frame, int slot) { - const int CC_id = 0; gNB_MAC_INST *nrmac = RC.nrmac[module_id]; - const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; /* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */ NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock); @@ -526,12 +528,6 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot) NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; - if(sched_ctrl->sched_srs.srs_scheduled && sched_ctrl->sched_srs.frame == frame && sched_ctrl->sched_srs.slot == slot) { - sched_ctrl->sched_srs.frame = -1; - sched_ctrl->sched_srs.slot = -1; - sched_ctrl->sched_srs.srs_scheduled = false; - } - if ((sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) || nr_timer_is_active(&sched_ctrl->transm_interrupt)) { continue; } @@ -566,34 +562,20 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot) continue; } - NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList = get_ul_tdalist(current_BWP, - sched_ctrl->coreset->controlResourceSetId, - sched_ctrl->search_space->searchSpaceType->present, - TYPE_C_RNTI_); - const int num_tda = tdaList->list.count; - int max_k2 = 0; - // avoid last one in the list (for msg3) - for (int i = 0; i < num_tda - 1; i++) { - int k2 = get_K2(tdaList, i, current_BWP->scs, scc); - max_k2 = k2 > max_k2 ? k2 : max_k2; - } - // we are sheduling SRS max_k2 slot in advance for the presence of SRS to be taken into account when scheduling PUSCH const int n_slots_frame = nrmac->frame_structure.numb_slots_frame; - const int sched_slot = (slot + max_k2) % n_slots_frame; - const int sched_frame = (frame + (slot + max_k2) / n_slots_frame) % MAX_FRAME_NUMBER; + const int n_ahead = n_slots_frame - 1 + get_NTN_Koffset(nrmac->common_channels[0].ServingCellConfigCommon); + const int sched_slot = (slot + n_ahead) % n_slots_frame; + const int sched_frame = (frame + (slot + n_ahead) / n_slots_frame) % MAX_FRAME_NUMBER; const uint16_t period = srs_period[srs_resource->resourceType.choice.periodic->periodicityAndOffset_p.present]; const uint16_t offset = get_nr_srs_offset(srs_resource->resourceType.choice.periodic->periodicityAndOffset_p); // Check if UE will transmit the SRS in this frame - if ((sched_frame * n_slots_frame + sched_slot - offset) % period == 0) { - LOG_D(NR_MAC," %d.%d Scheduling SRS reception for %d.%d\n", frame, slot, sched_frame, sched_slot); - nr_fill_nfapi_srs(nrmac, CC_id, UE, sched_frame, sched_slot, srs_resource_set, srs_resource); - sched_ctrl->sched_srs.frame = sched_frame; - sched_ctrl->sched_srs.slot = sched_slot; - sched_ctrl->sched_srs.srs_scheduled = true; - } + if ((sched_frame * n_slots_frame + sched_slot - offset) % period != 0) + continue; + LOG_D(NR_MAC," %d.%d Scheduling SRS reception for %d.%d\n", frame, slot, sched_frame, sched_slot); + nr_fill_nfapi_srs(nrmac, CC_id, UE, sched_frame, sched_slot, srs_resource_set, srs_resource); } } } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 4f55f73db1..da6eab799c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1585,25 +1585,6 @@ void handle_nr_srs_measurements(const module_id_t module_id, NR_SCHED_UNLOCK(&nrmac->sched_lock); } -long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList, - int time_domain_assignment, - int mu, - const NR_ServingCellConfigCommon_t *scc) -{ - /* we assume that this function is mutex-protected from outside */ - NR_PUSCH_TimeDomainResourceAllocation_t *tda = tdaList->list.array[time_domain_assignment]; - const int NTN_gNB_Koffset = get_NTN_Koffset(scc); - - if (tda->k2) - return *tda->k2 + NTN_gNB_Koffset; - else if (mu < 2) - return 1 + NTN_gNB_Koffset; - else if (mu == 2) - return 2 + NTN_gNB_Koffset; - else - return 3 + NTN_gNB_Koffset; -} - static bool nr_UE_is_to_be_scheduled(const frame_structure_t *fs, NR_UE_info_t *UE, frame_t frame, diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 9caa78bf7e..4cd3a6dd7e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -286,11 +286,6 @@ NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac, NR_BWP_DownlinkDedicated_t *bwp_dedicated, NR_ControlResourceSetId_t coreset_id); -long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList, - int time_domain_assignment, - int mu, - const NR_ServingCellConfigCommon_t *scc); - const NR_DMRS_UplinkConfig_t *get_DMRS_UplinkConfig(const NR_PUSCH_Config_t *pusch_Config, const NR_tda_info_t *tda_info); NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index aea5724056..a4e50bc7cb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -429,12 +429,6 @@ typedef struct NR_sched_pusch { int phr_txpower_calc; } NR_sched_pusch_t; -typedef struct NR_sched_srs { - int frame; - int slot; - bool srs_scheduled; -} NR_sched_srs_t; - typedef struct NR_pdsch_dmrs { uint8_t dmrs_ports_id; uint8_t N_PRB_DMRS; @@ -599,9 +593,6 @@ typedef struct { NR_sched_pucch_t *sched_pucch; int sched_pucch_size; - /// Sched SRS: scheduling decisions - NR_sched_srs_t sched_srs; - /// uplink bytes that are currently scheduled int sched_ul_bytes; /// estimation of the UL buffer size From 71e01bbaa975edc916eef351c2db0c8d1672f95f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 Jul 2025 16:41:44 +0200 Subject: [PATCH 070/112] Correctly interpret SRS numberOfSymbols A length of 0 is to be interpreted as 1 symbol, a length of 1 is 2, etc. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index a93b0cb051..d9e656dec9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -471,7 +471,9 @@ static void nr_configure_srs(gNB_MAC_INST *nrmac, NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, frame, slot, UE->UE_beam_index, slots_per_frame); AssertFatal(beam.idx >= 0, "Cannot allocate SRS in any available beam\n"); uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][buffer_index * MAX_BWP_SIZE]; - uint16_t mask = SL_to_bitmap(srs_pdu->time_start_position, srs_pdu->num_symbols); + uint16_t num = 1 << srs_pdu->num_symbols; // 0,1,2 means 1,2,4 symbols, see 222.10.04 table 3-105 + uint16_t mask = SL_to_bitmap(srs_pdu->time_start_position, num); + DevAssert(mask != 0); for (int i = 0; i < srs_pdu->bwp_size; ++i) { int rb = i + srs_pdu->bwp_start; uint16_t alloc = vrb_map_UL[rb] & mask; From 6981783ee188cc3517f6d004f4f66954118ec56f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 12:44:21 +0200 Subject: [PATCH 071/112] Select best out of multiple TDAs A new function get_best_ul_tda() allows to select the "best" TDA out of a number of TDA. Specifically, get_best_ul_tda() considers in how many RBs a given TDA might be allocated, and multiplies this number of RBs with the number of symbols in the TDA to form a "score". The TDA with the best "score" is selected, considering it maximizes resource usage. In phytest scheduler, we use this function to verify that the given TDA can be really allocated in all selected slots. --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 7 ++ .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 72 ++++++++++++++++++- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 8 +++ 3 files changed, 84 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 00872ade89..26b48ab998 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -262,6 +262,13 @@ void nr_ul_preprocessor_phytest(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_p // TODO implement beam procedures for phy-test mode int beam = 0; + const NR_tda_info_t *tda_p; + const int n_tda = get_num_ul_tda(nr_mac, sched_slot, tda_info.k2, &tda_p); + DevAssert(n_tda > 0); + /* check only the first TDA: we are only interested in finding out if this TDA fits completely */ + int rb_s = rbStart, rb_l = rbSize; + get_best_ul_tda(nr_mac, beam, tda_p, 1, sched_frame, sched_slot, &rb_s, &rb_l); + DevAssert(rb_s == rbStart && rb_l == rbSize); const int buffer_index = ul_buffer_index(sched_frame, sched_slot, slots_frame, nr_mac->vrb_map_UL_size); uint16_t *vrb_map_UL = &nr_mac->common_channels[CC_id].vrb_map_UL[beam][buffer_index * MAX_BWP_SIZE]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index da6eab799c..33a0ad650e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -92,6 +92,65 @@ int get_num_ul_tda(gNB_MAC_INST *nrmac, int slot, int k2, const NR_tda_info_t ** return diff; } +static void get_max_rb_range(const uint16_t *vrb_map_ul, const uint16_t *ulprbbl, uint16_t mask, int *rb_start, int *rb_len) +{ + int best_start = *rb_start; + int best_len = 0; + int current_start = *rb_start; + int current_len = 0; + for (int rb = *rb_start; rb < *rb_len; ++rb) { + if (ulprbbl[rb] == 0 && (mask & vrb_map_ul[rb]) == 0) { + current_len++; + continue; + } + + /* this RB is blocked for UL, or already in use */ + if (current_len > best_len) { + best_start = current_start; + best_len = current_len; + } + current_start = rb + 1; /* will start in next RB, or updated later */ + current_len = 0; + } + if (current_len > best_len) { + best_start = current_start; + best_len = current_len; + } + *rb_start = best_start; + *rb_len = best_len; +} + +const NR_tda_info_t *get_best_ul_tda(const gNB_MAC_INST *nrmac, int beam, const NR_tda_info_t *tdas, int n_tda, int frame, int slot, int *rb_start, int *rb_len) +{ + /* there is a mixed slot only when in TDD */ + const frame_structure_t *fs = &nrmac->frame_structure; + const int index = ul_buffer_index(frame, slot, fs->numb_slots_frame, nrmac->vrb_map_UL_size); + uint16_t *vrb_map_UL = &nrmac->common_channels[0].vrb_map_UL[beam][index * MAX_BWP_SIZE]; + + DevAssert(n_tda <= 16); + const NR_tda_info_t *best_tda = tdas; + uint64_t score = 0; + int check_rb_start = *rb_start; + int check_rb_len = *rb_len; + + for (int i = 0; i < n_tda; ++i, tdas++) { + int start = check_rb_start; + int len = check_rb_len; + uint16_t tda_mask = SL_to_bitmap(tdas->startSymbolIndex, tdas->nrOfSymbols); + get_max_rb_range(vrb_map_UL, nrmac->ulprbbl, tda_mask, &start, &len); + uint64_t s = (uint64_t)tdas->nrOfSymbols * len; + if (s > score) { + best_tda = tdas; + score = s; + *rb_start = start; + *rb_len = len; + } + LOG_D(NR_MAC, "%4d.%2d tda k2 %ld mask 0x%04x has PRB start/len %d/%d score %ld\n", frame, slot, tdas->k2, tda_mask, start, len, s); + } + + return best_tda; +} + bwp_info_t get_pusch_bwp_start_size(NR_UE_info_t *UE) { NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; @@ -2600,19 +2659,26 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp * "cell-specific", i.e., the UE will add it on the computation. */ int k2 = fs_get_diff(fs, *next, current) - koffset; DevAssert(k2 > 0); + // we assume that all beams have the same symbol utilization in all RBs for + // simplification (but this might not be true). Otherwise, we would need to + // check it separately for all beams and give a list of TDAs (one for each + // beam) in pf_ul(), which is complex. We should rewrite pf_ul() to + // schedule for one beam only instead (and for one BWP). + int beam = 0; const NR_tda_info_t *tda_info = NULL; int n_tda = get_num_ul_tda(nr_mac, next->s, k2, &tda_info); if (n_tda == 0) /* no TDA fulfills this */ break; - /* TODO: get_num_ul_tda() might indicate multiple TDAs to use (e.g., one - * handling SRS), this will be fixed in a follow-up commit. */ + int rb_start = 0; + int rb_len = bw; + tda_info = get_best_ul_tda(nr_mac, beam, tda_info, n_tda, next->f, next->s, &rb_start, &rb_len); DevAssert(tda_info->valid_tda); int tda = seq_arr_dist(&nr_mac->ul_tda, seq_arr_front(&nr_mac->ul_tda), tda_info); AssertFatal(tda >= 0 && tda < 16, "illegal TDA index %d\n", tda); int len[num_beams]; for (int i = 0; i < num_beams; i++) - len[i] = bw; + len[i] = rb_len; /* proportional fair scheduling algorithm */ int sched = pf_ul(nr_mac, pp_pusch, tda, tda_info, nr_mac->UE_info.connected_ue_list, max_dci, num_beams, len); LOG_D(NR_MAC, "run pf_ul() at %4d.%2d with tda %d k2 %d (ULSCH at %4d.%2d) scheduled %d last_dl %d\n", frame, slot, tda, k2, next->f, next->s, sched, last_dl); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 4cd3a6dd7e..584b294806 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -413,6 +413,14 @@ bool add_UE_to_list(int list_size, NR_UE_info_t *list[list_size], NR_UE_info_t * NR_UE_info_t *remove_UE_from_list(int list_size, NR_UE_info_t *list[list_size], rnti_t rnti); int get_dl_tda(const gNB_MAC_INST *nrmac, int slot); int get_num_ul_tda(gNB_MAC_INST *nrmac, int slot, int k2, const NR_tda_info_t **first_idx); +const NR_tda_info_t *get_best_ul_tda(const gNB_MAC_INST *nrmac, + int beam, + const NR_tda_info_t *tdas, + int n_tda, + int frame, + int slot, + int *rb_start, + int *rb_len); int get_cce_index(const gNB_MAC_INST *nrmac, const int CC_id, From 135525c17a7cd39f5ba6c582b474d537b464bde7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAben=20Soares=20Silva?= Date: Wed, 9 Jul 2025 07:11:25 +0200 Subject: [PATCH 072/112] P5 Config: Pack/Unpack TDD table with 10.02 and 10.04 formats Adds the capability to pack/unpack the TDD table in CONFIG.request following both SCF222.10.02 (Tag 0x1027) and SCF222.10.04 (Tag 0x1035) formats In the case of Aerial, the TDD table is packed following the 10.04 format, but with the 10.02 tag Prevent the packing of Digital Beamforming table and Precoding Matrix table for Aerial --- nfapi/open-nFAPI/fapi/CMakeLists.txt | 4 +- nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c | 139 ++++++++++++++++-- .../nfapi/public_inc/nfapi_nr_interface_scf.h | 7 + 3 files changed, 138 insertions(+), 12 deletions(-) diff --git a/nfapi/open-nFAPI/fapi/CMakeLists.txt b/nfapi/open-nFAPI/fapi/CMakeLists.txt index cf7f85052f..0cddd9d82f 100644 --- a/nfapi/open-nFAPI/fapi/CMakeLists.txt +++ b/nfapi/open-nFAPI/fapi/CMakeLists.txt @@ -19,8 +19,10 @@ target_include_directories(nr_fapi_p7 PUBLIC inc) target_link_libraries(nr_fapi_p7 PUBLIC nr_fapi_common) if (OAI_AERIAL) - target_compile_definitions(nr_fapi_p5 PRIVATE ENABLE_AERIAL) + target_compile_definitions(nr_fapi_p5 PRIVATE ENABLE_AERIAL ENABLE_10_04) target_compile_definitions(nr_fapi_p7 PRIVATE ENABLE_AERIAL) +else() + target_compile_definitions(nr_fapi_p5 PRIVATE ENABLE_10_02) endif () if(OAI_WLS) diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c index 6936d8b8fa..a7cb729f6c 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c @@ -721,7 +721,7 @@ uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void * config, &pNfapiMsg->vendor_extension)); } - +#ifndef ENABLE_AERIAL static uint8_t pack_dbt_table_tlv_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_dbt_tlv_ve_t *dbt_ve = (nfapi_nr_dbt_tlv_ve_t *)tlv; @@ -768,7 +768,27 @@ static uint8_t pack_pm_table_tlv_value(void *tlv, uint8_t **ppWritePackedMsg, ui } return 1; } - +#endif +#ifdef ENABLE_10_04 +static uint8_t pack_nr_tdd_table_10_04(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end) +{ + nfapi_nr_tdd_table_tlv_t *tdd_table_tlv = (nfapi_nr_tdd_table_tlv_t *)tlv; + nfapi_nr_tdd_table_t *tdd_table = tdd_table_tlv->value; +#ifndef ENABLE_AERIAL + if (!push8(tdd_table->tdd_period.value, ppWritePackedMsg, end)) { + return 0; + } +#endif + for (int i = 0; i < tdd_table_tlv->slots_per_frame; i++) { + for (int k = 0; k < tdd_table_tlv->symbols_per_slot; k++) { + if (!push8(tdd_table->max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[k].slot_config.value, ppWritePackedMsg, end)) { + return 0; + } + } + } + return 1; +} +#endif uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) { uint8_t *pNumTLVFields = (uint8_t *)*ppWritePackedMsg; @@ -1050,18 +1070,23 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e &pack_uint8_tlv_value); numTLVs++; } - // END SSB Table +#endif + // START TDD Table if (pNfapiMsg->cell_config.frame_duplex_type.value == 1 /* TDD */) { - retval &= - pack_nr_tlv(NFAPI_NR_CONFIG_TDD_PERIOD_TAG, &(pNfapiMsg->tdd_table.tdd_period), ppWritePackedMsg, end, &pack_uint8_tlv_value); - numTLVs++; const uint8_t slotsperframe[5] = {10, 20, 40, 80, 160}; // Assuming always CP_Normal, because Cyclic prefix is not included in CONFIG.request 10.02, but is present in 10.04 uint8_t cyclicprefix = 1; // 3GPP 38.211 Table 4.3.2.1 & Table 4.3.2.2 uint8_t number_of_symbols_per_slot = cyclicprefix ? 14 : 12; +#ifdef ENABLE_10_02 + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_TDD_PERIOD_TAG, + &(pNfapiMsg->tdd_table.tdd_period), + ppWritePackedMsg, + end, + &pack_uint8_tlv_value); + numTLVs++; for (int i = 0; i < slotsperframe[pNfapiMsg->ssb_config.scs_common.value]; i++) { // TODO check right number of slots for (int k = 0; k < number_of_symbols_per_slot; k++) { // TODO can change? retval &= pack_nr_tlv(NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, @@ -1072,10 +1097,37 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e numTLVs++; } } - } - - // END TDD Table #endif + +#ifdef ENABLE_10_04 +#ifdef ENABLE_AERIAL + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_TDD_PERIOD_TAG, + &(pNfapiMsg->tdd_table.tdd_period), + ppWritePackedMsg, + end, + &pack_uint8_tlv_value); + numTLVs++; + + nfapi_nr_tdd_table_tlv_t tdd_table_tlv = {.tl.tag = NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, .value = &pNfapiMsg->tdd_table, .slots_per_frame = slotsperframe[pNfapiMsg->ssb_config.scs_common.value], .symbols_per_slot = number_of_symbols_per_slot }; + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, + &tdd_table_tlv, + ppWritePackedMsg, + end, + &pack_nr_tdd_table_10_04); + numTLVs++; +#else + nfapi_nr_tdd_table_tlv_t tdd_table_tlv = {.tl.tag = NFAPI_NR_CONFIG_TDD_TABLE, .value = &pNfapiMsg->tdd_table, .slots_per_frame = slotsperframe[pNfapiMsg->ssb_config.scs_common.value], .symbols_per_slot = number_of_symbols_per_slot }; + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_TDD_TABLE, + &tdd_table_tlv, + ppWritePackedMsg, + end, + &pack_nr_tdd_table_10_04); + numTLVs++; +#endif +#endif + } + // END TDD Table + // START Measurement Config // SCF222.10.02 Table 3-27 : Contains only one TLV and is currently unused pNfapiMsg->measurement_config.rssi_measurement.tl.tag = NFAPI_NR_CONFIG_RSSI_MEASUREMENT_TAG; @@ -1087,7 +1139,7 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e &pack_uint8_tlv_value); numTLVs++; // END Measurement Config - +#ifndef ENABLE_AERIAL // START Digital Beam Table (DBT) PDU if (pNfapiMsg->dbt_config.num_dig_beams != 0) { nfapi_nr_dbt_tlv_ve_t dbt_tlv = {.tl.tag = NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, .value = pNfapiMsg->dbt_config}; @@ -1103,7 +1155,7 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e numTLVs++; } // is 0xA011 END Precoding Matrix (PM) PDU -#ifndef ENABLE_AERIAL + // START nFAPI TLVs included in CONFIG.request for IDLE and CONFIGURED states retval &= pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4), @@ -1264,7 +1316,37 @@ static uint8_t unpack_pm_table_tlv_value(void *tlv, uint8_t **ppReadPackedMsg, u } return 1; } +#ifdef ENABLE_10_04 +static uint8_t unpack_nr_tdd_table_10_04(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end) +{ + nfapi_nr_tdd_table_tlv_t *tdd_table_tlv = (nfapi_nr_tdd_table_tlv_t *)tlv; + nfapi_nr_tdd_table_t *tdd_table = tdd_table_tlv->value; + if (!(pull8(ppReadPackedMsg, &tdd_table->tdd_period.value, end))) { + return 0; + } + tdd_table->tdd_period.tl.tag = NFAPI_NR_CONFIG_TDD_PERIOD_TAG; + const int slots = tdd_table_tlv->slots_per_frame; + const int symbols = tdd_table_tlv->symbols_per_slot; + if (!tdd_table->max_tdd_periodicity_list) { + tdd_table->max_tdd_periodicity_list = calloc(slots, sizeof(*tdd_table->max_tdd_periodicity_list)); + } + for (int slot = 0; slot < slots; slot++) { + nfapi_nr_max_tdd_periodicity_t* list = &tdd_table->max_tdd_periodicity_list[slot]; + if (!list->max_num_of_symbol_per_slot_list) { + list->max_num_of_symbol_per_slot_list = calloc(symbols, sizeof(*list->max_num_of_symbol_per_slot_list)); + } + for (int sym = 0; sym < symbols; sym++) { + if (!(pull8(ppReadPackedMsg, &list->max_num_of_symbol_per_slot_list[sym].slot_config.value, end))) { + return 0; + } + list->max_num_of_symbol_per_slot_list[sym].slot_config.tl.tag = NFAPI_NR_CONFIG_SLOT_CONFIG_TAG; + } + } + + return 1; +} +#endif uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config) { // Helper vars for indexed TLVs @@ -1272,8 +1354,10 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * int unused_root_seq_idx = 0; int ssb_mask_idx = 0; int config_beam_idx = 0; +#ifdef ENABLE_10_02 int tdd_periodicity_idx = 0; int symbol_per_slot_idx = 0; +#endif int beam_ve_idx = 0; nfapi_nr_config_request_scf_t *pNfapiMsg = (nfapi_nr_config_request_scf_t *)msg; // unpack TLVs @@ -1324,7 +1408,16 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * &(pNfapiMsg->ssb_table.multiple_cells_ss_pbch_in_a_carrier), &unpack_uint8_tlv_value}, {NFAPI_NR_CONFIG_TDD_PERIOD_TAG, &(pNfapiMsg->tdd_table.tdd_period), &unpack_uint8_tlv_value}, +#ifdef ENABLE_10_02 {NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, NULL, &unpack_uint8_tlv_value}, +#endif +#ifdef ENABLE_10_04 +#ifdef ENABLE_AERIAL + {NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, NULL, &unpack_nr_tdd_table_10_04}, +#else + {NFAPI_NR_CONFIG_TDD_TABLE, NULL, &unpack_nr_tdd_table_10_04}, +#endif +#endif {NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.num_beams_period_vendor_ext), &unpack_uint8_tlv_value}, {NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.analog_bf_vendor_ext), &unpack_uint8_tlv_value}, {NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext), &unpack_uint8_tlv_value}, @@ -1341,6 +1434,13 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * {NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6), &unpack_ipv6_address_value}, {NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_pnf_port), &unpack_uint16_tlv_value}}; +#ifdef ENABLE_10_04 +#ifdef ENABLE_AERIAL + nfapi_nr_tdd_table_tlv_t tdd_table_tlv = {.tl.tag = NFAPI_NR_CONFIG_SLOT_CONFIG_TAG}; +#else + nfapi_nr_tdd_table_tlv_t tdd_table_tlv = {.tl.tag = NFAPI_NR_CONFIG_TDD_TABLE}; +#endif +#endif pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end); pNfapiMsg->vendor_extension = malloc(sizeof(&(pNfapiMsg->vendor_extension))); @@ -1387,6 +1487,16 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * unpack_fns[idx].tlv = &generic_tl; result = (*unpack_fns[idx].unpack_func)(&pNfapiMsg->pmi_list, ppReadPackedMsg, end); break; +#ifdef ENABLE_10_04 +#ifdef ENABLE_AERIAL + case NFAPI_NR_CONFIG_SLOT_CONFIG_TAG: +#else + case NFAPI_NR_CONFIG_TDD_TABLE: +#endif + unpack_fns[idx].tlv = &generic_tl; + result = (*unpack_fns[idx].unpack_func)(&tdd_table_tlv, ppReadPackedMsg, end); + break; +#endif case NFAPI_NR_CONFIG_NUM_PRACH_FD_OCCASIONS_TAG: pNfapiMsg->prach_config.num_prach_fd_occasions.tl.tag = generic_tl.tag; pNfapiMsg->prach_config.num_prach_fd_occasions.tl.length = generic_tl.length; @@ -1413,6 +1523,11 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * pNfapiMsg->tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list = calloc(number_of_symbols_per_slot, sizeof(nfapi_nr_max_num_of_symbol_per_slot_t)); } +#ifdef ENABLE_10_04 + tdd_table_tlv.slots_per_frame = slotsperframe[pNfapiMsg->ssb_config.scs_common.value]; + tdd_table_tlv.symbols_per_slot = number_of_symbols_per_slot; + tdd_table_tlv.value = &pNfapiMsg->tdd_table; +#endif } break; case NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG: @@ -1531,6 +1646,7 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * end); config_beam_idx++; break; +#ifdef ENABLE_10_02 case NFAPI_NR_CONFIG_SLOT_CONFIG_TAG: unpack_fns[idx].tlv = &(pNfapiMsg->tdd_table.max_tdd_periodicity_list[tdd_periodicity_idx] .max_num_of_symbol_per_slot_list[symbol_per_slot_idx] @@ -1551,6 +1667,7 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * tdd_periodicity_idx++; } break; +#endif default: result = (*unpack_fns[idx].unpack_func)(tl, ppReadPackedMsg, end); break; diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index e19dab108c..e966b0a57b 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -447,6 +447,13 @@ typedef struct } nfapi_nr_tdd_table_t; +typedef struct { + nfapi_tl_t tl; + nfapi_nr_tdd_table_t *value; + uint8_t slots_per_frame; + uint8_t symbols_per_slot; +} nfapi_nr_tdd_table_tlv_t; + //table 3-27 typedef struct { From c24673798a3cfd26c5481a9c488c16a7e269a604 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 23 Jul 2025 11:54:23 +0200 Subject: [PATCH 073/112] Handle TDD pattern 2 in UL TDA allocation Add the possibility to use UL slots in TDD pattern 2. For simplicity, we require the mixed slot to be of the same symbols in pattern 1 & 2. For UL slots, simply use the right amount of UL TDAs, depending on which number of UL slots among pattern 1 & 2 is bigger. One complication is the TDA for the mixed slot. The current code assumes that k2 has to be equal or larger than (number of DL slots +1) (because the spec says min k2=2, but we might want to schedule DSUUU). Then, there could be for instance the following cases: - only pattern 1: DSUUU DSUUU ...: the mixed slot has to be reached an entire period in advance - pattern 1 & 2: DSUUU DDDDD: normal mixed slot k2, e.g., like for 7DS2U - pattern 1 & 2: DSUUU DDDSU: the mixed slot has to be reached N_ul2+N_dl1+1 slots in advance I can't think of more cases right now. To avoid unscheduled slots, I put an assertion (which could also trivially be taken out). --- openair2/GNB_APP/gnb_config.c | 4 -- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 45 +++++++++++--------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 57086db62a..c2e56e7eb2 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1206,10 +1206,6 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf struct NR_TDD_UL_DL_ConfigCommon *tdd = scc->tdd_UL_DL_ConfigurationCommon; tdd->pattern2 = calloc_or_fail(1, sizeof(*tdd->pattern2)); *scc->tdd_UL_DL_ConfigurationCommon->pattern2 = p2; - AssertFatal(p2.nrofUplinkSlots ^ scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots, - "UL slots in pattern1 (%ld) and pattern2 (%ld) are mutually exclusive (e.g. DDDFUU DDDD, DDDD DDDFUU)\n", - scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots, - p2.nrofUplinkSlots); } struct NR_FrequencyInfoDL *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL; LOG_I(RRC, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 2203c0b2b7..e4becc1da3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1102,44 +1102,49 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i } if (scc->tdd_UL_DL_ConfigurationCommon) { - int ul_symb = 0; NR_TDD_UL_DL_Pattern_t *p1 = &scc->tdd_UL_DL_ConfigurationCommon->pattern1; + int ul_symb = p1->nrofUplinkSymbols; NR_TDD_UL_DL_Pattern_t *p2 = scc->tdd_UL_DL_ConfigurationCommon->pattern2; if (p2 && p2->nrofUplinkSymbols) - AssertFatal(p2->nrofUplinkSymbols == p1->nrofUplinkSymbols, - "nrofDownlinkSymbols in pattern1 %ld and pattern2 %ld must be the same in current implementation\n", - p1->nrofUplinkSymbols, + AssertFatal(p2->nrofUplinkSymbols == ul_symb, + "nrofDownlinkSymbols in pattern1 %d and pattern2 %ld must be the same in current implementation\n", + ul_symb, p2->nrofUplinkSymbols); - if (p1->nrofUplinkSymbols) { - ul_symb = p1->nrofUplinkSymbols; - } else if (p2) { - ul_symb = p1->nrofUplinkSymbols; - } + AssertFatal(!p2 || p2->nrofDownlinkSlots >= p2->nrofUplinkSlots, + "nrofDownlinkSlots must be larger than nrofUplinkSlots for pattern2 in current implementation\n"); - DevAssert(p2 == NULL); - int N_dl = p1->nrofDownlinkSlots; - int N_ul = p1->nrofUplinkSlots; + int N_dl1 = p1->nrofDownlinkSlots; + int N_ul1 = p1->nrofUplinkSlots; + int N_dl2 = p2 ? p2->nrofDownlinkSlots : 0; + int N_ul2 = p2 ? p2->nrofUplinkSlots : 0; int tdd_period_idx = get_tdd_period_idx(scc->tdd_UL_DL_ConfigurationCommon); int nb_periods_per_frame = get_nb_periods_per_frame(tdd_period_idx); int nb_slots_per_period = ((1 << mu) * 10) / nb_periods_per_frame; // make TDA for the mixed slot - if (ul_symb > 1 && k2 <= N_dl) { - // UL TDA index 2 for mixed slot (TDD) - long sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); - tda = set_TimeDomainResourceAllocation(k2, sliv); // to be reached from suitable DL slot + long mixed_sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); + if (ul_symb > 1 && (k2 <= N_dl1 || (p2 && N_ul2 == 0))) { + // UL TDA index 2 for mixed slot (TDD) (no pattern 2 and enough DL slots, or pattern2 only DL) + tda = set_TimeDomainResourceAllocation(k2, mixed_sliv); // to be reached from suitable DL slot asn1cSeqAdd(&tda_list->list, tda); - } else if (ul_symb > 1) { // k2 > N_Dl - long sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); - tda = set_TimeDomainResourceAllocation(nb_slots_per_period, sliv); // to be reached from last DL (mixed) slot, if any + } else if (ul_symb > 1 && !p2 && k2 > N_dl1) { // k2 > N_Dl1 + // UL TDA for mixed slot without pattern 2 and less DL slots than k2 + tda = set_TimeDomainResourceAllocation(nb_slots_per_period, mixed_sliv); // to be reached from last DL (mixed) slot, if any asn1cSeqAdd(&tda_list->list, tda); + } else if (ul_symb > 1 && N_ul2 > 0 && k2 > N_dl1) { + // we have pattern 2 with UL, and less p1 DL slots than k2 + tda = set_TimeDomainResourceAllocation(N_dl1 + N_ul2 + 1, mixed_sliv); + asn1cSeqAdd(&tda_list->list, tda); + } else { + AssertFatal(ul_symb == 0, "unhandled case of mixed slot: N_dl1 %d N_ul1 %d N_dl2 %d N_ul2 %d\n", N_dl1, N_ul1, N_dl2, N_ul2); } // make TDA for UL slots that are not reachable within k2/min_rxtxtime + int N_ul = max(N_ul1, N_ul2); if (N_ul > k2) { // enforce that with k2, we could reach all but one slot (which is mixed // and taken into account above - AssertFatal(N_dl >= k2 - 1, "cannot fulfil TDD pattern: N_dl %d, k2 %d\n", N_dl, k2); + AssertFatal(N_dl1 >= k2 - 1, "cannot fulfil TDD pattern: N_dl1 %d, k2 %d\n", N_dl1, k2); for (int i = k2 + 1; i <= N_ul; ++i) { tda = set_TimeDomainResourceAllocation(i, get_SLIV(0, 13)); asn1cSeqAdd(&tda_list->list, tda); From ba6bad5eb3454efdc538e7ad2609f97730141873 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Aug 2025 12:55:51 +0200 Subject: [PATCH 074/112] Fix AL candidate documentation to right default The default aggregation level candidate numbers in gnb_config.c (search "uess_num_agg_level_candidates") is 0,2,0,0,0, so write that instead. --- doc/MAC/mac-usage.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/MAC/mac-usage.md b/doc/MAC/mac-usage.md index 1ed71d30b4..2f4b849d4d 100644 --- a/doc/MAC/mac-usage.md +++ b/doc/MAC/mac-usage.md @@ -49,9 +49,11 @@ The value of `pdcch_cl_adjust` is clamped to range <0,1>, the increment value is the decrement value is 0.01. These values are selected to ensure PDCCH success rate is high. See Examples below for futher explaination. -The possible values of aggregation level on UE SS can be configured via `uess_agg_levels` configuration -option. By default the gNB uses only aggregation level 2 which translates to `uess_agg_levels` set to -`[0, 1, 0, 0, 0]`. For example, to enable aggregation level 2 and 4 set `uess_agg_levels` to `[0, 1, 1, 0, 0]`. +The possible values of aggregation level on UE SS can be configured via +`uess_agg_levels` configuration option. By default the gNB uses two candidates +in aggregation level 2 which translates to `uess_agg_levels` set to `[0, 2, 0, +0, 0]`. For example, to enable one candidate on aggregation levels 2 and 4 set +`uess_agg_levels` to `[0, 1, 1, 0, 0]`. ### Examples: #### Example 1: From e0c1f8d920be82e3379f1bae0b5001aa61faf0aa Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Aug 2025 13:00:09 +0200 Subject: [PATCH 075/112] Increase AL candidates count on AW2S pipeline Increase the number of aggregration level candidates. Since we have many UEs with concurrent traffic in that pipeline, we should ensure that we can allocate many DCIs to not waste resources (e.g., not all RBs used because could not find DCIs for specific UEs). --- ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf index 4b46b8ca33..02dfd2f5fe 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -25,6 +25,7 @@ gNBs = pusch_AntennaPorts = 1; do_CSIRS = 1; do_SRS = 0; + uess_agg_levels = [2, 2, 2, 0, 0]; servingCellConfigCommon = ( { From 6c4e5dccea40eaf40e10d284a4612477debb590c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 13:22:40 +0200 Subject: [PATCH 076/112] Don't redirect installation log files to a file Similarly to the parent, don't redirect log files to a file. It makes the CI more complicated, and also raises user awareness of what is being installed. --- cmake_targets/tools/build_helper | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 2c79659991..7d438e6e5f 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -186,9 +186,7 @@ clean_all_files() { ############################################ install_usrp_uhd_driver_from_source(){ - uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt - echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log " - ( + echo_info "\nInstalling UHD driver from sources." pushd /tmp echo "Cloning UHD driver repository" rm -rf /tmp/uhd @@ -248,7 +246,6 @@ install_usrp_uhd_driver_from_source(){ fi popd rm -rf /tmp/uhd - ) >& $uhd_install_log } check_install_usrp_uhd_driver(){ @@ -345,9 +342,7 @@ install_usrp_uhd_driver() { } install_bladerf_driver_from_source(){ - bladerf_install_log=$OPENAIR_DIR/cmake_targets/log/bladerf_install_log.txt - echo_info "\nInstalling BladeRF driver from sources. The log file for BladeRF driver installation is here: $bladerf_install_log " - ( + echo_info "\nInstalling BladeRF driver from sources." cd /tmp echo "Downloading BladeRF driver" rm -rf /tmp/bladeRF @@ -370,7 +365,6 @@ install_bladerf_driver_from_source(){ sudo mkdir -p /usr/share/Nuand/bladeRF sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf - ) >& $bladerf_install_log } check_install_bladerf_driver(){ @@ -405,9 +399,7 @@ check_install_lmssdr_driver(){ } install_soapy_from_source(){ - soapy_install_log=$OPENAIR_DIR/cmake_targets/log/soapy_install_log.txt - echo_info "\nInstalling Soapy EcoSystem from source. The log file for Soapy installation is here: $soapy_install_log " - ( + echo_info "\nInstalling Soapy EcoSystem from source." cd /tmp echo "Downloading SoapySDR" rm -rf /tmp/SoapySDR @@ -434,13 +426,10 @@ install_soapy_from_source(){ make -j`nproc` $SUDO make install $SUDO ldconfig - ) >& $soapy_install_log } install_soapy_iris_from_source(){ - iris_install_log=$OPENAIR_DIR/cmake_targets/log/iris_install_log.txt - echo_info "\nInstalling Iris driver from source. The log file for Iris driver installation is here: $iris_install_log " - ( + echo_info "\nInstalling Iris driver from source." cd /tmp echo "Downloading SoapyIris" rm -rf /tmp/sklk-soapyiris @@ -453,7 +442,6 @@ install_soapy_iris_from_source(){ make -j`nproc` $SUDO make install $SUDO ldconfig - ) >& $iris_install_log } check_install_soapy () { @@ -585,10 +573,7 @@ check_install_oai_software() { } install_asn1c_from_source(){ - mkdir -p $OPENAIR_DIR/cmake_targets/log - asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt - echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log " - ( + echo_info "\nInstalling ASN1." $SUDO $INSTALLER -y install bison flex $SUDO rm -rf /tmp/asn1c # GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c @@ -609,7 +594,6 @@ install_asn1c_from_source(){ if [[ -v CI_ENV ]]; then $SUDO rm -rf /tmp/asn1c fi - ) > $asn1_install_log 2>&1 } install_simde_from_source(){ From 334251c4ff1b1d60ae782b4e82bfb08874993864 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 13:24:33 +0200 Subject: [PATCH 077/112] Remove unused build_helper function --- cmake_targets/tools/build_helper | 40 -------------------------------- 1 file changed, 40 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 7d438e6e5f..e651723e63 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -733,43 +733,3 @@ set_openair_env(){ export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR_TARGETS=$openair_path/targets } - -################################ -# Function to killall the subprocesses when Ctrl-C Key is hit -############################### -function handle_ctrl_c(){ -CURPID=$$ -ppid=$$ -arraycounter=1 -echo_info "** Trapped CTRL-C. Killing all subprocesses now..." -echo_info "** Calling sync now..." -sync -while true -do - FORLOOP=FALSE - # Get all the child process id - for i in `ps -ef| awk '$3 == '$ppid' { print $2 }'` - do - if [ $i -ne $CURPID ] ; then - procid[$arraycounter]=$i - arraycounter=`expr $arraycounter + 1` - ppid=$i - FORLOOP=TRUE - fi - done - if [ "$FORLOOP" = "FALSE" ] ; then - arraycounter=`expr $arraycounter - 1` - ## We want to kill child process id first and then parent id's - while [ $arraycounter -ne 0 ] - do - echo "first we send ctrl-c to program" - $SUDO kill -INT "${procid[$arraycounter]}" - sleep 5 - echo "Now we force kill if that didn't work" - $SUDO kill -9 "${procid[$arraycounter]}" >/dev/null - arraycounter=`expr $arraycounter - 1` - done - exit - fi -done -} From 2086de2a98454f0a1a29ce2ebf15bd09d3dcb26e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 13:26:41 +0200 Subject: [PATCH 078/112] Do not collect log files that don't exist Since one of the parent commits, build_oai does not redirect files to a log folder. Hence, there is no need to collect those. --- ci-scripts/cls_cluster.py | 32 -------------------------------- ci-scripts/cls_containerize.py | 13 ------------- 2 files changed, 45 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 185e90a13e..5cbae237c3 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -165,24 +165,6 @@ class Cluster: return -1 return int(result.group("size")) - def _deploy_pod(self, filename, timeout = 120): - ret = self.cmd.run(f'oc create -f {filename}') - result = re.search(r'pod/(?P[a-zA-Z0-9_\-]+) created', ret.stdout) - if result is None: - logging.error(f'could not deploy pod: {ret.stdout}') - return None - pod = result.group("pod") - logging.debug(f'checking if pod {pod} is in Running state') - ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True) - if ret.returncode == 0: - return pod - logging.error(f'pod {pod} did not reach Running state') - self._undeploy_pod(filename) - return None - - def _undeploy_pod(self, filename): - self.cmd.run(f'oc delete -f {filename}') - def PullClusterImage(self, HTML, node, images, tag_prefix): logging.debug(f'Pull OC image {images} to server {node}') self.testCase_id = HTML.testCase_id @@ -296,20 +278,6 @@ class Cluster: if not status: logging.error('failure during build of ran-base') log_files.append(self._retrieveOCLog(ctx, ranbase_job, lSourcePath, 'ran-base')) - # recover logs by mounting image - self._retag_image_statement('ran-base', 'ran-base', baseTag, 'openshift/ran-base-log-retrieval.yaml') - pod = self._deploy_pod('openshift/ran-base-log-retrieval.yaml') - if pod is not None: - logdir = f'{lSourcePath}/cmake_targets/log/ran-base' - self.cmd.run(f'mkdir -p {logdir}') - self.cmd.run(f'oc rsync {pod}:/oai-ran/cmake_targets/log/ {logdir}') - self._undeploy_pod('openshift/ran-base-log-retrieval.yaml') - ret = self.cmd.run(f'ls {logdir}') - for f in ret.stdout.splitlines(): - archiveArtifact(self.cmd, ctx, f"{logdir}/{f}") - else: - status = False - if status: self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml') self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml') diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 34522d9eef..adc270cabb 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -386,13 +386,6 @@ class Containerize(): t = ("ran-base", archiveArtifact(cmd, ctx, logfile)) log_files.append(t) - # Recover build logs, for the moment only possible when build is successful - cmd.run(f"{self.cli} create --name test {baseImage}:{baseTag}") - cmd.run("mkdir -p cmake_targets/log/ran-base") - logfile = f'{lSourcePath}/cmake_targets/log/ran-base.log' - cmd.run(f"{self.cli} cp test:/oai-ran/cmake_targets/log/all.txt {logfile}") - cmd.run(f"{self.cli} rm -f test") - archiveArtifact(cmd, ctx, logfile) # First verify if the base image was properly created. ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {baseImage}:{baseTag}") allImagesSize = {} @@ -438,12 +431,6 @@ class Containerize(): log_files.append(t) if image == 'oai-gnb-aerial': cmd.run('rm -f nvipc.src.2025.05.20.tar.gz') - if image == 'ran-build' or image == 'ran-build-asan' or image == 'ran-build-fhi72': - cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true") - logfile = f'{lSourcePath}/{image}.ninja.log' - cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/all.txt {logfile}") - cmd.run(f"docker rm -f test-log") - archiveArtifact(cmd, ctx, logfile) # check the status of the build ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}") if ret.returncode != 0: From 599a1a8c74414f48829d92061553317a346d280f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 14:28:27 +0200 Subject: [PATCH 079/112] UHD installation: remove multiple packages at once Removing packages individually is slow, because apt starts to (re-)read it's database over and over again. Do it at once to speed up. --- cmake_targets/tools/build_helper | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index e651723e63..3379048171 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -252,18 +252,7 @@ check_install_usrp_uhd_driver(){ if [[ "$OS_BASEDISTRO" == "debian" ]]; then boost_libs_ubuntu="libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-test-dev libboost-regex-dev" #first we remove old installation - $SUDO apt-get remove uhd -y || true - $SUDO apt-get remove uhd-host -y || true - $SUDO apt-get remove libuhd-dev -y || true - $SUDO apt-get remove libuhd003 -y || true - $SUDO apt-get remove libuhd3.13.1 -y || true - $SUDO apt-get remove libuhd3.14.0 -y || true - $SUDO apt-get remove libuhd3.14.1 -y || true - $SUDO apt-get remove libuhd3.15.0 -y || true - local distribution=$(get_distribution_release) - if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then - $SUDO apt-get remove libuhd4.?.? -y || true - fi + $SUDO apt-get remove uhd* libuhd* -y || true v=$(lsb_release -cs) $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" if [[ -v BUILD_UHD_FROM_SOURCE ]] || [[ "$OS_DISTRO" == "debian" ]]; then From 47b658baf5822b39682bd936d6be5b9f2425bac1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 14:32:38 +0200 Subject: [PATCH 080/112] Disable various UHD features build_oai primarily builds UHD for OAI. Thus, a number of targets (B100, USRP1/2, ...) can be omitted, as OAI does not run on them. Further, disable documentation and man pages, which is typically not necessary for the averages user, and does not need to be installed for containers. --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 3379048171..2b11412e94 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -231,7 +231,7 @@ install_usrp_uhd_driver_from_source(){ git diff mkdir -p host/build cd host/build || true - $CMAKE ../ -GNinja -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF + $CMAKE ../ -GNinja -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_B100=OFF -DENABLE_DOXYGEN=OFF -DENABLE_MANUAL=OFF -DENABLE_MAN_PAGES=OFF -DENABLE_MAN_PAGE_COMPRESSION=OFF -DENABLE_OCTOCLOCK=ON -DENABLE_USRP1=OFF -DENABLE_USRP2=OFF echo "Compiling UHD" ninja $SUDO ninja install From e7ea9ba747770ee40ef5b0310c784f385ff464f1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 15:11:27 +0200 Subject: [PATCH 081/112] CI: Clarify HTML message if a (ctest-executed) test fails --- ci-scripts/cls_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 5cbae237c3..6634a3e8e7 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -460,7 +460,7 @@ class Cluster: HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result) logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') else: - HTML.CreateHtmlTestRow('Some test(s) failed!', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL) + HTML.CreateHtmlTestRowQueue('At least one physical simulator test failed!', 'KO', ["See below for details"]) HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result) logging.error('\u001B[1m Physical Simulator Fail\u001B[0m') else: From cf967d33143529f6c7fab1fae489fd62246d5ab2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 18:14:35 +0200 Subject: [PATCH 082/112] Complete run_locally.sh to produce valid HTML --- ci-scripts/run_locally.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ci-scripts/run_locally.sh b/ci-scripts/run_locally.sh index 60010ea30a..facc7c8752 100755 --- a/ci-scripts/run_locally.sh +++ b/ci-scripts/run_locally.sh @@ -26,8 +26,20 @@ fi docker tag oai-nr-ue oai-ci/oai-nr-ue:develop-${SHORT_COMMIT_SHA} docker tag oai-gnb oai-ci/oai-gnb:develop-${SHORT_COMMIT_SHA} +python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \ + --ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \ + --ranTargetBranch=NONE \ + --XMLTestFile=xml_files/${TESTCASE} --local + python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \ --ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \ --ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \ --eNBSourceCodePath=${REPO_PATH} \ --XMLTestFile=xml_files/${TESTCASE} --local +RET=$? + +python3 main.py --mode=FinalizeHtml \ + --local \ + --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE + +exit ${RET} From 3febc50f476cbe391618bd94d6f2f2b423e528ab Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Sun, 27 Jul 2025 11:34:23 +0200 Subject: [PATCH 083/112] Make run_locally.sh script take the full path to the xml file Use full path to xml file in run_locally.sh to allow usage of system command line completion feature. --- ci-scripts/run_locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/run_locally.sh b/ci-scripts/run_locally.sh index facc7c8752..84fd6a6f17 100755 --- a/ci-scripts/run_locally.sh +++ b/ci-scripts/run_locally.sh @@ -35,7 +35,7 @@ python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH --ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \ --ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \ --eNBSourceCodePath=${REPO_PATH} \ - --XMLTestFile=xml_files/${TESTCASE} --local + --XMLTestFile=${TESTCASE} --local RET=$? python3 main.py --mode=FinalizeHtml \ From 089059e10a08e46bb0c844d2492c73d437847fb3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 09:50:36 +0200 Subject: [PATCH 084/112] Remove unused variables --- ci-scripts/cls_oai_html.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py index c90b01a338..07226bcff3 100644 --- a/ci-scripts/cls_oai_html.py +++ b/ci-scripts/cls_oai_html.py @@ -70,16 +70,6 @@ class HTMLManagement(): self.testCase_id = '' self.desc = '' - self.OsVersion = ['', ''] - self.KernelVersion = ['', ''] - self.UhdVersion = ['', ''] - self.UsrpBoard = ['', ''] - self.CpuNb = ['', ''] - self.CpuModel = ['', ''] - self.CpuMHz = ['', ''] - - - #----------------------------------------------------------- # HTML structure creation functions #----------------------------------------------------------- From 81a79980dd7729de4d502d9c9e62289df20bd330 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 09:47:05 +0200 Subject: [PATCH 085/112] AnalyzeBuildLogs(): only analyze one file at a time Will be used in a follow-up commit to simplify analysis of log files and HTML file printing. --- ci-scripts/cls_cluster.py | 13 +++++----- ci-scripts/cls_containerize.py | 47 +++++++++++++++++----------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 6634a3e8e7..ace1545fbc 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -412,12 +412,13 @@ class Cluster: self.cmd.close() # Analyze the logs - collectInfo = cls_containerize.AnalyzeBuildLogs(log_files, status) - for img in collectInfo: - for f in collectInfo[img]: - status = status and collectInfo[img][f]['status'] - if not status: - logging.debug(collectInfo) + collectInfo = {} + for image, lf in log_files: + files = {} + idx = 'Target Image Creation' + files[idx] = cls_containerize.AnalyzeBuildLogs(image, lf) + status = status and files[idx]['status'] + collectInfo[image] = files if status: logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m') diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index adc270cabb..9af086308a 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -82,28 +82,23 @@ def CreateTag(ranCommitID, ranBranch, ranAllowMerge): tagToUse = f'develop-{shortCommit}' return tagToUse -def AnalyzeBuildLogs(logfiles, globalStatus): - collectInfo = {} - for image, lf in logfiles: - files = {} - errorandwarnings = {} - committed = False - tagged = False - with open(lf, mode='r') as inputfile: - for line in inputfile: - lineHasTag = re.search(f'Successfully tagged {image}:', str(line)) is not None - lineHasTag2 = re.search(f'naming to docker.io/library/{image}:', str(line)) is not None - tagged = tagged or lineHasTag or lineHasTag2 - # the OpenShift Cluster builder prepends image registry URL - lineHasCommit = re.search(r'COMMIT [a-zA-Z0-9\.:/\-]*' + image, str(line)) is not None - committed = committed or lineHasCommit - errorandwarnings['errors'] = 0 if committed or tagged else 1 - errorandwarnings['warnings'] = 0 - errorandwarnings['status'] = committed or tagged - logging.info(f"Analyzing {image}, file {lf}: {errorandwarnings}") - files['Target Image Creation'] = errorandwarnings - collectInfo[image] = files - return collectInfo +def AnalyzeBuildLogs(image, lf): + errorandwarnings = {} + committed = False + tagged = False + with open(lf, mode='r') as inputfile: + for line in inputfile: + lineHasTag = re.search(f'Successfully tagged {image}:', str(line)) is not None + lineHasTag2 = re.search(f'naming to docker.io/library/{image}:', str(line)) is not None + tagged = tagged or lineHasTag or lineHasTag2 + # the OpenShift Cluster builder prepends image registry URL + lineHasCommit = re.search(r'COMMIT [a-zA-Z0-9\.:/\-]*' + image, str(line)) is not None + committed = committed or lineHasCommit + errorandwarnings['errors'] = 0 if committed or tagged else 1 + errorandwarnings['warnings'] = 0 + errorandwarnings['status'] = committed or tagged + logging.info(f"Analyzing {image}, file {lf}: {errorandwarnings}") + return errorandwarnings def GetImageName(ssh, svcName, file): ret = ssh.run(f"docker compose -f {file} config --format json {svcName} | jq -r '.services.\"{svcName}\".image'", silent=True) @@ -467,7 +462,13 @@ class Containerize(): cmd.close() # Analyze the logs - collectInfo = AnalyzeBuildLogs(log_files, status) + collectInfo = {} + for name, lf in log_files: + files = {} + idx = 'Target Image Creation' + files[idx] = AnalyzeBuildLogs(name, lf) + status = status and files[idx]['status'] + collectInfo[name] = files if status: logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m') From 2f43b09651bbdfe399b1bd150451836fe298d492 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 11:58:47 +0200 Subject: [PATCH 086/112] Remove unnecessary HTML printing, simplify code --- ci-scripts/cls_cluster.py | 14 ++++----- ci-scripts/cls_containerize.py | 31 ++++---------------- ci-scripts/cls_oai_html.py | 52 ---------------------------------- 3 files changed, 11 insertions(+), 86 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index ace1545fbc..53164a2d55 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -414,20 +414,16 @@ class Cluster: # Analyze the logs collectInfo = {} for image, lf in log_files: - files = {} - idx = 'Target Image Creation' - files[idx] = cls_containerize.AnalyzeBuildLogs(image, lf) - status = status and files[idx]['status'] - collectInfo[image] = files + ret = cls_containerize.AnalyzeBuildLogs(image, lf) + imgStatus = ret['status'] + msg = f"size {imageSize[image]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings" + HTML.CreateHtmlTestRowQueue(image, 'OK' if imgStatus else 'KO', [msg]) + status = status and imgStatus if status: logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m') - HTML.CreateHtmlTestRow('all', 'OK', CONST.ALL_PROCESSES_OK) else: logging.error('\u001B[1m Building OAI Images Failed\u001B[0m') - HTML.CreateHtmlTestRow('all', 'KO', CONST.ALL_PROCESSES_OK) - - HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, imageSize) # TODO fix groovy script, remove the following. # the groovy scripts expects all logs in diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 9af086308a..c006951908 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -462,25 +462,18 @@ class Containerize(): cmd.close() # Analyze the logs - collectInfo = {} for name, lf in log_files: - files = {} - idx = 'Target Image Creation' - files[idx] = AnalyzeBuildLogs(name, lf) - status = status and files[idx]['status'] - collectInfo[name] = files + ret = AnalyzeBuildLogs(name, lf) + imgStatus = ret['status'] + msg = f"size {allImagesSize[name]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings" + HTML.CreateHtmlTestRowQueue(name, 'OK' if imgStatus else 'KO', [msg]) + status = status and imgStatus if status: logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m') - HTML.CreateHtmlTestRow(self.imageKind, 'OK', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) - return True else: logging.error('\u001B[1m Building OAI Images Failed\u001B[0m') - HTML.CreateHtmlTestRow(self.imageKind, 'KO', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) - HTML.CreateHtmlTabFooter(False) - return False + return status def BuildProxy(self, ctx, HTML): svr = self.eNB_serverId[self.eNB_instance] @@ -545,16 +538,6 @@ class Containerize(): self.ranAllowMerge = oldRanAllowMerge self.ranTargetBranch = oldRanTargetBranch - # we do not analyze the logs (we assume the proxy builds fine at this stage), - # but need to have the following information to correctly display the HTML - files = {} - errorandwarnings = {} - errorandwarnings['errors'] = 0 - errorandwarnings['warnings'] = 0 - errorandwarnings['status'] = True - files['Target Image Creation'] = errorandwarnings - collectInfo = {} - collectInfo['proxy'] = files ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}') result = re.search(r'Size *= *(?P[0-9\-]+) *bytes', ret.stdout) # Cleaning any created tmp volume @@ -568,14 +551,12 @@ class Containerize(): allImagesSize['proxy'] = str(round(imageSize,1)) + ' Mbytes' logging.info('\u001B[1m Building L2sim Proxy Image Pass\u001B[0m') HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) return True else: logging.error('proxy size is unknown') allImagesSize['proxy'] = 'unknown' logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m') HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlTabFooter(False) return False def BuildRunTests(self, ctx, HTML): diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py index 07226bcff3..c4e13b2e62 100644 --- a/ci-scripts/cls_oai_html.py +++ b/ci-scripts/cls_oai_html.py @@ -332,58 +332,6 @@ class HTMLManagement(): self.htmlFile.write(' \n') self.htmlFile.close() - - def CreateHtmlNextTabHeaderTestRow(self, collectInfo, allImagesSize, machine='eNB'): - if (self.htmlFooterCreated or (not self.htmlHeaderCreated)): - return - self.htmlFile = open('test_results.html', 'a') - if bool(collectInfo) == False: - self.htmlFile.write(' \n') - self.htmlFile.write(' ----IMAGES BUILDING FAILED - Unable to recover the image logs ---- \n') - self.htmlFile.write(' \n') - else: - for image in collectInfo: - files = collectInfo[image] - # TabHeader for image logs on built shared and target images - if allImagesSize[image].count('unknown') > 0: - self.htmlFile.write(' \n') - elif allImagesSize[image].count('Build Failed') > 0: - self.htmlFile.write(' \n') - else: - self.htmlFile.write(' \n') - self.htmlFile.write(' ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' \n') - self.htmlFile.write(' \n') - self.htmlFile.write(' \n') - self.htmlFile.write(' Element\n') - self.htmlFile.write(' Nb Errors\n') - self.htmlFile.write(' Nb Warnings\n') - self.htmlFile.write(' Status\n') - self.htmlFile.write(' \n') - - for fil in files: - parameters = files[fil] - # TestRow for image logs on built shared and target images - self.htmlFile.write(' \n') - self.htmlFile.write(' ' + fil + ' \n') - if (parameters['errors'] == 0): - self.htmlFile.write(' ' + str(parameters['errors']) + '\n') - else: - self.htmlFile.write(' ' + str(parameters['errors']) + '\n') - if (parameters['errors'] > 0): - self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') - elif (parameters['warnings'] == 0): - self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') - else: - self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') - if (parameters['errors'] == 0) and (parameters['warnings'] == 0): - self.htmlFile.write(' OK \n') - elif (parameters['errors'] == 0): - self.htmlFile.write(' OK \n') - else: - self.htmlFile.write(' NOT OK \n') - self.htmlFile.write(' \n') - self.htmlFile.close() - #for the moment it is limited to 4 columns, to be made generic later def CreateHtmlDataLogTable(self, DataLog): if (self.htmlFooterCreated or (not self.htmlHeaderCreated)): From c8c6aa50f37cb127bc45f62ce469967c60bba54a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 12:19:06 +0200 Subject: [PATCH 087/112] Cluster: build FHI7.2 in parallel --- ci-scripts/cls_cluster.py | 45 ++++++++++++++------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 53164a2d55..ba8c208508 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -279,6 +279,11 @@ class Cluster: log_files.append(self._retrieveOCLog(ctx, ranbase_job, lSourcePath, 'ran-base')) if status: + self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml') + self._recreate_bc('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-bc.yaml') + self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.fhi72.rhel9') + ranbuildfhi72_job = self._start_build('ran-build-fhi72') + self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml') self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml') self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.phySim.rhel9') @@ -294,15 +299,22 @@ class Cluster: self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.clang.rhel9') clang_job = self._start_build('oai-clang') - wait = ranbuild_job is not None and physim_job is not None and clang_job is not None and self._wait_build_end([ranbuild_job, physim_job, clang_job], 1200) - if not wait: logging.error('error during build of ranbuild_job or physim_job or clang_job') + wait = ranbuildfhi72_job is not None and ranbuild_job is not None and physim_job is not None and clang_job is not None and self._wait_build_end([ranbuildfhi72_job, ranbuild_job, physim_job, clang_job], 1200) + if not wait: logging.error('error during build of ranbuildfhi72_job or ranbuild_job or physim_job or clang_job') status = status and wait + log_files.append(self._retrieveOCLog(ctx, ranbuildfhi72_job, lSourcePath, 'ran-build-fhi72')) log_files.append(self._retrieveOCLog(ctx, ranbuild_job, lSourcePath, 'ran-build')) log_files.append(self._retrieveOCLog(ctx, physim_job, lSourcePath, 'oai-physim')) log_files.append(self._retrieveOCLog(ctx, clang_job, lSourcePath, 'oai-clang')) self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}') if status: + self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml') + self._recreate_bc('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-bc.yaml') + self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.fhi72.rhel9') + self._retag_image_statement('ran-build-fhi72', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build-fhi72', imageTag, 'docker/Dockerfile.gNB.fhi72.rhel9') + gnb_fhi72_job = self._start_build('oai-gnb-fhi72') + self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml') self._recreate_bc('oai-enb', imageTag, 'openshift/oai-enb-bc.yaml') self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.eNB.rhel9') @@ -321,10 +333,11 @@ class Cluster: self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.aw2s.rhel9') gnb_aw2s_job = self._start_build('oai-gnb-aw2s') - wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 800) + wait = gnb_fhi72_job is not None and enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([gnb_fhi72_job, enb_job, gnb_job, gnb_aw2s_job], 800) if not wait: logging.error('error during build of eNB/gNB') status = status and wait # recover logs + log_files.append(self._retrieveOCLog(ctx, gnb_fhi72_job, lSourcePath, 'oai-gnb-fhi72')) log_files.append(self._retrieveOCLog(ctx, enb_job, lSourcePath, 'oai-enb')) log_files.append(self._retrieveOCLog(ctx, gnb_job, lSourcePath, 'oai-gnb')) log_files.append(self._retrieveOCLog(ctx, gnb_aw2s_job, lSourcePath, 'oai-gnb-aw2s')) @@ -357,32 +370,6 @@ class Cluster: log_files.append(self._retrieveOCLog(ctx, nrue_job, lSourcePath, 'oai-nr-ue')) self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}') - if status: - self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml') - self._recreate_bc('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-bc.yaml') - self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.fhi72.rhel9') - ranbuildfhi72_job = self._start_build('ran-build-fhi72') - - wait = ranbuildfhi72_job is not None and self._wait_build_end([ranbuildfhi72_job], 1200) - if not wait: logging.error('error during build of ranbuildfhi72_job') - status = status and wait - log_files.append(self._retrieveOCLog(ctx, ranbuildfhi72_job, lSourcePath, 'ran-build-fhi72')) - self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}') - - if status: - self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml') - self._recreate_bc('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-bc.yaml') - self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.fhi72.rhel9') - self._retag_image_statement('ran-build-fhi72', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build-fhi72', imageTag, 'docker/Dockerfile.gNB.fhi72.rhel9') - gnb_fhi72_job = self._start_build('oai-gnb-fhi72') - - wait = gnb_fhi72_job is not None and self._wait_build_end([gnb_fhi72_job], 600) - if not wait: logging.error('error during build of gNB-fhi72') - status = status and wait - # recover logs - log_files.append(self._retrieveOCLog(ctx, gnb_fhi72_job, lSourcePath, 'oai-gnb-fhi72')) - self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}') - # split and analyze logs imageSize = {} for image, _ in log_files: From ae3799d4ed4b497aa9d4fa04e2438363c9c7ad2d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 14:42:35 +0200 Subject: [PATCH 088/112] Remove unused parameters --- ci-scripts/args_parse.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 92cb0d163f..02d31340cc 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -59,17 +59,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): force_local = True - #--apply= as parameters file, to replace inline parameters - elif re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE) - py_params_file = matchReg.group(1) - with open(py_params_file,'r') as file: - # The FullLoader parameter handles the conversion from YAML - # scalar values to Python dictionary format - py_params = yaml.load(file,Loader=yaml.FullLoader) - py_param_file_present = True #to be removed once validated - #AssignParams(py_params) #to be uncommented once validated - #consider inline parameters elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE) @@ -196,14 +185,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): CiTestObj.testXMLfiles.append(matchReg.group(1)) HTML.testXMLfiles.append(matchReg.group(1)) HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1 - elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup - print("parameter --UEIPAddress ignored") - elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE): - print("parameter --UEUserName ignored") - elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE): - print("parameter --UEPassword ignored") - elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE): - print("parameter --UESourceCodePath ignored") elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE) finalStatus = matchReg.group(1) From 7defffe97a0c2534ce25a686b3e9d838e7af38a2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 12:36:10 +0200 Subject: [PATCH 089/112] Remove unused file --- .../xml_files/test_case_list_template.xml | 105 ------------------ 1 file changed, 105 deletions(-) delete mode 100644 ci-scripts/xml_files/test_case_list_template.xml diff --git a/ci-scripts/xml_files/test_case_list_template.xml b/ci-scripts/xml_files/test_case_list_template.xml deleted file mode 100644 index bcc8f94c09..0000000000 --- a/ci-scripts/xml_files/test_case_list_template.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - 010101 050101 060101 070101 030101 030201 050201 070201 060201 - 010102 030102 030103 030104 030105 030106 - - - - - Build_eNB - Build eNB (USRP) - -w USRP -c --eNB - - - - Build_eNB - Build eNB (USRP) - -w BLADERF -c --eNB - - - - Initialize_eNB - Initialize eNB (FDD/Band1/5MHz/info) - -O enb.band7.tm1.50prb.usrpb210.conf --log_config.global_log_options level,nocolor,time - - - - Initialize_eNB - Initialize eNB (FDD/Band1/10MHz/info) - -O 10M.band1.FDD.info.conf --log_config.global_log_options level,nocolor,time - - - - Initialize_eNB - Initialize eNB (FDD/Band1/20MHz/info) - -O 20M.band1.FDD.info.conf --log_config.global_log_options level,nocolor,time - - - - Initialize_eNB - Initialize eNB (TDD/Band38/5MHz/info) - -O 5M.band38.TDD.info.conf --log_config.global_log_options level,nocolor,time - - - - Initialize_eNB - Initialize eNB (TDD/Band38/10MHz/info) - -O 10M.band38.TDD.info.conf --log_config.global_log_options level,nocolor,time - - - - Initialize_eNB - Initialize eNB (TDD/Band38/20MHz/info) - -O 20M.band38.TDD.info.conf --log_config.global_log_options level,nocolor,time - - - - Terminate_eNB - Terminate eNB - - - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - From 881f753f3feac19524b22fda1a83a4598e5335aa Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 8 Aug 2025 18:42:49 +0200 Subject: [PATCH 090/112] Integrate all NSA-related XML files into one Is simpler to test manually and view the results. --- .../xml_files/container_nsa_b200_quectel.xml | 14 +++++++ ci-scripts/xml_files/nsa_epc_closure.xml | 38 ------------------ ci-scripts/xml_files/nsa_epc_start.xml | 39 ------------------- 3 files changed, 14 insertions(+), 77 deletions(-) delete mode 100644 ci-scripts/xml_files/nsa_epc_closure.xml delete mode 100644 ci-scripts/xml_files/nsa_epc_start.xml diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 17c8a9b14f..f72d64a9d4 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -30,6 +30,7 @@ 500000 111110 111111 + 000100 010000 800833 030101 @@ -47,6 +48,7 @@ 010002 030202 030201 + 060000 300000 600000 222220 @@ -102,6 +104,12 @@ sudo cpupower idle-set -E + + DeployCoreNetwork + Start EPC + ltebox-nepes + + Initialize_UE Initialize Quectel @@ -241,6 +249,12 @@ 0 + + UndeployCoreNetwork + Terminate EPC + ltebox-nepes + + Undeploy_Object true diff --git a/ci-scripts/xml_files/nsa_epc_closure.xml b/ci-scripts/xml_files/nsa_epc_closure.xml deleted file mode 100644 index 23181ec674..0000000000 --- a/ci-scripts/xml_files/nsa_epc_closure.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - epc-closure - EPC-Closure - log-out - -060000 - - - - - UndeployCoreNetwork - Terminate EPC - ltebox-nepes - - - diff --git a/ci-scripts/xml_files/nsa_epc_start.xml b/ci-scripts/xml_files/nsa_epc_start.xml deleted file mode 100644 index 89761ddb74..0000000000 --- a/ci-scripts/xml_files/nsa_epc_start.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - epc-start-tab - EPC-Start - log-in - - 000100 - - - - - - DeployCoreNetwork - Start EPC - ltebox-nepes - - - From e25075134c1f7742f7f7d24375f3654d21013232 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 15:19:59 +0200 Subject: [PATCH 091/112] Integrate all SA-OAIUE pipeline related files into one --- .../xml_files/container_sa_n310_nrue.xml | 15 ++++++++ ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml | 38 ------------------- .../xml_files/sa_oaiue_cn5g_undeploy.xml | 38 ------------------- 3 files changed, 15 insertions(+), 76 deletions(-) delete mode 100644 ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml delete mode 100644 ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml index 16a23dc57a..da61c8e83f 100644 --- a/ci-scripts/xml_files/container_sa_n310_nrue.xml +++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml @@ -25,6 +25,7 @@ 40 MHz TDD SA tasks + 060000 010000 010001 800813 020000 @@ -38,9 +39,16 @@ 040001 040000 333333 444444 + 060001 + + DeployCoreNetwork + Initialize 5G Core + oc-cn5g + + Pull_Cluster_Image Pull Images from Cluster @@ -179,4 +187,11 @@ oai-nr-ue + + UndeployCoreNetwork + Terminate 5G Core + true + oc-cn5g + + diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml deleted file mode 100644 index a49a2cda18..0000000000 --- a/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - cn5g-start-tab - CN5G-Start - log-in - -000100 - - - - - - DeployCoreNetwork - Initialize 5G Core - oc-cn5g - - diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml deleted file mode 100644 index beb490dbed..0000000000 --- a/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - cn5g-closure - CN5G-Closure - log-out - -060000 - - - - - UndeployCoreNetwork - Terminate 5G Core - oc-cn5g - - - From d95e6bca6bfd60e9e2f38fe55eba47cab5d48d91 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 09:30:04 +0200 Subject: [PATCH 092/112] Pull_Image_from_Registry()/Clean_Test_Server_Images(): pass node Pass the node name for a host onto/from which to pull/clean the images. For doing this, I used: - rfsim 4G eNB_IPAddress none => localhost - rfsim 5g eNB_IPAddress none => localhost - flexric eNB_IPAddress none => localhost - l2sim 4g eNB_IPAddress none => localhost - l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost --- ci-scripts/cls_containerize.py | 18 ++++++++---------- ci-scripts/main.py | 6 +++--- ci-scripts/tests/pull-clean-int-registry.py | 13 ++++++------- .../xml_files/container_4g_l2sim_tdd.xml | 4 ++-- .../xml_files/container_4g_rfsim_fdd_05MHz.xml | 4 ++-- .../container_4g_rfsim_fdd_05MHz_noS1.xml | 4 ++-- .../xml_files/container_4g_rfsim_fdd_10MHz.xml | 4 ++-- .../xml_files/container_4g_rfsim_fdd_20MHz.xml | 4 ++-- .../xml_files/container_4g_rfsim_fembms.xml | 4 ++-- .../xml_files/container_4g_rfsim_mbms.xml | 4 ++-- .../xml_files/container_4g_rfsim_tdd_05MHz.xml | 4 ++-- ci-scripts/xml_files/container_5g_e1_rfsim.xml | 4 ++-- ci-scripts/xml_files/container_5g_f1_rfsim.xml | 4 ++-- .../xml_files/container_5g_fdd_rfsim.xml | 4 ++-- .../xml_files/container_5g_flexric_rfsim.xml | 8 ++++---- ci-scripts/xml_files/container_5g_rfsim.xml | 4 ++-- .../xml_files/container_5g_rfsim_24prb.xml | 4 ++-- .../xml_files/container_5g_rfsim_2x2.xml | 4 ++-- .../container_5g_rfsim_fdd_phytest.xml | 4 ++-- .../xml_files/container_5g_rfsim_fr2_32prb.xml | 4 ++-- .../xml_files/container_5g_rfsim_ntn_geo.xml | 4 ++-- .../xml_files/container_5g_rfsim_ntn_leo.xml | 4 ++-- .../xml_files/container_5g_rfsim_sidelink.xml | 4 ++-- .../xml_files/container_5g_rfsim_tdd_dora.xml | 4 ++-- .../xml_files/container_5g_rfsim_u0_25prb.xml | 4 ++-- .../container_lte_b200_fdd_05Mhz_tm1.xml | 4 ++-- .../container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 4 ++-- ..._lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml | 4 ++-- .../container_lte_b200_fdd_10Mhz_tm1.xml | 4 ++-- .../container_lte_b200_fdd_10Mhz_tm1_cdrx.xml | 4 ++-- .../container_lte_b200_fdd_10Mhz_tm1_oaiue.xml | 8 ++++---- .../container_lte_b200_fdd_20Mhz_tm1.xml | 4 ++-- .../container_lte_b200_tdd_05Mhz_tm1.xml | 4 ++-- .../container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 4 ++-- .../container_lte_b200_tdd_10Mhz_tm1.xml | 4 ++-- .../container_lte_b200_tdd_20Mhz_tm1.xml | 4 ++-- ...te_b200_tdd_20Mhz_tm1_default_scheduler.xml | 4 ++-- .../container_lte_n3xx_tdd_2x2_tm1.xml | 4 ++-- .../container_lte_n3xx_tdd_2x2_tm2.xml | 4 ++-- .../xml_files/container_nsa_b200_quectel.xml | 8 ++++---- .../xml_files/container_sa_aerial_quectel.xml | 4 ++-- .../xml_files/container_sa_aw2s_asue.xml | 2 +- .../xml_files/container_sa_aw2s_asue_2x2.xml | 2 +- .../xml_files/container_sa_b200_quectel.xml | 4 ++-- .../xml_files/container_sa_e1_b200_quectel.xml | 4 ++-- .../xml_files/container_sa_f1_b200_quectel.xml | 4 ++-- .../container_sa_fhi72_metanoia_up2_2x2.xml | 4 ++-- .../xml_files/container_sa_fhi72_vvdn_up2.xml | 4 ++-- .../container_sa_n310_2X2_100MHz_quectel.xml | 2 +- .../container_sa_n310_2X2_60MHz_quectel.xml | 2 +- .../container_sa_n310_4X4_60MHz_quectel.xml | 2 +- .../xml_files/container_sa_n310_nrue.xml | 4 ++-- .../xml_files/container_sa_sc_b200_quectel.xml | 4 ++-- 53 files changed, 118 insertions(+), 121 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index c006951908..3af3291c35 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -702,28 +702,26 @@ class Containerize(): msg = "Pulled Images:\n" + '\n'.join(pulled_images) return True, msg - def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"): - lIpAddr, lSourcePath = self.GetCredentials(svr_id) - logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m') + def Pull_Image_from_Registry(self, HTML, node, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"): + logging.debug(f'\u001B[1m Pulling image(s) on server: {node}\u001B[0m') if not tag: tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) - with cls_cmd.getConnection(lIpAddr) as cmd: + with cls_cmd.getConnection(node) as cmd: success, msg = Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, username, password) - param = f"on node {lIpAddr}" + param = f"on node {node}" if success: HTML.CreateHtmlTestRowQueue(param, 'OK', [msg]) else: HTML.CreateHtmlTestRowQueue(param, 'KO', [msg]) return success - def Clean_Test_Server_Images(self, HTML, svr_id, images, tag=None): - lIpAddr, lSourcePath = self.GetCredentials(svr_id) - logging.debug(f'\u001B[1m Cleaning image(s) from server: {lIpAddr}\u001B[0m') + def Clean_Test_Server_Images(self, HTML, node, images, tag=None): + logging.debug(f'\u001B[1m Cleaning image(s) from server: {node}\u001B[0m') if not tag: tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) status = True - with cls_cmd.getConnection(lIpAddr) as myCmd: + with cls_cmd.getConnection(node) as myCmd: removed_images = [] for image in images: fullImage = f"oai-ci/{image}:{tag}" @@ -734,7 +732,7 @@ class Containerize(): msg = "Removed Images:\n" + '\n'.join(removed_images) s = 'OK' if status else 'KO' - param = f"on node {lIpAddr}" + param = f"on node {node}" HTML.CreateHtmlTestRowQueue(param, s, [msg]) return status diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 0fdf538052..54f4073eb9 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -360,7 +360,7 @@ def ExecuteActionWithParam(action, ctx): if force_local: # Do not pull or remove images when running locally. User is supposed to handle image creation & cleanup return True - svr_id = test.findtext('svr_id') + node = test.findtext('node') or 'localhost' tag_prefix = test.findtext('tag_prefix') or "" images = test.findtext('images').split() # hack: for FlexRIC, we need to overwrite the tag to use @@ -368,9 +368,9 @@ def ExecuteActionWithParam(action, ctx): if len(images) == 1 and images[0] == "oai-flexric": tag = CONTAINERS.flexricTag if action == "Pull_Local_Registry": - success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag, tag_prefix=tag_prefix) + success = CONTAINERS.Pull_Image_from_Registry(HTML, node, images, tag=tag, tag_prefix=tag_prefix) if action == "Clean_Test_Server_Images": - success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag) + success = CONTAINERS.Clean_Test_Server_Images(HTML, node, images, tag=tag) elif action == 'Custom_Command': node = test.findtext('node') diff --git a/ci-scripts/tests/pull-clean-int-registry.py b/ci-scripts/tests/pull-clean-int-registry.py index d4d5b4fc0a..f17c1c7a1d 100644 --- a/ci-scripts/tests/pull-clean-int-registry.py +++ b/ci-scripts/tests/pull-clean-int-registry.py @@ -20,7 +20,6 @@ class TestDeploymentMethods(unittest.TestCase): self.html = cls_oai_html.HTMLManagement() self.html.testCaseId = "000000" self.cont = cls_containerize.Containerize() - self.cont.eNBIPAddress = 'localhost' self.cont.eNBSourceCodePath = os.getcwd() def test_pull_clean_local_reg(self): @@ -32,21 +31,21 @@ class TestDeploymentMethods(unittest.TestCase): ret = cmd.run(f"ping -c1 -w1 {registry}") if ret.returncode != 0: # could not ping once -> skip test self.skipTest(f"test_pull_clean_local_reg: could not reach {registry} (run inside sboai)") - svr_id = '0' + node = 'localhost' images = ["oai-gnb"] tag = "develop" - pull = self.cont.Pull_Image_from_Registry(self.html, svr_id, images, tag=tag) - clean = self.cont.Clean_Test_Server_Images(self.html, svr_id, images, tag=tag) + pull = self.cont.Pull_Image_from_Registry(self.html, node, images, tag=tag) + clean = self.cont.Clean_Test_Server_Images(self.html, node, images, tag=tag) self.assertTrue(pull) self.assertTrue(clean) def test_pull_clean_docker_hub(self): - svr_id = '0' + node = 'localhost' r = "docker.io" images = ["hello-world"] tag = "latest" - pull = self.cont.Pull_Image_from_Registry(self.html, svr_id, images, tag=tag, registry=r, username=None, password=None) - clean = self.cont.Clean_Test_Server_Images(self.html, svr_id, images, tag=tag) + pull = self.cont.Pull_Image_from_Registry(self.html, node, images, tag=tag, registry=r, username=None, password=None) + clean = self.cont.Clean_Test_Server_Images(self.html, node, images, tag=tag) self.assertTrue(pull) self.assertTrue(clean) diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml index 98e0ec7d08..43334c0f91 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml @@ -44,7 +44,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + obelix oai-enb oai-lte-ue @@ -153,7 +153,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + obelix oai-enb oai-lte-ue diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 235546928a..2f59fe3d7b 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -52,7 +52,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -170,7 +170,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index 9b27ba1f8c..d78b926a00 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -43,7 +43,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -141,7 +141,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index 2b8141a71d..c1a3b5ff6e 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -47,7 +47,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -170,7 +170,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index 7afcc2f7c1..7c2622fed5 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -47,7 +47,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -170,7 +170,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index 1f869ecdde..51cef07627 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -40,7 +40,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -104,7 +104,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 4c3691e466..621d3e121e 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -40,7 +40,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb-asan oai-lte-ue-asan @@ -104,7 +104,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb-asan oai-lte-ue-asan diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml index f84269b16e..bc0e4f23d6 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -47,7 +47,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-enb oai-lte-ue @@ -163,7 +163,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-enb oai-lte-ue diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml index 51f0270b19..50de456cdb 100644 --- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml @@ -40,7 +40,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb oai-nr-cuup oai-nr-ue @@ -109,7 +109,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb oai-nr-cuup oai-nr-ue diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index 17f52daeb7..af0a9164db 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -63,7 +63,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan @@ -249,7 +249,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml index 1fd3de1ad5..99814fbc09 100644 --- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml @@ -42,7 +42,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb oai-nr-ue @@ -137,7 +137,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb oai-nr-ue diff --git a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml index a56248fe0e..d360645cbb 100644 --- a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml @@ -51,21 +51,21 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb oai-nr-ue Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-flexric Clean_Test_Server_Images Clean Test Images on Test Server - 0 + localhost oai-gnb oai-nr-ue true @@ -73,7 +73,7 @@ Clean_Test_Server_Images Clean Test Images on Test Server - 0 + localhost oai-flexric true diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index 910a2dcbb5..8265e712c0 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -57,7 +57,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue @@ -262,7 +262,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index 60bb0011fc..c74579d87b 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -60,7 +60,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -173,7 +173,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml index 5efb2e708b..9b5316aea6 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml @@ -42,7 +42,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -137,7 +137,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml index 58ff14102b..03afaff6d1 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -42,7 +42,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -137,7 +137,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + acamas oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml index 3aa9a395b3..6261fed596 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml @@ -40,7 +40,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + acamas oai-gnb-asan oai-nr-ue-asan @@ -113,7 +113,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml index 88173b3659..4da64a8788 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml @@ -45,7 +45,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -142,7 +142,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml index 0d2634192d..89ff56d9fb 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml @@ -40,7 +40,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -110,7 +110,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml index 1e11870b88..9a57d49870 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml @@ -39,7 +39,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-nr-ue-asan @@ -96,7 +96,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml index 5efa8d3401..4d36ccec80 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -42,7 +42,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -119,7 +119,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml index 40f3ad4607..a7a7df3a35 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml @@ -44,7 +44,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + localhost oai-gnb-asan oai-nr-ue-asan @@ -158,7 +158,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml index a6d39d3f98..376c26400a 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml @@ -43,7 +43,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -212,7 +212,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml index 3e306844de..e37e1ca812 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -42,7 +42,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -195,7 +195,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml index 9d54eceaeb..04e459c4a3 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml @@ -42,7 +42,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -178,7 +178,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml index 2889101ee8..fc2b933805 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml @@ -44,7 +44,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -207,7 +207,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml index fb18ce090f..00a3a59d21 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml @@ -43,7 +43,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -139,7 +139,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml index 5501ad86fb..9f2f546bcf 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml @@ -49,13 +49,13 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb Pull_Local_Registry Pull Images from Local Registry - 1 + carabe oai-lte-ue @@ -191,7 +191,7 @@ Clean_Test_Server_Images true Clean Test Images on eNB Test Server - 0 + hutch oai-enb @@ -199,7 +199,7 @@ Clean_Test_Server_Images true Clean Test Images on LTE-UE Test Server - 1 + carabe oai-lte-ue diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml index 3a64107484..cda6ff236d 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml @@ -43,7 +43,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + hutch oai-enb @@ -207,7 +207,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + hutch oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml index bb6359d636..ae3275f5a6 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml @@ -43,7 +43,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + starsky oai-enb @@ -224,7 +224,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + starsky oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index 0d4d1cae81..4b60443d33 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -41,7 +41,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + starsky oai-enb @@ -210,7 +210,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + starsky oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml index e261a3a057..c89cf5aeb7 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml @@ -42,7 +42,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + starsky oai-enb @@ -215,7 +215,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + starsky oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml index dd8ef337b8..455a0b3e3a 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml @@ -42,7 +42,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml Pull_Local_Registry Pull Images from Local Registry - 0 + starsky oai-enb @@ -213,7 +213,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + starsky oai-enb diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml index 1719ad2691..76a9d3c020 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml @@ -42,7 +42,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml Pull_Local_Registry Pull Images from Local Registry - 0 + starsky oai-enb @@ -218,7 +218,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + starsky oai-enb diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml index f127601e39..e8d380ffc6 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml @@ -48,7 +48,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + obelix oai-enb @@ -155,7 +155,7 @@ Clean_Test_Server_Images true Clean Test Images - 0 + obelix oai-enb diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml index af3299061a..850f9aa954 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml @@ -48,7 +48,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + obelix oai-enb @@ -155,7 +155,7 @@ Clean_Test_Server_Images true Clean Test Images - 0 + obelix oai-enb diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index f72d64a9d4..03d784f8bc 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -59,14 +59,14 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + nepes oai-enb Pull_Local_Registry Pull Images from Local Registry - 1 + ofqot oai-gnb @@ -270,7 +270,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + nepes oai-enb @@ -278,7 +278,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 1 + ofqot oai-gnb diff --git a/ci-scripts/xml_files/container_sa_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_aerial_quectel.xml index 89db1ac2bb..ac66f89f59 100644 --- a/ci-scripts/xml_files/container_sa_aerial_quectel.xml +++ b/ci-scripts/xml_files/container_sa_aerial_quectel.xml @@ -52,7 +52,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + gracehopper1-oai oai-gnb-aerial arm_ @@ -161,7 +161,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + gracehopper1-oai oai-gnb-aerial diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml index 88ab941e31..fa277d710c 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -280,7 +280,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + avra oai-gnb-aw2s diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml index ed4a219f55..1b435276c1 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml @@ -277,7 +277,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + avra oai-gnb-aw2s diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index dacee9692f..598ee98b6c 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -59,7 +59,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + ofqot oai-gnb @@ -223,7 +223,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + ofqot oai-gnb diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index 4fbffbd9e8..8d9b4b996c 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -55,7 +55,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + ofqot oai-gnb oai-nr-cuup @@ -226,7 +226,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + ofqot oai-gnb oai-nr-cuup diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index fd935be551..13daf5b90c 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -64,7 +64,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + ofqot oai-gnb @@ -256,7 +256,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + ofqot oai-gnb diff --git a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml index 742b09e3d8..280c3ece38 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml @@ -54,7 +54,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + cacofonix oai-gnb-fhi72 @@ -155,7 +155,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + cacofonix oai-gnb-fhi72 diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml index 1d7cd323e4..59744e30a8 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml @@ -55,7 +55,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + cacofonix oai-gnb-fhi72 @@ -165,7 +165,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + cacofonix oai-gnb-fhi72 diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml index 94e97176ff..faf15ce772 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml @@ -158,7 +158,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + matix oai-gnb diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml index a701fc5ab9..77f8c3592a 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml @@ -158,7 +158,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + matix oai-gnb diff --git a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml index 75087fb4a0..ae7202991b 100644 --- a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml @@ -158,7 +158,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + matix oai-gnb diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml index da61c8e83f..4a69eebab7 100644 --- a/ci-scripts/xml_files/container_sa_n310_nrue.xml +++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml @@ -175,7 +175,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + avra oai-gnb @@ -183,7 +183,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 1 + caracal oai-nr-ue diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml index f116e97e24..92c537bfd2 100644 --- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml @@ -53,7 +53,7 @@ Pull_Local_Registry Pull Images from Local Registry - 0 + ofqot oai-gnb @@ -217,7 +217,7 @@ Clean_Test_Server_Images true Clean Test Images on Test Server - 0 + ofqot oai-gnb From 7839d0660157d9b7382fe9f1f0e1c52134f7a483 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 11:10:17 +0200 Subject: [PATCH 093/112] Create/Deploy/Undeploy(): use node Pass the node name for a host on which to create a workspace or deploy/undeploy. Add a new test for the creation of workspaces. To help myself and the reviewer, here is a list of "eNB_IPAddress"/"eNB1_IPAddress" parameters I copied from the various pipelines: - rfsim 4G eNB_IPAddress none => localhost - rfsim 5g eNB_IPAddress none => localhost - flexric eNB_IPAddress none => localhost - l2sim 4g eNB_IPAddress none => localhost - l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost - cluster image eNB_IPAddress poseidon - ubuntu18 eNB_IPAddress obelix => obelix - ubuntu-arm eNB_IPAddress gracehopper3-oai => gracehopper3-oai - arm-cross eNB_IPAddress alambix => alambix - lte-tdd eNB_IPAddress 172.21.18.45 => starsky - lte-fdd eNB_IPAddress 172.21.18.46 => hutch - lte-oaiue eNB_IPAddress 172.21.18.46 => hutch - lte-oaiue eNB1_IPAddress 172.21.18.47 => carabe - lte-tdd-2x2 eNB_IPAddress 172.21.16.128 => obelix - nsa eNB_IPAddress 172.21.16.137 => nepes - nsa eNB1_IPAddress 172.21.16.109 => ofqot - sa-aerial eNB_IPAddress gracehopper1-oai => gracehopper1-oai - aw2s eNB_IPAddress 172.21.16.124 => avra - sabox eNB_IPAddress 172.21.16.109 => ofqot - sa-oaiue eNB_IPAddress avra => avra - sa-oaiue eNB1_IPAddress caracal => caracal - cppcheck eNB_IPAddress 172.21.18.47 => carabe - timing-phytest eNB_IPAddress caracal => caracal - physim 4g eNB_IPAddress avra => avra - physim 5g eNB_IPAddress avra => avra --- ci-scripts/cls_containerize.py | 25 +++++------ ci-scripts/main.py | 19 +++------ ci-scripts/tests/deployment.py | 41 +++++++++++-------- ci-scripts/xml_files/cluster_image_build.xml | 1 + .../xml_files/container_4g_l2sim_proxy.xml | 3 +- .../xml_files/container_4g_l2sim_tdd.xml | 16 +++----- .../container_4g_rfsim_fdd_05MHz.xml | 18 +++----- .../container_4g_rfsim_fdd_05MHz_noS1.xml | 12 ++---- .../container_4g_rfsim_fdd_10MHz.xml | 18 +++----- .../container_4g_rfsim_fdd_20MHz.xml | 18 +++----- .../xml_files/container_4g_rfsim_fembms.xml | 12 ++---- .../xml_files/container_4g_rfsim_mbms.xml | 12 ++---- .../container_4g_rfsim_tdd_05MHz.xml | 18 +++----- .../xml_files/container_5g_e1_rfsim.xml | 15 +++---- .../xml_files/container_5g_f1_rfsim.xml | 15 +++---- .../xml_files/container_5g_fdd_rfsim.xml | 12 ++---- .../xml_files/container_5g_flexric_rfsim.xml | 30 +++++--------- ci-scripts/xml_files/container_5g_rfsim.xml | 27 ++++-------- .../xml_files/container_5g_rfsim_24prb.xml | 12 ++---- .../xml_files/container_5g_rfsim_2x2.xml | 12 ++---- .../container_5g_rfsim_fdd_phytest.xml | 14 +++---- .../container_5g_rfsim_fr2_32prb.xml | 14 +++---- .../xml_files/container_5g_rfsim_ntn_geo.xml | 12 ++---- .../xml_files/container_5g_rfsim_ntn_leo.xml | 12 ++---- .../xml_files/container_5g_rfsim_sidelink.xml | 12 ++---- .../xml_files/container_5g_rfsim_tdd_dora.xml | 12 ++---- .../xml_files/container_5g_rfsim_u0_25prb.xml | 12 ++---- .../xml_files/container_image_build.xml | 3 +- .../xml_files/container_image_build_arm.xml | 3 +- .../xml_files/container_image_build_cross.xml | 3 +- .../container_lte_b200_fdd_05Mhz_tm1.xml | 9 ++-- ...container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 12 ++---- ...lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml | 9 ++-- .../container_lte_b200_fdd_10Mhz_tm1.xml | 9 ++-- .../container_lte_b200_fdd_10Mhz_tm1_cdrx.xml | 9 ++-- ...container_lte_b200_fdd_10Mhz_tm1_oaiue.xml | 18 +++----- .../container_lte_b200_fdd_20Mhz_tm1.xml | 9 ++-- .../container_lte_b200_tdd_05Mhz_tm1.xml | 9 ++-- ...container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 12 ++---- .../container_lte_b200_tdd_10Mhz_tm1.xml | 9 ++-- .../container_lte_b200_tdd_20Mhz_tm1.xml | 9 ++-- ...e_b200_tdd_20Mhz_tm1_default_scheduler.xml | 9 ++-- .../container_lte_n3xx_tdd_2x2_tm1.xml | 9 ++-- .../container_lte_n3xx_tdd_2x2_tm2.xml | 9 ++-- .../xml_files/container_nsa_b200_quectel.xml | 18 +++----- .../xml_files/container_sa_aerial_quectel.xml | 12 ++---- .../xml_files/container_sa_aw2s_asue.xml | 9 ++-- .../xml_files/container_sa_aw2s_asue_2x2.xml | 9 ++-- .../xml_files/container_sa_b200_quectel.xml | 9 ++-- .../container_sa_e1_b200_quectel.xml | 15 +++---- .../container_sa_f1_b200_quectel.xml | 12 ++---- .../container_sa_fhi72_metanoia_up2_2x2.xml | 9 ++-- .../xml_files/container_sa_fhi72_vvdn_up2.xml | 9 ++-- .../container_sa_n310_2X2_100MHz_quectel.xml | 9 ++-- .../container_sa_n310_2X2_60MHz_quectel.xml | 9 ++-- .../container_sa_n310_4X4_60MHz_quectel.xml | 9 ++-- .../xml_files/container_sa_n310_nrue.xml | 18 +++----- .../container_sa_sc_b200_quectel.xml | 9 ++-- ci-scripts/xml_files/cppcheck.xml | 1 + ci-scripts/xml_files/gnb_usrp_build.xml | 1 + ci-scripts/xml_files/physim_4g_deploy_run.xml | 3 +- ci-scripts/xml_files/physim_5g_deploy_run.xml | 3 +- 62 files changed, 261 insertions(+), 477 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 3af3291c35..8b6b12a4e0 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -736,25 +736,23 @@ class Containerize(): HTML.CreateHtmlTestRowQueue(param, s, [msg]) return status - def Create_Workspace(self,HTML): - svr = self.eNB_serverId[self.eNB_instance] - lIpAddr, lSourcePath = self.GetCredentials(svr) - success = CreateWorkspace(lIpAddr, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) + def Create_Workspace(self, node, HTML): + lSourcePath = self.eNBSourceCodePath + success = CreateWorkspace(node, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) if success: HTML.CreateHtmlTestRowQueue('N/A', 'OK', [f"created workspace {lSourcePath}"]) else: HTML.CreateHtmlTestRowQueue('N/A', 'KO', ["cannot create workspace"]) return success - def DeployObject(self, ctx, HTML): - svr = self.eNB_serverId[self.eNB_instance] + def DeployObject(self, ctx, node, HTML): num_attempts = self.num_attempts - lIpAddr, lSourcePath = self.GetCredentials(svr) - logging.debug(f'Deploying OAI Object on server: {lIpAddr}') + lSourcePath = self.eNBSourceCodePath + logging.debug(f'Deploying OAI Object on server: {node}') yaml = self.yamlPath[self.eNB_instance].strip('/') wd = f'{lSourcePath}/{yaml}' wd_yaml = f'{wd}/docker-compose.y*ml' - with cls_cmd.getConnection(lIpAddr) as ssh: + with cls_cmd.getConnection(node) as ssh: services = GetServices(ssh, self.services[self.eNB_instance], wd_yaml) if services == [] or services == ' ' or services == None: msg = 'Cannot determine services to start' @@ -790,13 +788,12 @@ class Containerize(): HTML.CreateHtmlTestRowQueue('N/A', 'KO', ['\n'.join(imagesInfo)]) return deployed - def UndeployObject(self, ctx, HTML, RAN): - svr = self.eNB_serverId[self.eNB_instance] - lIpAddr, lSourcePath = self.GetCredentials(svr) - logging.debug(f'\u001B[1m Undeploying OAI Object from server: {lIpAddr}\u001B[0m') + def UndeployObject(self, ctx, node, HTML, RAN): + lSourcePath = self.eNBSourceCodePath + logging.debug(f'\u001B[1m Undeploying OAI Object from server: {node}\u001B[0m') yaml = self.yamlPath[self.eNB_instance].strip('/') wd = f'{lSourcePath}/{yaml}' - with cls_cmd.getConnection(lIpAddr) as ssh: + with cls_cmd.getConnection(node) as ssh: ExistEnvFilePrint(ssh, wd) services = GetRunningServices(ssh, f"{wd}/docker-compose.y*ml") copyin_res = None diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 54f4073eb9..85765de30c 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -305,16 +305,7 @@ def ExecuteActionWithParam(action, ctx): success = core_op(cn_id, ctx, HTML) elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace": - eNB_instance=test.findtext('eNB_instance') - if (eNB_instance is None): - CONTAINERS.eNB_instance=0 - else: - CONTAINERS.eNB_instance=int(eNB_instance) - eNB_serverId=test.findtext('eNB_serverId') - if (eNB_serverId is None): - CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]='0' - else: - CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]=eNB_serverId + node = test.findtext('node') string_field = test.findtext('yaml_path') if (string_field is not None): CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field @@ -330,14 +321,14 @@ def ExecuteActionWithParam(action, ctx): CONTAINERS.num_attempts = int(test.findtext('num_attempts') or 1) CONTAINERS.deploymentTag = cls_containerize.CreateTag(CONTAINERS.ranCommitID, CONTAINERS.ranBranch, CONTAINERS.ranAllowMerge) if action == 'Deploy_Object': - success = CONTAINERS.DeployObject(ctx, HTML) + success = CONTAINERS.DeployObject(ctx, node, HTML) elif action == 'Undeploy_Object': - success = CONTAINERS.UndeployObject(ctx, HTML, RAN) + success = CONTAINERS.UndeployObject(ctx, node, HTML, RAN) elif action == 'Create_Workspace': if force_local: # Do not create a working directory when running locally. Current repo directory will be used return True - success = CONTAINERS.Create_Workspace(HTML) + success = CONTAINERS.Create_Workspace(node, HTML) elif action == 'Run_Physim': physim_options = test.findtext('physim_run_args') @@ -360,7 +351,7 @@ def ExecuteActionWithParam(action, ctx): if force_local: # Do not pull or remove images when running locally. User is supposed to handle image creation & cleanup return True - node = test.findtext('node') or 'localhost' + node = test.findtext('node') tag_prefix = test.findtext('tag_prefix') or "" images = test.findtext('images').split() # hack: for FlexRIC, we need to overwrite the tag to use diff --git a/ci-scripts/tests/deployment.py b/ci-scripts/tests/deployment.py index d2fb0cda57..60c88f39a1 100644 --- a/ci-scripts/tests/deployment.py +++ b/ci-scripts/tests/deployment.py @@ -44,12 +44,9 @@ class TestDeploymentMethods(unittest.TestCase): self.cont.ranAllowMerge = True self.cont.ranBranch = '' self.cont.ranCommitID = '' - self.cont.eNB_serverId[0] = '0' - self.cont.eNBIPAddress = 'localhost' - self.cont.eNBUserName = None - self.cont.eNBPassword = None self.cont.eNBSourceCodePath = os.getcwd() self.cont.num_attempts = 3 + self.node = 'localhost' self.ctx = TestCaseCtx.Default(tempfile.mkdtemp()) def tearDown(self): with cls_cmd.LocalCmd() as c: @@ -58,8 +55,8 @@ class TestDeploymentMethods(unittest.TestCase): def test_deploy(self): self.cont.yamlPath[0] = 'tests/simple-dep/' self.cont.deploymentTag = "noble" - deploy = self.cont.DeployObject(self.ctx, self.html) - undeploy = self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy = self.cont.DeployObject(self.ctx, self.node, self.html) + undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertTrue(deploy) self.assertTrue(undeploy) @@ -67,8 +64,8 @@ class TestDeploymentMethods(unittest.TestCase): # fails reliably old = self.cont.yamlPath self.cont.yamlPath[0] = 'tests/simple-fail/' - deploy = self.cont.DeployObject(self.ctx, self.html) - self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy = self.cont.DeployObject(self.ctx, self.node, self.html) + self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertFalse(deploy) self.cont.yamlPath = old @@ -76,8 +73,8 @@ class TestDeploymentMethods(unittest.TestCase): # fails reliably old = self.cont.yamlPath self.cont.yamlPath[0] = 'tests/simple-fail-2svc/' - deploy = self.cont.DeployObject(self.ctx, self.html) - self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy = self.cont.DeployObject(self.ctx, self.node, self.html) + self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertFalse(deploy) self.cont.yamlPath = old @@ -85,8 +82,8 @@ class TestDeploymentMethods(unittest.TestCase): self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' self.cont.services[0] = "oai-gnb" self.cont.deploymentTag = 'develop-12345678' - deploy = self.cont.DeployObject(self.ctx, self.html) - undeploy = self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy = self.cont.DeployObject(self.ctx, self.node, self.html) + undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertTrue(deploy) self.assertTrue(undeploy) @@ -94,8 +91,8 @@ class TestDeploymentMethods(unittest.TestCase): self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' self.cont.services[0] = "oai-gnb oai-nr-ue" self.cont.deploymentTag = 'develop-12345678' - deploy = self.cont.DeployObject(self.ctx, self.html) - undeploy = self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy = self.cont.DeployObject(self.ctx, self.node, self.html) + undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertTrue(deploy) self.assertTrue(undeploy) @@ -103,13 +100,23 @@ class TestDeploymentMethods(unittest.TestCase): self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' self.cont.services[0] = "oai-gnb" self.cont.deploymentTag = 'develop-12345678' - deploy1 = self.cont.DeployObject(self.ctx, self.html) + deploy1 = self.cont.DeployObject(self.ctx, self.node, self.html) self.cont.services[0] = "oai-nr-ue" - deploy2 = self.cont.DeployObject(self.ctx, self.html) - undeploy = self.cont.UndeployObject(self.ctx, self.html, self.ran) + deploy2 = self.cont.DeployObject(self.ctx, self.node, self.html) + undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertTrue(deploy1) self.assertTrue(deploy2) self.assertTrue(undeploy) + def test_create_workspace(self): + self.cont.eNBSourceCodePath = tempfile.mkdtemp() + self.cont.ranRepository = "https://gitlab.eurecom.fr/oai/openairinterface5g.git" + self.cont.ranCommitID = "05f9c975eeecbca1bdff5940affad44465f1301f" + self.cont.ranBranch = "develop" + ws = self.cont.Create_Workspace(self.node, self.html) + with cls_cmd.LocalCmd() as cmd: + cmd.run(f"rm -rf {self.cont.eNBSourceCodePath}") + self.assertTrue(ws) + if __name__ == '__main__': unittest.main() diff --git a/ci-scripts/xml_files/cluster_image_build.xml b/ci-scripts/xml_files/cluster_image_build.xml index 6810873b1c..b8462a4ebd 100644 --- a/ci-scripts/xml_files/cluster_image_build.xml +++ b/ci-scripts/xml_files/cluster_image_build.xml @@ -32,6 +32,7 @@ Create_Workspace Create new Workspace + poseidon Build_Cluster_Image diff --git a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml index cd57a24b6a..4e65928147 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml @@ -32,8 +32,7 @@ Create_Workspace Create new Workspace - 1 - 1 + localhost Build_Proxy diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml index 43334c0f91..eabece50cd 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml @@ -50,43 +50,38 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy Cassandra Database + localhost ci-scripts/yaml_files/4g_l2sim_fdd cassandra db_init - 0 - 0 Deploy_Object Deploy OAI 4G CoreNetwork + localhost ci-scripts/yaml_files/4g_l2sim_fdd oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 0 - 0 Deploy_Object Deploy OAI 4G eNB L2 sim + localhost ci-scripts/yaml_files/4g_l2sim_fdd oai_enb - 0 - 0 Deploy_Object Deploy OAI L2 sim 4G LTE-UE 1 and Proxy + localhost ci-scripts/yaml_files/4g_l2sim_fdd proxy oai_ue1 - 0 - 0 @@ -145,6 +140,7 @@ Undeploy_Object true + localhost Undeploy all OAI 4G stack ci-scripts/yaml_files/4g_l2sim_fdd diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 2f59fe3d7b..4b93c10fcd 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -46,8 +46,7 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Pull_Local_Registry @@ -59,10 +58,9 @@ Deploy_Object Deploy Cassandra Database + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz cassandra db_init - 0 - 0 @@ -80,28 +78,25 @@ Deploy_Object Deploy OAI 4G CoreNetwork + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 0 - 0 Deploy_Object Deploy OAI 4G eNB RF sim (FDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_ue0 - 0 - 0 @@ -161,9 +156,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index d78b926a00..968e30071a 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -49,8 +49,7 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost IdleSleep @@ -67,19 +66,17 @@ Deploy_Object Deploy OAI 4G eNB RF sim (FDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 oai_ue0 - 0 - 0 @@ -132,9 +129,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index c1a3b5ff6e..076ee6995b 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -53,16 +53,14 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy Cassandra Database + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz cassandra db_init - 0 - 0 @@ -80,28 +78,25 @@ Deploy_Object Deploy OAI 4G CoreNetwork + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 0 - 0 Deploy_Object Deploy OAI 4G eNB RF sim (FDD 10MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 10MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_ue0 - 0 - 0 @@ -161,9 +156,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index 7c2622fed5..2e049e4efe 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -53,16 +53,14 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy Cassandra Database + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz cassandra db_init - 0 - 0 @@ -80,28 +78,25 @@ Deploy_Object Deploy OAI 4G CoreNetwork + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 0 - 0 Deploy_Object Deploy OAI 4G eNB RF sim (FDD 20MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 20MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_ue0 - 0 - 0 @@ -161,9 +156,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index 51cef07627..7ab434c804 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -46,8 +46,7 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost IdleSleep @@ -64,19 +63,17 @@ Deploy_Object Deploy OAI 4G eNB RF sim (FeMBMS) + localhost ci-scripts/yaml_files/4g_rfsimulator_fembms oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (FeMBMS) + localhost ci-scripts/yaml_files/4g_rfsimulator_fembms oai_ue0 - 0 - 0 @@ -95,9 +92,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_fembms - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 621d3e121e..e6a4cde19a 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -46,8 +46,7 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost IdleSleep @@ -64,19 +63,17 @@ Deploy_Object Deploy OAI 4G eNB RF sim (MBMS) + localhost ci-scripts/yaml_files/4g_rfsimulator_mbms oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (MBMS) + localhost ci-scripts/yaml_files/4g_rfsimulator_mbms oai_ue0 - 0 - 0 @@ -95,9 +92,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_mbms - 0 - 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml index bc0e4f23d6..2e22577879 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -53,16 +53,14 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy Cassandra Database + localhost ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz cassandra db_init - 0 - 0 @@ -80,28 +78,25 @@ Deploy_Object Deploy OAI 4G CoreNetwork + localhost ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_hss oai_mme oai_spgwc oai_spgwu trf_gen - 0 - 0 Deploy_Object Deploy OAI 4G eNB RF sim (TDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_enb0 - 0 - 0 Deploy_Object Deploy OAI 4G LTE-UE RF sim (TDD 05MHz) + localhost ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_ue0 - 0 - 0 @@ -154,9 +149,8 @@ Undeploy_Object true Undeploy all OAI 4G stack + localhost ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml index 50de456cdb..d27091ac63 100644 --- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml @@ -46,34 +46,30 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_e1 mysql oai-amf oai-smf oai-upf - 0 - 0 Deploy_Object Deploy OAI 5G RAN RF sim SA (1 CU-CP, 3 CU-UPs, 3 DUs) + localhost ci-scripts/yaml_files/5g_rfsimulator_e1 oai-cucp oai-cuup oai-cuup2 oai-cuup3 oai-du oai-du2 oai-du3 - 0 - 0 Deploy_Object Deploy OAI 5G NR-UE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_e1 oai-nr-ue oai-nr-ue2 oai-nr-ue3 - 0 - 0 @@ -97,12 +93,11 @@ Undeploy_Object true + localhost Undeploy all OAI 5G stack ci-scripts/yaml_files/5g_rfsimulator_e1 1,0,0,0 1,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index af0a9164db..efe8fce8e2 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -69,25 +69,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_f1_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G CU + DU-PCI0 + UE RF sim SA + localhost ci-scripts/yaml_files/5g_f1_rfsimulator oai-cu oai-du-pci0 oai-nr-ue - 0 - 0 @@ -112,10 +109,9 @@ Deploy_Object Deploy OAI 5G (target) DU-PCI1 RF sim SA + localhost ci-scripts/yaml_files/5g_f1_rfsimulator oai-du-pci1 - 0 - 0 @@ -238,11 +234,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_f1_rfsimulator 30,100,100,100 30,100,100,100 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml index 99814fbc09..6ce1e37b90 100644 --- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml @@ -48,25 +48,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_fdd_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB+UE RF sim SA + localhost ci-scripts/yaml_files/5g_fdd_rfsimulator oai-gnb oai-nr-ue - 0 - 0 @@ -126,11 +123,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_fdd_rfsimulator 1,0,0,0 1,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml index d360645cbb..8ee9326b5e 100644 --- a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml @@ -88,37 +88,33 @@ Deploy_Object Deploy OAI 5G CoreNetwork + localhost doc/tutorial_resources/oai-cn5g mysql oai-nrf oai-udr oai-udm oai-ausf oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI FlexRIC + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric oai-flexric - 0 - 0 Deploy_Object Deploy OAI 5G gNB in RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric oai-gnb - 0 - 0 Deploy_Object Deploy 2 OAI 5G NR-UEs in RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric oai-nr-ue oai-nr-ue2 - 0 - 0 @@ -149,55 +145,49 @@ Undeploy_Object Undeploy Core Network + localhost doc/tutorial_resources/oai-cn5g - 0 - 0 true Undeploy_Object Undeploy RAN and Flexric + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric - 0 - 0 true Deploy_Object RC monitoring + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric xapp-rc-moni - 0 - 0 Deploy_Object KPM monitoring + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric xapp-kpm-moni - 0 - 0 Deploy_Object KPM monitoring and RC control + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric xapp-kpm-rc - 0 - 0 Deploy_Object Custom SMs monitoring + localhost ci-scripts/yaml_files/5g_rfsimulator_flexric xapp-gtp-mac-rlc-pdcp-moni - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index 8265e712c0..d7fb38ef8f 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -63,70 +63,62 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-gnb - 0 - 0 Deploy_Object Deploy OAI 5G NR-UE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue - 0 - 0 Deploy_Object Deploy Second OAI 5G NR-UE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue2 - 0 - 0 Deploy_Object Deploy OAI 5G NR-UEs (#3, #4, #5) RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue3 oai-nr-ue4 oai-nr-ue5 - 0 - 0 Deploy_Object Deploy OAI 5G NR-UEs (#6, #7, #8) RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue6 oai-nr-ue7 oai-nr-ue8 - 0 - 0 Deploy_Object Deploy OAI 5G NR-UEs (#9, #10) RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue9 oai-nr-ue10 - 0 - 0 @@ -251,11 +243,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator 1,0,0,0 1,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index c74579d87b..7db37d8e63 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -66,25 +66,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_24prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB+UE RFsim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_24prb oai-gnb oai-nr-ue - 0 - 0 @@ -164,9 +161,8 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_24prb - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml index 9b5316aea6..75924e1ca2 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml @@ -48,25 +48,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_2x2 mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB+UE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_2x2 oai-gnb oai-nr-ue - 0 - 0 @@ -126,9 +123,8 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_2x2 - 0 - 0 1,0,0,0 1,0,0,0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml index 03afaff6d1..b376df99f4 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -55,25 +55,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G gNB RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest oai-gnb - 0 - 0 Deploy_Object Deploy OAI 5G NR-UE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest oai-nr-ue - 0 - 0 @@ -126,18 +123,17 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest 10,100,100,100 10,100,100,100 - 0 - 0 Clean_Test_Server_Images true Clean Test Images on Test Server - acamas + localhost oai-gnb-asan oai-nr-ue-asan diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml index 6261fed596..6a47da0ff9 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml @@ -40,33 +40,30 @@ Pull_Local_Registry Pull Images from Local Registry - acamas + localhost oai-gnb-asan oai-nr-ue-asan Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI gNB + localhost ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI NR-UE + localhost ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb oai-gnb oai-nr-ue - 0 - 0 @@ -102,11 +99,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb 10,0,0,0 10,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml index 4da64a8788..7107b7971b 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml @@ -52,25 +52,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_geo mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB+nrUE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_geo oai-gnb oai-nr-ue - 0 - 0 @@ -133,9 +130,8 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_geo - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml index 89ff56d9fb..63897cfb8b 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_leo.xml @@ -47,25 +47,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_leo mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G gNB+nrUE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_leo oai-gnb oai-nr-ue - 0 - 0 @@ -101,9 +98,8 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_ntn_leo - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml index 9a57d49870..58bff964d4 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml @@ -46,26 +46,23 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G UE 1 + localhost ci-scripts/yaml_files/5g_rfsimulator_sidelink oai-nr-ue-1 - 0 - 0 Deploy_Object Deploy OAI 5G UE 2 + localhost ci-scripts/yaml_files/5g_rfsimulator_sidelink oai-nr-ue-2 - 0 - 0 @@ -85,11 +82,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_sidelink 1,0,0,0 1,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml index 4d36ccec80..97730bd233 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -55,25 +55,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI gNB + localhost ci-scripts/yaml_files/5g_rfsimulator_tdd_dora oai-gnb - 0 - 0 Deploy_Object Deploy OAI NR-UE + localhost ci-scripts/yaml_files/5g_rfsimulator_tdd_dora oai-nr-ue - 0 - 0 @@ -108,11 +105,10 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost ci-scripts/yaml_files/5g_rfsimulator_tdd_dora 0,0,0,0 0,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml index a7a7df3a35..c5c76124d3 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml @@ -50,25 +50,22 @@ Create_Workspace Create new Workspace - 0 - 0 + localhost Deploy_Object Deploy OAI 5G CoreNetwork + localhost ci-scripts/yaml_files/5g_rfsimulator_u0_25prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 0 - 0 Deploy_Object Deploy OAI 5G VNF+PNF+nrUE RF sim SA + localhost ci-scripts/yaml_files/5g_rfsimulator_u0_25prb oai-vnf oai-pnf oai-nr-ue - 0 - 0 @@ -146,12 +143,11 @@ Undeploy_Object true Undeploy all OAI 5G stack + localhost oai-vnf oai-pnf ci-scripts/yaml_files/5g_rfsimulator_u0_25prb 1,0,0,0 1,0,0,0 - 0 - 0 diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index 7db63e4281..215ae2a2cb 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -34,8 +34,7 @@ Create_Workspace Create new Workspace for server 0 - 0 - 0 + obelix Build_Image diff --git a/ci-scripts/xml_files/container_image_build_arm.xml b/ci-scripts/xml_files/container_image_build_arm.xml index 722d23ddcf..2287c51b86 100644 --- a/ci-scripts/xml_files/container_image_build_arm.xml +++ b/ci-scripts/xml_files/container_image_build_arm.xml @@ -34,8 +34,7 @@ Create_Workspace Create new Workspace for server 0 - 0 - 0 + gracehopper3-oai Build_Image diff --git a/ci-scripts/xml_files/container_image_build_cross.xml b/ci-scripts/xml_files/container_image_build_cross.xml index 046ceb5413..c47253662b 100644 --- a/ci-scripts/xml_files/container_image_build_cross.xml +++ b/ci-scripts/xml_files/container_image_build_cross.xml @@ -32,8 +32,7 @@ Create_Workspace Create new Workspace - 0 - 0 + alambix Build_Image diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml index 376c26400a..10ab1fd3b0 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml @@ -69,15 +69,13 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/5MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1 - 0 - 0 @@ -90,9 +88,8 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml index e37e1ca812..ebc59e746d 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -68,24 +68,21 @@ Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy RRU (FDD/Band7/5MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 rru_fdd - 0 - 0 Deploy_Object Deploy RCC (FDD/Band7/5MHz) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 rcc_fdd - 0 - 0 @@ -98,9 +95,8 @@ Undeploy_Object true Undeploy RCC/RRU + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml index 04e459c4a3..8936a3928e 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml @@ -61,24 +61,21 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/5MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity - 0 - 0 Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml index fc2b933805..1456418475 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml @@ -63,15 +63,13 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1 - 0 - 0 @@ -84,9 +82,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml index 00a3a59d21..aafcdff6ea 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml @@ -62,24 +62,21 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx - 0 - 0 Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml index 9f2f546bcf..f50330ab89 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml @@ -87,28 +87,24 @@ Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma - 0 - 0 + hutch Create_Workspace Create new Workspace for server 1 - 1 - 1 + carabe Deploy_Object Deploy LTE-UE (FDD/Band7/10MHz/B200) in a container + carabe ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma - 1 - 1 @@ -127,18 +123,16 @@ Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma - 0 - 0 Undeploy_Object true Undeploy LTE-UE + carabe ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma - 1 - 1 diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml index cda6ff236d..52dbcb8972 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml @@ -62,15 +62,13 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + hutch Deploy_Object Deploy eNB (FDD/Band7/20MHz/B200) in a container + hutch ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1 - 0 - 0 @@ -83,9 +81,8 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml Undeploy_Object true Undeploy eNB + hutch ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml index ae3275f5a6..f46697a106 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml @@ -70,15 +70,13 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + starsky Deploy_Object Deploy eNB (TDD/Band40/5MHz/B200) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1 - 0 - 0 @@ -91,9 +89,8 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml Undeploy_Object true Undeploy eNB + starsky ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index 4b60443d33..da187e2120 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -68,24 +68,21 @@ Create_Workspace Create new Workspace for server 0 - 0 - 0 + starsky Deploy_Object Deploy RRU (TDD/Band40/5MHz/B200) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 rru_tdd - 0 - 0 Deploy_Object Deploy RCC (TDD/Band40/5MHz) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 rcc_tdd - 0 - 0 @@ -98,9 +95,8 @@ Undeploy_Object true Undeploy RRU/RCC + starsky ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml index c89cf5aeb7..88b3330508 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml @@ -61,15 +61,13 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + starsky Deploy_Object Deploy eNB (TDD/Band40/10MHz/B200) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1 - 0 - 0 @@ -82,9 +80,8 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml Undeploy_Object true Undeploy eNB + starsky ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml index 455a0b3e3a..65f4dfc6b4 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml @@ -61,15 +61,13 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + starsky Deploy_Object Deploy eNB (TDD/Band40/20MHz/B200) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1 - 0 - 0 @@ -82,9 +80,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml Undeploy_Object true Undeploy eNB + starsky ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1 - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml index 76a9d3c020..6a0cb0f892 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml @@ -62,15 +62,13 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml Create_Workspace Create new Workspace for server 0 - 0 - 0 + starsky Deploy_Object Deploy eNB (TDD/Band40/20MHz/B200) in a container + starsky ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler - 0 - 0 @@ -83,9 +81,8 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml Undeploy_Object true Undeploy eNB + starsky ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler - 0 - 0 diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml index e8d380ffc6..3337bba999 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml @@ -68,15 +68,13 @@ Create_Workspace Create new Workspace - 0 - 0 + obelix Deploy_Object Deploy eNB (TDD/Band38/2.6Ghz/N3XX) in a container + obelix ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1 - 0 - 0 @@ -142,9 +140,8 @@ Undeploy_Object true Undeploy gNB + obelix ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1 - 0 - 0 - - l2sim-4glte-proxy-build - Build L2sim proxy image - wrench - - 100001 - 000001 - - - - Create_Workspace - Create new Workspace - localhost - - - Build_Proxy - Build L2sim Proxy Image - 1 - 1 - True - b64d9bce986b38ca59e8582864ade3fcdd05c0dc - - - From 190dc55d9fff3abc2dbe2c5ee48d89451425a2d1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 12:35:56 +0200 Subject: [PATCH 099/112] Pass node to various Build*() functions Pass node directly from XML to these functions - BuildClusterImage() - BuildImage() - BuildProxy() - BuildRunTests() instead of reading the "server ID" and looking up from eNB_IPAddress/eNB1_IPAddress/eNB2_IPAddress. Improve the proxy build unit test by properly passing ctx information. --- ci-scripts/args_parse.py | 3 -- ci-scripts/cls_cluster.py | 10 +++---- ci-scripts/cls_containerize.py | 29 +++++++++---------- ci-scripts/cls_native.py | 6 ++-- ci-scripts/main.py | 25 ++++------------ ci-scripts/tests/build.py | 10 +++---- ci-scripts/xml_files/cluster_image_build.xml | 1 + .../xml_files/container_build_run_tests.xml | 3 +- .../xml_files/container_image_build.xml | 3 +- .../xml_files/container_image_build_arm.xml | 3 +- .../xml_files/container_image_build_cross.xml | 3 +- .../xml_files/container_l2sim_proxy.xml | 3 +- ci-scripts/xml_files/gnb_usrp_build.xml | 1 + 13 files changed, 38 insertions(+), 62 deletions(-) diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 7b57409fb0..11b27135a2 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -125,7 +125,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE) RAN.eNBIPAddress=matchReg.group(1) CONTAINERS.eNBIPAddress=matchReg.group(1) - CLUSTER.eNBIPAddress=matchReg.group(1) elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE) RAN.eNB1IPAddress=matchReg.group(1) @@ -139,7 +138,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE) RAN.eNBUserName=matchReg.group(1) CONTAINERS.eNBUserName=matchReg.group(1) - CLUSTER.eNBUserName=matchReg.group(1) elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE) RAN.eNB1UserName=matchReg.group(1) @@ -153,7 +151,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE) RAN.eNBPassword=matchReg.group(1) CONTAINERS.eNBPassword=matchReg.group(1) - CLUSTER.eNBPassword=matchReg.group(1) elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE) RAN.eNB1Password=matchReg.group(1) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index dd3c66d989..929dd29021 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -69,7 +69,6 @@ def OC_logout(cmd): class Cluster: def __init__(self): - self.eNBIPAddress = "" self.eNBSourceCodePath = "" self.forcedWorkspaceCleanup = False self.OCUserName = "" @@ -195,13 +194,12 @@ class Cluster: self.cmd.run(f'oc logs {job} &> {fn}') return (image, archiveArtifact(self.cmd, ctx, fn)) - def BuildClusterImage(self, ctx, HTML): + def BuildClusterImage(self, ctx, node, HTML): if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': HELP.GenericHelp(CONST.Version) raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}') - lIpAddr = self.eNBIPAddress lSourcePath = self.eNBSourceCodePath - if lIpAddr == '' or lSourcePath == '': + if node == '' or lSourcePath == '': raise ValueError('Insufficient Parameter: eNBSourceCodePath missing') ocUserName = self.OCUserName ocPassword = self.OCPassword @@ -212,8 +210,8 @@ class Cluster: if self.OCRegistry.startswith("http") or self.OCRegistry.endswith("/"): raise ValueError(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and not end on a slash /') - logging.debug(f'Building on cluster triggered from server: {lIpAddr}') - self.cmd = cls_cmd.RemoteCmd(lIpAddr) + logging.debug(f'Building on cluster triggered from server: {node}') + self.cmd = cls_cmd.RemoteCmd(node) self.testCase_id = HTML.testCase_id diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 7629a2ee17..282fe0f4a0 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -280,11 +280,10 @@ class Containerize(): raise ValueError(f'Insufficient Parameter: IP/node {ip}, path {path}') return (ip, path) - def BuildImage(self, ctx, HTML): - svr = self.eNB_serverId[self.eNB_instance] - lIpAddr, lSourcePath = self.GetCredentials(svr) - logging.debug('Building on server: ' + lIpAddr) - cmd = cls_cmd.getConnection(lIpAddr) + def BuildImage(self, ctx, node, HTML): + lSourcePath = self.eNBSourceCodePath + logging.debug('Building on server: ' + node) + cmd = cls_cmd.getConnection(node) log_files = [] # Checking the hostname to get adapted on cli and dockerfileprefixes @@ -475,11 +474,10 @@ class Containerize(): logging.error('\u001B[1m Building OAI Images Failed\u001B[0m') return status - def BuildProxy(self, ctx, HTML): - svr = self.eNB_serverId[self.eNB_instance] - lIpAddr, lSourcePath = self.GetCredentials(svr) - logging.debug('Building on server: ' + lIpAddr) - ssh = cls_cmd.getConnection(lIpAddr) + def BuildProxy(self, ctx, node, HTML): + lSourcePath = self.eNBSourceCodePath + logging.debug('Building on server: ' + node) + ssh = cls_cmd.getConnection(node) oldRanCommidID = self.ranCommitID oldRanRepository = self.ranRepository @@ -502,7 +500,7 @@ class Containerize(): buildProxy = ret.returncode != 0 # if no image, build new proxy if buildProxy: ssh.run(f'rm -Rf {lSourcePath}') - success = CreateWorkspace(lIpAddr, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) + success = CreateWorkspace(node, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) if not success: raise Exception("could not clone proxy repository") @@ -559,11 +557,10 @@ class Containerize(): HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK) return False - def BuildRunTests(self, ctx, HTML): - svr = self.eNB_serverId[self.eNB_instance] - lIpAddr, lSourcePath = self.GetCredentials(svr) - logging.debug('Building on server: ' + lIpAddr) - cmd = cls_cmd.RemoteCmd(lIpAddr) + def BuildRunTests(self, ctx, node, HTML): + lSourcePath = self.eNBSourceCodePath + logging.debug('Building on server: ' + node) + cmd = cls_cmd.RemoteCmd(node) cmd.cd(lSourcePath) ret = cmd.run('hostnamectl') diff --git a/ci-scripts/cls_native.py b/ci-scripts/cls_native.py index 83c1b14b37..9546f93d28 100644 --- a/ci-scripts/cls_native.py +++ b/ci-scripts/cls_native.py @@ -34,11 +34,11 @@ DPDK_PATH = '/opt/dpdk-t2-22.11.0' class Native(): - def Build(ctx, test_case, HTML, host, directory, options): - logging.debug(f'Building on server: {host}') + def Build(ctx, node, test_case, HTML, directory, options): + logging.debug(f'Building on server: {node}') HTML.testCase_id = test_case - with cls_cmd.getConnection(host) as ssh: + with cls_cmd.getConnection(node) as ssh: base = f"{directory}/cmake_targets" ret = ssh.run(f"C_INCLUDE_PATH={DPDK_PATH}/include/ PKG_CONFIG_PATH={DPDK_PATH}/lib64/pkgconfig/ {base}/build_oai {options} > {base}/build_oai.log", timeout=900) success = ret.returncode == 0 diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 03e8e126a0..d30b209be7 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -110,33 +110,20 @@ def ExecuteActionWithParam(action, ctx): RAN.Build_eNB_forced_workspace_cleanup = True CONTAINERS.forcedWorkspaceCleanup = True CLUSTER.forcedWorkspaceCleanup = True - eNB_instance=test.findtext('eNB_instance') - if (eNB_instance is None): - RAN.eNB_instance=0 - CONTAINERS.eNB_instance=0 - else: - RAN.eNB_instance=int(eNB_instance) - CONTAINERS.eNB_instance=int(eNB_instance) - eNB_serverId=test.findtext('eNB_serverId') - if (eNB_serverId is None): - RAN.eNB_serverId[RAN.eNB_instance]='0' - CONTAINERS.eNB_serverId[RAN.eNB_instance]='0' - else: - RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId - CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]=eNB_serverId + node = test.findtext('node') proxy_commit = test.findtext('proxy_commit') if proxy_commit is not None: CONTAINERS.proxyCommit = proxy_commit if action == 'Build_eNB': - success = cls_native.Native.Build(ctx, HTML.testCase_id, HTML, RAN.eNBIPAddress, RAN.eNBSourceCodePath, RAN.Build_eNB_args) + success = cls_native.Native.Build(ctx, node, HTML.testCase_id, HTML, RAN.eNBSourceCodePath, RAN.Build_eNB_args) elif action == 'Build_Image': - success = CONTAINERS.BuildImage(ctx, HTML) + success = CONTAINERS.BuildImage(ctx, node, HTML) elif action == 'Build_Proxy': - success = CONTAINERS.BuildProxy(ctx, HTML) + success = CONTAINERS.BuildProxy(ctx, node, HTML) elif action == 'Build_Cluster_Image': - success = CLUSTER.BuildClusterImage(ctx, HTML) + success = CLUSTER.BuildClusterImage(ctx, node, HTML) elif action == 'Build_Run_Tests': - success = CONTAINERS.BuildRunTests(ctx, HTML) + success = CONTAINERS.BuildRunTests(ctx, node, HTML) elif action == 'Initialize_eNB': datalog_rt_stats_file=test.findtext('rt_stats_cfg') diff --git a/ci-scripts/tests/build.py b/ci-scripts/tests/build.py index 669e6711b4..013486a560 100644 --- a/ci-scripts/tests/build.py +++ b/ci-scripts/tests/build.py @@ -11,6 +11,7 @@ import tempfile sys.path.append('./') # to find OAI imports below import cls_oai_html import cls_containerize +from cls_ci_helper import TestCaseCtx import cls_cmd class TestBuild(unittest.TestCase): @@ -18,22 +19,21 @@ class TestBuild(unittest.TestCase): self.html = cls_oai_html.HTMLManagement() self.html.testCase_id = "000000" self.cont = cls_containerize.Containerize() - self.cont.eNB_serverId[0] = '0' - self.cont.eNBIPAddress = 'localhost' - self.cont.eNBUserName = None - self.cont.eNBPassword = None self._d = tempfile.mkdtemp() logging.warning(f"temporary directory: {self._d}") + self.node = 'localhost' self.cont.eNBSourceCodePath = self._d + self.ctx = TestCaseCtx.Default(tempfile.mkdtemp()) def tearDown(self): logging.warning(f"removing directory contents") with cls_cmd.getConnection(None) as cmd: cmd.run(f"rm -rf {self._d}") + cmd.run(f'rm -rf {self.ctx.logPath}') def test_build_proxy(self): self.cont.proxyCommit = "b64d9bce986b38ca59e8582864ade3fcdd05c0dc" - success = self.cont.BuildProxy(self.html) + success = self.cont.BuildProxy(self.ctx, self.node, self.html) self.assertTrue(success) if __name__ == '__main__': diff --git a/ci-scripts/xml_files/cluster_image_build.xml b/ci-scripts/xml_files/cluster_image_build.xml index b8462a4ebd..a80d1cd7d4 100644 --- a/ci-scripts/xml_files/cluster_image_build.xml +++ b/ci-scripts/xml_files/cluster_image_build.xml @@ -37,6 +37,7 @@ Build_Cluster_Image Build Images on OpenShift Cluster + poseidon diff --git a/ci-scripts/xml_files/container_build_run_tests.xml b/ci-scripts/xml_files/container_build_run_tests.xml index 479bb20a5d..087c5af598 100644 --- a/ci-scripts/xml_files/container_build_run_tests.xml +++ b/ci-scripts/xml_files/container_build_run_tests.xml @@ -32,9 +32,8 @@ Build_Run_Tests Build and Run UnitTests + obelix all - 0 - 0 diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index b2c0705d8a..33f29cf087 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -39,9 +39,8 @@ Build_Image Build all Images + obelix all - 0 - 0 True diff --git a/ci-scripts/xml_files/container_image_build_arm.xml b/ci-scripts/xml_files/container_image_build_arm.xml index e82e357d26..7c731fd3a1 100644 --- a/ci-scripts/xml_files/container_image_build_arm.xml +++ b/ci-scripts/xml_files/container_image_build_arm.xml @@ -39,9 +39,8 @@ Build_Image Build all Images + gracehopper3-oai native_arm - 0 - 0 diff --git a/ci-scripts/xml_files/container_image_build_cross.xml b/ci-scripts/xml_files/container_image_build_cross.xml index c47253662b..ddaeac3602 100644 --- a/ci-scripts/xml_files/container_image_build_cross.xml +++ b/ci-scripts/xml_files/container_image_build_cross.xml @@ -38,8 +38,7 @@ Build_Image Cross-Compile for ARM64 build_cross_arm64 - 0 - 0 + alambix True diff --git a/ci-scripts/xml_files/container_l2sim_proxy.xml b/ci-scripts/xml_files/container_l2sim_proxy.xml index 197baf429b..88026f077d 100644 --- a/ci-scripts/xml_files/container_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_l2sim_proxy.xml @@ -32,8 +32,7 @@ Build_Proxy Build L2sim Proxy Image - 1 - 1 + localhost True b64d9bce986b38ca59e8582864ade3fcdd05c0dc diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 8ee89ee108..4e763678a7 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -41,6 +41,7 @@ TesteNB Build_eNB Build gNB (USRP) + caracal --gNB -w USRP --ninja -c -P --build-lib ldpc_cuda --build-lib ldpc_aal --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c True From 3f4df04875a27a4670f2f0fe82fa7fc69a496c70 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 12:57:58 +0200 Subject: [PATCH 100/112] Run_Physim(): pass node --- ci-scripts/main.py | 3 +- ci-scripts/xml_files/ldpc_gpu_test.xml | 40 +++++++++++++++++++ .../xml_files/t2_offload_dec_nr_ulsim.xml | 18 +++++++++ .../xml_files/t2_offload_enc_nr_dlsim.xml | 24 +++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index d30b209be7..90b5b7de90 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -313,7 +313,8 @@ def ExecuteActionWithParam(action, ctx): physim_options = test.findtext('physim_run_args') physim_test = test.findtext('physim_test') physim_threshold = test.findtext('physim_time_threshold') or 'inf' - success = cls_native.Native.Run_Physim(ctx, HTML, RAN.eNBIPAddress, RAN.eNBSourceCodePath, physim_options, physim_test, physim_threshold) + node = test.findtext('node') + success = cls_native.Native.Run_Physim(ctx, HTML, node, RAN.eNBSourceCodePath, physim_options, physim_test, physim_threshold) elif action == 'LicenceAndFormattingCheck': node = test.findtext('node') diff --git a/ci-scripts/xml_files/ldpc_gpu_test.xml b/ci-scripts/xml_files/ldpc_gpu_test.xml index bee9035c8b..00ccbe3da1 100644 --- a/ci-scripts/xml_files/ldpc_gpu_test.xml +++ b/ci-scripts/xml_files/ldpc_gpu_test.xml @@ -35,6 +35,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 3872 -s10 -n100 @@ -43,6 +44,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 3872 -s10 -n100 -G 1 @@ -51,6 +53,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 4224 -s10 -n100 @@ -59,6 +62,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 4224 -s10 -n100 -G 1 @@ -67,6 +71,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 4576 -s10 -n100 @@ -75,6 +80,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 4576 -s10 -n100 -G 1 @@ -83,6 +89,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 4928 -s10 -n100 @@ -91,6 +98,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 4928 -s10 -n100 -G 1 @@ -99,6 +107,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 5280 -s10 -n100 @@ -107,6 +116,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 5280 -s10 -n100 -G 1 @@ -115,6 +125,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 5632 -s10 -n100 @@ -123,6 +134,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 5632 -s10 -n100 -G 1 @@ -131,6 +143,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 6336 -s10 -n100 @@ -139,6 +152,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 6336 -s10 -n100 -G 1 @@ -147,6 +161,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 7040 -s10 -n100 @@ -155,6 +170,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 7040 -s10 -n100 -G 1 @@ -163,6 +179,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 7744 -s10 -n100 @@ -171,6 +188,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 7744 -s10 -n100 -G 1 @@ -179,6 +197,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 8448 -s10 -n100 @@ -187,6 +206,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 8448 -s10 -n100 -G 1 @@ -195,6 +215,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 1 -s10 -n100 @@ -203,6 +224,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 1 -s10 -n100 -G 1 @@ -211,6 +233,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 100 -s10 -n100 @@ -219,6 +242,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 100 -s10 -n100 -G 1 @@ -227,6 +251,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 193 -s10 -n100 @@ -235,6 +260,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 193 -s10 -n100 -G 1 @@ -243,6 +269,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 500 -s10 -n100 @@ -251,6 +278,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 500 -s10 -n100 -G 1 @@ -259,6 +287,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 561 -s10 -n100 @@ -267,6 +296,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 561 -s10 -n100 -G 1 @@ -275,6 +305,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 600 -s10 -n100 @@ -283,6 +314,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 600 -s10 -n100 -G 1 @@ -291,6 +323,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 641 -s10 -n100 @@ -299,6 +332,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 641 -s10 -n100 -G 1 @@ -307,6 +341,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 2000 -s10 -n100 @@ -315,6 +350,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 2000 -s10 -n100 -G 1 @@ -323,6 +359,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 3000 -s10 -n100 @@ -331,6 +368,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 3000 -s10 -n100 -G 1 @@ -339,6 +377,7 @@ Run_Physim Run LDPC Test with CPU true + caracal ldpctest -l 3840 -s10 -n100 @@ -347,6 +386,7 @@ Run_Physim Run LDPC Test with GPU true + caracal ldpctest -l 3840 -s10 -n100 -G 1 diff --git a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml index f82c54e8de..4a2daf0b97 100644 --- a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml +++ b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml @@ -51,6 +51,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer true + caracal nr_ulsim 300 -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P @@ -60,6 +61,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer true + caracal nr_ulsim 100 -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -69,6 +71,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer true + caracal nr_ulsim 300 -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P @@ -78,6 +81,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer true + caracal nr_ulsim 150 -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -87,6 +91,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer true + caracal nr_ulsim 250 -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P @@ -96,6 +101,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer true + caracal nr_ulsim 250 -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -105,6 +111,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer true + caracal nr_ulsim 300 -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P @@ -114,6 +121,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer true + caracal nr_ulsim 150 -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -123,6 +131,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer true + caracal nr_ulsim 400 -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P @@ -132,6 +141,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer true + caracal nr_ulsim 350 -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -141,6 +151,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer true + caracal nr_ulsim 400 -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P @@ -150,6 +161,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer true + caracal nr_ulsim 550 -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -159,6 +171,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers true + caracal nr_ulsim 300 -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P @@ -168,6 +181,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers true + caracal nr_ulsim 250 -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -177,6 +191,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers true + caracal nr_ulsim 600 -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P @@ -186,6 +201,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers true + caracal nr_ulsim 650 -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -195,6 +211,7 @@ Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers true + caracal nr_ulsim 650 -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P @@ -204,6 +221,7 @@ Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers true + caracal nr_ulsim 1100 -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 diff --git a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml index 9b7a84c51f..69dc27943c 100644 --- a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml +++ b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml @@ -52,6 +52,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer true + caracal nr_dlsim 230 -n1000 -s30 -S30.2 -e5 -b106 -R106 -X 8,9,10,11,12 -P @@ -61,6 +62,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer true + caracal nr_dlsim 100 -n1000 -s30 -S30.2 -e5 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -70,6 +72,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer true + caracal nr_dlsim 300 -n1000 -s30 -S30.2 -e15 -b106 -R106 -X 8,9,10,11,12 -P @@ -79,6 +82,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer true + caracal nr_dlsim 100 -n1000 -s30 -S30.2 -e15 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -88,6 +92,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer true + caracal nr_dlsim 350 -n1000 -s30 -S30.2 -e25 -b106 -R106 -X 8,9,10,11,12 -P @@ -97,6 +102,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer true + caracal nr_dlsim 200 -n1000 -s30 -S30.2 -e25 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -106,6 +112,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer true + caracal nr_dlsim 300 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -P @@ -115,6 +122,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer true + caracal nr_dlsim 150 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -124,6 +132,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer true + caracal nr_dlsim 350 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -P @@ -133,6 +142,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer true + caracal nr_dlsim 250 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -142,6 +152,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer true + caracal nr_dlsim 400 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P @@ -151,6 +162,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer true + caracal nr_dlsim 400 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -160,6 +172,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers true + caracal nr_dlsim 400 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P @@ -169,6 +182,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers true + caracal nr_dlsim 200 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -178,6 +192,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers true + caracal nr_dlsim 450 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P @@ -187,6 +202,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers true + caracal nr_dlsim 500 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -196,6 +212,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers true + caracal nr_dlsim 500 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P @@ -205,6 +222,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers true + caracal nr_dlsim 500 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -214,6 +232,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 400 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P @@ -223,6 +242,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 200 -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -232,6 +252,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 400 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P @@ -241,6 +262,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 300 -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 @@ -250,6 +272,7 @@ Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 450 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P @@ -259,6 +282,7 @@ Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas true + caracal nr_dlsim 450 -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1 From c4efe9feed59fe8299477902332c4d5e21ad24b5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 13:11:00 +0200 Subject: [PATCH 101/112] cls_containerize: yamlPath/services as normal string These variables were set as lists, to be indexed by the "server ID". Since this has been removed from all XMLs, it is not necessary anymore. --- ci-scripts/cls_containerize.py | 10 +++++----- ci-scripts/main.py | 8 ++------ ci-scripts/tests/deployment.py | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 282fe0f4a0..b45aed5d8d 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -247,8 +247,8 @@ class Containerize(): self.proxyCommit = None self.eNB_instance = 0 self.eNB_serverId = ['', '', ''] - self.yamlPath = ['', '', ''] - self.services = ['', '', ''] + self.yamlPath = '' + self.services = '' self.deploymentTag = '' self.cli = '' @@ -746,11 +746,11 @@ class Containerize(): num_attempts = self.num_attempts lSourcePath = self.eNBSourceCodePath logging.debug(f'Deploying OAI Object on server: {node}') - yaml = self.yamlPath[self.eNB_instance].strip('/') + yaml = self.yamlPath.strip('/') wd = f'{lSourcePath}/{yaml}' wd_yaml = f'{wd}/docker-compose.y*ml' with cls_cmd.getConnection(node) as ssh: - services = GetServices(ssh, self.services[self.eNB_instance], wd_yaml) + services = GetServices(ssh, self.services, wd_yaml) if services == [] or services == ' ' or services == None: msg = 'Cannot determine services to start' logging.error(msg) @@ -788,7 +788,7 @@ class Containerize(): def UndeployObject(self, ctx, node, HTML, RAN): lSourcePath = self.eNBSourceCodePath logging.debug(f'\u001B[1m Undeploying OAI Object from server: {node}\u001B[0m') - yaml = self.yamlPath[self.eNB_instance].strip('/') + yaml = self.yamlPath.strip('/') wd = f'{lSourcePath}/{yaml}' with cls_cmd.getConnection(node) as ssh: ExistEnvFilePrint(ssh, wd) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 90b5b7de90..76c3962437 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -285,18 +285,14 @@ def ExecuteActionWithParam(action, ctx): elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace": node = test.findtext('node') - string_field = test.findtext('yaml_path') - if (string_field is not None): - CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field + CONTAINERS.yamlPath = test.findtext('yaml_path') string_field=test.findtext('d_retx_th') if (string_field is not None): CONTAINERS.ran_checkers['d_retx_th'] = [float(x) for x in string_field.split(',')] string_field=test.findtext('u_retx_th') if (string_field is not None): CONTAINERS.ran_checkers['u_retx_th'] = [float(x) for x in string_field.split(',')] - string_field = test.findtext('services') - if string_field is not None: - CONTAINERS.services[CONTAINERS.eNB_instance] = string_field + CONTAINERS.services = test.findtext('services') CONTAINERS.num_attempts = int(test.findtext('num_attempts') or 1) CONTAINERS.deploymentTag = cls_containerize.CreateTag(CONTAINERS.ranCommitID, CONTAINERS.ranBranch, CONTAINERS.ranAllowMerge) if action == 'Deploy_Object': diff --git a/ci-scripts/tests/deployment.py b/ci-scripts/tests/deployment.py index 60c88f39a1..e7efc707bf 100644 --- a/ci-scripts/tests/deployment.py +++ b/ci-scripts/tests/deployment.py @@ -40,7 +40,7 @@ class TestDeploymentMethods(unittest.TestCase): self.ci = cls_oaicitest.OaiCiTest() self.cont = cls_containerize.Containerize() self.ran = ran.RANManagement() - self.cont.yamlPath[0] = '' + self.cont.yamlPath = '' self.cont.ranAllowMerge = True self.cont.ranBranch = '' self.cont.ranCommitID = '' @@ -53,7 +53,7 @@ class TestDeploymentMethods(unittest.TestCase): c.run(f'rm -rf {self.ctx.logPath}') def test_deploy(self): - self.cont.yamlPath[0] = 'tests/simple-dep/' + self.cont.yamlPath = 'tests/simple-dep/' self.cont.deploymentTag = "noble" deploy = self.cont.DeployObject(self.ctx, self.node, self.html) undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) @@ -63,7 +63,7 @@ class TestDeploymentMethods(unittest.TestCase): def test_deployfails(self): # fails reliably old = self.cont.yamlPath - self.cont.yamlPath[0] = 'tests/simple-fail/' + self.cont.yamlPath = 'tests/simple-fail/' deploy = self.cont.DeployObject(self.ctx, self.node, self.html) self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertFalse(deploy) @@ -72,15 +72,15 @@ class TestDeploymentMethods(unittest.TestCase): def test_deployfails_2svc(self): # fails reliably old = self.cont.yamlPath - self.cont.yamlPath[0] = 'tests/simple-fail-2svc/' + self.cont.yamlPath = 'tests/simple-fail-2svc/' deploy = self.cont.DeployObject(self.ctx, self.node, self.html) self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertFalse(deploy) self.cont.yamlPath = old def test_deploy_ran(self): - self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' - self.cont.services[0] = "oai-gnb" + self.cont.yamlPath = 'yaml_files/5g_rfsimulator_tdd_dora' + self.cont.services = "oai-gnb" self.cont.deploymentTag = 'develop-12345678' deploy = self.cont.DeployObject(self.ctx, self.node, self.html) undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) @@ -88,8 +88,8 @@ class TestDeploymentMethods(unittest.TestCase): self.assertTrue(undeploy) def test_deploy_multiran(self): - self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' - self.cont.services[0] = "oai-gnb oai-nr-ue" + self.cont.yamlPath = 'yaml_files/5g_rfsimulator_tdd_dora' + self.cont.services = "oai-gnb oai-nr-ue" self.cont.deploymentTag = 'develop-12345678' deploy = self.cont.DeployObject(self.ctx, self.node, self.html) undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) @@ -97,11 +97,11 @@ class TestDeploymentMethods(unittest.TestCase): self.assertTrue(undeploy) def test_deploy_staged(self): - self.cont.yamlPath[0] = 'yaml_files/5g_rfsimulator_tdd_dora' - self.cont.services[0] = "oai-gnb" + self.cont.yamlPath = 'yaml_files/5g_rfsimulator_tdd_dora' + self.cont.services = "oai-gnb" self.cont.deploymentTag = 'develop-12345678' deploy1 = self.cont.DeployObject(self.ctx, self.node, self.html) - self.cont.services[0] = "oai-nr-ue" + self.cont.services = "oai-nr-ue" deploy2 = self.cont.DeployObject(self.ctx, self.node, self.html) undeploy = self.cont.UndeployObject(self.ctx, self.node, self.html, self.ran) self.assertTrue(deploy1) From 45da9face4e2830ae13a022bfe464f27aa0beb59 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 14:35:42 +0200 Subject: [PATCH 102/112] Reimplement Initialize_eNB()/Terminate_eNB() Reimplement these functions by - using cls_cmd - retain only the necessary steps from the timing-phytest function - pass in ctx and node information, instead of server ID - remove all superfluous variables that don't seem to be used - make some lists (corresponding indices are "server ID") into normal variables. --- ci-scripts/main.py | 45 +-- ci-scripts/ran.py | 333 +++++------------- ci-scripts/xml_files/gnb_phytest_usrp_run.xml | 2 + .../gnb_phytest_usrp_run_100_2x2.xml | 2 + .../xml_files/gnb_phytest_usrp_run_60.xml | 2 + .../xml_files/gnb_phytest_usrp_run_60_2x2.xml | 2 + 6 files changed, 101 insertions(+), 285 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 76c3962437..6847e10950 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -126,53 +126,30 @@ def ExecuteActionWithParam(action, ctx): success = CONTAINERS.BuildRunTests(ctx, node, HTML) elif action == 'Initialize_eNB': + node = test.findtext('node') datalog_rt_stats_file=test.findtext('rt_stats_cfg') if datalog_rt_stats_file is None: RAN.datalog_rt_stats_file='datalog_rt_stats.default.yaml' else: RAN.datalog_rt_stats_file=datalog_rt_stats_file RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args') - eNB_instance=test.findtext('eNB_instance') - USRPIPAddress=test.findtext('USRP_IPAddress') - if USRPIPAddress is None: - RAN.USRPIPAddress='' - else: - RAN.USRPIPAddress=USRPIPAddress - if (eNB_instance is None): - RAN.eNB_instance=0 - else: - RAN.eNB_instance=int(eNB_instance) - eNB_serverId=test.findtext('eNB_serverId') - if (eNB_serverId is None): - RAN.eNB_serverId[RAN.eNB_instance]='0' - else: - RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId - + USRPIPAddress = test.findtext('USRP_IPAddress') or '' + #local variable air_interface air_interface = test.findtext('air_interface') if (air_interface is None) or (air_interface.lower() not in ['nr','lte']): - RAN.air_interface[RAN.eNB_instance] = 'lte-softmodem' + RAN.air_interface = 'lte-softmodem' else: - RAN.air_interface[RAN.eNB_instance] = air_interface.lower() +'-softmodem' + RAN.air_interface = air_interface.lower() +'-softmodem' cmd_prefix = test.findtext('cmd_prefix') if cmd_prefix is not None: RAN.cmd_prefix = cmd_prefix - success = RAN.InitializeeNB(HTML) + success = RAN.InitializeeNB(ctx, node, HTML) elif action == 'Terminate_eNB': - eNB_instance=test.findtext('eNB_instance') - if (eNB_instance is None): - RAN.eNB_instance=0 - else: - RAN.eNB_instance=int(eNB_instance) - eNB_serverId=test.findtext('eNB_serverId') - if (eNB_serverId is None): - RAN.eNB_serverId[RAN.eNB_instance]='0' - else: - RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId - + node = test.findtext('node') #retx checkers - string_field=test.findtext('d_retx_th') + string_field = test.findtext('d_retx_th') if (string_field is not None): RAN.ran_checkers['d_retx_th'] = [float(x) for x in string_field.split(',')] string_field=test.findtext('u_retx_th') @@ -182,10 +159,10 @@ def ExecuteActionWithParam(action, ctx): #local variable air_interface air_interface = test.findtext('air_interface') if (air_interface is None) or (air_interface.lower() not in ['nr','lte']): - RAN.air_interface[RAN.eNB_instance] = 'lte-softmodem' + RAN.air_interface = 'lte-softmodem' else: - RAN.air_interface[RAN.eNB_instance] = air_interface.lower() +'-softmodem' - success = RAN.TerminateeNB(ctx, HTML) + RAN.air_interface = air_interface.lower() +'-softmodem' + success = RAN.TerminateeNB(ctx, node, HTML) elif action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Terminate_UE' or action == 'CheckStatusUE' or action == 'DataEnable_UE' or action == 'DataDisable_UE': CiTestObj.ue_ids = test.findtext('id').split(' ') diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index c41fec09c6..1d96308c1d 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -43,7 +43,7 @@ import cls_cmd #----------------------------------------------------------- # OAI Testing modules #----------------------------------------------------------- -import sshconnection as SSH +import cls_cmd import helpreadme as HELP import constants as CONST from cls_ci_helper import archiveArtifact @@ -72,19 +72,13 @@ class RANManagement(): self.eNB2UserName = '' self.eNB2Password = '' self.eNB2SourceCodePath = '' - self.Build_eNB_args = '' - self.Build_eNB_forced_workspace_cleanup = False self.Initialize_eNB_args = '' self.imageKind = '' - self.air_interface = ['', '', ''] #changed from 'lte' to '' may lead to side effects in main - self.eNB_instance = 0 - self.eNB_serverId = ['', '', ''] - self.eNBLogFiles = ['', '', ''] + self.air_interface = '' self.eNBOptions = ['', '', ''] self.eNBmbmsEnables = [False, False, False] self.eNBstatuses = [-1, -1, -1] self.testCase_id = '' - self.epcPcapFile = '' self.runtime_stats= '' self.datalog_rt_stats={} self.datalog_rt_stats_file='datalog_rt_stats.default.yaml' @@ -100,261 +94,98 @@ class RANManagement(): # RAN management functions #----------------------------------------------------------- - def InitializeeNB(self, HTML): - if self.eNB_serverId[self.eNB_instance] == '0': - lIpAddr = self.eNBIPAddress - lUserName = self.eNBUserName - lPassWord = self.eNBPassword - lSourcePath = self.eNBSourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '1': - lIpAddr = self.eNB1IPAddress - lUserName = self.eNB1UserName - lPassWord = self.eNB1Password - lSourcePath = self.eNB1SourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '2': - lIpAddr = self.eNB2IPAddress - lUserName = self.eNB2UserName - lPassWord = self.eNB2Password - lSourcePath = self.eNB2SourceCodePath - if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - logging.debug('Starting eNB/gNB on server: ' + lIpAddr) + def InitializeeNB(self, ctx, node, HTML): + if not node: + raise ValueError(f"{node=}") + logging.debug('Starting eNB/gNB on server: ' + node) self.testCase_id = HTML.testCase_id - mySSH = SSH.SSHConnection() + lSourcePath = self.eNBSourceCodePath + cmd = cls_cmd.getConnection(node) - mySSH.open(lIpAddr, lUserName, lPassWord) - mySSH.command('cd ' + lSourcePath, '\$', 5) # Initialize_eNB_args usually start with -O and followed by the location in repository full_config_file = self.Initialize_eNB_args.replace('-O ','') extra_options = '' extIdx = full_config_file.find('.conf') - if (extIdx > 0): - extra_options = full_config_file[extIdx + 5:] - # if tracer options is on, compiling and running T Tracer - result = re.search('T_stdout', str(extra_options)) - if result is not None: - logging.debug('\u001B[1m Compiling and launching T Tracer\u001B[0m') - mySSH.command('cd common/utils/T/tracer', '\$', 5) - mySSH.command('make', '\$', 10) - mySSH.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', lUserName, 5) - mySSH.command('cd ' + lSourcePath, '\$', 5) - full_config_file = full_config_file[:extIdx + 5] - config_path, config_file = os.path.split(full_config_file) - else: - sys.exit('Insufficient Parameter') - ci_full_config_file = config_path + '/ci-' + config_file - rruCheck = False - result = re.search('^rru|^rcc|^du.band', str(config_file)) - if result is not None: - rruCheck = True - mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) - mySSH.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2); - mySSH.command('sed -i -e \'s/CI_GNB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2); - mySSH.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2); - mySSH.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2); - mySSH.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2); - mySSH.command('sed -i -e \'s/CI_FR1_CTL_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2); - self.eNBmbmsEnables[int(self.eNB_instance)] = False - mySSH.command('grep --colour=never enable_enb_m2 ' + ci_full_config_file, '\$', 2); - result = re.search('yes', mySSH.getBefore()) - if result is not None: - self.eNBmbmsEnables[int(self.eNB_instance)] = True - logging.debug('\u001B[1m MBMS is enabled on this eNB\u001B[0m') - result = re.search('noS1', str(self.Initialize_eNB_args)) - eNBinNoS1 = False - if result is not None: - eNBinNoS1 = True - logging.debug('\u001B[1m eNB is in noS1 configuration \u001B[0m') - # Launch eNB with the modified config file - mySSH.command('source oaienv', '\$', 5) - mySSH.command('cd cmake_targets', '\$', 5) - if self.air_interface[self.eNB_instance] == 'nr-softmodem': - mySSH.command('if [ -e rbconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm rbconfig.raw; fi', '\$', 5) - mySSH.command('if [ -e reconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm reconfig.raw; fi', '\$', 5) - # NOTE: WE SHALL do a check if the executable is present (in case build went wrong) + if (extIdx <= 0): + raise ValueError(f"no config file in {self.Initialize_eNB_args}") + extra_options = full_config_file[extIdx + 5:] + full_config_file = full_config_file[:extIdx + 5] + config_path, config_file = os.path.split(full_config_file) - #hack UHD_RFNOC_DIR variable for gNB / N310 on RHEL8 server: - #if the USRP address is in the xml then we are using an eth USRP (N3xx) - if self.air_interface[self.eNB_instance] == 'lte-softmodem': - gNB = False - else: - gNB = True - mySSH.command(f'echo "ulimit -c unlimited && {self.cmd_prefix} ./ran_build/build/{self.air_interface[self.eNB_instance]} -O {lSourcePath}/{ci_full_config_file} {extra_options}" > ./my-lte-softmodem-run{self.eNB_instance}.sh', '\$', 5) + logfile = f'{lSourcePath}/cmake_targets/enb.log' + cmd.cd(f"{lSourcePath}/cmake_targets/") # important: set wd so nrL1_stats.log etc are logged here + cmd.run(f'sudo -E stdbuf -o0 {self.cmd_prefix} {lSourcePath}/cmake_targets/ran_build/build/{self.air_interface} -O {lSourcePath}/{full_config_file} {extra_options} > {logfile} 2>&1 &') - mySSH.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) - mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5) - mySSH.command('echo $USER; nohup sudo -E stdbuf -o0 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log 2>&1 &', lUserName, 10) - - self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log' if extra_options != '': - self.eNBOptions[int(self.eNB_instance)] = extra_options - time.sleep(6) - doLoop = True - loopCounter = 20 + self.eNBOptions = extra_options + enbDidSync = False - while (doLoop): - loopCounter = loopCounter - 1 - if (loopCounter == 0): - # In case of T tracer recording, we may need to kill it - result = re.search('T_stdout', str(self.Initialize_eNB_args)) - if result is not None: - mySSH.command('killall --signal SIGKILL record', '\$', 5) - mySSH.close() - doLoop = False - logging.error('\u001B[1;37;41m eNB/gNB logging system did not show got sync! \u001B[0m') - HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK) - return False - else: - mySSH.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | grep -E --text --color=never -i "wait|sync|Starting|Started"', '\$', 4) - if rruCheck: - result = re.search('wait RUs', mySSH.getBefore()) - else: - result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore()) - if result is None: - time.sleep(6) - else: - doLoop = False - enbDidSync = True - time.sleep(10) - - rruCheck = False - result = re.search('^rru|^du.band', str(config_file)) - if result is not None: - rruCheck = True - if enbDidSync and eNBinNoS1 and not rruCheck: - mySSH.command('ifconfig oaitun_enb1', '\$', 4) - mySSH.command('ifconfig oaitun_enb1', '\$', 4) - result = re.search('inet addr:1|inet 1', mySSH.getBefore()) + for _ in range(10): + time.sleep(5) + ret = cmd.run(f'grep --text -E --color=never -i "wait|sync|Starting|Started" {logfile}', reportNonZero=False) + result = re.search('got sync|Starting F1AP at CU', ret.stdout) if result is not None: - logging.debug('\u001B[1m oaitun_enb1 interface is mounted and configured\u001B[0m') - else: - logging.error('\u001B[1m oaitun_enb1 interface is either NOT mounted or NOT configured\u001B[0m') - if self.eNBmbmsEnables[int(self.eNB_instance)]: - mySSH.command('ifconfig oaitun_enm1', '\$', 4) - result = re.search('inet addr', mySSH.getBefore()) - if result is not None: - logging.debug('\u001B[1m oaitun_enm1 interface is mounted and configured\u001B[0m') - else: - logging.error('\u001B[1m oaitun_enm1 interface is either NOT mounted or NOT configured\u001B[0m') + enbDidSync = True + break + if not enbDidSync: + cmd.run(f'sudo killall -9 {self.air_interface}') # in case it did not stop automatically + archiveArtifact(cmd, ctx, logfile) + + cmd.close() + + msg = f'{self.cmd_prefix} {self.air_interface} -O {config_file} {extra_options}' if enbDidSync: - self.eNBstatuses[int(self.eNB_instance)] = int(self.eNB_serverId[self.eNB_instance]) + logging.debug('\u001B[1m Initialize eNB/gNB Completed\u001B[0m') + HTML.CreateHtmlTestRowQueue(msg, 'OK', []) + else: + logging.error('\u001B[1;37;41m eNB/gNB logging system did not show got sync! \u001B[0m') + HTML.CreateHtmlTestRowQueue(msg, 'KO', []) - mySSH.close() - - HTML.CreateHtmlTestRow(f'{self.cmd_prefix} {self.air_interface[self.eNB_instance]} -O {config_file} {extra_options}', 'OK', CONST.ALL_PROCESSES_OK) - logging.debug('\u001B[1m Initialize eNB/gNB Completed\u001B[0m') return enbDidSync - def TerminateeNB(self, ctx, HTML): - if self.eNB_serverId[self.eNB_instance] == '0': - lIpAddr = self.eNBIPAddress - lUserName = self.eNBUserName - lPassWord = self.eNBPassword - lSourcePath = self.eNBSourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '1': - lIpAddr = self.eNB1IPAddress - lUserName = self.eNB1UserName - lPassWord = self.eNB1Password - lSourcePath = self.eNB1SourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '2': - lIpAddr = self.eNB2IPAddress - lUserName = self.eNB2UserName - lPassWord = self.eNB2Password - lSourcePath = self.eNB2SourceCodePath - if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - logging.debug('Stopping eNB/gNB on server: ' + lIpAddr) - mySSH = SSH.SSHConnection() - mySSH.open(lIpAddr, lUserName, lPassWord) - mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) - if self.air_interface[self.eNB_instance] == 'lte-softmodem': - nodeB_prefix = 'e' - else: - nodeB_prefix = 'g' - mySSH.command('stdbuf -o0 ps -aux | grep --color=never -e softmodem | grep -v grep', '\$', 5) - result = re.search('-softmodem', mySSH.getBefore()) + def TerminateeNB(self, ctx, node, HTML): + logging.debug('Stopping eNB/gNB on server: ' + node) + lSourcePath = self.eNBSourceCodePath + cmd = cls_cmd.getConnection(node) + ret = cmd.run('ps -aux | grep --color=never -e softmodem | grep -v grep') + result = re.search('-softmodem', ret.stdout) if result is not None: - mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGINT -r .*-softmodem || true', '\$', 5) - time.sleep(10) - mySSH.command('stdbuf -o0 ps -aux | grep --color=never -e softmodem | grep -v grep', '\$', 5) - result = re.search('-softmodem', mySSH.getBefore()) - if result is not None: - mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem || true', '\$', 5) - time.sleep(5) - mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) - #stopping tshark (valid if eNB and enabled in xml, will not harm otherwise) - logging.debug('\u001B[1m Stopping tshark on xNB \u001B[0m') - mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5) - time.sleep(1) - mySSH.close() - # if T tracer was run with option 0 (no logs), analyze logs - # from textlog, otherwise do normal analysis (e.g., option 2) - result = re.search('T_stdout 0', str(self.Initialize_eNB_args)) - if (result is not None): - logging.debug('\u001B[1m Replaying RAW record file\u001B[0m') - mySSH.open(lIpAddr, lUserName, lPassWord) - mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5) - enbLogFile = self.eNBLogFiles[int(self.eNB_instance)] - raw_record_file = enbLogFile.replace('.log', '_record.raw') - replay_log_file = enbLogFile.replace('.log', '_replay.log') - extracted_txt_file = enbLogFile.replace('.log', '_extracted_messages.txt') - extracted_log_file = enbLogFile.replace('.log', '_extracted_messages.log') - mySSH.command('./extract_config -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + extracted_txt_file, '\$', 5) - mySSH.command('echo $USER; nohup ./replay -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', lUserName, 5) - mySSH.command('./textlog -d ' + lSourcePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + lSourcePath + '/cmake_targets/' + extracted_log_file, '\$', 5) - mySSH.close() - mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + extracted_log_file, '.') - logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m') - logStatus = self.AnalyzeLogFile_eNB(extracted_log_file, HTML, self.ran_checkers) + cmd.run('sudo -S killall --signal SIGINT -r .*-softmodem') + time.sleep(6) + + ret = cmd.run('ps -aux | grep --color=never -e softmodem | grep -v grep') + result = re.search('-softmodem', ret.stdout) + if result is not None: + cmd.run('sudo -S killall --signal SIGKILL -r .*-softmodem') + time.sleep(5) + + # see InitializeeNB() + logfile = f'{lSourcePath}/cmake_targets/enb.log' + logdir = os.path.dirname(logfile) + + file = archiveArtifact(cmd, ctx, logfile) + archiveArtifact(cmd, ctx, f"{logdir}/nrL1_stats.log") + archiveArtifact(cmd, ctx, f"{logdir}/nrMAC_stats.log") + cmd.close() + if file is None: + logging.debug('\u001B[1;37;41m Could not copy xNB logfile to analyze it! \u001B[0m') + msg = 'Could not copy xNB logfile to analyze it!' + HTML.CreateHtmlTestRowQueue('N/A', 'KO', [msg]) + return False + + logging.debug('\u001B[1m Analyzing xNB logfile \u001B[0m ' + file) + logStatus = self.AnalyzeLogFile_eNB(file, HTML, self.ran_checkers) + if logStatus < 0: + HTML.CreateHtmlTestRow('N/A', 'KO', logStatus) + else: HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) - self.eNBLogFiles[int(self.eNB_instance)] = '' - return True - else: - analyzeFile = False - if self.eNBLogFiles[int(self.eNB_instance)] != '': - analyzeFile = True - fileToAnalyze = self.eNBLogFiles[int(self.eNB_instance)] - self.eNBLogFiles[int(self.eNB_instance)] = '' - if analyzeFile: - with cls_cmd.getConnection(lIpAddr) as cmd: - file = archiveArtifact(cmd, ctx, lSourcePath + '/cmake_targets/' + fileToAnalyze) - archiveArtifact(cmd, ctx, lSourcePath + '/cmake_targets/nrL1_stats.log') - archiveArtifact(cmd, ctx, lSourcePath + '/cmake_targets/nrMAC_stats.log') - if file is None: - logging.debug('\u001B[1;37;41m Could not copy ' + nodeB_prefix + 'NB logfile to analyze it! \u001B[0m') - HTML.htmleNBFailureMsg='Could not copy ' + nodeB_prefix + 'NB logfile to analyze it!' - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) - self.eNBmbmsEnables[int(self.eNB_instance)] = False - return False - if self.eNB_serverId[self.eNB_instance] != '0': - #*stats.log files + pickle + png - #debug / tentative - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrL1_stats.log', self.eNBSourceCodePath + '/cmake_targets/') - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrMAC_stats.log', self.eNBSourceCodePath + '/cmake_targets/') - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + fileToAnalyze, self.eNBSourceCodePath + '/cmake_targets/') - logging.debug('\u001B[1m Analyzing ' + nodeB_prefix + 'NB logfile \u001B[0m ' + file) - logStatus = self.AnalyzeLogFile_eNB(file, HTML, self.ran_checkers) - if (logStatus < 0): - HTML.CreateHtmlTestRow('N/A', 'KO', logStatus) - #display rt stats for gNB only - if len(self.datalog_rt_stats)!=0 and nodeB_prefix == 'g': - HTML.CreateHtmlDataLogTable(self.datalog_rt_stats) - self.eNBmbmsEnables[int(self.eNB_instance)] = False - return False - else: - HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) - else: - HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) #display rt stats for gNB only - if len(self.datalog_rt_stats)!=0 and nodeB_prefix == 'g': + if len(self.datalog_rt_stats) != 0: HTML.CreateHtmlDataLogTable(self.datalog_rt_stats) - self.eNBmbmsEnables[int(self.eNB_instance)] = False - self.eNBstatuses[int(self.eNB_instance)] = -1 - return True + + return logStatus >= 0 def LogCollecteNB(self): mySSH = SSH.SSHConnection() @@ -526,16 +357,16 @@ class RANManagement(): X2HO_state = CONST.X2_HO_REQ_STATE__IDLE X2HO_outNbProcedures += 1 - if self.eNBOptions[int(self.eNB_instance)] != '': - res1 = re.search('max_rxgain (?P[0-9]+)', self.eNBOptions[int(self.eNB_instance)]) + if self.eNBOptions[0] != '': + res1 = re.search('max_rxgain (?P[0-9]+)', self.eNBOptions[0]) res2 = re.search('max_rxgain (?P[0-9]+)', str(line)) if res1 is not None and res2 is not None: requested_option = int(res1.group('requested_option')) applied_option = int(res2.group('applied_option')) if requested_option == applied_option: - htmleNBFailureMsg += ' Command line option(s) correctly applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n' + htmleNBFailureMsg += ' Command line option(s) correctly applied ' + self.eNBOptions[0] + '\n\n' else: - htmleNBFailureMsg += ' Command line option(s) NOT applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n' + htmleNBFailureMsg += ' Command line option(s) NOT applied ' + self.eNBOptions[0] + '\n\n' result = re.search('Exiting OAI softmodem|Caught SIGTERM, shutting down', str(line)) if result is not None: exitSignalReceived = True @@ -622,7 +453,7 @@ class RANManagement(): result = re.search('dropping, not enough RBs', str(line)) if result is not None: dropNotEnoughRBs += 1 - if self.eNBmbmsEnables[int(self.eNB_instance)]: + if self.eNBmbmsEnables[0]: result = re.search('MBMS USER-PLANE.*Requesting.*bytes from RLC', str(line)) if result is not None: mbmsRequestMsg += 1 @@ -731,7 +562,7 @@ class RANManagement(): #post processing depending on the node type if not nodeB_prefix_found: - if self.air_interface[self.eNB_instance] == 'lte-softmodem': + if self.air_interface == 'lte-softmodem': nodeB_prefix = 'e' else: nodeB_prefix = 'g' @@ -935,7 +766,7 @@ class RANManagement(): rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected' logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') htmleNBFailureMsg += rrcMsg + '\n' - if self.eNBmbmsEnables[int(self.eNB_instance)]: + if self.eNBmbmsEnables[0]: if mbmsRequestMsg > 0: rrcMsg = 'eNB requested ' + str(mbmsRequestMsg) + ' times the RLC for MBMS USER-PLANE' logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') @@ -948,8 +779,8 @@ class RANManagement(): rrcMsg = 'eNB completed ' + str(X2HO_outNbProcedures) + ' X2 Handover Release procedure(s)' logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') htmleNBFailureMsg += rrcMsg + '\n' - if self.eNBOptions[int(self.eNB_instance)] != '': - res1 = re.search('drx_Config_present prSetup', self.eNBOptions[int(self.eNB_instance)]) + if self.eNBOptions[0] != '': + res1 = re.search('drx_Config_present prSetup', self.eNBOptions[0]) if res1 is not None: if cdrxActivationMessageCount > 0: rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)' diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml index 658d0b8c70..5adeb17966 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml @@ -45,6 +45,7 @@ Initialize_eNB Initialize gNB USRP + caracal -O ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 106 -t 23 -D 127 -m 28 -M 106 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time datalog_rt_stats.default.yaml NR @@ -63,6 +64,7 @@ Terminate_eNB true Terminate gNB + caracal NR diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml index 3a24805449..7821be863c 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml @@ -45,6 +45,7 @@ Initialize_eNB Initialize gNB USRP + caracal -O ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 273 -t 23 -D 127 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time datalog_rt_stats.100.2x2.yaml NR @@ -63,6 +64,7 @@ Terminate_eNB true Terminate gNB + caracal NR diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run_60.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run_60.xml index bececb210f..72e4b5244e 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run_60.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run_60.xml @@ -45,6 +45,7 @@ Initialize_eNB Initialize gNB USRP + caracal -O ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time datalog_rt_stats.1x1.60.yaml NR @@ -63,6 +64,7 @@ Terminate_eNB true Terminate gNB + caracal NR diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run_60_2x2.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run_60_2x2.xml index 503f0880a5..1be4a24477 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run_60_2x2.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run_60_2x2.xml @@ -45,6 +45,7 @@ Initialize_eNB Initialize gNB USRP + caracal -O ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf --phy-test --gNBs.[0].pdsch_AntennaPorts_XP 2 --RUs.[0].nb_tx 2 --RUs.[0].nb_rx 2 -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time datalog_rt_stats.60.2x2.yaml NR @@ -63,6 +64,7 @@ Terminate_eNB true Terminate gNB + caracal NR From dc27690c86f02d88db6b39f16b08e2b1a2679c4c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 15:03:50 +0200 Subject: [PATCH 103/112] LogCollecteNB() not used anymore Since 28ce0dc444fa2 ("Main: pass in ctx"), the CI always collects logs into cmake_targets/log/. Hence, LogCollecteNB() is never called. We can remove it. Further, change the cmake_targets/log/ to ci-log/, which is shorter, and append a / on the zip path to make sure that only contents is zipped. --- ci-scripts/main.py | 1 - ci-scripts/ran.py | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 6847e10950..6426b358ea 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -437,7 +437,6 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE): logging.error("Command '{}' returned non-zero exit status {}.".format(e.cmd, e.returncode)) logging.error("Error output:\n{}".format(e.output)) sys.exit(0) - RAN.LogCollecteNB() elif re.match('^LogCollectHSS$', mode, re.IGNORECASE): logging.warning("Option LogCollectHSS ignored") elif re.match('^LogCollectMME$', mode, re.IGNORECASE): diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 1d96308c1d..f56bbec42a 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -187,31 +187,6 @@ class RANManagement(): return logStatus >= 0 - def LogCollecteNB(self): - mySSH = SSH.SSHConnection() - # Copying back to xNB server any log from all the runs. - # Should also contains ping and iperf logs - absPath = os.path.abspath('.') - if absPath.count('ci-scripts') == 0: - os.chdir('./ci-scripts') - - for x in os.listdir(): - if x.endswith('.log') or x.endswith('.log.png'): - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, x, self.eNBSourceCodePath + '/cmake_targets/', silent=True, ignorePermDenied=True) - # Back to normal - mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) - mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) - mySSH.command('cd cmake_targets', '\$', 5) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip *.log enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 60) - result = re.search('core.\d+', mySSH.getBefore()) - if result is not None: - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip core* ran_build/build/{lte,nr}-softmodem', '\$', 60) # add core and executable to zip - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 15) - mySSH.close() - def _analyzeUeRetx(self, rounds, checkers, regex): if len(rounds) == 0 or len(checkers) == 0: logging.warning(f'warning: rounds={rounds} checkers={checkers}') From 0e60be785ca07d4dc42f962ac14aba21d0609ebc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 14:38:18 +0200 Subject: [PATCH 104/112] Remove SSH connection Remove this class. It is not safe to use (no return codes, can get out of sync), hardcodes the use of passwords, and it's API is cumbersone. More explanations can also be found in !1867. It is superseded by cls_cmd.py --- ci-scripts/sshconnection.py | 281 ------------------------------------ 1 file changed, 281 deletions(-) delete mode 100644 ci-scripts/sshconnection.py diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py deleted file mode 100644 index a41b8bf7f1..0000000000 --- a/ci-scripts/sshconnection.py +++ /dev/null @@ -1,281 +0,0 @@ -#/* -# * 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 -# */ -#--------------------------------------------------------------------- -# Python for CI of OAI-eNB + COTS-UE -# -# Required Python Version -# Python 3.x -# -# Required Python Package -# pexpect -#--------------------------------------------------------------------- - -#----------------------------------------------------------- -# Import -#----------------------------------------------------------- -import pexpect # pexpect -import logging -import time # sleep -import re -import subprocess -import sys - -#----------------------------------------------------------- -# Class Declaration -#----------------------------------------------------------- -class SSHConnection(): - def __init__(self): - self.ssh = '' - self.picocom_closure = False - self.ipaddress = '' - self.username = '' - self.cmd2Results = '' - - def disablePicocomClosure(self): - self.picocom_closure = False - - def enablePicocomClosure(self): - self.picocom_closure = True - - def open(self, ipaddress, username, password): - prompt = "\$" - count = 0 - connect_status = False - while count < 4: - self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=yes {}@{}'.format(username,ipaddress)) - # Longer timeout at connection due to asterix slowness - self.ssh.timeout = 25 - self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - self.ssh.sendline('yes') - self.sshresponse = self.ssh.expect(['password:', username + '@']) - if self.sshresponse == 0: - self.ssh.sendline(password) - self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - count = 10 - connect_status = True - else: - logging.warning('self.sshresponse = ' + str(self.sshresponse)) - elif self.sshresponse == 1: - self.ssh.sendline(password) - self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - count = 10 - connect_status = True - else: - logging.warning('self.sshresponse = ' + str(self.sshresponse)) - elif self.sshresponse == 2: - # We directly ended up on the remote server because of pubkey auth - count = 10 - connect_status = True - # this expect() seems to be necessary to advance the read buffer until the prompt, or getBefore() will not return the last command - self.sshresponse = self.ssh.expect([prompt]) - else: - # debug output - logging.warning(str(self.ssh.before)) - logging.warning('self.sshresponse = ' + str(self.sshresponse)) - # adding a tempo when failure - if not connect_status: - time.sleep(1) - count += 1 - if connect_status: - self.command('unset HISTFILE', prompt, 5, silent=True) - else: - raise ConnectionError('SSH Connection Failed') - self.ipaddress = ipaddress - self.username = username - - - - - def cde_check_value(self, commandline, expected, timeout): - logging.info(commandline) - self.ssh.timeout = timeout - self.ssh.sendline(commandline) - expected.append(pexpect.EOF) - expected.append(pexpect.TIMEOUT) - self.sshresponse = self.ssh.expect(expected) - return self.sshresponse - - def command(self, commandline, expectedline, timeout, silent=False, resync=False): - if not silent: - logging.info(commandline) - self.ssh.timeout = timeout - # Nasty patch when pexpect output is out of sync. - # Much pronounced when running back-to-back-back oc commands - if resync: - self.ssh.send(commandline) - self.ssh.expect([commandline, pexpect.TIMEOUT]) - self.ssh.send('\r\n') - self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) - else: - self.ssh.sendline(commandline) - self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - return 0 - elif self.sshresponse == 1: - logging.error('\u001B[1;37;41m Unexpected EOF \u001B[0m') - logging.error('Expected Line : ' + expectedline) - logging.error(str(self.ssh.before)) - raise ConnectionError(self.sshresponse) - elif self.sshresponse == 2: - logging.error('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m') - logging.error('Expected Line : ' + expectedline) - result = re.search('ping |iperf |picocom', str(commandline)) - if result is None: - logging.warning(str(self.ssh.before)) - raise ConnectionError(self.sshresponse) - else: - return -1 - else: - logging.error('\u001B[1;37;41m Unexpected Others \u001B[0m') - logging.error('Expected Line : ' + expectedline) - raise ConnectionError(self.sshresponse) - - def command2(self, commandline, timeout, silent=False): - if not silent: - logging.info(commandline) - self.cmd2Results = '' - noHistoryCmd = 'unset HISTFILE; ' + commandline - myHost = self.username + '@' + self.ipaddress - # CAUTION: THIS METHOD IMPLIES THAT THERE ARE VALID SSH KEYS - # BETWEEN THE PYTHON EXECUTOR NODE AND THE REMOTE HOST - # OTHERWISE IT WON'T WORK - lSsh = subprocess.Popen(["ssh", "%s" % myHost, noHistoryCmd],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) - self.cmd2Results = str(lSsh.stdout.readlines()) - - def command3(self, commandline, timeout, silent=False): - if not silent: - logging.info(commandline) - self.cmd2Results = '' - noHistoryCmd = 'unset HISTFILE; ' + commandline - myHost = self.username + '@' + self.ipaddress - # CAUTION: THIS METHOD IMPLIES THAT THERE ARE VALID SSH KEYS - # BETWEEN THE PYTHON EXECUTOR NODE AND THE REMOTE HOST - # OTHERWISE IT WON'T WORK - lSsh = subprocess.Popen(["ssh", "%s" % myHost, noHistoryCmd],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) - return lSsh.stdout.readlines() - - - def close(self): - self.ssh.timeout = 5 - self.ssh.sendline('exit') - self.sshresponse = self.ssh.expect([pexpect.EOF, pexpect.TIMEOUT]) - self.ipaddress = '' - self.username = '' - if self.sshresponse == 0: - pass - elif self.sshresponse == 1: - if not self.picocom_closure: - logging.warning('\u001B[1;37;41m Unexpected TIMEOUT during closing\u001B[0m') - else: - logging.warning('\u001B[1;37;41m Unexpected Others during closing\u001B[0m') - - def copyin(self, ipaddress, username, password, source, destination): - count = 0 - copy_status = False - logging.info('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination) - while count < 10: - scp_spawn = pexpect.spawn('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 100) - scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0: - scp_spawn.sendline('yes') - scp_spawn.expect('password:') - scp_spawn.sendline(password) - scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0: - count = 10 - copy_status = True - else: - logging.warning('1 - scp_response = ' + str(scp_response)) - elif scp_response == 1: - scp_spawn.sendline(password) - scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0 or scp_response == 3: - count = 10 - copy_status = True - else: - logging.warning('2 - scp_response = ' + str(scp_response)) - elif scp_response == 2: - count = 10 - copy_status = True - else: - logging.warning('3 - scp_response = ' + str(scp_response)) - # adding a tempo when failure - if not copy_status: - time.sleep(1) - count += 1 - if copy_status: - return 0 - else: - return -1 - - def copyout(self, ipaddress, username, password, source, destination, silent=False, ignorePermDenied=False): - count = 0 - copy_status = False - if not silent: - logging.info('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination) - while count < 4: - scp_spawn = pexpect.spawn('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100) - scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0: - scp_spawn.sendline('yes') - scp_spawn.expect('password:') - scp_spawn.sendline(password) - scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0: - count = 10 - copy_status = True - elif scp_response == 1 and ignorePermDenied: - logging.warning(f'copyout(): permission denied, not copying file ({source})') - count = 10 - copy_status = True - else: - logging.warning('1 - scp_response = ' + str(scp_response)) - elif scp_response == 1: - scp_spawn.sendline(password) - scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if scp_response == 0 or scp_response == 3: - count = 10 - copy_status = True - elif scp_response == 1 and ignorePermDenied: - logging.warning(f'copyout(): permission denied, not copying file ({source})') - count = 10 - copy_status = True - else: - logging.warning('2 - scp_response = ' + str(scp_response)) - elif scp_response == 2: - count = 10 - copy_status = True - else: - logging.warning('3 - scp_response = ' + str(scp_response)) - # adding a tempo when failure - if not copy_status: - time.sleep(1) - count += 1 - if copy_status: - pass - else: - raise ConnectionError('SCP failed') - - def getBefore(self): - return self.ssh.before.decode('utf-8') From 9e1cbb103507c5f3c570560fc88e9eaf581d2df2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 14:06:25 +0200 Subject: [PATCH 105/112] Ignore eNB{,1,2}{UserName,IPAddress,Password} parameters After having transitioned to direct node names in the XML, these parameters are not relevant anymore. The best way to view this patch is with git show --ignore-all-space --- ci-scripts/Jenkinsfile-cluster | 13 +---- ci-scripts/Jenkinsfile-nrue | 21 +------ ci-scripts/Jenkinsfile-physim-deploy | 11 +--- ci-scripts/Jenkinsfile-tmp-full-ran | 42 +++----------- ci-scripts/Jenkinsfile-tmp-multi-enb | 73 +++++------------------- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 68 +++++----------------- ci-scripts/Jenkinsfile-tmp-ran | 43 +++----------- ci-scripts/args_parse.py | 47 ++------------- ci-scripts/cls_containerize.py | 27 --------- ci-scripts/helpreadme.py | 5 +- ci-scripts/main.py | 8 +-- ci-scripts/ran.py | 11 ---- ci-scripts/run_locally.sh | 6 +- ci-scripts/tests/test-runner/run.sh | 3 - 14 files changed, 65 insertions(+), 313 deletions(-) diff --git a/ci-scripts/Jenkinsfile-cluster b/ci-scripts/Jenkinsfile-cluster index e91b27426e..174ccab62f 100644 --- a/ci-scripts/Jenkinsfile-cluster +++ b/ci-scripts/Jenkinsfile-cluster @@ -98,18 +98,10 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - if (params.eNB_IPAddress == null) { - echo "no eNB_IPAddress given" - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { echo "no eNB_SourceCodePath given" allParametersPresent = false } - if (params.eNB_Credentials == null) { - echo "no eNB_Credentials given" - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -188,7 +180,6 @@ pipeline { } } withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" @@ -196,7 +187,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -204,7 +195,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } diff --git a/ci-scripts/Jenkinsfile-nrue b/ci-scripts/Jenkinsfile-nrue index aed99b3568..3f7ef9b9ed 100644 --- a/ci-scripts/Jenkinsfile-nrue +++ b/ci-scripts/Jenkinsfile-nrue @@ -91,24 +91,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } - if (params.eNB1_IPAddress == null) { - allParametersPresent = false - } - if (params.eNB1_SourceCodePath == null) { - allParametersPresent = false - } - if (params.eNB1_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -187,8 +172,6 @@ pipeline { } } withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" @@ -197,7 +180,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -205,7 +188,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy index ffeff8685b..e3d243d07b 100644 --- a/ci-scripts/Jenkinsfile-physim-deploy +++ b/ci-scripts/Jenkinsfile-physim-deploy @@ -92,15 +92,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -179,7 +173,6 @@ pipeline { } } withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" @@ -188,7 +181,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -196,7 +189,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran index 3bc1d6ad8e..07b10ab980 100644 --- a/ci-scripts/Jenkinsfile-tmp-full-ran +++ b/ci-scripts/Jenkinsfile-tmp-full-ran @@ -91,15 +91,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -170,25 +164,21 @@ pipeline { } } } - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - ]) { - sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" - String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") - for (xmlFile in myXmlTestSuite) { + sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' buildStageStatus = false } } - } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } @@ -198,11 +188,7 @@ pipeline { stage('Terminate eNB') { steps { echo '\u2705 \u001B[32mTerminate eNB\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" - } + sh "python3 ci-scripts/main.py --mode=TerminateeNB" } post { success { @@ -218,15 +204,9 @@ pipeline { parallel { stage('Log Collection (eNB - Run)') { steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" + echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" - echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m' - sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true" - } script { if(fileExists("enb.log.${env.BUILD_ID}.zip")) { archiveArtifacts "enb.log.${env.BUILD_ID}.zip" @@ -262,11 +242,7 @@ pipeline { failure { script { if (!termStatusArray[termENB]) { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" - } + sh "python3 ci-scripts/main.py --mode=TerminateeNB" } } } diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb index 7c7397f30b..c01c8daf7e 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb @@ -81,36 +81,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - // 1st eNB parameters - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } - // 2nd eNB parameters - if (params.eNB1_IPAddress == null) { - allParametersPresent = false - } - if (params.eNB1_SourceCodePath == null) { - allParametersPresent = false - } - if (params.eNB1_Credentials == null) { - allParametersPresent = false - } - // 3rd eNB parameters - if (params.eNB2_IPAddress == null) { - allParametersPresent = false - } - if (params.eNB2_SourceCodePath == null) { - allParametersPresent = false - } - if (params.eNB2_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -181,27 +154,21 @@ pipeline { } } } - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], - ]) { - sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" - String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") - for (xmlFile in myXmlTestSuite) { - if (fileExists(xmlFile)) { - try { - timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}" - } - } catch (Exception e) { - currentBuild.result = 'FAILURE' - buildStageStatus = false - } + sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { + if (fileExists(xmlFile)) { + try { + timeout (time: 60, unit: 'MINUTES') { + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + buildStageStatus = false } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } @@ -211,11 +178,7 @@ pipeline { stage('Terminate eNB') { steps { echo '\u2705 \u001B[32mTerminate eNB\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" - } + sh "python3 ci-scripts/main.py --mode=TerminateeNB" } } } @@ -224,15 +187,9 @@ pipeline { parallel { stage('Log Collection (eNB - Run)') { steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" + echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" - echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m' - sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true" - } script { if(fileExists("enb.log.${env.BUILD_ID}.zip")) { archiveArtifacts "enb.log.${env.BUILD_ID}.zip" diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 89daaec8c1..67aa6b4511 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -83,36 +83,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - // 1st eNB parameters - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } - // 2nd eNB parameters - if (params.eNB1_IPAddress == null) { - allParametersPresent = false - } - if (params.eNB1_SourceCodePath == null) { - allParametersPresent = false - } - if (params.eNB1_Credentials == null) { - allParametersPresent = false - } - // 3rd eNB parameters - if (params.eNB2_IPAddress == null) { - allParametersPresent = false - } - if (params.eNB2_SourceCodePath == null) { - allParametersPresent = false - } - if (params.eNB2_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -183,27 +156,21 @@ pipeline { } } } - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], - ]) { - sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" - String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") - for (xmlFile in myXmlTestSuite) { - if (fileExists(xmlFile)) { - try { - timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}" - } - } catch (Exception e) { - currentBuild.result = 'FAILURE' - buildStageStatus = false - } + sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { + if (fileExists(xmlFile)) { + try { + timeout (time: 60, unit: 'MINUTES') { + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + buildStageStatus = false } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } @@ -212,15 +179,8 @@ pipeline { parallel { stage('Log Collection (eNB - Run)') { steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" - - echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m' - sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true" - } + echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" script { if(fileExists("enb.log.${env.BUILD_ID}.zip")) { archiveArtifacts "enb.log.${env.BUILD_ID}.zip" diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 82db6641e3..526899a5a2 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -96,15 +96,9 @@ pipeline { echo "no LockResources given" allParametersPresent = false } - if (params.eNB_IPAddress == null) { - allParametersPresent = false - } if (params.eNB_SourceCodePath == null) { allParametersPresent = false } - if (params.eNB_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -181,25 +175,21 @@ pipeline { } } } - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - ]) { - sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}" - String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") - for (xmlFile in myXmlTestSuite) { + sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}" + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' buildStageStatus = false } } - } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}" } } } @@ -209,11 +199,7 @@ pipeline { stage('Terminate eNB') { steps { echo '\u2705 \u001B[32mTerminate eNB\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" - } + sh "python3 ci-scripts/main.py --mode=TerminateeNB" } post { success { @@ -229,15 +215,8 @@ pipeline { parallel { stage('Log Collection (eNB - Run)') { steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" - - echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m' - sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true" - } + echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}" script { if(fileExists("enb.log.${env.BUILD_ID}.zip")) { archiveArtifacts "enb.log.${env.BUILD_ID}.zip" @@ -273,11 +252,7 @@ pipeline { failure { script { if (!termStatusArray[termENB]) { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" - } + sh "python3 ci-scripts/main.py --mode=TerminateeNB" } } } diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 11b27135a2..4953f049fb 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -121,44 +121,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): SCA.ranTargetBranch=matchReg.group(1) CLUSTER.ranTargetBranch=matchReg.group(1) elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE): - if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE) - RAN.eNBIPAddress=matchReg.group(1) - CONTAINERS.eNBIPAddress=matchReg.group(1) - elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB1IPAddress=matchReg.group(1) - CONTAINERS.eNB1IPAddress=matchReg.group(1) - elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB2IPAddress=matchReg.group(1) - CONTAINERS.eNB2IPAddress=matchReg.group(1) + print("parameters --eNB*IPAddress ignored") elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE): - if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE) - RAN.eNBUserName=matchReg.group(1) - CONTAINERS.eNBUserName=matchReg.group(1) - elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB1UserName=matchReg.group(1) - CONTAINERS.eNB1UserName=matchReg.group(1) - elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB2UserName=matchReg.group(1) - CONTAINERS.eNB2UserName=matchReg.group(1) + print("parameters --eNB*UserName ignored") elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE): - if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE) - RAN.eNBPassword=matchReg.group(1) - CONTAINERS.eNBPassword=matchReg.group(1) - elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB1Password=matchReg.group(1) - CONTAINERS.eNB1Password=matchReg.group(1) - elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB2Password=matchReg.group(1) - CONTAINERS.eNB2Password=matchReg.group(1) + print("parameter --eNB*Password ignored") elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE) @@ -167,13 +134,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): SCA.eNBSourceCodePath=matchReg.group(1) CLUSTER.eNBSourceCodePath=matchReg.group(1) elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB1SourceCodePath=matchReg.group(1) - CONTAINERS.eNB1SourceCodePath=matchReg.group(1) + print("parameter --eNB1SourceCodePath ignored") elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE) - RAN.eNB2SourceCodePath=matchReg.group(1) - CONTAINERS.eNB2SourceCodePath=matchReg.group(1) + print("parameter --eNB2SourceCodePath ignored") elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE) CiTestObj.testXMLfiles.append(matchReg.group(1)) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index b45aed5d8d..920f08f75c 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -230,23 +230,10 @@ class Containerize(): self.ranAllowMerge = False self.ranCommitID = '' self.ranTargetBranch = '' - self.eNBIPAddress = '' - self.eNBUserName = '' - self.eNBPassword = '' self.eNBSourceCodePath = '' - self.eNB1IPAddress = '' - self.eNB1UserName = '' - self.eNB1Password = '' - self.eNB1SourceCodePath = '' - self.eNB2IPAddress = '' - self.eNB2UserName = '' - self.eNB2Password = '' - self.eNB2SourceCodePath = '' self.forcedWorkspaceCleanup = False self.imageKind = '' self.proxyCommit = None - self.eNB_instance = 0 - self.eNB_serverId = ['', '', ''] self.yamlPath = '' self.services = '' self.deploymentTag = '' @@ -266,20 +253,6 @@ class Containerize(): # Container management functions #----------------------------------------------------------- - def GetCredentials(self, server_id): - if server_id == '0': - ip, path = self.eNBIPAddress, self.eNBSourceCodePath - elif server_id == '1': - ip, path = self.eNB1IPAddress, self.eNB1SourceCodePath - elif server_id == '2': - ip, path = self.eNB2IPAddress, self.eNB2SourceCodePath - else: - raise ValueError(f"unknown server ID '{server_id}'") - if ip == '' or path == '': - HELP.GenericHelp(CONST.Version) - raise ValueError(f'Insufficient Parameter: IP/node {ip}, path {path}') - return (ip, path) - def BuildImage(self, ctx, node, HTML): lSourcePath = self.eNBSourceCodePath logging.debug('Building on server: ' + node) diff --git a/ci-scripts/helpreadme.py b/ci-scripts/helpreadme.py index ce4c594f58..a9783bd1f0 100644 --- a/ci-scripts/helpreadme.py +++ b/ci-scripts/helpreadme.py @@ -52,10 +52,7 @@ def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch): print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow) print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch) -def eNBSrvHelp(ipaddr, username, password, sourcepath): - print(' --eNBIPAddress=[eNB\'s IP Address] -- ' + ipaddr) - print(' --eNBUserName=[eNB\'s Login User Name] -- ' + username) - print(' --eNBPassword=[eNB\'s Login Password] -- ' + password) +def eNBSrvHelp(sourcepath): print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath) def XmlHelp(filename): diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 6426b358ea..76fe64c2f6 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -425,7 +425,7 @@ elif re.match('^TerminateSPGW$', mode, re.IGNORECASE): elif re.match('^LogCollectBuild$', mode, re.IGNORECASE): logging.warning("Option LogCollectBuild ignored") elif re.match('^LogCollecteNB$', mode, re.IGNORECASE): - if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': + if RAN.eNBSourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') if os.path.isdir('cmake_targets/log'): @@ -481,12 +481,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m') if re.match('^TesteNB$', mode, re.IGNORECASE): - if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': + if RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBSourceCodePath == '': HELP.GenericHelp(CONST.Version) if RAN.ranRepository == '': HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch) - if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': - HELP.eNBSrvHelp(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath) + if RAN.eNBSourceCodePath == '': + HELP.eNBSrvHelp(RAN.eNBSourceCodePath) sys.exit('Insufficient Parameter') else: if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '': diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index f56bbec42a..49032f01e2 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -60,18 +60,7 @@ class RANManagement(): self.ranAllowMerge = False self.ranCommitID = '' self.ranTargetBranch = '' - self.eNBIPAddress = '' - self.eNBUserName = '' - self.eNBPassword = '' self.eNBSourceCodePath = '' - self.eNB1IPAddress = '' - self.eNB1UserName = '' - self.eNB1Password = '' - self.eNB1SourceCodePath = '' - self.eNB2IPAddress = '' - self.eNB2UserName = '' - self.eNB2Password = '' - self.eNB2SourceCodePath = '' self.Initialize_eNB_args = '' self.imageKind = '' self.air_interface = '' diff --git a/ci-scripts/run_locally.sh b/ci-scripts/run_locally.sh index 84fd6a6f17..1d4a73e919 100755 --- a/ci-scripts/run_locally.sh +++ b/ci-scripts/run_locally.sh @@ -33,13 +33,11 @@ python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_B python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \ --ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \ - --ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \ + --ranTargetBranch=NONE \ --eNBSourceCodePath=${REPO_PATH} \ --XMLTestFile=${TESTCASE} --local RET=$? -python3 main.py --mode=FinalizeHtml \ - --local \ - --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE +python3 main.py --mode=FinalizeHtml --local exit ${RET} diff --git a/ci-scripts/tests/test-runner/run.sh b/ci-scripts/tests/test-runner/run.sh index 9c02186a5f..55d421cdb0 100755 --- a/ci-scripts/tests/test-runner/run.sh +++ b/ci-scripts/tests/test-runner/run.sh @@ -22,9 +22,6 @@ python3 main.py \ --ranCommitID=${commit} \ --ranAllowMerge=true \ --ranTargetBranch=develop \ - --eNBIPAddress=localhost \ - --eNBUserName=NONE \ - --eNBPassword=NONE \ --eNBSourceCodePath=NONE \ --XMLTestFile=tests/test-runner/test.xml From 35f080e426c2df485d3ba4825426cf3b5ef4b815 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 17:39:07 +0200 Subject: [PATCH 106/112] Fix: new Iperf test need to get ctx --- ci-scripts/tests/ping-iperf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/tests/ping-iperf.py b/ci-scripts/tests/ping-iperf.py index f63ce323d6..bd30768a9f 100644 --- a/ci-scripts/tests/ping-iperf.py +++ b/ci-scripts/tests/ping-iperf.py @@ -77,7 +77,7 @@ class TestPingIperf(unittest.TestCase): self.ci.iperf_profile = "balanced" infra_file = "tests/config/infra_ping_iperf.yaml" # TODO Should need nothing but options and UE(s) to use - success = self.ci.Iperf(self.html, self.cont, infra_file=infra_file) + success = self.ci.Iperf(self.ctx, self.html, infra_file=infra_file) self.assertTrue(success) if __name__ == '__main__': From 3c54daf4e29070cd2ddb72541b8e3eaf9a9564d1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 11 Aug 2025 19:02:19 +0200 Subject: [PATCH 107/112] Remove "forcedWorkspaceCleanup" option It is superseded by the CreateWorkspace() function and task step (which removes and recreates a workspace), and this option was not actually used in any function except for the build of unit tests, but no XML step actually specified this option. --- ci-scripts/cls_cluster.py | 1 - ci-scripts/cls_containerize.py | 4 ---- ci-scripts/main.py | 8 -------- ci-scripts/xml_files/container_image_build.xml | 1 - ci-scripts/xml_files/container_image_build_cross.xml | 1 - ci-scripts/xml_files/container_l2sim_proxy.xml | 1 - ci-scripts/xml_files/gnb_usrp_build.xml | 1 - 7 files changed, 17 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 929dd29021..ae4e718ecf 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -70,7 +70,6 @@ def OC_logout(cmd): class Cluster: def __init__(self): self.eNBSourceCodePath = "" - self.forcedWorkspaceCleanup = False self.OCUserName = "" self.OCPassword = "" self.OCProjectName = "" diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 920f08f75c..b91b857521 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -231,7 +231,6 @@ class Containerize(): self.ranCommitID = '' self.ranTargetBranch = '' self.eNBSourceCodePath = '' - self.forcedWorkspaceCleanup = False self.imageKind = '' self.proxyCommit = None self.yamlPath = '' @@ -544,9 +543,6 @@ class Containerize(): raise Exception("Can build unit tests only on Ubuntu server") logging.debug('running on Ubuntu as expected') - if self.forcedWorkspaceCleanup: - cmd.run(f'sudo -S rm -Rf {lSourcePath}') - # check that ran-base image exists as we expect it baseImage = 'ran-base' baseTag = 'develop' diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 76fe64c2f6..cbc03a47d5 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -102,14 +102,6 @@ def ExecuteActionWithParam(action, ctx): if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy' or action == "Build_Cluster_Image" or action == "Build_Run_Tests": RAN.Build_eNB_args=test.findtext('Build_eNB_args') CONTAINERS.imageKind=test.findtext('kind') - forced_workspace_cleanup = test.findtext('forced_workspace_cleanup') - RAN.Build_eNB_forced_workspace_cleanup=False - CONTAINERS.forcedWorkspaceCleanup=False - CLUSTER.forcedWorkspaceCleanup = False - if forced_workspace_cleanup is not None and re.match('true', forced_workspace_cleanup, re.IGNORECASE): - RAN.Build_eNB_forced_workspace_cleanup = True - CONTAINERS.forcedWorkspaceCleanup = True - CLUSTER.forcedWorkspaceCleanup = True node = test.findtext('node') proxy_commit = test.findtext('proxy_commit') if proxy_commit is not None: diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index 33f29cf087..afd58d4d6d 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -41,7 +41,6 @@ Build all Images obelix all - True diff --git a/ci-scripts/xml_files/container_image_build_cross.xml b/ci-scripts/xml_files/container_image_build_cross.xml index ddaeac3602..ab94d847c8 100644 --- a/ci-scripts/xml_files/container_image_build_cross.xml +++ b/ci-scripts/xml_files/container_image_build_cross.xml @@ -39,7 +39,6 @@ Cross-Compile for ARM64 build_cross_arm64 alambix - True diff --git a/ci-scripts/xml_files/container_l2sim_proxy.xml b/ci-scripts/xml_files/container_l2sim_proxy.xml index 88026f077d..c2f19f9471 100644 --- a/ci-scripts/xml_files/container_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_l2sim_proxy.xml @@ -33,7 +33,6 @@ Build_Proxy Build L2sim Proxy Image localhost - True b64d9bce986b38ca59e8582864ade3fcdd05c0dc diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 4e763678a7..42d567cd15 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -43,7 +43,6 @@ Build gNB (USRP) caracal --gNB -w USRP --ninja -c -P --build-lib ldpc_cuda --build-lib ldpc_aal --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c - True From 852e98d3852bd0b3303f753407402e1db82a013e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Aug 2025 10:13:22 +0200 Subject: [PATCH 108/112] Run_Physim(): avoid large console logs, rewrite file Many of these tests exit with an exit code != 0. Thus, the CI automatically logs the result. Rather, write everything including stderr to the file for analysis. Also, rewrite the file with ">" instead of appending through ">>". While appending works because the CI removes files after archiving, it seems "cleaner" to remove files. --- ci-scripts/cls_native.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/cls_native.py b/ci-scripts/cls_native.py index 9546f93d28..1736cc144d 100644 --- a/ci-scripts/cls_native.py +++ b/ci-scripts/cls_native.py @@ -70,7 +70,7 @@ class Native(): workSpacePath = f'{directory}/cmake_targets' runLogFile=f'{workSpacePath}/physim.log' with cls_cmd.getConnection(host) as cmd: - cmd.run(f'sudo LD_LIBRARY_PATH=.:{DPDK_PATH}/lib64/ {workSpacePath}/ran_build/build/{physim_test} {options} >> {runLogFile}') + cmd.run(f'sudo LD_LIBRARY_PATH=.:{DPDK_PATH}/lib64/ {workSpacePath}/ran_build/build/{physim_test} {options} > {runLogFile} 2>&1') physim_file = archiveArtifact(cmd, ctx, runLogFile) success, msg = cls_analysis.Analysis.analyze_physim(physim_file, physim_test, options, threshold) if success: From c5624661eb3e8204ebad3d47dd48f0d51d6cc231 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Aug 2025 10:20:33 +0200 Subject: [PATCH 109/112] Remove HTML 'no analysis function' For some network functions, we don't match an analysis function. In the console logs we print an info message. In the HTML, it's just noise. --- ci-scripts/cls_containerize.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index b91b857521..bfb27e4548 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -214,7 +214,6 @@ def CheckLogs(self, filename, HTML, RAN): HTML.htmleNBFailureMsg = "" else: logging.info(f"Skipping analysis of log '{filename}': no submatch for xNB/UE") - HTML.CreateHtmlTestRowQueue(f"file {name}", 'OK', ["no analysis function"]) logging.debug(f"log check: file {filename} passed analysis {success}") return success From f82063c25231f0b507835d6ff6cbb0eb2a14f0f5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Aug 2025 10:37:49 +0200 Subject: [PATCH 110/112] CI: Sleep: print time to wait --- ci-scripts/cls_oaicitest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 37b0ca76a9..18631134c0 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -244,6 +244,7 @@ def Custom_Script(HTML, node, script): return status == 'OK' or status == 'Warning' def IdleSleep(HTML, idle_sleep_time): + logging.debug(f"sleep for {idle_sleep_time} seconds") time.sleep(idle_sleep_time) HTML.CreateHtmlTestRow(f"{idle_sleep_time} sec", 'OK', CONST.ALL_PROCESSES_OK) return True From b075c733f31dbe8c695fbbe1b2d8251206e0d8fd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Aug 2025 10:43:28 +0200 Subject: [PATCH 111/112] CI: correct log analysis filename interpolation A previous commit changed to use archiveArtifact() to recover CI logs, and then attempted to "guess" the L1/MAC stats file name through a regex. However, the format "enb-[0-9]+" is not correct, as archiveArtifact() puts the task ID ("[0-9]+") BEFORE the file name (here, "enb"). So, make it more generic and match the final "-enb.log" ("$" means "end of string"). Fixes: 244ea8fc220 ("Use archiveArtifact() for TerminateeNB()") --- ci-scripts/ran.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 49032f01e2..e440fc3a62 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -493,8 +493,8 @@ class RANManagement(): # nrL1_stats.log/nrMAC_stats.log should be in the same directory as main log file # currently the link is only implicit as below based on pattern matching # I will rework this to give the file explicitly - l1_stats_fn = re.sub(r'enb_[0-9]+', 'nrL1_stats', eNBlogFile) - mac_stats_fn = re.sub(r'enb_[0-9]+', 'nrMAC_stats', eNBlogFile) + l1_stats_fn = re.sub(r'-enb.log$', '-nrL1_stats.log', eNBlogFile) + mac_stats_fn = re.sub(r'-enb.log$', '-nrMAC_stats.log', eNBlogFile) if os.path.isfile(l1_stats_fn) and os.path.isfile(mac_stats_fn): # don't use CI-nrL1_stats.log, as this will increase the processing time for # no reason, we just need the last occurence From 5b8d66bbacadf4feac2b2bdf23f28f7a41898679 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Aug 2025 18:15:26 +0200 Subject: [PATCH 112/112] Write simple CI documentation and add sample script --- ci-scripts/README.md | 60 ++++++++++++ .../xml_files/container_5g_rfsim_simple.xml | 97 +++++++++++++++++++ doc/README.md | 2 + 3 files changed, 159 insertions(+) create mode 100644 ci-scripts/README.md create mode 100644 ci-scripts/xml_files/container_5g_rfsim_simple.xml diff --git a/ci-scripts/README.md b/ci-scripts/README.md new file mode 100644 index 0000000000..becd518e4c --- /dev/null +++ b/ci-scripts/README.md @@ -0,0 +1,60 @@ +This document outlines how to use the OAI CI framework and gives a quickstart. + +[[_TOC_]] + +# Quickstart + +There is a script `main.py` that + +- reads scenario files from XML +- executes the steps (e.g., deployment of CN/gNB/UE, attach, ping, ...) + +To simplify, a script `run_locally.sh` can be used to run a single scenario +locally. First, download images for gNB&UE (we assume you already downloaded +the CN) and tag them "latest", which is expected by `run_locally.sh`: + + docker pull oaisoftwarealliance/oai-gnb:develop + docker tag oaisoftwarealliance/oai-gnb:develop oai-gnb + docker pull oaisoftwarealliance/oai-nr-ue:develop + docker tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue + +Now, run the scenario: + + cd ~/openairinterface5g/ci-scripts/ + ./run_locally.sh xml_files/container_5g_rfsim_simple.xml + +Output should look like + +``` +[2025-08-07 18:07:49,631] INFO: ---------------------------------------- +[2025-08-07 18:07:49,631] INFO: Creating HTML header +[2025-08-07 18:07:49,631] INFO: ---------------------------------------- +[2025-08-07 18:07:49,766] INFO: ---------------------------------------- +[2025-08-07 18:07:49,767] INFO: Starting Scenario: xml_files/container_5g_rfsim_simple.xml +[2025-08-07 18:07:49,767] INFO: ---------------------------------------- +[2025-08-07 18:07:49,767] INFO: placing all artifacts for this run in /home/richie/oai/cmake_targets/log/container_5g_rfsim_simple.xml.d/ + +[...] + +[2025-08-07 18:07:49,771] INFO: ---------------------------------------- +[2025-08-07 18:07:49,771] INFO: Test ID: 1 (#1) +[2025-08-07 18:07:49,771] INFO: Deploy OAI 5G CoreNetwork +[2025-08-07 18:07:49,771] INFO: ---------------------------------------- +``` + +it will run an end-to-end test, connecting one UE to the gNB, and ping, before +undeploying. As shown, logs will be under +`/home/richie/oai/cmake_targets/log/container_5g_rfsim_simple.xml.d/`. The +python code also produces an HTML report in `ci-scripts/test_results.html`. + +# Running with local changes + +In order to run the tests as above, with local changes, please [build images +locally](../docker/README.md). + +It is not yet possible to override an existing image with changes made locally +to a source file and run it directly through the CI framework. However, it is +possible to override an existing image with local changes, and run the scenario +manually following the console logs steps provided above. This is described in +the [5G RFsimulator +README](yaml_files/5g_rfsimulator/README.md#6-running-with-local-changes). diff --git a/ci-scripts/xml_files/container_5g_rfsim_simple.xml b/ci-scripts/xml_files/container_5g_rfsim_simple.xml new file mode 100644 index 0000000000..738ce1a077 --- /dev/null +++ b/ci-scripts/xml_files/container_5g_rfsim_simple.xml @@ -0,0 +1,97 @@ + + + rfsim-5gnr-tdd + Monolithic SA TDD gNB + wrench + + 000001 + 000002 + 000003 + 000008 + 020001 + 444444 + 100001 + + + + + Deploy_Object + Deploy OAI 5G CoreNetwork + localhost + ci-scripts/yaml_files/5g_rfsimulator + mysql oai-amf oai-smf oai-upf oai-ext-dn + + + + Deploy_Object + Deploy OAI 5G gNB RF sim SA + localhost + ci-scripts/yaml_files/5g_rfsimulator + oai-gnb + + + + Deploy_Object + Deploy OAI 5G NR-UE RF sim SA + localhost + ci-scripts/yaml_files/5g_rfsimulator + oai-nr-ue + + + + Attach_UE + Attach OAI UE (Wait for IP) + rfsim5g_ue + localhost + + + + Ping + Ping ext-dn from NR-UE + rfsim5g_ue + localhost + rfsim5g_ext_dn + localhost + -c 20 -i 0.25 + 5 + + + + Detach_UE + Detach OAI UE 1 + rfsim5g_ue + localhost + + + + Undeploy_Object + true + Undeploy all OAI 5G stack + localhost + ci-scripts/yaml_files/5g_rfsimulator + 1,0,0,0 + 1,0,0,0 + + + diff --git a/doc/README.md b/doc/README.md index 40f838750a..226592ac60 100644 --- a/doc/README.md +++ b/doc/README.md @@ -133,6 +133,8 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs. - Component tests are under `tests/`. Currently, there is a simple CU-UP tester, see the corresponding [README.md](../tests/nr-cuup/README.md). - [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines +- The CI setup uses a [custom framework](../ci-scripts/README.md) to run + end-to-end tests. # Developer tools