Remove usage of emulate_l1 flag at gNB
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode runs L1, or not. Correspondingly, add an assert to check this invariant. In the NR_IF_module, the correct check to do is for VNF (implying no L1, or "emulation of L1" [which is not true]), in which case we use queues.
This commit is contained in:
@@ -327,7 +327,13 @@ void *nrL1_stats_thread(void *param) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_gNB_Tpool(int inst) {
|
void init_gNB_Tpool(int inst)
|
||||||
|
{
|
||||||
|
AssertFatal(NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MONOLITHIC,
|
||||||
|
"illegal NFAPI_MODE %d (%s): it cannot have an L1\n",
|
||||||
|
NFAPI_MODE,
|
||||||
|
nfapi_get_strmode());
|
||||||
|
|
||||||
PHY_VARS_gNB *gNB;
|
PHY_VARS_gNB *gNB;
|
||||||
gNB = RC.gNB[inst];
|
gNB = RC.gNB[inst];
|
||||||
gNB_L1_proc_t *proc = &gNB->proc;
|
gNB_L1_proc_t *proc = &gNB->proc;
|
||||||
@@ -360,8 +366,7 @@ void init_gNB_Tpool(int inst) {
|
|||||||
// this will be removed when the msgDataTx is not necessary anymore
|
// this will be removed when the msgDataTx is not necessary anymore
|
||||||
gNB->msgDataTx = msgDataTx;
|
gNB->msgDataTx = msgDataTx;
|
||||||
|
|
||||||
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS) && (NFAPI_MODE != NFAPI_MODE_VNF)
|
if (!IS_SOFTMODEM_NOSTATS)
|
||||||
&& (NFAPI_MODE != NFAPI_MODE_AERIAL))
|
|
||||||
threadCreate(&proc->L1_stats_thread, nrL1_stats_thread, (void *)gNB, "L1_stats", -1, OAI_PRIORITY_RT_LOW);
|
threadCreate(&proc->L1_stats_thread, nrL1_stats_thread, (void *)gNB, "L1_stats", -1, OAI_PRIORITY_RT_LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,8 +385,7 @@ void term_gNB_Tpool(int inst) {
|
|||||||
abortNotifiedFIFO(&gNB->L1_rx_out);
|
abortNotifiedFIFO(&gNB->L1_rx_out);
|
||||||
|
|
||||||
gNB_L1_proc_t *proc = &gNB->proc;
|
gNB_L1_proc_t *proc = &gNB->proc;
|
||||||
if (!get_softmodem_params()->emulate_l1)
|
pthread_join(proc->L1_stats_thread, NULL);
|
||||||
pthread_join(proc->L1_stats_thread, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// eNB kept in function name for nffapi calls, TO FIX
|
/// eNB kept in function name for nffapi calls, TO FIX
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
nfapi_nr_uci_indication_t *uci_ind = NULL;
|
nfapi_nr_uci_indication_t *uci_ind = NULL;
|
||||||
nfapi_nr_rx_data_indication_t *rx_ind = NULL;
|
nfapi_nr_rx_data_indication_t *rx_ind = NULL;
|
||||||
nfapi_nr_crc_indication_t *crc_ind = NULL;
|
nfapi_nr_crc_indication_t *crc_ind = NULL;
|
||||||
if (get_softmodem_params()->emulate_l1 || NFAPI_MODE == NFAPI_MODE_AERIAL)
|
if (NFAPI_MODE == NFAPI_MODE_VNF || NFAPI_MODE == NFAPI_MODE_AERIAL)
|
||||||
{
|
{
|
||||||
if (gnb_rach_ind_queue.num_items > 0) {
|
if (gnb_rach_ind_queue.num_items > 0) {
|
||||||
LOG_D(NR_MAC, "gnb_rach_ind_queue size = %zu\n", gnb_rach_ind_queue.num_items);
|
LOG_D(NR_MAC, "gnb_rach_ind_queue size = %zu\n", gnb_rach_ind_queue.num_items);
|
||||||
@@ -493,7 +493,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
handle_nr_ulsch(UL_info);
|
handle_nr_ulsch(UL_info);
|
||||||
handle_nr_srs(UL_info);
|
handle_nr_srs(UL_info);
|
||||||
|
|
||||||
if (get_softmodem_params()->emulate_l1 || NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
if (NFAPI_MODE == NFAPI_MODE_VNF || NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
||||||
free_unqueued_nfapi_indications(rach_ind, uci_ind, rx_ind, crc_ind);
|
free_unqueued_nfapi_indications(rach_ind, uci_ind, rx_ind, crc_ind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user