diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index d19d2db597..6bc5a736de 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -244,13 +244,13 @@ void oai_create_gnb(void) { if (RC.gNB == NULL) { RC.gNB = (PHY_VARS_gNB **) calloc(1, sizeof(PHY_VARS_gNB *)); - LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB); + LOG_D(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB); } if (RC.gNB[0] == NULL) { RC.gNB[0] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB)); - LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]); + LOG_D(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]); } PHY_VARS_gNB *gNB = RC.gNB[0]; @@ -491,7 +491,7 @@ int wake_gNB_rxtx(PHY_VARS_gNB *gNB, uint16_t sfn, uint16_t slot) { L1_proc->frame_tx = (L1_proc->slot_rx > (19-slot_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx; L1_proc->slot_tx = (L1_proc->slot_rx + slot_ahead)%20; - //LOG_I(PHY, "sfn/sf:%d%d proc[rx:%d%d] rx:%d%d] About to wake rxtx thread\n\n", sfn, slot, proc->frame_rx, proc->slot_rx, L1_proc->frame_rx, L1_proc->slot_rx); + //LOG_D(PHY, "sfn/sf:%d%d proc[rx:%d%d] rx:%d%d] About to wake rxtx thread\n\n", sfn, slot, proc->frame_rx, proc->slot_rx, L1_proc->frame_rx, L1_proc->slot_rx); //NFAPI_TRACE(NFAPI_TRACE_INFO, "\nEntering wake_gNB_rxtx sfn %d slot %d\n",L1_proc->frame_rx,L1_proc->slot_rx); // the thread can now be woken up if (pthread_cond_signal(&L1_proc->cond) != 0) { @@ -757,7 +757,7 @@ int phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind) int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { - LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n", + LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n", __FUNCTION__,ind->sfn, ind->slot, ind->num_ucis); if(NFAPI_MODE == NFAPI_MODE_VNF) { @@ -950,7 +950,7 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_ int phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { - LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n", + LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n", __FUNCTION__,ind->sfn, ind->slot, ind->number_crcs); if(NFAPI_MODE == NFAPI_MODE_VNF) @@ -973,7 +973,7 @@ int phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { crc_ind->crc_list[j].tb_crc_status = ind->crc_list[j].tb_crc_status; crc_ind->crc_list[j].timing_advance = ind->crc_list[j].timing_advance; crc_ind->crc_list[j].ul_cqi = ind->crc_list[j].ul_cqi; - LOG_I(NR_MAC, "Received crc_ind.harq_id = %d for %d index SFN SLot %u %u with rnti %x\n", + LOG_D(NR_MAC, "Received crc_ind.harq_id = %d for %d index SFN SLot %u %u with rnti %x\n", ind->crc_list[j].harq_id, j, ind->sfn, ind->slot, ind->crc_list[j].rnti); } if (!put_queue(&gnb_crc_ind_queue, crc_ind)) @@ -1069,7 +1069,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t int phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { - LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u, and pdu %p\n", + LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u, and pdu %p\n", __FUNCTION__,ind->sfn, ind->slot, ind->number_of_pdus, ind->pdu_list[0].pdu); if(NFAPI_MODE == NFAPI_MODE_VNF) @@ -1171,7 +1171,7 @@ static void analyze_cqi_pdus_for_duplicates(nfapi_cqi_indication_t *ind) { nfapi_cqi_indication_pdu_t *src_pdu = &ind->cqi_indication_body.cqi_pdu_list[i]; - LOG_I(MAC, "CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n", i, src_pdu->rx_ue_information.rnti, + LOG_D(MAC, "CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n", i, src_pdu->rx_ue_information.rnti, src_pdu->ul_cqi_information.ul_cqi, src_pdu->ul_cqi_information.channel); for (int j = i + 1; j < num_cqis; j++) @@ -1893,7 +1893,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! dl_config_req->header.message_id = NFAPI_DL_CONFIG_REQUEST; - LOG_I(PHY, "[VNF] %s() DL_CONFIG_REQ sfn_sf:%d_%d number_of_pdus:%d\n", __FUNCTION__, + LOG_D(PHY, "[VNF] %s() DL_CONFIG_REQ sfn_sf:%d_%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),NFAPI_SFNSF2SF(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdu); if (dl_config_req->dl_config_request_body.number_pdu > 0) { @@ -1904,7 +1904,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { { uint16_t dl_rnti = dl_config_req->dl_config_request_body.dl_config_pdu_list[i].dlsch_pdu.dlsch_pdu_rel8.rnti; uint16_t numPDUs = dl_config_req->dl_config_request_body.number_pdu; - LOG_I(MAC, "(OAI eNB) Sending dl_config_req at VNF during Frame: %d and Subframe: %d," + LOG_D(MAC, "(OAI eNB) Sending dl_config_req at VNF during Frame: %d and Subframe: %d," " with a RNTI value of: %x and with number of PDUs: %u\n", NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),NFAPI_SFNSF2SF(dl_config_req->sfn_sf), dl_rnti, numPDUs); } @@ -2062,7 +2062,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { { uint8_t pdu_type = pdu_list[i].pdu_type; - LOG_I(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n", + LOG_D(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n", num_pdus, i, pdu_type, ul_config_req->sfn_sf >> 4, ul_config_req->sfn_sf & 15); if (pdu_type != NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 5f2f0e88ca..9bdaabd00b 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -117,7 +117,7 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response "Too many ul_config pdus %d", ul_config->number_pdus); for (int i = 0; i < ul_config->number_pdus; ++i) { - LOG_I(NR_PHY, "In %s: processing type %d PDU of %d total UL PDUs (ul_config %p) \n", + LOG_D(NR_PHY, "In %s: processing type %d PDU of %d total UL PDUs (ul_config %p) \n", __FUNCTION__, ul_config->ul_config_list[i].pdu_type, ul_config->number_pdus, ul_config); uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type; @@ -218,7 +218,7 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response uci_ind->uci_list = CALLOC(uci_ind->num_ucis, sizeof(*uci_ind->uci_list)); for (int j = 0; j < uci_ind->num_ucis; j++) { - LOG_I(NR_MAC, "ul_config->ul_config_list[%d].pucch_config_pdu.n_bit = %d\n", i, ul_config->ul_config_list[i].pucch_config_pdu.n_bit); + LOG_D(NR_MAC, "ul_config->ul_config_list[%d].pucch_config_pdu.n_bit = %d\n", i, ul_config->ul_config_list[i].pucch_config_pdu.n_bit); if (ul_config->ul_config_list[i].pucch_config_pdu.n_bit > 3 && mac->nr_ue_emul_l1.num_csi_reports > 0) { uci_ind->uci_list[j].pdu_type = NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE; @@ -265,7 +265,7 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response } } - LOG_I(NR_PHY, "Sending UCI with %d PDUs in sfn.slot %d/%d\n", + LOG_D(NR_PHY, "Sending UCI with %d PDUs in sfn.slot %d/%d\n", uci_ind->num_ucis, uci_ind->sfn, uci_ind->slot); NR_UL_IND_t ul_info = { .uci_ind = *uci_ind, @@ -276,7 +276,7 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response } default: - LOG_I(NR_MAC, "Unknown ul_config->pdu_type %d\n", pdu_type); + LOG_W(NR_MAC, "Unknown ul_config->pdu_type %d\n", pdu_type); break; } } diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 780fd42989..e998125e04 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -87,9 +87,6 @@ PHY_VARS_NR_UE *UE; RAN_CONTEXT_t RC; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -/* dummy constant */ -NR_UE_RRC_INST_t *NR_UE_rrc_inst; - double cpuf; char *uecap_file; diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index bc4f4a0b60..f255ab5337 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -223,6 +223,8 @@ nrUE_params_t *get_nrUE_params(void) { return &nrUE_params; } +nr_bler_struct nr_bler_data[NR_NUM_MCS]; + void processSlotTX(void *arg) {} int main(int argc, char **argv){ diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 6efd423419..0144d0c0d3 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -93,9 +93,6 @@ THREAD_STRUCT thread_struct; nfapi_ue_release_request_body_t release_rntis; uint32_t N_RB_DL = 106; -/* dummy constant */ -NR_UE_RRC_INST_t *NR_UE_rrc_inst; - //Fixme: Uniq dirty DU instance, by global var, datamodel need better management instance_t DUuniqInstance=0; instance_t CUuniqInstance=0; diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 2dd7e0cb27..3db2770af8 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -109,7 +109,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, "Successfully set up tx_socket in %s.\n", __FUNCTION__); + LOG_T(NR_RRC, "Successfully set up tx_socket in %s.\n", __FUNCTION__); } { @@ -135,9 +135,9 @@ 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, "Successfully set up rx_socket in %s.\n", __FUNCTION__); + LOG_T(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", + LOG_D(NR_RRC, "NRUE standalone socket info: tx_port %d rx_port %d on %s.\n", tx_port, rx_port, stub_eth_params.remote_addr); } @@ -148,7 +148,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: { char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE]; - LOG_D(NR_MAC, "RACH header id :%d\n", UL_INFO->rach_ind.header.message_id); + LOG_T(NR_MAC, "RACH header id :%d\n", UL_INFO->rach_ind.header.message_id); int encoded_size = nfapi_nr_p7_message_pack(&UL_INFO->rach_ind, buffer, sizeof(buffer), NULL); if (encoded_size <= 0) { @@ -156,7 +156,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) return; } - LOG_I(NR_MAC, "NR_RACH_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, + LOG_D(NR_MAC, "NR_RACH_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, UL_INFO->rach_ind.sfn, UL_INFO->rach_ind.slot, UL_INFO->rach_ind.number_of_pdus); if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0) { @@ -168,7 +168,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: { char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE]; - LOG_D(NR_MAC, "RX header id :%d\n", UL_INFO->rx_ind.header.message_id); + LOG_T(NR_MAC, "RX header id :%d\n", UL_INFO->rx_ind.header.message_id); int encoded_size = nfapi_nr_p7_message_pack(&UL_INFO->rx_ind, buffer, sizeof(buffer), NULL); if (encoded_size <= 0) { @@ -176,7 +176,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) return; } - LOG_I(NR_MAC, "NR_RX_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, + LOG_D(NR_MAC, "NR_RX_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, UL_INFO->rx_ind.sfn, UL_INFO->rx_ind.slot, UL_INFO->rx_ind.number_of_pdus); if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0) { @@ -188,7 +188,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: { char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE]; - LOG_D(NR_MAC, "CRC header id :%d\n", UL_INFO->crc_ind.header.message_id); + LOG_T(NR_MAC, "CRC header id :%d\n", UL_INFO->crc_ind.header.message_id); int encoded_size = nfapi_nr_p7_message_pack(&UL_INFO->crc_ind, buffer, sizeof(buffer), NULL); if (encoded_size <= 0) { @@ -196,7 +196,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) return; } - LOG_I(NR_MAC, "NR_CRC_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, + LOG_D(NR_MAC, "NR_CRC_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, UL_INFO->crc_ind.sfn, UL_INFO->crc_ind.slot, UL_INFO->crc_ind.number_crcs); if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0) { @@ -208,7 +208,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION: { char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE]; - LOG_I(NR_MAC, "UCI header id :%d\n", UL_INFO->uci_ind.header.message_id); + LOG_D(NR_MAC, "UCI header id :%d\n", UL_INFO->uci_ind.header.message_id); int encoded_size = nfapi_nr_p7_message_pack(&UL_INFO->uci_ind, buffer, sizeof(buffer), NULL); if (encoded_size <= 0) { @@ -216,7 +216,7 @@ void send_nsa_standalone_msg(NR_UL_IND_t *UL_INFO, uint16_t msg_id) return; } - LOG_I(NR_MAC, "NR_UCI_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, + LOG_D(NR_MAC, "NR_UCI_IND sent to Proxy, Size: %d Frame %d Slot %d Num PDUS %d\n", encoded_size, UL_INFO->uci_ind.sfn, UL_INFO->uci_ind.slot, UL_INFO->uci_ind.num_ucis); if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0) { @@ -298,11 +298,11 @@ bool sfn_slot_matcher(void *wanted, void *candidate) static void fill_dl_info_with_pdcch(fapi_nr_dci_indication_t *dci, nfapi_nr_dl_dci_pdu_t *rx_dci, int idx) { int num_bytes = (rx_dci->PayloadSizeBits + 7) / 8; - LOG_I(NR_PHY, "[%d, %d] PDCCH DCI (Payload) for rnti %x with PayloadSizeBits %d, num_bytes %d\n", + LOG_D(NR_PHY, "[%d, %d] PDCCH DCI (Payload) for rnti %x with PayloadSizeBits %d, num_bytes %d\n", dci->SFN, dci->slot, rx_dci->RNTI, rx_dci->PayloadSizeBits, num_bytes); for (int k = 0; k < num_bytes; k++) { - LOG_I(NR_MAC, "PDCCH DCI PDU payload[%d] = %d\n", k, rx_dci->Payload[k]); + LOG_D(NR_MAC, "PDCCH DCI PDU payload[%d] = %d\n", k, rx_dci->Payload[k]); dci->dci_list[idx].payloadBits[k] = rx_dci->Payload[k]; } dci->dci_list[idx].payloadSize = rx_dci->PayloadSizeBits; @@ -318,7 +318,7 @@ static void fill_mib_in_rx_ind(nfapi_nr_dl_tti_request_pdu_t *pdu_list, fapi_nr_ "pdu_index (%d) is greater than rx_indication_body size!\n", pdu_idx); AssertFatal(pdu_idx == rx_ind->number_pdus, "Invalid pdu_idx %d!\n", pdu_idx); - LOG_D(NR_MAC, "Recevied an SSB and are filling rx_ind with the MIB!\n"); + LOG_T(NR_MAC, "Recevied an SSB and are filling rx_ind with the MIB!\n"); nfapi_nr_dl_tti_ssb_pdu_rel15_t *ssb_pdu = &pdu_list->ssb_pdu.ssb_pdu_rel15; rx_ind->rx_indication_body[pdu_idx].ssb_pdu.cell_id = ssb_pdu->PhysCellId; @@ -387,13 +387,13 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_ nfapi_nr_dl_tti_request_pdu_t *pdu_list = &dl_tti_request->dl_tti_request_body.dl_tti_pdu_list[i]; if (pdu_list->PDUType == NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE) { - LOG_I(NR_PHY, "[%d, %d] PDSCH PDU for rnti %x\n", + LOG_D(NR_PHY, "[%d, %d] PDSCH PDU for rnti %x\n", dl_tti_request->SFN, dl_tti_request->Slot, pdu_list->pdsch_pdu.pdsch_pdu_rel15.rnti); } if (pdu_list->PDUType == NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE) { - LOG_I(NR_PHY, "[%d, %d] PDCCH DCI PDU (Format for incoming PDSCH PDU)\n", + LOG_D(NR_PHY, "[%d, %d] PDCCH DCI PDU (Format for incoming PDSCH PDU)\n", dl_tti_request->SFN, dl_tti_request->Slot); uint16_t num_dcis = pdu_list->pdcch_pdu.pdcch_pdu_rel15.numDlDci; if (num_dcis > 0) @@ -418,19 +418,19 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_ { mac->nr_ue_emul_l1.expected_sib = true; mac->nr_ue_emul_l1.index_has_sib[j] = true; - LOG_D(NR_MAC, "Setting index_has_sib[%d] = true\n", j); + LOG_T(NR_MAC, "Setting index_has_sib[%d] = true\n", j); } else if (dci_pdu_list->RNTI == mac->ra.ra_rnti) { mac->nr_ue_emul_l1.expected_rar = true; mac->nr_ue_emul_l1.index_has_rar[j] = true; - LOG_D(NR_MAC, "Setting index_has_rar[%d] = true\n", j); + LOG_T(NR_MAC, "Setting index_has_rar[%d] = true\n", j); } else { mac->nr_ue_emul_l1.expected_dci = true; mac->nr_ue_emul_l1.index_has_dci[j] = true; - LOG_D(NR_MAC, "Setting index_has_dci[%d] = true\n", j); + LOG_T(NR_MAC, "Setting index_has_dci[%d] = true\n", j); } pdu_idx++; } @@ -471,7 +471,7 @@ static void fill_rx_ind(nfapi_nr_pdu_t *pdu_list, fapi_nr_rx_indication_t *rx_in { length += pdu_list->TLVs[j].length; } - LOG_I(NR_PHY, "%s: num_tlv %d and length %d, pdu index %d\n", + LOG_D(NR_PHY, "%s: num_tlv %d and length %d, pdu index %d\n", __FUNCTION__, pdu_list->num_TLV, length, pdu_idx); uint8_t *pdu = malloc(length); AssertFatal(pdu != NULL, "%s: Out of memory in malloc", __FUNCTION__); @@ -537,7 +537,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi } else { - LOG_D(NR_MAC, "mac->nr_ue_emul_l1.index_has_dci[%d] = 0, so this index contained a DCI for a different UE\n", i); + LOG_T(NR_MAC, "mac->nr_ue_emul_l1.index_has_dci[%d] = 0, so this index contained a DCI for a different UE\n", i); } } @@ -558,7 +558,7 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n { nfapi_nr_ul_dci_request_pdus_t *pdu_list = &ul_dci_req->ul_dci_pdu_list[i]; AssertFatal(pdu_list->PDUType == 0, "ul_dci_req pdu type != PUCCH"); - LOG_I(NR_PHY, "[%d %d] PUCCH PDU in ul_dci for rnti %x and numDLDCI = %d\n", + LOG_D(NR_PHY, "[%d %d] PUCCH PDU in ul_dci for rnti %x and numDLDCI = %d\n", ul_dci_req->SFN, ul_dci_req->Slot, pdu_list->pdcch_pdu.pdcch_pdu_rel15.dci_pdu->RNTI, pdu_list->pdcch_pdu.pdcch_pdu_rel15.numDlDci); uint16_t num_dci = pdu_list->pdcch_pdu.pdcch_pdu_rel15.numDlDci; @@ -577,7 +577,7 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n nfapi_nr_dl_dci_pdu_t *dci_pdu_list = &pdu_list->pdcch_pdu.pdcch_pdu_rel15.dci_pdu[j]; if (dci_pdu_list->RNTI != mac->crnti) { - LOG_D(NR_MAC, "dci_pdu_list->RNTI (%x) != mac->crnti (%x)\n", dci_pdu_list->RNTI, mac->crnti); + LOG_T(NR_MAC, "dci_pdu_list->RNTI (%x) != mac->crnti (%x)\n", dci_pdu_list->RNTI, mac->crnti); continue; } fill_dl_info_with_pdcch(dl_info->dci_ind, dci_pdu_list, pdu_idx); @@ -601,7 +601,7 @@ static bool send_crc_ind_and_rx_ind(int sfn_slot) NR_UE_MAC_INST_t *mac = get_mac_inst(0); for (int i = 0; i < crc_ind->number_crcs; i++) { int harq_pid = crc_ind->crc_list[i].harq_id; - LOG_D(NR_MAC, "Resetting harq_pid %d active_ul_harq_sfn_slot\n", harq_pid); + LOG_T(NR_MAC, "Resetting harq_pid %d active_ul_harq_sfn_slot\n", harq_pid); mac->nr_ue_emul_l1.harq[harq_pid].active_ul_harq_sfn_slot = -1; } NR_UL_IND_t UL_INFO = { @@ -636,7 +636,7 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n "Too many pdus %d in ul_tti_req\n", num_pdus); if (!send_crc_ind_and_rx_ind(sfn_slot)) { - LOG_D(NR_MAC, "CRC_RX ind not sent\n"); + LOG_T(NR_MAC, "CRC_RX ind not sent\n"); if (!put_queue(&nr_ul_tti_req_queue, ul_tti_req)) { LOG_E(NR_PHY, "put_queue failed for ul_tti_req.\n"); @@ -659,13 +659,13 @@ static void fill_dci_from_dl_config(nr_downlink_indication_t*dl_ind, fapi_nr_dl_ "Too many dl_config pdus %d", dl_config->number_pdus); for (int i = 0; i < dl_config->number_pdus; i++) { - LOG_I(PHY, "In %s: filling DCI with a total of %d total DL PDUs (dl_config %p) \n", + LOG_D(PHY, "In %s: filling DCI with a total of %d total DL PDUs (dl_config %p) \n", __FUNCTION__, dl_config->number_pdus, dl_config); fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15_dci = &dl_config->dl_config_list[i].dci_config_pdu.dci_config_rel15; int num_dci_options = rel15_dci->num_dci_options; if (num_dci_options <= 0) { - LOG_I(NR_MAC, "num_dci_opts = %d for pdu[%d] in dl_config_list\n", rel15_dci->num_dci_options, i); + LOG_D(NR_MAC, "num_dci_opts = %d for pdu[%d] in dl_config_list\n", rel15_dci->num_dci_options, i); } AssertFatal(num_dci_options <= sizeof(rel15_dci->dci_length_options) / sizeof(rel15_dci->dci_length_options[0]), "num_dci_options %d > dci_length_options array\n", num_dci_options); @@ -679,13 +679,13 @@ static void fill_dci_from_dl_config(nr_downlink_indication_t*dl_ind, fapi_nr_dl_ "dl_config->number_pdus %d > dci_ind->dci_list array\n", num_dcis); for (int k = 0; k < num_dcis; k++) { - LOG_D(NR_PHY, "Received len %d, length options[%d] %d, format assigned %d, format options[%d] %d\n", + LOG_T(NR_PHY, "Received len %d, length options[%d] %d, format assigned %d, format options[%d] %d\n", dl_ind->dci_ind->dci_list[k].payloadSize, j, rel15_dci->dci_length_options[j], dl_ind->dci_ind->dci_list[k].dci_format, j, rel15_dci->dci_format_options[j]); if (rel15_dci->dci_length_options[j] == dl_ind->dci_ind->dci_list[k].payloadSize) { dl_ind->dci_ind->dci_list[k].dci_format = rel15_dci->dci_format_options[j]; - LOG_I(NR_PHY, "format assigned dl_ind->dci_ind->dci_list[k].dci_format %d\n", + LOG_D(NR_PHY, "format assigned dl_ind->dci_ind->dci_list[k].dci_format %d\n", dl_ind->dci_ind->dci_list[k].dci_format); } } @@ -708,7 +708,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request, { frame = dl_tti_request->SFN; slot = dl_tti_request->Slot; - LOG_I(NR_PHY, "[%d, %d] dl_tti_request\n", frame, slot); + LOG_D(NR_PHY, "[%d, %d] dl_tti_request\n", frame, slot); copy_dl_tti_req_to_dl_info(&mac->dl_info, dl_tti_request); } /* This checks if the previously recevied DCI matches our current RNTI @@ -722,27 +722,27 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request, { frame = tx_data_request->SFN; slot = tx_data_request->Slot; - LOG_I(NR_PHY, "[%d, %d] PDSCH in tx_request\n", frame, slot); + LOG_D(NR_PHY, "[%d, %d] PDSCH in tx_request\n", frame, slot); copy_tx_data_req_to_dl_info(&mac->dl_info, tx_data_request); } else if (ul_dci_request) { frame = ul_dci_request->SFN; slot = ul_dci_request->Slot; - LOG_I(NR_PHY, "[%d, %d] ul_dci_request\n", frame, slot); + LOG_D(NR_PHY, "[%d, %d] ul_dci_request\n", frame, slot); copy_ul_dci_data_req_to_dl_info(&mac->dl_info, ul_dci_request); } else if (ul_tti_request) { frame = ul_tti_request->SFN; slot = ul_tti_request->Slot; - LOG_D(NR_PHY, "[%d, %d] ul_tti_request\n", frame, slot); + LOG_T(NR_PHY, "[%d, %d] ul_tti_request\n", frame, slot); copy_ul_tti_data_req_to_dl_info(&mac->dl_info, ul_tti_request); } else { if (pthread_mutex_unlock(&mac->mutex_dl_info)) abort(); - LOG_D(NR_MAC, "All indications were NULL in %s\n", __FUNCTION__); + LOG_T(NR_MAC, "All indications were NULL in %s\n", __FUNCTION__); return; } @@ -788,19 +788,19 @@ void save_nr_measurement_info(nfapi_nr_dl_tti_request_t *dl_tti_request) LOG_E(NR_PHY, "%s: dl_tti_request number of PDUS <= 0\n", __FUNCTION__); abort(); } - LOG_D(NR_PHY, "%s: dl_tti_request number of PDUS: %d\n", __FUNCTION__, num_pdus); + LOG_T(NR_PHY, "%s: dl_tti_request number of PDUS: %d\n", __FUNCTION__, num_pdus); for (int i = 0; i < num_pdus; i++) { nfapi_nr_dl_tti_request_pdu_t *pdu_list = &dl_tti_request->dl_tti_request_body.dl_tti_pdu_list[i]; if (pdu_list->PDUType == NFAPI_NR_DL_TTI_SSB_PDU_TYPE) { - LOG_D(NR_PHY, "Cell_id: %d, the ssb_block_idx %d, sc_offset: %d and payload %d\n", + LOG_T(NR_PHY, "Cell_id: %d, the ssb_block_idx %d, sc_offset: %d and payload %d\n", pdu_list->ssb_pdu.ssb_pdu_rel15.PhysCellId, pdu_list->ssb_pdu.ssb_pdu_rel15.SsbBlockIndex, pdu_list->ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset, pdu_list->ssb_pdu.ssb_pdu_rel15.bchPayload); pdu_list->ssb_pdu.ssb_pdu_rel15.ssbRsrp = 60; - LOG_D(NR_RRC, "Setting pdulist[%d].ssbRsrp to %d\n", i, pdu_list->ssb_pdu.ssb_pdu_rel15.ssbRsrp); + LOG_T(NR_RRC, "Setting pdulist[%d].ssbRsrp to %d\n", i, pdu_list->ssb_pdu.ssb_pdu_rel15.ssbRsrp); } } @@ -830,7 +830,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea LOG_E(NR_PHY, "Message dl_tti_request failed to unpack\n"); break; } - LOG_I(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message in sfn/slot %d %d. \n", + LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message in sfn/slot %d %d. \n", dl_tti_request->SFN, dl_tti_request->Slot); if (is_channel_modeling()) @@ -854,7 +854,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea LOG_E(NR_PHY, "Message tx_data_request failed to unpack\n"); break; } - LOG_I(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST message in SFN/slot %d %d. \n", + LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST message in SFN/slot %d %d. \n", tx_data_request->SFN, tx_data_request->Slot); if (!put_queue(&nr_tx_req_queue, tx_data_request)) { @@ -874,7 +874,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea LOG_E(NR_PHY, "Message ul_dci_request failed to unpack\n"); break; } - LOG_I(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST message in SFN/slot %d %d. \n", + LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST message in SFN/slot %d %d. \n", ul_dci_request->SFN, ul_dci_request->Slot); if (!put_queue(&nr_ul_dci_req_queue, ul_dci_request)) { @@ -903,7 +903,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea mac->ra.ra_state >= RA_SUCCEEDED) { if (!put_queue(&nr_ul_tti_req_queue, ul_tti_request)) { - LOG_I(NR_PHY, "put_queue failed for ul_tti_request, calling put_queue_replace.\n"); + LOG_D(NR_PHY, "put_queue failed for ul_tti_request, calling put_queue_replace.\n"); nfapi_nr_ul_tti_request_t *evicted_ul_tti_req = put_queue_replace(&nr_ul_tti_req_queue, ul_tti_request); free(evicted_ul_tti_req); } @@ -912,7 +912,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea else if (mac->ra.ra_state < RA_SUCCEEDED) { if (!put_queue(&nr_ul_tti_req_queue, ul_tti_request)) { - LOG_I(NR_PHY, "put_queue failed for ul_tti_request, calling put_queue_replace.\n"); + LOG_D(NR_PHY, "put_queue failed for ul_tti_request, calling put_queue_replace.\n"); nfapi_nr_ul_tti_request_t *evicted_ul_tti_req = put_queue_replace(&nr_ul_tti_req_queue, ul_tti_request); free(evicted_ul_tti_req); } @@ -952,7 +952,7 @@ static void save_pdsch_pdu_for_crnti(nfapi_nr_dl_tti_request_t *dl_tti_request) { read_channel_param(pdsch_pdu, dl_tti_request->Slot, count_sent); count_sent++; - LOG_D(NR_MAC, "pdsch_pdu->rnti %x mac->crnti %x mac->ra.ra_state %d count_sent %d\n", + LOG_T(NR_MAC, "pdsch_pdu->rnti %x mac->crnti %x mac->ra.ra_state %d count_sent %d\n", pdsch_pdu->rnti, mac->crnti, mac->ra.ra_state, count_sent); } } @@ -999,7 +999,7 @@ void *nrue_standalone_pnf_task(void *context) uint16_t *sfn_slot = CALLOC(1, sizeof(*sfn_slot)); memcpy(sfn_slot, buffer, sizeof(*sfn_slot)); - LOG_I(NR_PHY, "Received from proxy sfn %d slot %d\n", + LOG_D(NR_PHY, "Received from proxy sfn %d slot %d\n", NFAPI_SFNSLOT2SFN(*sfn_slot), NFAPI_SFNSLOT2SLOT(*sfn_slot)); if (!put_queue(&nr_sfn_slot_queue, sfn_slot)) @@ -1026,7 +1026,7 @@ void *nrue_standalone_pnf_task(void *context) { slot_rnti_mcs[NFAPI_SFNSLOT2SLOT(ch_info->sfn_slot)].sinr = ch_info->sinr[i]; - LOG_D(NR_PHY, "Received_SINR[%d] = %f, sfn:slot %d:%d\n", + LOG_T(NR_PHY, "Received_SINR[%d] = %f, sfn:slot %d:%d\n", i, ch_info->sinr[i], NFAPI_SFNSLOT2SFN(ch_info->sfn_slot), NFAPI_SFNSLOT2SLOT(ch_info->sfn_slot)); } @@ -1112,7 +1112,7 @@ void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nac if (current_harq->active) { current_harq->ack = ack_nack; current_harq->ack_received = true; - LOG_D(PHY,"Updating harq_status for harq_id %d,ack/nak %d\n",harq_pid,current_harq->ack); + LOG_T(PHY,"Updating harq_status for harq_id %d,ack/nak %d\n",harq_pid,current_harq->ack); } else { //shouldn't get here @@ -1134,7 +1134,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ ret = nr_ue_scheduler(NULL, ul_info); } else - LOG_D(NR_MAC, "In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d\n", + LOG_T(NR_MAC, "In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d\n", __FUNCTION__, __LINE__, ul_info->ue_sched_mode, mac->ra.ra_state); NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon; @@ -1174,9 +1174,9 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ } else { // UL indication after reception of DCI or DL PDU if (dl_info && dl_info->dci_ind && dl_info->dci_ind->number_of_dcis) { - LOG_D(MAC,"[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); + LOG_T(MAC,"[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); for (int i = 0; i < dl_info->dci_ind->number_of_dcis; i++) { - LOG_D(MAC,">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis); + LOG_T(MAC,">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis); nr_scheduled_response_t scheduled_response; int8_t ret = handle_dci(dl_info->module_id, dl_info->cc_id, @@ -1189,12 +1189,12 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ /* The check below filters out UL_DCIs (format 7) which are being processed as DL_DCIs. */ if (dci_index->dci_format == 7 && mac->ra.ra_state == RA_SUCCEEDED) { - LOG_D(NR_MAC, "We are filtering a UL_DCI to prevent it from being treated like a DL_DCI\n"); + LOG_T(NR_MAC, "We are filtering a UL_DCI to prevent it from being treated like a DL_DCI\n"); break; } dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dci_index->dci_format]; g_harq_pid = def_dci_pdu_rel15->harq_pid; - LOG_D(NR_MAC, "Setting harq_pid = %d and dci_index = %d (based on format)\n", g_harq_pid, dci_index->dci_format); + LOG_T(NR_MAC, "Setting harq_pid = %d and dci_index = %d (based on format)\n", g_harq_pid, dci_index->dci_format); ret_mask |= (ret << FAPI_NR_DCI_IND); if (ret >= 0) { @@ -1213,7 +1213,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ for (int i=0; irx_ind->number_pdus; ++i) { - LOG_D(MAC, "In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs \n", + LOG_T(MAC, "In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs \n", __FUNCTION__, dl_info->rx_ind->rx_indication_body[i].pdu_type, dl_info->rx_ind->number_pdus); @@ -1297,7 +1297,7 @@ int nr_ue_dcireq(nr_dcireq_t *dcireq) { dl_config->sfn = UE_mac->dl_config_request.sfn; dl_config->slot = UE_mac->dl_config_request.slot; - LOG_D(PHY, "Entering UE DCI configuration frame %d slot %d \n", dcireq->frame, dcireq->slot); + LOG_T(PHY, "Entering UE DCI configuration frame %d slot %d \n", dcireq->frame, dcireq->slot); ue_dci_configuration(UE_mac, dl_config, dcireq->frame, dcireq->slot); @@ -1337,13 +1337,13 @@ static int get_mcs_from_sinr(float sinr) { if (sinr < (nr_bler_data[0].bler_table[0][0])) { - LOG_I(NR_MAC, "The SINR found is smaller than first MCS table\n"); + LOG_D(NR_MAC, "The SINR found is smaller than first MCS table\n"); return 0; } if (sinr > (nr_bler_data[NR_NUM_MCS-1].bler_table[nr_bler_data[NR_NUM_MCS-1].length - 1][0])) { - LOG_I(NR_MAC, "The SINR found is larger than last MCS table\n"); + LOG_D(NR_MAC, "The SINR found is larger than last MCS table\n"); return NR_NUM_MCS-1; } @@ -1354,7 +1354,7 @@ static int get_mcs_from_sinr(float sinr) float smallest_sinr = (nr_bler_data[n].bler_table[0][0]); if (sinr < largest_sinr && sinr > smallest_sinr) { - LOG_I(NR_MAC, "The SINR found in MCS %d table\n", n); + LOG_D(NR_MAC, "The SINR found in MCS %d table\n", n); return n; } } @@ -1383,7 +1383,7 @@ static int get_cqi_from_mcs(void) int mcs = get_mcs_from_sinr(slot_rnti_mcs[slot].sinr); CHECK_INDEX(mcs_to_cqi, mcs); int cqi = mcs_to_cqi[mcs]; - LOG_I(NR_MAC, "SINR: %f -> MCS: %d -> CQI: %d\n", slot_rnti_mcs[slot].sinr, mcs, cqi); + LOG_D(NR_MAC, "SINR: %f -> MCS: %d -> CQI: %d\n", slot_rnti_mcs[slot].sinr, mcs, cqi); return cqi; } slot++; @@ -1418,7 +1418,7 @@ static void read_channel_param(const nfapi_nr_dl_tti_pdsch_pdu_rel15_t * pdu, in slot_rnti_mcs[slot].drop_flag[index] = false; slot_rnti_mcs[slot].num_pdus = index+1; //index starts at 0 so we incrament to get num of pdus slot_rnti_mcs[slot].latest = true; - LOG_I(NR_MAC, "Adding MCS %d and RNTI %x for slot_rnti_mcs[%d]\n", slot_rnti_mcs[slot].mcs[index], slot_rnti_mcs[slot].rnti[index], slot); + LOG_D(NR_MAC, "Adding MCS %d and RNTI %x for slot_rnti_mcs[%d]\n", slot_rnti_mcs[slot].mcs[index], slot_rnti_mcs[slot].rnti[index], slot); return; } @@ -1448,20 +1448,20 @@ static float get_bler_val(uint8_t mcs, int sinr) // 4th col = dropped packets, 5th col = total packets float bler_val = 0.0; CHECK_INDEX(nr_bler_data, mcs); - LOG_I(NR_MAC, "sinr %d min %d max %d\n", sinr, + LOG_D(NR_MAC, "sinr %d min %d max %d\n", sinr, (int)(nr_bler_data[mcs].bler_table[0][0] * 10), (int)(nr_bler_data[mcs].bler_table[nr_bler_data[mcs].length - 1][0] * 10) ); if (sinr < (int)(nr_bler_data[mcs].bler_table[0][0] * 10)) { - LOG_I(NR_MAC, "MCS %d table. SINR is smaller than lowest SINR, bler_val is set based on lowest SINR in table\n", mcs); + LOG_D(NR_MAC, "MCS %d table. SINR is smaller than lowest SINR, bler_val is set based on lowest SINR in table\n", mcs); bler_val = nr_bler_data[mcs].bler_table[0][4] / nr_bler_data[mcs].bler_table[0][5]; return bler_val; } if (sinr > (int)(nr_bler_data[mcs].bler_table[nr_bler_data[mcs].length - 1][0] * 10)) { - LOG_I(NR_MAC, "MCS %d table. SINR is greater than largest SINR. bler_val is set based on largest SINR in table\n", mcs); + LOG_D(NR_MAC, "MCS %d table. SINR is greater than largest SINR. bler_val is set based on largest SINR in table\n", mcs); bler_val = nr_bler_data[mcs].bler_table[(nr_bler_data[mcs].length - 1)][4] / nr_bler_data[mcs].bler_table[(nr_bler_data[mcs].length - 1)][5]; return bler_val; } @@ -1479,7 +1479,7 @@ static float get_bler_val(uint8_t mcs, int sinr) { float bler_val1 = nr_bler_data[mcs].bler_table[i - 1][4] / nr_bler_data[mcs].bler_table[i - 1][5]; float bler_val2 = nr_bler_data[mcs].bler_table[i][4] / nr_bler_data[mcs].bler_table[i][5]; - LOG_I(NR_MAC, "sinr %d min %f max %f\n", sinr, bler_val1, bler_val2); + LOG_D(NR_MAC, "sinr %d min %f max %f\n", sinr, bler_val1, bler_val2); return ((bler_val1 + bler_val2) / 2); } } @@ -1510,7 +1510,7 @@ static bool should_drop_transport_block(int slot, uint16_t rnti) NR_UE_MAC_INST_t *mac = get_mac_inst(0); if (mac->ra.ra_state < RA_SUCCEEDED) { - LOG_I(NR_MAC, "Not dropping because MAC state: %d", mac->ra.ra_state); + LOG_D(NR_MAC, "Not dropping because MAC state: %d", mac->ra.ra_state); return false; } @@ -1519,7 +1519,7 @@ static bool should_drop_transport_block(int slot, uint16_t rnti) Generate random uniform vairable to compare against bler_val. */ int num_pdus = slot_rnti_mcs[slot].num_pdus; assert(slot < 20 && slot >= 0); - LOG_I(NR_MAC, "rnti: %x num_pdus %d state %d slot %u sinr %f\n", + LOG_D(NR_MAC, "rnti: %x num_pdus %d state %d slot %u sinr %f\n", rnti, num_pdus, mac->ra.ra_state, slot, slot_rnti_mcs[slot].sinr); assert(num_pdus > 0); CHECK_INDEX(slot_rnti_mcs[slot].rnti, num_pdus); @@ -1540,7 +1540,7 @@ static bool should_drop_transport_block(int slot, uint16_t rnti) flagged for drop before returning. If even one is flagged for drop we return immediately because we drop the entire packet. */ - LOG_I(NR_MAC, "rnti: %x mcs %u slot %u sinr %f\n", + LOG_D(NR_MAC, "rnti: %x mcs %u slot %u sinr %f\n", slot_rnti_mcs[slot].rnti[n], mcs, slot, slot_rnti_mcs[slot].sinr); float bler_val; @@ -1550,11 +1550,11 @@ static bool should_drop_transport_block(int slot, uint16_t rnti) bler_val = get_bler_val(mcs, ((int)(slot_rnti_mcs[slot].sinr * 10))); double drop_cutoff = ((double) rand() / (RAND_MAX)); assert(drop_cutoff <= 1); - LOG_I(NR_MAC, "SINR = %f, Bler_val = %f, MCS = %"PRIu8"\n", slot_rnti_mcs[slot].sinr, bler_val, slot_rnti_mcs[slot].mcs[n]); + LOG_D(NR_MAC, "SINR = %f, Bler_val = %f, MCS = %"PRIu8"\n", slot_rnti_mcs[slot].sinr, bler_val, slot_rnti_mcs[slot].mcs[n]); if (drop_cutoff <= bler_val) { slot_rnti_mcs[slot].drop_flag[n] = true; - LOG_D(NR_MAC, "We are dropping this packet. Bler_val = %f, MCS = %"PRIu8", slot = %d\n", bler_val, slot_rnti_mcs[slot].mcs[n], slot); + LOG_T(NR_MAC, "We are dropping this packet. Bler_val = %f, MCS = %"PRIu8", slot = %d\n", bler_val, slot_rnti_mcs[slot].mcs[n], slot); return slot_rnti_mcs[slot].drop_flag[n]; } }