Move UL_INFO structure allocation local to a rx slot processing
Use UL_INFO on the stack, to simplify the code. move in the same struct the associated rach, pdu, crc, srs arrays that where pointed from directly in gNB structure Keep in nfapi the existing logic that make malloc for theses rach, pdu, crc, srs array lists Pass only relevant fields, where appropriate. Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
committed by
Robert Schmidt
co-authored by
Robert Schmidt
parent
f9bff3d6a0
commit
b4bc7c96ba
@@ -182,24 +182,25 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "This is the slot_ind queue size %ld in %s():%d\n",
|
||||
gnb_slot_ind_queue.num_items, __FUNCTION__, __LINE__);
|
||||
if (slot_ind) {
|
||||
gNB->UL_INFO.frame = slot_ind->sfn;
|
||||
gNB->UL_INFO.slot = slot_ind->slot;
|
||||
NR_UL_IND_t UL_INFO = {.frame = slot_ind->sfn, .slot = slot_ind->slot};
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "gNB->UL_INFO.frame = %d and slot %d, prev_slot = %d\n",
|
||||
gNB->UL_INFO.frame, gNB->UL_INFO.slot, prev_slot);
|
||||
if (setup_done && prev_slot != gNB->UL_INFO.slot) { //Give the VNF sufficient time to setup before starting scheduling && prev_slot != gNB->UL_INFO.slot
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "UL_INFO.frame = %d and slot %d, prev_slot = %d\n", UL_INFO.frame, UL_INFO.slot, prev_slot);
|
||||
if (setup_done && prev_slot != UL_INFO.slot) { // Give the VNF sufficient time to setup before starting scheduling &&
|
||||
// prev_slot != UL_INFO.slot
|
||||
|
||||
//Call the scheduler
|
||||
gNB->UL_INFO.module_id = gNB->Mod_id;
|
||||
gNB->UL_INFO.CC_id = gNB->CC_id;
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d\n",
|
||||
gNB->UL_INFO.frame, gNB->UL_INFO.slot);
|
||||
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
||||
prev_slot = gNB->UL_INFO.slot;
|
||||
}
|
||||
free(slot_ind);
|
||||
slot_ind = NULL;
|
||||
}
|
||||
// Call the scheduler
|
||||
UL_INFO.module_id = gNB->Mod_id;
|
||||
UL_INFO.CC_id = gNB->CC_id;
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG,
|
||||
"Calling NR_UL_indication for UL_INFO.frame = %d and slot %d\n",
|
||||
UL_INFO.frame,
|
||||
UL_INFO.slot);
|
||||
gNB->if_inst->NR_UL_indication(&UL_INFO);
|
||||
prev_slot = UL_INFO.slot;
|
||||
}
|
||||
free(slot_ind);
|
||||
slot_ind = NULL;
|
||||
}
|
||||
|
||||
selectRetval = pselect(maxSock+1, &rfds, NULL, NULL, &pselect_timeout, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user