Updated AssertFatal conditions and LOG level from I to D

Regarding dl_hard, some AssertFatal commented out.
Regarding to memory allocation error, AssertFatal was used.
This commit is contained in:
David Kim
2021-07-30 08:35:57 -07:00
parent 61aa4f99dd
commit dd73b2df87
11 changed files with 34 additions and 67 deletions
@@ -488,7 +488,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) {
NR_RA_t *ra = &cc->ra[i];
LOG_I(MAC,
LOG_D(MAC,
"[gNB %d][RAPROC] CC_id %d Frame %d, Slot %d Checking all rnti : preamble index %d, rnti %x\n",
module_idP,
CC_id,
@@ -721,6 +721,12 @@ void nr_schedule_ue_spec(module_id_t module_id,
if (current_harq_pid < 0) {
/* PP has not selected a specific HARQ Process, get a new one */
current_harq_pid = sched_ctrl->available_dl_harq.head;
//TODO:: Need to remove this if condition after debug.
if (current_harq_pid < 0)
{
LOG_D(MAC,"no free dl HARQ process available for UE %d\n",UE_id);
return;
}
AssertFatal(current_harq_pid >= 0,
"no free HARQ process available for UE %d\n",
UE_id);
@@ -1452,7 +1452,7 @@ int extract_length(int startSymbolAndLength) {
void dump_nr_list(NR_list_t *listP)
{
for (int j = listP->head; j >= 0; j = listP->next[j])
LOG_T(MAC, "NR list node %d => %d\n", j, listP->next[j]);
LOG_I(MAC, "NR list node %d => %d\n", j, listP->next[j]);
}
/*
@@ -525,6 +525,7 @@ int nr_acknack_scheduling(int mod_id,
if (pucch->dai_c > 0 && pucch->frame == frame) {
/* this UE already has a PUCCH occasion */
DevAssert(pucch->frame == frame);
// Find the right timing_indicator value.
int i = 0;
while (i < 8) {
@@ -298,9 +298,6 @@ void nr_process_mac_pdu(
if (pdu_len < 0) {
LOG_E(MAC, "%s() residual mac pdu length < 0!, pdu_len: %d\n", __func__, pdu_len);
LOG_E(MAC, "MAC PDU ");
//for (int i = 0; i < 20; i++) // Only printf 1st - 20nd bytes
// printf("%02x ", pdu_ptr[i]);
//printf("\n");
return;
}
}
@@ -487,7 +484,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
NR_RA_t *ra = &gNB_mac->common_channels[CC_idP].ra[i];
if (ra->state != WAIT_Msg3 || ra->rnti == 0)
{
LOG_I(NR_MAC, "Notice ra->state = %d (if it is 2, it is WAIT_Msg3. Else we continue), ra->rnti %x\n", ra->state, ra->rnti);
LOG_D(NR_MAC, "Notice ra->state = %d (if it is 2, it is WAIT_Msg3. Else we continue), ra->rnti %x\n", ra->state, ra->rnti);
continue;
}
+7 -8
View File
@@ -185,13 +185,12 @@ static bool crc_sfn_slot_matcher(void *wanted, void *candidate)
void handle_nr_ulsch(NR_UL_IND_t *UL_info)
{
if (gnb_rx_ind_queue.num_items == 0 || gnb_crc_ind_queue.num_items == 0)
return;
LOG_I(NR_MAC, "gnb_rx_ind_queue size and gnb_crc_ind_queue size = %zu and %zu\n",
gnb_rx_ind_queue.num_items,
gnb_crc_ind_queue.num_items
);
nfapi_nr_rx_data_indication_t *rx_ind = get_queue(&gnb_rx_ind_queue);
if (!rx_ind)
{
LOG_D(NR_PHY, "No rx data indication (empty gnb_rx_ind_queue)\n");
return;
}
int sfn_slot = NFAPI_SFNSLOT2HEX(rx_ind->sfn, rx_ind->slot);
nfapi_nr_crc_indication_t *crc_ind = unqueue_matching(&gnb_crc_ind_queue,
@@ -200,7 +199,7 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
&sfn_slot);
if (!crc_ind)
{
LOG_I(NR_PHY, "No crc indication with the same SFN SLOT of rx indication %u %u\n", rx_ind->sfn, rx_ind->slot);
LOG_D(NR_PHY, "No crc indication with the same SFN SLOT of rx indication %u %u\n", rx_ind->sfn, rx_ind->slot);
requeue(&gnb_rx_ind_queue, rx_ind);
return;
}
@@ -234,7 +233,7 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
if (crc->rnti != rx->rnti)
{
LOG_I(NR_MAC, "mis-match between CRC rnti %04x and RX rnit %04x\n", crc->rnti, rx->rnti);
LOG_D(NR_MAC, "mis-match between CRC rnti %04x and RX rnit %04x\n", crc->rnti, rx->rnti);
continue;
}
+2 -2
View File
@@ -287,7 +287,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
if (tx_data_request->Slot == 7) { //Melissa this means we have an RAR, sorta hacky though
if( get_mac_inst(dl_info->module_id)->crnti == get_mac_inst(dl_info->module_id)->ra.t_crnti )
{ LOG_I(MAC, "Discarding tx_data_requested since it includes useless RAR.\n");
{ LOG_D(MAC, "Discarding tx_data_requested since it includes useless RAR.\n");
continue;
}
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR;
@@ -590,7 +590,7 @@ void *nrue_standalone_pnf_task(void *context)
if (!put_queue(&nr_sfn_slot_queue, &sfn_slot_pool[sfn_slot_id]))
{
LOG_I(NR_MAC, "put_queue failed for sfn slot.\n");
LOG_D(NR_MAC, "put_queue failed for sfn slot.\n");
}
LOG_D(NR_MAC, "We have successfully queued snf slot %d.%d, with id %u, qsize %zu\n",
sfn_slot_pool[sfn_slot_id]>> 6, sfn_slot_pool[sfn_slot_id] & 0x3F,
+1 -1
View File
@@ -165,4 +165,4 @@ void *unqueue_matching(queue_t *q, size_t max_depth, queue_matcher_t *matcher, v
pthread_mutex_unlock(&q->mutex);
return item;
}
}