X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_lmm.c;h=25a5429c1a49d6a8482652f02e1c0d05ff17adca;hb=3330932565e15a749fd5dd5039cdea2862ca51cc;hp=5500bec46045b19e0e5e7c3f9acceb3f9c592df3;hpb=d75d1b078091768f45b83f2a745a25917e03b39d;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_lmm.c b/src/5gnrrlc/kw_lmm.c index 5500bec46..25a5429c1 100755 --- a/src/5gnrrlc/kw_lmm.c +++ b/src/5gnrrlc/kw_lmm.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE - RLC - Layer Manager file + Name: NR RLC - Layer Manager file Type: C source file @@ -38,9 +38,6 @@ File: kw_lmm.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="LMM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=197; /** @file kw_lmm.c @brief RLC Layer Manager Module **/ @@ -133,7 +130,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxUe > RLC_MAX_UE) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxUe : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxUe : Max [%lu] Received [%lu]", RLC_MAX_UE, cfg->maxUe); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -143,7 +140,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxKwuSaps > RLC_MAX_KWUSAPS) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxKwuSaps : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxKwuSaps : Max [%lu] Received [%lu]", RLC_MAX_KWUSAPS, cfg->maxKwuSaps); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -153,7 +150,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxUdxSaps > RLC_MAX_UDXSAPS) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxUduSaps : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxUduSaps : Max [%lu] Received [%lu]", RLC_MAX_UDXSAPS, cfg->maxUdxSaps); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -184,7 +181,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_ALLOC(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); if (gCb->u.dlCb == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -198,7 +195,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(gCb->u.dlCb->rlcKwuDlSap == NULLP) { RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -214,7 +211,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) { RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -244,7 +241,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.dlCb->rguDlSap, rguSapSize); RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"RLC DL Initialization failed"); + DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -285,7 +282,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_ALLOC(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); if (gCb->u.ulCb == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -299,7 +296,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(gCb->u.ulCb->rlcKwuUlSap == NULLP) { RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -317,7 +314,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) { RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -346,7 +343,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb->rguUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"RLC DL Initialization failed"); + DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed"); } /* Register the timer */ @@ -368,7 +365,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) else { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG0(L_ERROR, "Received Invalid RLC Mode"); + DU_LOG("\nERROR --> RLC : Received Invalid RLC Mode"); #endif /* ERRCLASS & ERRCLS_INT_PAR */ return (LCM_REASON_INVALID_PAR_VAL); @@ -471,7 +468,7 @@ Header *hdr break; default: #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG0(L_ERROR, "Received Invalid Message Type"); + DU_LOG("\nERROR --> RLC : Received Invalid Message Type"); if(!gCb) { fflush(stdout); @@ -580,7 +577,7 @@ uint8_t RlcMiRlcConfigReq (Pst *pst,RlcMngmt *cfg) return (RFAILED); } - RLOG1(L_DEBUG, "RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt); switch(cfg->hdr.elmId.elmnt) { @@ -718,7 +715,7 @@ uint8_t RlcMiLkwCntrlReq(Pst *pst, RlcMngmt *cntrl) rlcLmmSendCfm(tRlcCb,pst, cntrl, TCNTRL, &cntrl->hdr); return (RFAILED); } - RLOG1(L_DEBUG, "RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt); /* In normal cases, LCM_REASON_NOT_APPL is returned in cfm. * In all error cases appropriate reason is returned @@ -808,7 +805,7 @@ S16 RlcMiLkwStaReq(Pst *pst,RlcMngmt *sta) return (RFAILED); } - RLOG1(L_DEBUG, "Status request for elmId(%d))", sta->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : Status request for elmId(%d))", sta->hdr.elmId.elmnt); reason = LCM_REASON_NOT_APPL; @@ -930,7 +927,7 @@ S16 RlcMiLkwStsReq (Pst *pst, Action action,RlcMngmt *sts) return (RFAILED); } - RLOG2(L_DEBUG, "RlcMiLkwStsReq(elmId(%d),action(%d))", + DU_LOG("\nDEBUG --> RLC : RlcMiLkwStsReq(elmId(%d),action(%d))", action, sts->hdr.elmId.elmnt); @@ -1084,7 +1081,7 @@ S16 RlcMiLkwL2MeasReq(Pst *pst, RlcL2MeasReqEvt *measReqEvt) #if (ERRCLASS & ERRCLS_ADD_RES) /* KW_FIX */ if(measEvt == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return RFAILED; } #endif @@ -1247,7 +1244,7 @@ static S16 rlcLmmCfgKwuSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if (rlcKwuSapCb->state != RLC_SAP_NOT_CFG) { - RLOG2(L_ERROR,"RLC Mode [%d] : Invalid rlckwuSap State [%d]", + DU_LOG("\nERROR --> RLC : RLC Mode [%d] : Invalid rlckwuSap State [%d]", gCb->genCfg.rlcMode, rlcKwuSapCb->state); /* reconfiguration not allowed */ return (LCM_REASON_RECONFIG_FAIL); @@ -1297,7 +1294,7 @@ static S16 rlcLmmCfgCkwSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(ckwSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid rlckwuSap State [%d]",ckwSap->state); + DU_LOG("\nERROR --> RLC : Invalid rlckwuSap State [%d]",ckwSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1341,7 +1338,7 @@ static S16 rlcLmmCfgUdxSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(udxDlSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid udxDlSap State [%d]",udxDlSap->state); + DU_LOG("\nERROR --> RLC : Invalid udxDlSap State [%d]",udxDlSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1357,7 +1354,7 @@ static S16 rlcLmmCfgUdxSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(udxUlSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid udxUlSap State [%d]", udxUlSap->state); + DU_LOG("\nERROR --> RLC : Invalid udxUlSap State [%d]", udxUlSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1407,7 +1404,7 @@ static S16 rlcLmmCfgRguSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(rguSap->state != RLC_SAP_NOT_CFG) { - RLOG2(L_ERROR,"RLC Mode [%d]: Invalid rguSap State [%d]", + DU_LOG("\nERROR --> RLC : RLC Mode [%d]: Invalid rguSap State [%d]", gCb->genCfg.rlcMode, rguSap->state); return (LCM_REASON_RECONFIG_FAIL); } @@ -1744,7 +1741,7 @@ static S16 rlcLmmUdxSapCntrl(RlcCb *gCb,RlcMngmt *cntrl) /* validate SAP */ if(UDX_SAP.state == RLC_SAP_NOT_CFG) { - RLOG0(L_ERROR,"udxUlSap not configured yet"); + DU_LOG("\nERROR --> RLC : udxUlSap not configured yet"); return (LCM_REASON_INVALID_STATE); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1816,7 +1813,7 @@ static S16 rlcLmmLSapCntrl(RlcCb *gCb,RlcMngmt *cntrl) /* validate SAP */ if(rguSap->state == RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode); + DU_LOG("\nERROR --> RLC : RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode); return (LCM_REASON_INVALID_STATE); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -2142,7 +2139,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) MsgLen tempCnt; Pst pst; - RLOG2(L_DEBUG, "rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d", + DU_LOG("\nDEBUG --> RLC : rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d", event, gCb->trcLen); @@ -2164,7 +2161,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) != ROK) { /* rg005.201 removed SPutSBuf on error */ - RLOG0(L_ERROR,"SCpyMsgMsg Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed"); return RFAILED; } /* Send Trace Indication to Layer manager */ @@ -2176,7 +2173,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) /* Get the length of the recvd message buffer */ if (SFndLenMsg(mBuf, &bufLen) != ROK) { - RLOG0(L_ERROR,"SFndLenMsg Failed"); + DU_LOG("\nERROR --> RLC : SFndLenMsg Failed"); return RFAILED; } /* Check if the recvd buffer size is less than request trace len */ @@ -2187,7 +2184,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) if (SCpyMsgMsg(mBuf, pst.region, pst.pool, &dstMbuf) != ROK) { - RLOG0(L_ERROR,"SCpyMsgMsg Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed"); return RFAILED; } @@ -2205,7 +2202,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) { (Void) SPutSMem(RLC_GET_MEM_REGION(gCb), RLC_GET_MEM_POOL(gCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -2213,19 +2210,19 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) /* Copy trcLen nos of bytes from the recvd message */ if (SCpyMsgFix(mBuf,0,gCb->trcLen,tempBuf,&tempCnt) != ROK) { - RLOG0(L_ERROR,"SCpyMsgFix Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed"); return RFAILED; } if (SGetMsg(pst.region, pst.pool, &dstMbuf) != ROK) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return RFAILED; } /* Copy the tempBuf data to dst mBuf */ if (SCpyFixMsg(tempBuf,dstMbuf,0,gCb->trcLen,&tempCnt) != ROK) { - RLOG0(L_ERROR,"SCpyMsgFix Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed"); return RFAILED; }