Unqueueing UL_TTI_REQs based on active harq sfn sf
Also fixed some silly spelling errors.
This commit is contained in:
+15
-3
@@ -257,14 +257,17 @@ static bool sfn_slot_matcher(void *wanted, void *candidate)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void process_queued_nr_nfapi_msgs(int sfn_slot)
|
||||
static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
|
||||
{
|
||||
nfapi_nr_rach_indication_t *rach_ind = unqueue_matching(&nr_rach_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_rx_data_indication_t *rx_ind = unqueue_matching(&nr_rx_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_crc_indication_t *crc_ind = unqueue_matching(&nr_crc_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_dl_tti_request_t *dl_tti_request = get_queue(&nr_dl_tti_req_queue);
|
||||
nfapi_nr_ul_dci_request_t *ul_dci_request = get_queue(&nr_ul_dci_req_queue);
|
||||
nfapi_nr_ul_tti_request_t *ul_tti_request = get_queue(&nr_ul_tti_req_queue);
|
||||
|
||||
LOG_D(NR_MAC, "Try to get a ul_tti_req for sfn/slot %d %d from queue with %d items\n",
|
||||
NFAPI_SFNSLOT2SFN(mac->active_harq_sfn_sf),NFAPI_SFNSLOT2SLOT(mac->active_harq_sfn_sf), nr_ul_tti_req_queue.num_items);
|
||||
nfapi_nr_ul_tti_request_t *ul_tti_request = unqueue_matching(&nr_ul_tti_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &mac->active_harq_sfn_sf);
|
||||
|
||||
if (rach_ind && rach_ind->number_of_pdus > 0)
|
||||
{
|
||||
@@ -318,6 +321,11 @@ static void process_queued_nr_nfapi_msgs(int sfn_slot)
|
||||
save_nr_measurement_info(dl_tti_request);
|
||||
check_and_process_dci(dl_tti_request, tx_data_request, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
AssertFatal(false, "We dont have PDUs in either dl_tti %d or tx_req %d\n",
|
||||
dl_tti_request->dl_tti_request_body.nPDUs, tx_data_request->Number_of_PDUs);
|
||||
}
|
||||
}
|
||||
if (ul_dci_request && ul_dci_request->numPdus > 0)
|
||||
{
|
||||
@@ -373,6 +381,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
reset_queue(&nr_rx_ind_queue);
|
||||
reset_queue(&nr_crc_ind_queue);
|
||||
reset_queue(&nr_uci_ind_queue);
|
||||
reset_queue(&nr_dl_tti_req_queue);
|
||||
reset_queue(&nr_tx_req_queue);
|
||||
reset_queue(&nr_ul_dci_req_queue);
|
||||
reset_queue(&nr_ul_tti_req_queue);
|
||||
|
||||
NR_PRACH_RESOURCES_t prach_resources;
|
||||
memset(&prach_resources, 0, sizeof(prach_resources));
|
||||
@@ -452,7 +464,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
nr_ue_ul_indication(&ul_info);
|
||||
check_nr_prach(mac, &ul_info, &prach_resources);
|
||||
}
|
||||
process_queued_nr_nfapi_msgs(sfn_slot);
|
||||
process_queued_nr_nfapi_msgs(mac, sfn_slot);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -437,6 +437,7 @@ typedef struct {
|
||||
|
||||
bool expected_dci;
|
||||
bool index_has_dci[16];
|
||||
int active_harq_sfn_sf;
|
||||
|
||||
pthread_mutex_t mutex_dl_info;
|
||||
|
||||
|
||||
@@ -1283,8 +1283,10 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
|
||||
// FIXME k0 != 0 currently not taken into consideration
|
||||
current_harq->dl_frame = frame;
|
||||
current_harq->dl_slot = slot;
|
||||
mac->active_harq_sfn_sf = NFAPI_SFNSLOT2HEX(frame, (slot + data_toul_fb));
|
||||
|
||||
LOG_D(PHY,"Setting harq_status for harq_id %d, dl %d.%d\n",harq_id,frame,slot);
|
||||
LOG_D(NR_PHY,"Setting harq_status for harq_id %d, dl %d.%d, sched ul %d.%d\n",
|
||||
harq_id, frame, slot, frame, (slot + data_toul_fb));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
|
||||
}
|
||||
assert(ue_tx_sock_descriptor == -1);
|
||||
ue_tx_sock_descriptor = sd;
|
||||
LOG_D(NR_RRC, "Sucessfully set up tx_socket in %s.\n", __FUNCTION__);
|
||||
LOG_D(NR_RRC, "Successfully set up tx_socket in %s.\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -119,7 +119,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
|
||||
}
|
||||
assert(ue_rx_sock_descriptor == -1);
|
||||
ue_rx_sock_descriptor = sd;
|
||||
LOG_D(NR_RRC, "Sucessfully set up rx_socket in %s.\n", __FUNCTION__);
|
||||
LOG_D(NR_RRC, "Successfully set up rx_socket in %s.\n", __FUNCTION__);
|
||||
}
|
||||
LOG_I(NR_RRC, "NRUE standalone socket info: tx_port %d rx_port %d on %s.\n",
|
||||
tx_port, rx_port, stub_eth_params.remote_addr);
|
||||
@@ -745,7 +745,7 @@ void *nrue_standalone_pnf_task(void *context)
|
||||
int slot = 0;
|
||||
|
||||
|
||||
LOG_I(NR_RRC, "Sucessfully started %s.\n", __FUNCTION__);
|
||||
LOG_I(NR_RRC, "Successfully started %s.\n", __FUNCTION__);
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user