X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ptli.c;h=261ac789f843987fc038521d886fe0363660bc25;hb=3330932565e15a749fd5dd5039cdea2862ca51cc;hp=811bc25a22058b63545486f091ce361b4e66a2d3;hpb=694adde1a08c393a8443fd5bbd4f036f5cf85403;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ptli.c b/src/5gnrrlc/kw_ptli.c index 811bc25a2..261ac789f 100755 --- a/src/5gnrrlc/kw_ptli.c +++ b/src/5gnrrlc/kw_ptli.c @@ -18,11 +18,11 @@ /********************************************************************20** - Name: LTE-RLC Layer - Lower Interface + Name: NR RLC Layer - Lower Interface Type: C file - Desc: C source code for the lower interface of LTE-RLC + Desc: C source code for the lower interface of NR RLC File: kw_ptli.c @@ -71,7 +71,7 @@ #endif #ifdef __cplusplus -EXTERN "C" { +extern "C" { #endif /* __cplusplus */ @@ -84,7 +84,7 @@ S16 rlcLiRguDatReqRbuf(Pst *Post,SpId spId,Void *datReq); S16 rlcLiRguStaRspRbuf(Pst *Post,SpId spId,Void *staRsp); #endif #if defined(MAC_RLC_HARQ_STA_RBUF) && defined(LTE_L2_MEAS) -EXTERN S16 RlcDlHarqStaBatchProc (Void); +S16 RlcDlHarqStaBatchProc (Void); #endif @@ -163,19 +163,12 @@ RguL2MUlThrpMeasReq kwLiRguL2MUlThrpMeasReqMt[] = * -# ROK */ -#ifdef ANSI S16 RlcLiRguBndReq ( Pst *post, /* post structure */ SuId suId, /* Service User Id */ SpId spId /* Service Provider Id */ ) -#else -S16 RlcLiRguBndReq(post, suId, spId) -Pst *post; /* post structure */ -SuId suId; /* Service User Id */ -SpId spId; /* Service Provider Id */ -#endif { /* jump to specific primitive depending on configured selector */ @@ -205,19 +198,7 @@ SpId spId; /* Service Provider Id */ * -# ROK */ -#ifdef ANSI -S16 RlcLiRguUbndReq -( -Pst *post, -SpId spId, -Reason reason -) -#else -S16 RlcLiRguUbndReq(post, spId, reason) -Pst *post; -SpId spId; -Reason reason; -#endif +S16 RlcLiRguUbndReq(Pst *post,SpId spId,Reason reason) { /* jump to specific primitive depending on configured selector */ @@ -252,19 +233,7 @@ Reason reason; * -# RFAILED * */ -#ifdef ANSI -S16 RlcLiRguL2MUlThrpMeasReq -( -Pst *post, -SpId spId, -RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq -) -#else -S16 RlcLiRguL2MUlThrpMeasReq(post, spId, l2mUlThrpMeasReq) -Pst *post; -SpId spId; -RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq; -#endif +S16 RlcLiRguL2MUlThrpMeasReq(Pst *post,SpId spId,RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq) { /* jump to specific primitive depending on configured selector */ @@ -280,41 +249,33 @@ RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq; #ifdef MAC_RLC_UL_RBUF S16 rlcUlBatchProc ARGS ((Void)); -EXTERN Void rlcUtlFreeUlRBuf ARGS((void)); +Void rlcUtlFreeUlRBuf ARGS((void)); -#ifdef ANSI -S16 rlcUlBatchProc -( -Void -) -#else -S16 rlcUlBatchProc() -Void; -#endif +S16 rlcUlBatchProc(Void) { /* Read from Ring Buffer and process PDCP packets */ RguDDatIndInfo *datInd; Void *elmIndx = NULLP; - PRIVATE Pst rlcUlRbfuPst={1,1,ENTRLC,0,ENTMAC,0,PRIOR0,RTESPEC,EVTRLCULDAT,0,0,0,0}; + static Pst rlcUlRbfuPst={1,1,ENTRLC,0,ENTMAC,0,PRIOR0,RTESPEC,EVTRLCULDAT,0,0,0,0}; /* Read from Ring Buffer and process PDCP packets */ #ifndef SS_RBUF RguDedDatInd1 *rguDatInd = NULLP; - U8 rngBufDeqIndx = 0; + uint8_t rngBufDeqIndx = 0; elmIndx = SRngGetRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC); while(NULLP != elmIndx) { rguDatInd = (RguDedDatInd1 *)elmIndx; datInd = (RguDDatIndInfo*) rguDatInd->msg; - SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].nPktProc++;;//Number of pkt processed in tti + SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].nPktProc++;//Number of pkt processed in tti if(datInd != NULLP) { RlcProcDedLcUlData(&rlcUlRbfuPst, 0, datInd); } else { - RLOG0(L_ERROR,"Received NULL buffer"); + DU_LOG("\nERROR --> RLC UL : Received NULL buffer"); } rguDatInd->msg=NULLP; SRngIncrRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC); @@ -361,16 +322,12 @@ Void; * -# RFAILED * */ -#ifdef ANSI Void rlcUtlFreeUlRBuf(void) -#else -Void rlcUtlFreeUlRBuf() -#endif { RguDDatIndInfo *datInd; PTR elem; - U8 numLch; - U8 numPdu; + uint8_t numLch; + uint8_t numPdu; /* Free SS_RNG_BUF_ULMAC_TO_ULRLC */ while((SDeqSRngBuf (SS_RNG_BUF_ULMAC_TO_ULRLC, &elem) == ROK)) @@ -382,7 +339,7 @@ Void rlcUtlFreeUlRBuf() { if(datInd->lchData[numLch].pdu.mBuf[numPdu]) { - RLC_FREE_BUF_WC(datInd->lchData[numLch].pdu.mBuf[numPdu]); + ODU_PUT_MSG_BUF(datInd->lchData[numLch].pdu.mBuf[numPdu]); } } } @@ -391,19 +348,7 @@ Void rlcUtlFreeUlRBuf() } #endif #ifdef RLC_MAC_STA_RSP_RBUF -#ifdef ANSI -S16 rlcLiRguStaRspRbuf -( -Pst *post, -SpId spId, -Void *staRsp -) -#else -S16 rlcLiRguStaRspRbuf(post, spId, staRsp) -Pst *post; -SpId spId; -Void *staRsp; -#endif /* ANSI */ +S16 rlcLiRguStaRspRbuf(Pst *post,SpId spId,Void *staRsp) { S16 ret1 = ROK; @@ -421,28 +366,16 @@ Void *staRsp; } else { - RLOG0(L_ERROR,"RLC DL STA RSP RBUF is FULL!!! "); + DU_LOG("\nERROR --> RLC_DL : RLC DL STA RSP RBUF is FULL!!! "); SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].pktDrop++; ret1 = RFAILED; } return (ret1); -} /* cmPkKwuDatReq */ +} /* cmPkRlcDatReq */ #endif #ifdef RLC_MAC_DAT_REQ_RBUF -#ifdef ANSI -S16 rlcLiRguDatReqRbuf -( -Pst *post, -SpId spId, -Void *datReq -) -#else -S16 rlcLiRguDatReqRbuf(post, spId, datReq) -Pst *post; -SpId spId; -Void *datReq; -#endif /* ANSI */ +S16 rlcLiRguDatReqRbuf(Pst *post,SpId spId,Void *datReq) { S16 ret1 = ROK; @@ -460,12 +393,12 @@ Void *datReq; } else { - printf("RLC DL DAT REQ RBUF is FULL!!! \n"); + DU_LOG("\nERROR --> RLC_DL : RLC DL DAT REQ RBUF is FULL!!! \n"); SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].pktDrop++; ret1 = RFAILED; } return (ret1); -} /* cmPkKwuDatReq */ +} /* cmPkRlcDatReq */ #endif