From 525b67cf153ba66b8901989cbba11347bebf13f7 Mon Sep 17 00:00:00 2001 From: sphoorthi Date: Mon, 18 Jan 2021 10:14:32 +0530 Subject: [PATCH] Part -4 Separation of logs Change-Id: I35aef888ea461d0dbe71a1f97d0e6b519b47717e Signed-off-by: sphoorthi --- src/5gnrmac/lwr_mac_fsm.c | 128 +++++++++++++++++++++++----------------------- src/5gnrmac/lwr_mac_phy.c | 14 ++--- src/5gnrmac/mac_cfg_hdl.c | 6 +-- src/5gnrmac/mac_ue_mgr.c | 120 +++++++++++++++++++++---------------------- 4 files changed, 134 insertions(+), 134 deletions(-) diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index af03dce59..4ae21ccc0 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -86,7 +86,7 @@ void lwrMacLayerInit() * ****************************************************************/ uint8_t lwr_mac_procInvalidEvt(void *msg) { - printf("\nLWR_MAC: Error Indication Event[%d] received in state [%d]", lwrMacCb.event, lwrMacCb.phyState); + DU_LOG("\nERROR --> LWR_MAC: Error Indication Event[%d] received in state [%d]", lwrMacCb.event, lwrMacCb.phyState); return ROK; } @@ -1265,7 +1265,7 @@ uint32_t getParamValue(fapi_uint16_tlv_t *tlv, uint16_t type) } else { - DU_LOG("\nLWR_MAC: Value Extraction failed" ); + DU_LOG("\nERROR --> LWR_MAC: Value Extraction failed" ); return RFAILED; } } @@ -1290,7 +1290,7 @@ void setMibPdu(uint8_t *mibPdu, uint32_t *val, uint16_t sfn) { *mibPdu |= (((uint8_t)(sfn >> 2)) & MIB_SFN_BITMASK); *val = (mibPdu[0] << 24 | mibPdu[1] << 16 | mibPdu[2] << 8); - DU_LOG("\nLWR_MAC: MIB PDU %x", *val); + DU_LOG("\nDEBUG --> LWR_MAC: MIB PDU %x", *val); } /******************************************************************* @@ -1332,7 +1332,7 @@ uint8_t lwr_mac_procParamReqEvt(void *msg) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for param req header"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for param req header"); LWR_MAC_FREE(paramReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_param_req_t))); return RFAILED; } @@ -1342,12 +1342,12 @@ uint8_t lwr_mac_procParamReqEvt(void *msg) msgHeader->num_msg = 1; msgHeader->handle = 0; - DU_LOG("\nLWR_MAC: Sending Param Request to Phy"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending Param Request to Phy"); LwrMacSendToL1(headerElem); } else { - DU_LOG("\nLWR_MAC: Failed to allocate memory for Param Request"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for Param Request"); return RFAILED; } #endif @@ -1381,14 +1381,14 @@ uint8_t lwr_mac_procParamRspEvt(void *msg) ClCellParam *cellParam = NULLP; paramRsp = (fapi_param_resp_t *)msg; - DU_LOG("\nLWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, lwrMacCb.phyState); + DU_LOG("\nINFO --> LWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, lwrMacCb.phyState); if(paramRsp != NULLP) { MAC_ALLOC(cellParam, sizeof(ClCellParam)); if(cellParam != NULLP) { - DU_LOG("\n LWR_MAC: Filling TLVS into MAC API"); + DU_LOG("\nDEBUG --> LWR_MAC: Filling TLVS into MAC API"); if(paramRsp->error_code == MSG_OK) { for(index = 0; index < paramRsp->number_of_tlvs; index++) @@ -1407,7 +1407,7 @@ uint8_t lwr_mac_procParamRspEvt(void *msg) encodedVal = getParamValue(¶mRsp->tlvs[index], FAPI_UINT_8); if(encodedVal != RFAILED && encodedVal != lwrMacCb.phyState) { - printf("\n PhyState mismatch [%d][%d]", lwrMacCb.phyState, lwrMacCb.event); + DU_LOG("\nERROR --> PhyState mismatch [%d][%d]", lwrMacCb.phyState, lwrMacCb.event); return RFAILED; } break; @@ -1861,7 +1861,7 @@ uint8_t lwr_mac_procParamRspEvt(void *msg) } break; default: - //printf("\n Invalid value for TLV[%x] at index[%d]", paramRsp->tlvs[index].tl.tag, index); + //DU_LOG("\nERROR --> Invalid value for TLV[%x] at index[%d]", paramRsp->tlvs[index].tl.tag, index); break; } } @@ -1871,19 +1871,19 @@ uint8_t lwr_mac_procParamRspEvt(void *msg) } else { - DU_LOG("\n LWR_MAC: Invalid error code %d", paramRsp->error_code); + DU_LOG("\nERROR --> LWR_MAC: Invalid error code %d", paramRsp->error_code); return RFAILED; } } else { - DU_LOG("\nLWR_MAC: Failed to allocate memory for cell param"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for cell param"); return RFAILED; } } else { - DU_LOG("\nLWR_MAC: Param Response received from PHY is NULL"); + DU_LOG("\nERROR --> LWR_MAC: Param Response received from PHY is NULL"); return RFAILED; } #else @@ -1912,7 +1912,7 @@ uint8_t lwr_mac_procIqSamplesReqEvt(void *msg) LWR_MAC_ALLOC(iqSampleElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_ext_iq_samples_req_t))); if(!iqSampleElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for IQ sample req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for IQ sample req"); return RFAILED; } FILL_FAPI_LIST_ELEM(iqSampleElem, NULLP, FAPI_VENDOR_EXT_UL_IQ_SAMPLES, 1, \ @@ -1940,7 +1940,7 @@ uint8_t lwr_mac_procIqSamplesReqEvt(void *msg) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for FAPI header in lwr_mac_procIqSamplesReqEvt"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for FAPI header in lwr_mac_procIqSamplesReqEvt"); return RFAILED; } FILL_FAPI_LIST_ELEM(headerElem, iqSampleElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ @@ -1949,7 +1949,7 @@ uint8_t lwr_mac_procIqSamplesReqEvt(void *msg) msgHeader->num_msg = 1; msgHeader->handle = 0; - DU_LOG("\nLWR_MAC: Sending IQ Sample request to Phy"); + DU_LOG("\nINFO --> LWR_MAC: Sending IQ Sample request to Phy"); LwrMacSendToL1(headerElem); return ROK; } @@ -1989,7 +1989,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) p_fapi_api_queue_elem_t vendorMsgQElem; p_fapi_api_queue_elem_t cfgReqQElem; - DU_LOG("\nLWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, \ + DU_LOG("\nINFO --> LWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, \ lwrMacCb.phyState); cellId = (uint16_t *)msg; @@ -2006,7 +2006,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) LWR_MAC_ALLOC(vendorMsgQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); if(!vendorMsgQElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in config req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in config req"); return RFAILED; } FILL_FAPI_LIST_ELEM(vendorMsgQElem, NULLP, FAPI_VENDOR_MESSAGE, 1, sizeof(fapi_vendor_msg_t)); @@ -2021,7 +2021,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) LWR_MAC_ALLOC(cfgReqQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_config_req_t))); if(!cfgReqQElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for config req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for config req"); LWR_MAC_ALLOC(vendorMsgQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } @@ -2158,7 +2158,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in config req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in config req"); LWR_MAC_ALLOC(cfgReqQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_config_req_t))); LWR_MAC_ALLOC(vendorMsgQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; @@ -2169,7 +2169,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) msgHeader->num_msg = 2; /* Config req msg and vendor specific msg */ msgHeader->handle = 0; - DU_LOG("\nLWR_MAC: Sending Config Request to Phy"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending Config Request to Phy"); LwrMacSendToL1(headerElem); #endif @@ -2199,14 +2199,14 @@ uint8_t lwr_mac_procConfigRspEvt(void *msg) fapi_config_resp_t *configRsp; configRsp = (fapi_config_resp_t *)msg; - DU_LOG("\nLWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, \ + DU_LOG("\nINFO --> LWR_MAC: Received EVENT[%d] at STATE[%d]", lwrMacCb.event, \ lwrMacCb.phyState); if(configRsp != NULL) { if(configRsp->error_code == MSG_OK) { - DU_LOG("\nLWR_MAC: PHY has moved to Configured state \n"); + DU_LOG("\nDEBUG --> LWR_MAC: PHY has moved to Configured state \n"); lwrMacCb.phyState = PHY_STATE_CONFIGURED; lwrMacCb.cellCb[0].state = PHY_STATE_CONFIGURED; /* TODO : @@ -2217,13 +2217,13 @@ uint8_t lwr_mac_procConfigRspEvt(void *msg) } else { - DU_LOG("\n LWR_MAC: Invalid error code %d", configRsp->error_code); + DU_LOG("\nERROR --> LWR_MAC: Invalid error code %d", configRsp->error_code); return RFAILED; } } else { - DU_LOG("\nLWR_MAC: Config Response received from PHY is NULL"); + DU_LOG("\nERROR --> LWR_MAC: Config Response received from PHY is NULL"); return RFAILED; } #endif @@ -2261,7 +2261,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); if(!vendorMsgElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in start req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in start req"); return RFAILED; } FILL_FAPI_LIST_ELEM(vendorMsgElem, NULLP, FAPI_VENDOR_MESSAGE, 1, sizeof(fapi_vendor_msg_t)); @@ -2279,7 +2279,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) LWR_MAC_ALLOC(startReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_start_req_t))); if(!startReqElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for start req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for start req"); LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } @@ -2294,7 +2294,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in config req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in config req"); LWR_MAC_ALLOC(startReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_start_req_t))); LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; @@ -2306,7 +2306,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) msgHeader->handle = 0; /* Send to PHY */ - DU_LOG("\nLWR_MAC: Sending Start Request to Phy"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending Start Request to Phy"); LwrMacSendToL1(headerElem); #endif return ROK; @@ -2346,7 +2346,7 @@ uint8_t lwr_mac_procStopReqEvt(void *msg) LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); if(!vendorMsgElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in stop req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in stop req"); return RFAILED; } FILL_FAPI_LIST_ELEM(vendorMsgElem, NULLP, FAPI_VENDOR_MESSAGE, 1, sizeof(fapi_vendor_msg_t)); @@ -2359,7 +2359,7 @@ uint8_t lwr_mac_procStopReqEvt(void *msg) LWR_MAC_ALLOC(stopReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_stop_req_t))); if(!stopReqElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for stop req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for stop req"); LWR_MAC_FREE(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } @@ -2373,7 +2373,7 @@ uint8_t lwr_mac_procStopReqEvt(void *msg) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for header in stop req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for header in stop req"); LWR_MAC_FREE(stopReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_stop_req_t))); LWR_MAC_FREE(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; @@ -2385,7 +2385,7 @@ uint8_t lwr_mac_procStopReqEvt(void *msg) msgHeader->handle = 0; /* Send to PHY */ - DU_LOG("\nLWR_MAC: Sending Stop Request to Phy"); + DU_LOG("\nINFO --> LWR_MAC: Sending Stop Request to Phy"); LwrMacSendToL1(headerElem); #endif @@ -2552,7 +2552,7 @@ void fillSib1DlDciPdu(fapi_dl_dci_t *dlDciPtr, PdcchCfg *sib1PdcchInfo) if(numBytes > FAPI_DCI_PAYLOAD_BYTE_LEN) { - DU_LOG("\nLWR_MAC : Total bytes for DCI is more than expected"); + DU_LOG("\nERROR --> LWR_MAC : Total bytes for DCI is more than expected"); return; } @@ -2686,7 +2686,7 @@ void fillRarDlDciPdu(fapi_dl_dci_t *dlDciPtr, PdcchCfg *rarPdcchInfo) if(numBytes > FAPI_DCI_PAYLOAD_BYTE_LEN) { - DU_LOG("\nLWR_MAC : Total bytes for DCI is more than expected"); + DU_LOG("\nERROR --> LWR_MAC : Total bytes for DCI is more than expected"); return; } @@ -2842,7 +2842,7 @@ void fillDlMsgDlDciPdu(fapi_dl_dci_t *dlDciPtr, PdcchCfg *pdcchInfo,\ if(numBytes > FAPI_DCI_PAYLOAD_BYTE_LEN) { - DU_LOG("\nLWR_MAC : Total bytes for DCI is more than expected"); + DU_LOG("\nERROR --> LWR_MAC : Total bytes for DCI is more than expected"); return; } @@ -2930,7 +2930,7 @@ uint8_t fillPdcchPdu(fapi_dl_tti_req_pdu_t *dlTtiReqPdu, DlSchedInfo *dlInfo, \ } else { - DU_LOG("\nLWR_MAC: Failed filling PDCCH Pdu"); + DU_LOG("\nERROR --> LWR_MAC: Failed filling PDCCH Pdu"); return RFAILED; } dlTtiReqPdu->pduType = PDCCH_PDU_TYPE; @@ -3340,7 +3340,7 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for header in DL TTI req"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for header in DL TTI req"); LWR_MAC_FREE(dlTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_dl_tti_req_t))); return RFAILED; } @@ -3376,9 +3376,9 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) numPduEncoded++; } } - printf("\033[1;31m"); - DU_LOG("\nLWR_MAC: MIB sent.."); - printf("\033[0m"); + DU_LOG("\033[1;31m"); + DU_LOG("\nDEBUG --> LWR_MAC: MIB sent.."); + DU_LOG("\033[0m"); } if(currDlSlot->dlInfo.brdcstAlloc.sib1Trans) { @@ -3396,9 +3396,9 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) pduIndex++; numPduEncoded++; } - printf("\033[1;34m"); - DU_LOG("\nLWR_MAC: SIB1 sent..."); - printf("\033[0m"); + DU_LOG("\033[1;34m"); + DU_LOG("\nDEBUG --> LWR_MAC: SIB1 sent..."); + DU_LOG("\033[0m"); } } if(currDlSlot->dlInfo.rarAlloc != NULLP) @@ -3415,22 +3415,22 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) numPduEncoded++; pduIndex++; - printf("\033[1;32m"); - DU_LOG("\nLWR_MAC: RAR sent..."); - printf("\033[0m"); + DU_LOG("\033[1;32m"); + DU_LOG("\nDEBUG --> LWR_MAC: RAR sent..."); + DU_LOG("\033[0m"); } if(currDlSlot->dlInfo.dlMsgAlloc != NULLP) { if(currDlSlot->dlInfo.dlMsgAlloc->dlMsgInfo.dlMsgPdu != NULLP) { /* Filling Msg4 param */ - printf("\033[1;32m"); + DU_LOG("\033[1;32m"); if(currDlSlot->dlInfo.dlMsgAlloc->dlMsgInfo.isMsg4Pdu) { rntiType = TC_RNTI_TYPE; fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \ &currDlSlot->dlInfo, rntiType, CORESET_TYPE0); - DU_LOG("\nLWR_MAC: MSG4 sent..."); + DU_LOG("\nDEBUG --> LWR_MAC: MSG4 sent..."); } else { @@ -3438,9 +3438,9 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) rntiType = C_RNTI_TYPE; fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \ &currDlSlot->dlInfo, rntiType, CORESET_TYPE1); - DU_LOG("\nLWR_MAC: DL MSG sent..."); + DU_LOG("\nDEBUG --> LWR_MAC: DL MSG sent..."); } - printf("\033[0m"); + DU_LOG("\033[0m"); numPduEncoded++; fillPdschPdu(&dlTtiReq->pdus[numPduEncoded], @@ -3458,7 +3458,7 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) } #ifdef ODU_SLOT_IND_DEBUG_LOG - DU_LOG("\nLWR_MAC: Sending DL TTI Request"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending DL TTI Request"); #endif LwrMacSendToL1(headerElem); @@ -3468,7 +3468,7 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) else { #ifdef ODU_SLOT_IND_DEBUG_LOG - DU_LOG("\nLWR_MAC: Sending DL TTI Request"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending DL TTI Request"); #endif LwrMacSendToL1(headerElem); } @@ -3477,7 +3477,7 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) } else { - DU_LOG("\nLWR_MAC: Failed to allocate memory for DL TTI Request"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for DL TTI Request"); memset(currDlSlot, 0, sizeof(MacDlSlot)); return RFAILED; } @@ -3527,7 +3527,7 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) LWR_MAC_ALLOC(txDataElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_tx_data_req_t))); if(txDataElem == NULLP) { - DU_LOG("\nLWR_MAC: Failed to allocate memory for TX data Request"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for TX data Request"); return RFAILED; } @@ -3573,7 +3573,7 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for TxDataReq header"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for TxDataReq header"); LWR_MAC_FREE(txDataElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_tx_data_req_t))); return RFAILED; } @@ -3583,7 +3583,7 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) msgHeader->num_msg = 1; msgHeader->handle = 0; - DU_LOG("\nLWR_MAC: Sending TX DATA Request"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending TX DATA Request"); LwrMacSendToL1(headerElem); } #endif @@ -3931,7 +3931,7 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for UL TTI req header"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for UL TTI req header"); LWR_MAC_FREE(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t))); return RFAILED; } @@ -3941,7 +3941,7 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) msgHeader->num_msg = 1; msgHeader->handle = 0; #ifdef ODU_SLOT_IND_DEBUG_LOG - DU_LOG("\nLWR_MAC: Sending UL TTI Request"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending UL TTI Request"); #endif LwrMacSendToL1(headerElem); @@ -3950,7 +3950,7 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) } else { - DU_LOG("\nLWR_MAC: Failed to allocate memory for UL TTI Request"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for UL TTI Request"); memset(currUlSlot, 0, sizeof(MacUlSlot)); return RFAILED; } @@ -4081,7 +4081,7 @@ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo) if(numBytes > FAPI_DCI_PAYLOAD_BYTE_LEN) { - DU_LOG("\nLWR_MAC : Total bytes for DCI is more than expected"); + DU_LOG("\nERROR --> LWR_MAC : Total bytes for DCI is more than expected"); return; } @@ -4221,7 +4221,7 @@ uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); if(!headerElem) { - DU_LOG("\nLWR_MAC: Memory allocation failed for UL DCI req header"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for UL DCI req header"); LWR_MAC_FREE(ulDciElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_dci_req_t))); return RFAILED; } @@ -4231,14 +4231,14 @@ uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) msgHeader->num_msg = 1; msgHeader->handle = 0; #ifdef ODU_SLOT_IND_DEBUG_LOG - DU_LOG("\nLWR_MAC: Sending UL DCI Request"); + DU_LOG("\nDEBUG --> LWR_MAC: Sending UL DCI Request"); #endif LwrMacSendToL1(headerElem); } } else { - DU_LOG("\nLWR_MAC: Failed to allocate memory for UL DCI Request"); + DU_LOG("\nERROR --> LWR_MAC: Failed to allocate memory for UL DCI Request"); memset(currDlSlot, 0, sizeof(MacDlSlot)); return RFAILED; } diff --git a/src/5gnrmac/lwr_mac_phy.c b/src/5gnrmac/lwr_mac_phy.c index c1aa4dbb3..519de20fd 100644 --- a/src/5gnrmac/lwr_mac_phy.c +++ b/src/5gnrmac/lwr_mac_phy.c @@ -63,7 +63,7 @@ void LwrMacStartWlsRcvr() Pst pst; Buffer *mBuf; - DU_LOG("\nLWR MAC: Requesting to start WLS receiver thread"); + DU_LOG("\nINFO --> LWR MAC : Requesting to start WLS receiver thread"); /* Filling post */ memset(&pst, 0, sizeof(Pst)); @@ -71,7 +71,7 @@ void LwrMacStartWlsRcvr() if (ODU_GET_MSG_BUF(pst.region, pst.pool, &mBuf) != ROK) { - DU_LOG("\nLWR MAC : Memory allocation failed for LwrMacStartWlsRcvr"); + DU_LOG("\nERROR --> LWR MAC : Memory allocation failed for LwrMacStartWlsRcvr"); return; } @@ -227,7 +227,7 @@ void LwrMacRecvPhyMsg() continue; } - printf("\nLWR_MAC: numMsgToGet %d", numMsgToGet); + DU_LOG("\nDEBUG --> LWR_MAC : numMsgToGet %d", numMsgToGet); while(numMsgToGet--) { currElem = NULLP; @@ -286,7 +286,7 @@ uint8_t LwrMacSendToL1(void *msg) addWlsBlockToFree(currMsg, msgLen, (slotIndIdx-1)); if(currMsg->p_next == NULLP) { - DU_LOG("\nThere cannot be only one block to send"); + DU_LOG("\nERROR --> LWR MAC : There cannot be only one block to send"); return RFAILED; } @@ -294,7 +294,7 @@ uint8_t LwrMacSendToL1(void *msg) ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_FIRST); if(ret != 0) { - DU_LOG("\nFailure in sending message to PHY"); + DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY"); return RFAILED; } currMsg = currMsg->p_next; @@ -309,7 +309,7 @@ uint8_t LwrMacSendToL1(void *msg) ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_NEXT); if(ret != 0) { - DU_LOG("\nFailure in sending message to PHY"); + DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY"); return RFAILED; } currMsg = currMsg->p_next; @@ -320,7 +320,7 @@ uint8_t LwrMacSendToL1(void *msg) ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_LAST); if(ret != 0) { - DU_LOG("\nFailure in sending message to PHY"); + DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY"); return RFAILED; } currMsg = NULLP; diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 3fbd3554a..a7baf2e0f 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -91,7 +91,7 @@ uint8_t MacSchGenCfgReq(Pst *pst, RgMngmt *cfg) **/ uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm) { - printf("\nSending Scheduler config confirm to DU APP"); + DU_LOG("\nDEBUG --> Sending Scheduler config confirm to DU APP"); pst->dstEnt = ENTDUAPP; pst->dstInst = 0; pst->srcInst = 0; @@ -129,7 +129,7 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) MAC_ALLOC(macCellCb, sizeof(MacCellCb)); if(macCellCb == NULLP) { - DU_LOG("\nMAC : macCellCb is NULL at handling of macCellCfg\n"); + DU_LOG("\nERROR --> MAC : macCellCb is NULL at handling of macCellCfg\n"); return RFAILED; } memset(macCellCb, 0, sizeof(MacCellCb)); @@ -143,7 +143,7 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen); if(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu == NULLP) { - DU_LOG("\nMAC : macCellCb is NULL at handling of sib1Pdu of macCellCfg\n"); + DU_LOG("\nERROR --> MAC : macCellCb is NULL at handling of sib1Pdu of macCellCfg\n"); return RFAILED; } memcpy(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1Pdu, \ diff --git a/src/5gnrmac/mac_ue_mgr.c b/src/5gnrmac/mac_ue_mgr.c index 0f389874c..9f32e9c87 100644 --- a/src/5gnrmac/mac_ue_mgr.c +++ b/src/5gnrmac/mac_ue_mgr.c @@ -77,7 +77,7 @@ uint8_t fillMacCellGroupCfg(MacCellGrpCfg macCellGrp, SchMacCellGrpCfg *macCell schedReqCfg->addModListCount = macCellGrp.schReqCfg.addModListCount; if(schedReqCfg->addModListCount > MAX_NUM_SR_CFG_PER_CELL_GRP) { - DU_LOG("\nMAC : Scheduling Request Add/Mod Count %d exceeds max limit %d", \ + DU_LOG("\nERROR --> MAC : Scheduling Request Add/Mod Count %d exceeds max limit %d", \ schedReqCfg->addModListCount, MAX_NUM_SR_CFG_PER_CELL_GRP); return RFAILED; } @@ -97,7 +97,7 @@ uint8_t fillMacCellGroupCfg(MacCellGrpCfg macCellGrp, SchMacCellGrpCfg *macCell tagCfg->addModListCount = macCellGrp.tagCfg.addModListCount; if(tagCfg->addModListCount > MAX_NUM_TAGS) { - DU_LOG("\nMAC : Scheduling Request Add/Mod Count %d exceeds max limit %d", \ + DU_LOG("\nERROR --> MAC : Scheduling Request Add/Mod Count %d exceeds max limit %d", \ tagCfg->addModListCount, MAX_NUM_TAGS); return RFAILED; } @@ -174,7 +174,7 @@ uint8_t fillPdschServCellCfg(PdschServCellCfg macPdschCfg, SchPdschServCellCfg * MAC_ALLOC_SHRABL_BUF(schPdschCfg->maxMimoLayers, sizeof(uint8_t)); if(!schPdschCfg->maxMimoLayers) { - DU_LOG("\nMAC :Memory Alloc MimoLayers Failed at fillPdschServCellCfg()"); + DU_LOG("\nERROR --> MAC :Memory Alloc MimoLayers Failed at fillPdschServCellCfg()"); return RFAILED; } } @@ -195,7 +195,7 @@ uint8_t fillPdschServCellCfg(PdschServCellCfg macPdschCfg, SchPdschServCellCfg * MAC_ALLOC_SHRABL_BUF(schPdschCfg->maxCodeBlkGrpPerTb, sizeof(SchMaxCodeBlkGrpPerTB)); if(!schPdschCfg->maxCodeBlkGrpPerTb) { - DU_LOG("\nMAC :Memory Alloc for code Block Failed at fillPdschServCellCfg()"); + DU_LOG("\nERROR --> MAC :Memory Alloc for code Block Failed at fillPdschServCellCfg()"); return RFAILED; } } @@ -213,7 +213,7 @@ uint8_t fillPdschServCellCfg(PdschServCellCfg macPdschCfg, SchPdschServCellCfg * MAC_ALLOC_SHRABL_BUF(schPdschCfg->codeBlkGrpFlushInd, sizeof(bool)); if(!schPdschCfg->codeBlkGrpFlushInd) { - DU_LOG("\nMAC :Memory Alloc for Flush Ind Failed at fillPdschServCellCfg()"); + DU_LOG("\nERROR --> MAC :Memory Alloc for Flush Ind Failed at fillPdschServCellCfg()"); return RFAILED; } } @@ -231,7 +231,7 @@ uint8_t fillPdschServCellCfg(PdschServCellCfg macPdschCfg, SchPdschServCellCfg * MAC_ALLOC_SHRABL_BUF(schPdschCfg->xOverhead, sizeof(SchPdschXOverhead)); if(!schPdschCfg->xOverhead) { - DU_LOG("\nMAC :Memory Alloc for xOverHead Failed at fillPdschServCellCfg()"); + DU_LOG("\nERROR --> MAC :Memory Alloc for xOverHead Failed at fillPdschServCellCfg()"); return RFAILED; } } @@ -276,7 +276,7 @@ uint8_t fillInitalUlBwpPuschCfg(PuschCfg macPuschCfg, SchPuschCfg *schPuschCfg) schPuschCfg->numTimeDomRsrcAlloc = macPuschCfg.numTimeDomRsrcAlloc; if(schPuschCfg->numTimeDomRsrcAlloc > MAX_NUM_UL_ALLOC) { - DU_LOG("\nMAC : Number of Time domain resource allocation [%d] exceeds max limit [%d]",\ + DU_LOG("\nERROR --> MAC : Number of Time domain resource allocation [%d] exceeds max limit [%d]",\ schPuschCfg->numTimeDomRsrcAlloc, MAX_NUM_UL_ALLOC); return RFAILED; } @@ -380,7 +380,7 @@ uint8_t fillResrcList(PucchResrcCfg *macResrcCfg, SchPucchResrcCfg *schResrcCfg) MAC_ALLOC(schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format0, sizeof(SchPucchFormat0)); if(schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format0 == NULLP) { - DU_LOG("\nERROR --> MAC : Failed to allocate memory for Format0 in fillResrcList()"); + DU_LOG("\nERROR --> MAC : Failed to allocate memory for Format0 in fillResrcList()"); return RFAILED; } schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format0->initialCyclicShift =\ @@ -396,7 +396,7 @@ uint8_t fillResrcList(PucchResrcCfg *macResrcCfg, SchPucchResrcCfg *schResrcCfg) MAC_ALLOC(schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format1, sizeof(SchPucchFormat1)); if(schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format1 == NULLP) { - DU_LOG("\nERROR --> MAC : Failed to allocate memory for Format1 in fillResrcList()"); + DU_LOG("\nERROR --> MAC : Failed to allocate memory for Format1 in fillResrcList()"); return RFAILED; } schResrcCfg->resrcToAddModList[arrIdx].SchPucchFormat.format1->initialCyclicShift =\ @@ -1089,7 +1089,7 @@ uint8_t fillInitDlBwpPdcchCfg(PdcchConfig macPdcchCfg, SchPdcchConfig *schPdcchC schPdcchCfg->numCRsetToAddMod = macPdcchCfg.numCRsetToAddMod; if(schPdcchCfg->numCRsetToAddMod > MAX_NUM_CRSET) { - DU_LOG("\nMAC : Number of CORESET to ADD/MOD [%d] exceeds max limit [%d]",\ + DU_LOG("\nERROR --> MAC : Number of CORESET to ADD/MOD [%d] exceeds max limit [%d]",\ schPdcchCfg->numCRsetToAddMod, MAX_NUM_CRSET); return RFAILED; } @@ -1113,7 +1113,7 @@ uint8_t fillInitDlBwpPdcchCfg(PdcchConfig macPdcchCfg, SchPdcchConfig *schPdcchC schPdcchCfg->numCRsetToRel = macPdcchCfg.numCRsetToRel; if(schPdcchCfg->numCRsetToAddMod > MAX_NUM_CRSET) { - DU_LOG("\nMAC : Number of CORESET to release [%d] exceeds max limit [%d]",\ + DU_LOG("\nERROR --> MAC : Number of CORESET to release [%d] exceeds max limit [%d]",\ schPdcchCfg->numCRsetToRel, MAX_NUM_CRSET); return RFAILED; } @@ -1127,7 +1127,7 @@ uint8_t fillInitDlBwpPdcchCfg(PdcchConfig macPdcchCfg, SchPdcchConfig *schPdcchC schPdcchCfg->numSearchSpcToAddMod = macPdcchCfg.numSearchSpcToAddMod; if(schPdcchCfg->numSearchSpcToAddMod > MAX_NUM_SEARCH_SPC) { - DU_LOG("\nMAC : Number of search space to ADD/MOD [%d] exceeds max [%d]", \ + DU_LOG("\nERROR --> MAC : Number of search space to ADD/MOD [%d] exceeds max [%d]", \ schPdcchCfg->numSearchSpcToAddMod, MAX_NUM_SEARCH_SPC); return RFAILED; } @@ -1161,7 +1161,7 @@ uint8_t fillInitDlBwpPdcchCfg(PdcchConfig macPdcchCfg, SchPdcchConfig *schPdcchC schPdcchCfg->numSearchSpcToRel = macPdcchCfg.numSearchSpcToRel; if(schPdcchCfg->numSearchSpcToRel > MAX_NUM_SEARCH_SPC) { - DU_LOG("\nMAC : Number of search space to release [%d] exceeds max [%d]", \ + DU_LOG("\nERROR --> MAC : Number of search space to release [%d] exceeds max [%d]", \ schPdcchCfg->numSearchSpcToRel, MAX_NUM_SEARCH_SPC); return RFAILED; } @@ -1200,7 +1200,7 @@ uint8_t fillInitDlBwpPdschCfg(PdschConfig macPdschCfg, SchPdschConfig *schPdschC schPdschCfg->numTimeDomRsrcAlloc = macPdschCfg.numTimeDomRsrcAlloc; if(schPdschCfg->numTimeDomRsrcAlloc > MAX_NUM_DL_ALLOC) { - DU_LOG("\nMAC : Number of time domain resource allocation [%d], exceeds\ + DU_LOG("\nERROR --> MAC : Number of time domain resource allocation [%d], exceeds\ max limit [%d]", schPdschCfg->numTimeDomRsrcAlloc, MAX_NUM_DL_ALLOC); return RFAILED; } @@ -1253,7 +1253,7 @@ uint8_t fillInitialDlBwp(InitialDlBwp macInitDlBwp, SchInitalDlBwp *schInitDlBwp { if(fillInitDlBwpPdcchCfg(macInitDlBwp.pdcchCfg, &schInitDlBwp->pdcchCfg) != ROK) { - DU_LOG("\nMAC : fillInitDlBwpPdcchCfg() failed"); + DU_LOG("\nERROR --> MAC : fillInitDlBwpPdcchCfg() failed"); return RFAILED; } } @@ -1263,7 +1263,7 @@ uint8_t fillInitialDlBwp(InitialDlBwp macInitDlBwp, SchInitalDlBwp *schInitDlBwp { if(fillInitDlBwpPdschCfg(macInitDlBwp.pdschCfg,&schInitDlBwp->pdschCfg) != ROK) { - DU_LOG("\nMAC : fillInitDlBwpPdschCfg() failed"); + DU_LOG("\nERROR --> MAC : fillInitDlBwpPdschCfg() failed"); return RFAILED; } } @@ -1298,14 +1298,14 @@ uint8_t fillSpCellCfg(SpCellCfg macSpCellCfg, SchSpCellCfg *schSpCellCfg) if(fillInitialDlBwp(macSpCellCfg.servCellCfg.initDlBwp, \ &servCellCfg->initDlBwp) != ROK ) { - DU_LOG("\nMAC : fillInitialDlBwp() failed"); + DU_LOG("\nERROR --> MAC : fillInitialDlBwp() failed"); return RFAILED; } servCellCfg->numDlBwpToAdd = macSpCellCfg.servCellCfg.numDlBwpToAdd; if(servCellCfg->numDlBwpToAdd > MAX_NUM_BWP) { - DU_LOG("\nMAC : Number of DL BWP to ADD/MOD [%d] exceeds max limit [%d]",\ + DU_LOG("\nERROR --> MAC : Number of DL BWP to ADD/MOD [%d] exceeds max limit [%d]",\ servCellCfg->numDlBwpToAdd, MAX_NUM_BWP); return RFAILED; } @@ -1326,7 +1326,7 @@ uint8_t fillSpCellCfg(SpCellCfg macSpCellCfg, SchSpCellCfg *schSpCellCfg) if(fillPdschServCellCfg(macSpCellCfg.servCellCfg.pdschServCellCfg, \ &servCellCfg->pdschServCellCfg) != ROK) { - DU_LOG("\nMAC : fillPdschServCellCfg() failed"); + DU_LOG("\nERROR --> MAC : fillPdschServCellCfg() failed"); return RFAILED; } @@ -1334,14 +1334,14 @@ uint8_t fillSpCellCfg(SpCellCfg macSpCellCfg, SchSpCellCfg *schSpCellCfg) if(fillInitialUlBwp(macSpCellCfg.servCellCfg.initUlBwp, \ &servCellCfg->initUlBwp) != ROK) { - DU_LOG("\nMAC : fillInitialUlBwp() failed"); + DU_LOG("\nERROR --> MAC : fillInitialUlBwp() failed"); return RFAILED; } servCellCfg->numUlBwpToAdd = macSpCellCfg.servCellCfg.numUlBwpToAdd; if(servCellCfg->numUlBwpToAdd > MAX_NUM_BWP) { - DU_LOG("\nMAC : Number of UL BWP to ADD/MOD [%d] exceeds max limit [%d]",\ + DU_LOG("\nERROR --> MAC : Number of UL BWP to ADD/MOD [%d] exceeds max limit [%d]",\ servCellCfg->numUlBwpToAdd, MAX_NUM_BWP); return RFAILED; } @@ -1383,7 +1383,7 @@ uint8_t sendUeReqToSch(Pst *pst, SchUeCfg *schUeCfg) FILL_PST_MAC_TO_SCH(schPst, EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH); return(*macSchModUeConfigReqOpts[schPst.selector])(&schPst,schUeCfg); default: - DU_LOG("\n Invalid Pst received %d", pst->event); + DU_LOG("\nERROR --> Invalid Pst received %d", pst->event); return RFAILED; } } @@ -1493,7 +1493,7 @@ uint8_t fillLogicalChannelCfg(SchLcCfg *schLcCfg, LcCfg *macLcCfg) MAC_ALLOC(schLcCfg->drbQos, sizeof(SchDrbQosInfo)); if(!schLcCfg->drbQos) { - DU_LOG("\nMAC : Memory alloc failed at drbQos at fillLogicalChannelCfg()"); + DU_LOG("\nERROR --> MAC : Memory alloc failed at drbQos at fillLogicalChannelCfg()"); ret = RFAILED; } } @@ -1518,7 +1518,7 @@ uint8_t fillLogicalChannelCfg(SchLcCfg *schLcCfg, LcCfg *macLcCfg) MAC_ALLOC(schLcCfg->snssai, sizeof(SchSnssai)); if(!schLcCfg->snssai) { - DU_LOG("\nMAC : Memory alloc failed at snssai at fillLogicalChannelCfg()"); + DU_LOG("\nERROR --> MAC : Memory alloc failed at snssai at fillLogicalChannelCfg()"); ret = RFAILED; } } @@ -1575,7 +1575,7 @@ uint8_t fillSchLcCfgList(SchUeCfg *schUeCfg, MacUeCfg *ueCfg) { if(fillLogicalChannelCfg(&schUeCfg->schLcCfg[lcIdx], &ueCfg->lcCfgList[lcIdx]) != ROK) { - DU_LOG("\nMAC : fillLogicalChannelCfg() failed for lc Idx[%d]", lcIdx); + DU_LOG("\nERROR --> MAC : fillLogicalChannelCfg() failed for lc Idx[%d]", lcIdx); return RFAILED; } schUeCfg->numLcs++; @@ -1609,7 +1609,7 @@ uint8_t fillSchUeCfg(Pst *pst, SchUeCfg *schUeCfg, MacUeCfg *ueCfg) memset(&schUeCfg->macCellGrpCfg, 0, sizeof(SchMacCellGrpCfg)); if(fillMacCellGroupCfg(ueCfg->macCellGrpCfg, &schUeCfg->macCellGrpCfg) != ROK) { - DU_LOG("\nMAC : fillMacCellGroupCfg() failed"); + DU_LOG("\nERROR --> MAC : fillMacCellGroupCfg() failed"); return RFAILED; } @@ -1617,7 +1617,7 @@ uint8_t fillSchUeCfg(Pst *pst, SchUeCfg *schUeCfg, MacUeCfg *ueCfg) memset(&schUeCfg->phyCellGrpCfg, 0,sizeof(SchPhyCellGrpCfg)); if(fillPhyCellGroupCfg(ueCfg->phyCellGrpCfg, &schUeCfg->phyCellGrpCfg) != ROK) { - DU_LOG("\nMAC : fillPhyCellGroupCfg() failed"); + DU_LOG("\nERROR --> MAC : fillPhyCellGroupCfg() failed"); return RFAILED; } @@ -1625,7 +1625,7 @@ uint8_t fillSchUeCfg(Pst *pst, SchUeCfg *schUeCfg, MacUeCfg *ueCfg) memset(&schUeCfg->spCellCfg, 0, sizeof(SchSpCellCfg)); if(fillSpCellCfg(ueCfg->spCellCfg, &schUeCfg->spCellCfg) != ROK) { - DU_LOG("\nMAC : fillSpCellCfg() failed"); + DU_LOG("\nERROR --> MAC : fillSpCellCfg() failed"); return RFAILED; } @@ -1634,7 +1634,7 @@ uint8_t fillSchUeCfg(Pst *pst, SchUeCfg *schUeCfg, MacUeCfg *ueCfg) MAC_ALLOC(schUeCfg->ambrCfg, sizeof(SchAmbrCfg)); if(!schUeCfg->ambrCfg) { - DU_LOG("\nMAC : Memory allocation failed in sendReconfigReqToSch"); + DU_LOG("\nERROR --> MAC : Memory allocation failed in sendReconfigReqToSch"); return RFAILED; } schUeCfg->ambrCfg->ulBr = ueCfg->ambrCfg->ulBr; @@ -1657,7 +1657,7 @@ uint8_t fillSchUeCfg(Pst *pst, SchUeCfg *schUeCfg, MacUeCfg *ueCfg) ret = fillSchLcCfgList(schUeCfg, ueCfg); if(ret == RFAILED) { - DU_LOG("\nMAC : Failed to copy LCs at fillSchUeCfg()"); + DU_LOG("\nERROR --> MAC : Failed to copy LCs at fillSchUeCfg()"); return ret; } return ret; @@ -1765,7 +1765,7 @@ uint8_t fillMacLcCfgList(MacUeCb *ueCb, MacUeCfg *ueCfg) /*Nothing to Modify in DL LC CB */ /*Modify UL LC CB */ ueCb->ulInfo.lcCb[ueLcIdx].lcGrpId = ueCfg->lcCfgList[lcIdx].ulLcCfg.lcGroup; - DU_LOG("\nMAC: Successfully Modified LC context for lcId[%d]", ueCfg->lcCfgList[lcIdx].lcId); + DU_LOG("\nINFO --> MAC: Successfully Modified LC context for lcId[%d]", ueCfg->lcCfgList[lcIdx].lcId); break; } if(ueCfg->lcCfgList[lcIdx].configType == CONFIG_DEL) @@ -1777,7 +1777,7 @@ uint8_t fillMacLcCfgList(MacUeCb *ueCb, MacUeCfg *ueCfg) memset(&ueCb->ulInfo.lcCb[ueLcIdx], 0, sizeof(UlLcCb)); (ueCb->ulInfo.numUlLc)--; updateMacUlCb(ueLcIdx, &ueCb->ulInfo); - DU_LOG("\nMAC: Successfully Deleted LC context for lcId[%d]", ueCfg->lcCfgList[lcIdx].lcId); + DU_LOG("\nINFO --> MAC: Successfully Deleted LC context for lcId[%d]", ueCfg->lcCfgList[lcIdx].lcId); break; } } @@ -1822,7 +1822,7 @@ uint8_t fillMacUeCb(MacUeCb *ueCb, MacUeCfg *ueCfg, uint8_t cellIdx) ret = fillMacLcCfgList(ueCb, ueCfg); if(ret == RFAILED) { - DU_LOG("\nMAC: Failed while filing MAC LC List at fillMacUeCb()"); + DU_LOG("\nERROR --> MAC: Failed while filing MAC LC List at fillMacUeCb()"); } return ret; } @@ -1920,7 +1920,7 @@ uint8_t createUeCb(uint8_t cellIdx, MacUeCb *ueCb, MacUeCfg *ueCfg) if((ueCb->ueIdx == ueCfg->ueIdx) && (ueCb->crnti == ueCfg->crnti)\ &&(ueCb->state == UE_STATE_ACTIVE)) { - DU_LOG("\n MAC : CRNTI %d already configured ", ueCfg->crnti); + DU_LOG("\nERROR --> MAC : CRNTI %d already configured ", ueCfg->crnti); return ROKDUP; } else @@ -1929,7 +1929,7 @@ uint8_t createUeCb(uint8_t cellIdx, MacUeCb *ueCb, MacUeCfg *ueCfg) ret = fillMacUeCb(ueCb, ueCfg, cellIdx); if(ret != ROK) { - DU_LOG("\nMAC : Failed to create Ue Cb at createUeCb()"); + DU_LOG("\nERROR --> MAC : Failed to create Ue Cb at createUeCb()"); return ret; } else @@ -1965,11 +1965,11 @@ uint8_t modifyUeCb(uint8_t cellIdx, MacUeCb *ueCb, MacUeCfg *ueCfg) if((ueCb->ueIdx == ueCfg->ueIdx) && (ueCb->crnti == ueCfg->crnti)\ &&(ueCb->state == UE_STATE_ACTIVE)) { - DU_LOG("\n MAC : Modifying Ue config Req for CRNTI %d ", ueCfg->crnti); + DU_LOG("\nINFO --> MAC : Modifying Ue config Req for CRNTI %d ", ueCfg->crnti); ret = fillMacUeCb(ueCb, ueCfg, cellIdx); if(ret != ROK) { - DU_LOG("\nMAC : Failed to modify MacUeCb at modifyUeCb()"); + DU_LOG("\nERROR --> MAC : Failed to modify MacUeCb at modifyUeCb()"); return ret; } else @@ -2010,14 +2010,14 @@ uint8_t procMacUeCfgData(Pst *pst, MacUeCfg *ueCfg) /* Validate cell id */ if(macCb.macCell[cellIdx]->cellId != ueCfg->cellId) { - DU_LOG("\nMAC : Cell Id %d not configured", ueCfg->cellId); + DU_LOG("\nERROR --> MAC : Cell Id %d not configured", ueCfg->cellId); return RFAILED; } /* Check if max number of UE configured */ if(macCb.macCell[cellIdx]->numActvUe > MAX_NUM_UE) { - DU_LOG("MAC : Max number of UE [%d] already configured", MAX_NUM_UE); + DU_LOG("\nERROR --> MAC : Max number of UE [%d] already configured", MAX_NUM_UE); return RFAILED; } @@ -2028,12 +2028,12 @@ uint8_t procMacUeCfgData(Pst *pst, MacUeCfg *ueCfg) case EVENT_UE_CONFIG_RSP_TO_MAC: ret = createUeCb(cellIdx, ueCb, ueCfg); if(ret != ROK) - DU_LOG("\nMAC: AddUeConfigReq for cellIdx :%d failed in procMacUeCfgData()", cellIdx); + DU_LOG("\nERROR --> MAC: AddUeConfigReq for cellIdx :%d failed in procMacUeCfgData()", cellIdx); break; case EVENT_UE_RECONFIG_RSP_TO_MAC: ret = modifyUeCb(cellIdx, ueCb, ueCfg); if(ret != ROK) - DU_LOG("\nMAC: ModifyUeConfigReq for cellIdx :%d failed at procMacUeCfgData()", cellIdx); + DU_LOG("\nERROR --> MAC: ModifyUeConfigReq for cellIdx :%d failed at procMacUeCfgData()", cellIdx); break; default: break; @@ -2066,7 +2066,7 @@ uint8_t copyToTmpData(MacUeCfg *ueCfg) MAC_ALLOC(tmpData, sizeof(MacUeCfg)); if(!tmpData) { - DU_LOG("\nMAC: Memory Alloc Failed at copyToTmpData()"); + DU_LOG("\nERROR --> MAC: Memory Alloc Failed at copyToTmpData()"); return RFAILED; } memcpy(tmpData, ueCfg, sizeof(MacUeCfg)); @@ -2096,7 +2096,7 @@ uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg) SchUeCfg schUeCfg; memset(&schUeCfg, 0, sizeof(SchUeCfg)); - DU_LOG("\nMAC : UE Create Request for CRNTI[%d]", ueCfg->crnti); + DU_LOG("\nINFO --> MAC : UE Create Request for CRNTI[%d]", ueCfg->crnti); if(ueCfg) { @@ -2107,23 +2107,23 @@ uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg) /*Sending Cfg Req to SCH */ ret = fillSchUeCfg(pst, &schUeCfg, ueCfg); if(ret != ROK) - DU_LOG("\nMAC : Failed to fill Sch Ue Cfg at MacProcUeCreateReq()"); + DU_LOG("\nERROR --> MAC : Failed to fill Sch Ue Cfg at MacProcUeCreateReq()"); else { /* Fill event and send UE create request to SCH */ ret = sendUeReqToSch(pst, &schUeCfg); if(ret != ROK) - DU_LOG("\nMAC : Failed to send UE Create request to SCH"); + DU_LOG("\nERROR --> MAC : Failed to send UE Create request to SCH"); } } else { - DU_LOG("\nMAC : Failed to store MAC UE CFG "); + DU_LOG("\nERROR --> MAC : Failed to store MAC UE CFG "); } } else { - DU_LOG("\nMAC : MAC UE Create request processing failed"); + DU_LOG("\nERROR --> MAC : MAC UE Create request processing failed"); ret = RFAILED; } /* FREE shared memory */ @@ -2156,7 +2156,7 @@ uint8_t MacSendUeCreateRsp(MacRsp result, SchUeCfgRsp *schCfgRsp) MAC_ALLOC_SHRABL_BUF(cfgRsp, sizeof(MacUeCfgRsp)); if(!cfgRsp) { - DU_LOG("\nMAC: Memory allocation for UE config response failed"); + DU_LOG("\nERROR --> MAC: Memory allocation for UE config response failed"); return RFAILED; } @@ -2196,7 +2196,7 @@ uint8_t MacSendUeReconfigRsp(MacRsp result, SchUeCfgRsp *schCfgRsp) MAC_ALLOC_SHRABL_BUF(cfgRsp, sizeof(MacUeCfgRsp)); if(!cfgRsp) { - DU_LOG("\nMAC: Memory allocation for UE Reconfig response failed"); + DU_LOG("\nERROR --> MAC: Memory allocation for UE Reconfig response failed"); return RFAILED; } @@ -2239,7 +2239,7 @@ MacUeCfg *getMacUeCfg(uint16_t cellIdx, uint8_t ueIdx) } else { - DU_LOG("\nMAC: Failed to get macCellCb in getMacUeCfg()"); + DU_LOG("\nERROR --> MAC: Failed to get macCellCb in getMacUeCfg()"); } return ueCfg; } @@ -2273,7 +2273,7 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) ueCfg = getMacUeCfg(cellIdx, schCfgRsp->ueIdx); if(ueCfg == NULLP) { - DU_LOG("\nMAC : Failed to find the Mac Ue Cfg for event [%d] in MacProcSchUeCfgRsp()", pst->event); + DU_LOG("\nERROR --> MAC : Failed to find the Mac Ue Cfg for event [%d] in MacProcSchUeCfgRsp()", pst->event); ret = RFAILED; } @@ -2283,7 +2283,7 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) { if(schCfgRsp->rsp != RSP_NOK) { - DU_LOG("\nMAC: SCH UeConfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + DU_LOG("\nINFO --> MAC: SCH UeConfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); if(ret == ROK) { ret = procMacUeCfgData(pst, ueCfg); @@ -2295,7 +2295,7 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) } else { - DU_LOG("\nMAC: SCH UeConfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + DU_LOG("\nERROR --> MAC: SCH UeConfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); } ret = MacSendUeCreateRsp(result, schCfgRsp); } @@ -2305,7 +2305,7 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) { if(schCfgRsp->rsp != RSP_NOK) { - DU_LOG("\nMAC: SCH UeReconfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + DU_LOG("\nINFO --> MAC: SCH UeReconfigRsp for CRNTI[%d] is success in MacProcSchUeCfgRsp()", schCfgRsp->crnti); if(ret == ROK) { ret = procMacUeCfgData(pst, ueCfg); @@ -2317,7 +2317,7 @@ uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *schCfgRsp) } else { - DU_LOG("\nMAC: SCH UeReconfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); + DU_LOG("\nERROR --> MAC: SCH UeReconfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti); } ret = MacSendUeReconfigRsp(result, schCfgRsp); } @@ -2353,7 +2353,7 @@ uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg) SchUeCfg schUeCfg; memset(&schUeCfg, 0, sizeof(SchUeCfg)); - DU_LOG("\nMAC : UE Reconfig Request for CRNTI[%d]", ueCfg->crnti); + DU_LOG("\nINFO --> MAC : UE Reconfig Request for CRNTI[%d]", ueCfg->crnti); if(ueCfg) { @@ -2364,23 +2364,23 @@ uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg) /*Sending Cfg Req to SCH */ ret = fillSchUeCfg(pst, &schUeCfg, ueCfg); if(ret != ROK) - DU_LOG("\nMAC : Failed to fill sch Ue Cfg at MacProcUeReconfigReq()"); + DU_LOG("\nERROR --> MAC : Failed to fill sch Ue Cfg at MacProcUeReconfigReq()"); else { /* Fill event and send UE create request to SCH */ ret = sendUeReqToSch(pst, &schUeCfg); if(ret != ROK) - DU_LOG("\nMAC : Failed to send UE Reconfig Request to SCH"); + DU_LOG("\nERROR --> MAC : Failed to send UE Reconfig Request to SCH"); } } else { - DU_LOG("\nMAC : Failed to store MAC UE Cb "); + DU_LOG("\nERROR --> MAC : Failed to store MAC UE Cb "); } } else { - DU_LOG("\nMAC : MAC UE Create request processing failed"); + DU_LOG("\nERROR --> MAC : MAC UE Create request processing failed"); ret = RFAILED; } /* FREE shared memory */ -- 2.16.6