X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ptui.c;h=840d46028d9fa1487e2ad5ac94e52ac1fc715659;hb=7602d994b0efa53be2a79b8f66a8d83be8b5420d;hp=e9f8756d01674245e1ad272799cad2d048f258cd;hpb=2193e4cf01012809495be026097e8d7eacb9f0ac;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ptui.c b/src/5gnrrlc/kw_ptui.c index e9f8756d0..840d46028 100755 --- a/src/5gnrrlc/kw_ptui.c +++ b/src/5gnrrlc/kw_ptui.c @@ -18,18 +18,15 @@ /********************************************************************20** - Name: LTE-RLC Layer - Upper Interface + Name: NR RLC Layer - Upper Interface Type: C file - Desc: C source code for the upper interface of LTE-RLC + Desc: C source code for the upper interface of NR RLC File: kw_ptui.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="UIM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=199; /** @file kw_ptui.c @brief RLC Upper Interface @@ -63,7 +60,7 @@ static int RLOG_FILE_ID=199; #endif #ifdef __cplusplus -EXTERN "C" { +extern "C" { #endif /* __cplusplus */ @@ -73,10 +70,10 @@ EXTERN "C" { #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF) S16 rlcDlBatchProc ARGS ((Void)); S16 rlcUtlDlFreeRlcRBuf ARGS((Void)); -EXTERN void rlcUtlDlBatchProcHqStaInd ARGS ((Void)); -EXTERN Void rlcUtlFreeDlMem ARGS((Void)); -EXTERN SsRngBufCnt rngCb; -EXTERN S16 rlcUtlDlBatchProcPkts ARGS((Void)); +void rlcUtlDlBatchProcHqStaInd ARGS ((Void)); +Void rlcUtlFreeDlMem ARGS((Void)); +SsRngBufCnt rngCb; +S16 rlcUtlDlBatchProcPkts ARGS((Void)); #endif #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)) @@ -253,21 +250,13 @@ KwuDatAckInd kwUiKwuDatAckIndMt[] = * -# ROK * */ -#ifdef ANSI S16 RlcUiKwuBndCfm ( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* Status */ +Pst *pst, /* post structure */ +SuId suId, /* Service User Id */ +uint8_t status /* Status */ ) -#else -S16 RlcUiKwuBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* Status */ -#endif { - TRC3(RlcUiKwuBndCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuBndCfmMt[pst->selector])(pst, suId, status); @@ -297,21 +286,13 @@ U8 status; /* Status */ * -# ROK * -# RFAILED */ -#ifdef ANSI S16 rlcSendUlDataToDu ( Pst *pst, KwuDatIndInfo *datInd, Buffer *mBuf ) -#else -S16 rlcSendUlDataToDu(pst, datInd, mBuf) -Pst *pst; -KwuDatIndInfo *datInd; -Buffer *mBuf; -#endif { - TRC3(rlcSendUlDataToDu) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDatIndMt[pst->selector])(pst, datInd, mBuf); @@ -342,22 +323,14 @@ Buffer *mBuf; * -# ROK * -# RFAILED */ -#ifdef ANSI S16 RlcUiKwuDatCfm ( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm +Pst *pst, +SuId suId, +KwuDatCfmInfo *datCfm ) -#else -S16 RlcUiKwuDatCfm(pst, suId, datCfm) -Pst *pst; -SuId suId; -KwuDatCfmInfo *datCfm; -#endif { rlcDatCfmsSent++; - TRC3(RlcUiKwuDatCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDatCfmMt[pst->selector])(pst, suId, datCfm); @@ -387,21 +360,13 @@ KwuDatCfmInfo *datCfm; * -# ROK * -# RFAILED */ -#ifdef ANSI S16 RlcUiKwuStaInd ( Pst *pst, SuId suId, KwuStaIndInfo *staInd ) -#else -S16 RlcUiKwuStaInd(pst, suId, staInd) -Pst *pst; -SuId suId; -KwuStaIndInfo *staInd; -#endif { - TRC3(RlcUiKwuStaInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuStaIndMt[pst->selector])(pst, suId, staInd); @@ -431,22 +396,14 @@ KwuStaIndInfo *staInd; * -# ROK * -# RFAILED */ -#ifdef ANSI S16 RlcUiKwuReEstCmpInd ( Pst *pst, SuId suId, CmLteRlcId rlcId ) -#else -S16 RlcUiKwuReEstCmpInd(pst, suId, rlcId) -Pst *pst; -SuId suId; -CmLteRlcId rlcId; -#endif { - TRC3(RlcUiKwuReEstCmpInd) - RLOG0(L_DEBUG, "In RlcUiKwuReEstCmpInd"); + DU_LOG("\nINFO --> RLC : In RlcUiKwuReEstCmpInd"); /* jump to specific primitive depending on configured selector */ (*kwUiKwuReEstCmpIndMt[pst->selector])(pst, suId, rlcId); @@ -474,21 +431,13 @@ CmLteRlcId rlcId; * -# ROK * -# RFAILED */ -#ifdef ANSI S16 RlcUiKwuDiscSduCfm ( Pst *pst, SuId suId, KwuDiscSduInfo *discCfm ) -#else -S16 RlcUiKwuDiscSduCfm(pst, suId, discCfm) -Pst *pst; -SuId suId; -KwuDiscSduInfo *discCfm; -#endif { - TRC3(RlcUiKwuDiscSduCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDiscSduCfmMt[pst->selector])(pst, suId, discCfm); @@ -516,21 +465,8 @@ KwuDiscSduInfo *discCfm; * -# ROK * -# RFAILED */ -#ifdef ANSI -S16 RlcUiKwuFlowCntrlInd -( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -) -#else -S16 RlcUiKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo) -Pst *pst; -SuId suId; -KwuFlowCntrlIndInfo *flowCntrlIndInfo; -#endif +S16 RlcUiKwuFlowCntrlInd(Pst *pst,SuId suId,KwuFlowCntrlIndInfo *flowCntrlIndInfo) { - TRC3(RlcUiKwuFlowCntrlInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuFlowCntrlIndMt[pst->selector])(pst, suId, flowCntrlIndInfo); @@ -558,21 +494,8 @@ KwuFlowCntrlIndInfo *flowCntrlIndInfo; * -# ROK * -# RFAILED */ -#ifdef ANSI -S16 RlcUiKwuDatAckInd -( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -) -#else -S16 RlcUiKwuDatAckInd(pst, suId, datAckInd) -Pst *pst; -SuId suId; -KwuDatAckInfo *datAckInd; -#endif +S16 RlcUiKwuDatAckInd(Pst *pst,SuId suId,KwuDatAckInfo *datAckInd) { - TRC3(RlcUiKwuDatAckInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDatAckIndMt[pst->selector])(pst, suId, datAckInd); @@ -647,21 +570,13 @@ CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] = * @return S16 * -# ROK */ -#ifdef ANSI S16 RlcUiCkwBndCfm ( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* Status */ +Pst *pst, /* post structure */ +SuId suId, /* Service User Id */ +uint8_t status /* Status */ ) -#else -S16 RlcUiCkwBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* Status */ -#endif { - TRC3(RlcUiCkwBndCfm) /* jump to specific primitive depending on configured selector */ (*kwUiCkwBndCfmMt[pst->selector])(pst, suId, status); @@ -691,21 +606,13 @@ U8 status; /* Status */ * -# ROK * */ -#ifdef ANSI S16 RlcUiRlcCfgCfm ( Pst *pst, /* post structure */ SuId suId, /* Service User Id */ RlcCfgCfmInfo *cfmInfo /* Configuration Confirm */ ) -#else -S16 RlcUiRlcCfgCfm(pst, suId, cfmInfo) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -RlcCfgCfmInfo *cfmInfo; /* Configuration Confirm */ -#endif { - TRC3(RlcUiRlcCfgCfm) /* jump to specific primitive depending on configured selector */ (*kwUiRlcCfgCfmMt[pst->selector])(pst, suId, cfmInfo); @@ -735,25 +642,15 @@ RlcCfgCfmInfo *cfmInfo; /* Configuration Confirm */ * -# ROK * */ -#ifdef ANSI S16 RlcUiCkwUeIdChgCfm ( Pst *pst, /* post structure */ SuId suId, /* Service User Id */ -U32 transId, +uint32_t transId, CkwUeInfo *ueInfo, CmStatus status ) -#else -S16 RlcUiCkwUeIdChgCfm(pst, suId, transId,ueInfo,status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U32 transId; -CkwUeInfo *ueInfo; -CmStatus status; -#endif { - TRC3(RlcUiCkwUeIdChgCfm) /* jump to specific primitive depending on configured selector */ (*kwUiCkwUeIdChgCfmMt[pst->selector])(pst, suId, transId, ueInfo, status); @@ -773,26 +670,18 @@ CmStatus status; * @return S16 * -# ROK */ -#ifdef ANSI -S16 rlcDlBatchProcSplit -( -Void -) -#else -S16 rlcDlBatchProcSplit() -Void; -#endif +S16 rlcDlBatchProcSplit(Void) { /* Read from Ring Buffer and process PDCP packets */ Void *elmIndx = NULLP; RxmBufReq *datReq = NULLP; #ifdef LTE_ADV - U32 dlPktCount = 0; + uint32_t dlPktCount = 0; #endif - U8 rngBufDeqIndx = 0; - U32 rngBufDeqMaxCnt; - U32 rngBufCurrCnt; + uint8_t rngBufDeqIndx = 0; + uint32_t rngBufDeqMaxCnt; + uint32_t rngBufCurrCnt; rngBufDeqMaxCnt = SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT; #ifdef TENB_T2K3K_SPECIFIC_CHANGES @@ -820,7 +709,7 @@ Void; } else { - RLOG0(L_ERROR, "mBuf is NULL"); + DU_LOG("\nERROR --> RLC : mBuf is NULL"); if(datReq->mBuf) cmUnpkKwuDatReq(rlcProcDlData, &datReq->pst, datReq->mBuf); @@ -853,33 +742,25 @@ Void; #endif #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF) -#ifdef ANSI -S16 rlcDlBatchProc -( -Void -) -#else -S16 rlcDlBatchProc() -Void; -#endif +S16 rlcDlBatchProc(Void) { /* Read from Ring Buffer and process PDCP packets */ - U8 rngBufDeqIndx = 0; - U32 rngBufDeqMaxCnt; + uint8_t rngBufDeqIndx = 0; + uint32_t rngBufDeqMaxCnt; #ifdef TENB_T2K3K_SPECIFIC_CHANGES - U32 rngBufCurrCnt; + uint32_t rngBufCurrCnt; #endif /* Memory regions different for BRCM and Intel */ /*dstProcId,srcProcId,dstEnt,dstInst,srcEnt,srcInst,prior,route,event,region,pool,selector*/ #ifdef SS_RBUF - PRIVATE Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,1,1,0,0}; + static Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,1,1,0,0}; #else - PRIVATE Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,2,1,0,0}; + static Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,2,1,0,0}; #endif Void *elmIndx = NULLP; KwuDatReqDetl *kwuDatReqDetl = NULLP; - KwuDatReqInfo datReq; + RlcDatReqInfo datReq; rngBufDeqMaxCnt = SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT; #ifdef TENB_T2K3K_SPECIFIC_CHANGES @@ -904,7 +785,7 @@ Void; datReq.rlcId = kwuDatReqDetl->rlcId; datReq.sduId = kwuDatReqDetl->sduId; datReq.lcType = kwuDatReqDetl->lcType; - SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;;//Number of pkt processed in tti + SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;//Number of pkt processed in tti if(kwuDatReqDetl->mBuf != NULLP) { rlcProcDlData(&rlcDlRbfuPst, kwuDatReqDetl->spId, &datReq, kwuDatReqDetl->mBuf); @@ -923,15 +804,7 @@ Void; } -#ifdef ANSI -S16 rlcUtlDlBatchProcPkts -( -Void -) -#else -S16 rlcUtlDlBatchProcPkts -Void; -#endif +S16 rlcUtlDlBatchProcPkts(Void) { rlcDlBatchProc(); #ifdef SS_RBUF @@ -944,15 +817,7 @@ Void; } -#ifdef ANSI -S16 rlcUtlDlFreeRlcRBuf -( -Void -) -#else -S16 rlcUtlDlFreeRlcRBuf -Void; -#endif +S16 rlcUtlDlFreeRlcRBuf(Void) { /* Read from Ring Buffer and process PDCP packets */ Void *elmIndx = NULLP;