From 3ecca3e4e3a36a7f357a475bd4a938b0ac551e7c Mon Sep 17 00:00:00 2001 From: sphoorthi Date: Wed, 13 Jan 2021 12:56:31 +0530 Subject: [PATCH] Separation of logs Part - 2 Change-Id: Ie0f9e332ff788bf6332c3a5517c6f77151136885 Signed-off-by: sphoorthi --- src/5gnrmac/lwr_mac_ex_ms.c | 6 +++--- src/5gnrmac/lwr_mac_handle_phy.c | 25 +++++++++++++------------ src/5gnrmac/lwr_mac_upr_inf.c | 12 ++++++------ src/5gnrmac/lwr_mac_util.c | 2 +- src/5gnrmac/mac_rach.c | 2 +- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/5gnrmac/lwr_mac_ex_ms.c b/src/5gnrmac/lwr_mac_ex_ms.c index ae44c99a9..f446545f7 100644 --- a/src/5gnrmac/lwr_mac_ex_ms.c +++ b/src/5gnrmac/lwr_mac_ex_ms.c @@ -80,7 +80,7 @@ uint8_t lwrMacActvTsk(Pst *pst, Buffer *mBuf) case EVT_START_WLS_RCVR: { SPutMsg(mBuf); - DU_LOG("\nLWR MAC: Starting WLS receiver thread"); + DU_LOG("\nINFO --> LWR MAC: Starting WLS receiver thread"); LwrMacRecvPhyMsg(); break; } @@ -88,7 +88,7 @@ uint8_t lwrMacActvTsk(Pst *pst, Buffer *mBuf) default: { SPutMsg(mBuf); - DU_LOG("\nLWR MAC: Invalid event %d received", pst->event); + DU_LOG("\nERROR --> LWR MAC: Invalid event %d received", pst->event); ret = RFAILED; } } @@ -97,7 +97,7 @@ uint8_t lwrMacActvTsk(Pst *pst, Buffer *mBuf) default: { SPutMsg(mBuf); - DU_LOG("\nLWR MAC: Message from invalid source entity %d", pst->srcEnt); + DU_LOG("\nERROR --> LWR MAC: Message from invalid source entity %d", pst->srcEnt); ret = RFAILED; } } diff --git a/src/5gnrmac/lwr_mac_handle_phy.c b/src/5gnrmac/lwr_mac_handle_phy.c index 28a0ea272..b07ac4060 100644 --- a/src/5gnrmac/lwr_mac_handle_phy.c +++ b/src/5gnrmac/lwr_mac_handle_phy.c @@ -120,7 +120,7 @@ uint8_t procSlotInd(fapi_slot_ind_t *fapiSlotInd) } else { - printf("\nLWR_MAC: Memory allocation failed in procSlotInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in procSlotInd"); ret = RFAILED; } @@ -158,14 +158,14 @@ uint8_t procStopInd() MAC_ALLOC_SHRABL_BUF(cellId, sizeof(uint16_t)); if(!cellId) { - printf("\nLWR_MAC: Memory Allocation failed in procStopInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procStopInd"); return RFAILED; } *cellId = lwrMacCb.cellCb[0].cellId; lwrMacCb.phyState = PHY_STATE_CONFIGURED; lwrMacCb.cellCb[0].state = PHY_STATE_CONFIGURED; - DU_LOG("\nLWR_MAC: PHY has moved to configured state"); + DU_LOG("\nINFO --> LWR_MAC: PHY has moved to configured state"); FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_STOP_IND_TO_MAC); return (*sendStopIndOpts[pst.selector])(&pst, cellId); @@ -198,7 +198,7 @@ uint8_t procRachInd(fapi_rach_indication_t *fapiRachInd) MAC_ALLOC_SHRABL_BUF(rachInd, sizeof(RachInd)); if(!rachInd) { - printf("\nLWR_MAC: Memory Allocation failed in procRachInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procRachInd"); return RFAILED; } @@ -257,7 +257,7 @@ uint8_t procCrcInd(fapi_crc_ind_t *fapiCrcInd) MAC_ALLOC_SHRABL_BUF(crcInd, sizeof(CrcInd)); if(!crcInd) { - printf("\nLWR_MAC: Memory Allocation failed in procCrcInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procCrcInd"); return RFAILED; } @@ -316,7 +316,7 @@ uint8_t procRxDataInd(fapi_rx_data_indication_t *fapiRxDataInd) MAC_ALLOC_SHRABL_BUF(rxDataInd, sizeof(RxDataInd)); if(!rxDataInd) { - printf("\nLWR_MAC: Memory Allocation failed in procRxDataInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procRxDataInd"); return RFAILED; } @@ -423,10 +423,11 @@ uint8_t procUciInd(fapi_uci_indication_t *fapiUciInd) MAC_ALLOC_SHRABL_BUF(macUciInd, sizeof(UciInd)); if(!macUciInd) { - printf("\nLWR_MAC: Memory Allocation failed in procUciInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procUciInd"); return RFAILED; } + DU_LOG("\nDEBUG --> LWR_MAC: Processing UCI Indication"); memset(macUciInd, 0, sizeof(UciInd)); macUciInd->cellId = lwrMacCb.cellCb[0].cellId; macUciInd->slotInd.sfn = fapiUciInd->sfn; @@ -451,7 +452,7 @@ uint8_t procUciInd(fapi_uci_indication_t *fapiUciInd) case UCI_IND_PUCCH_F2F3F4: break; default: - DU_LOG("\nLWR_MAC: Invalid Pdu Type %d at procmacUciInd()", macUciInd->pdus[pduIdx].pduType); + DU_LOG("\nERROR --> LWR_MAC: Invalid Pdu Type %d at procmacUciInd()", macUciInd->pdus[pduIdx].pduType); ret = RFAILED; break; } @@ -463,7 +464,7 @@ uint8_t procUciInd(fapi_uci_indication_t *fapiUciInd) } else { - DU_LOG("\nLWR_MAC: Failed sending UCI Ind to MAC"); + DU_LOG("\nERROR --> LWR_MAC: Failed sending UCI Ind to MAC"); } return ret; } @@ -496,7 +497,7 @@ void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg) #ifdef INTEL_TIMER_MODE case FAPI_VENDOR_EXT_UL_IQ_SAMPLES: { - printf("\nLWR_MAC: Received FAPI_VENDOR_EXT_UL_IQ_SAMPLES"); + DU_LOG("\nDEBUG --> LWR_MAC: Received FAPI_VENDOR_EXT_UL_IQ_SAMPLES"); //send config req uint16_t cellId = 1; sendToLowerMac(CONFIG_REQUEST, 0, (void *)&cellId); @@ -517,7 +518,7 @@ void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg) { if(lwrMacCb.phyState == PHY_STATE_CONFIGURED) { - DU_LOG("\nLWR_MAC: PHY has moved to running state"); + DU_LOG("\nINFO --> LWR_MAC: PHY has moved to running state"); lwrMacCb.phyState = PHY_STATE_RUNNING; lwrMacCb.cellCb[0].state = PHY_STATE_RUNNING; } @@ -565,7 +566,7 @@ void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg) } case FAPI_STOP_INDICATION: { - DU_LOG("\nLWR_MAC: Handling Stop Indication"); + DU_LOG("\nINFO --> LWR_MAC: Handling Stop Indication"); procStopInd(); break; } diff --git a/src/5gnrmac/lwr_mac_upr_inf.c b/src/5gnrmac/lwr_mac_upr_inf.c index 9b92d6af8..4a7319a11 100644 --- a/src/5gnrmac/lwr_mac_upr_inf.c +++ b/src/5gnrmac/lwr_mac_upr_inf.c @@ -42,7 +42,7 @@ uint8_t packCrcInd(Pst *pst, CrcInd *crcInd) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packCrcInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packCrcInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)crcInd, mBuf); @@ -107,7 +107,7 @@ uint8_t packRxDataInd(Pst *pst, RxDataInd *rxDataInd) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packRxDataInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packRxDataInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)rxDataInd, mBuf); @@ -172,7 +172,7 @@ uint8_t packRachInd(Pst *pst, RachInd *rachInd) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packRachInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packRachInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)rachInd, mBuf); @@ -236,7 +236,7 @@ uint8_t packSlotInd (Pst *pst, SlotIndInfo *slotInd) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packSlotInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packSlotInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)slotInd, mBuf); @@ -300,7 +300,7 @@ uint8_t packStopInd(Pst *pst, uint16_t *cellId) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packStopInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packStopInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)cellId, mBuf); @@ -363,7 +363,7 @@ uint8_t packUciInd(Pst *pst, UciInd *uciInd) Buffer *mBuf = NULLP; if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nLWR_MAC: Memory allocation failed in packUciInd"); + DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed in packUciInd"); return RFAILED; } CMCHKPK(oduPackPointer,(PTR)uciInd, mBuf); diff --git a/src/5gnrmac/lwr_mac_util.c b/src/5gnrmac/lwr_mac_util.c index 6dfddc2d0..0a926913c 100644 --- a/src/5gnrmac/lwr_mac_util.c +++ b/src/5gnrmac/lwr_mac_util.c @@ -46,7 +46,7 @@ LwrMacCellCb * lwrMacGetCellCb if(cellId >= MAX_NUM_CELL) { - printf("\n Invalid Cell Id [%d]. rgClUtlGetCellCb failed.", cellId); + DU_LOG("\nERROR --> Invalid Cell Id [%d]. rgClUtlGetCellCb failed.", cellId); return NULLP; } diff --git a/src/5gnrmac/mac_rach.c b/src/5gnrmac/mac_rach.c index 9efad6c25..18a6200bf 100644 --- a/src/5gnrmac/mac_rach.c +++ b/src/5gnrmac/mac_rach.c @@ -80,7 +80,7 @@ uint8_t fapiMacRachInd(Pst *pst, RachInd *rachInd) uint8_t preambleIdx; RachIndInfo rachIndInfo; - DU_LOG("\nMAC : Received RACH indication"); + DU_LOG("\nINFO --> MAC : Received RACH indication"); /* Considering one pdu and one preamble */ pduIdx = 0; preambleIdx = 0; -- 2.16.6