X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ptli.c;h=261ac789f843987fc038521d886fe0363660bc25;hb=7ebfb1f80967fe83bf169c2915cedf2c9fb5cbf7;hp=558bc77883d50e1ad60d5798b32d6fe9fa9c49f5;hpb=2193e4cf01012809495be026097e8d7eacb9f0ac;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ptli.c b/src/5gnrrlc/kw_ptli.c index 558bc7788..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,21 +163,13 @@ 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 { - TRC3(RlcLiRguBndReq) /* jump to specific primitive depending on configured selector */ (*kwLiRguBndReqMt[post->selector])(post, suId, spId); @@ -206,21 +198,8 @@ 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) { - TRC3(RlcLiRguUbndReq) /* jump to specific primitive depending on configured selector */ (*kwLiRguUbndReqMt[post->selector])(post, spId, reason); @@ -254,21 +233,8 @@ 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) { - TRC3(RlcLiRguL2MUlThrpMeasReq) /* jump to specific primitive depending on configured selector */ (*kwLiRguL2MUlThrpMeasReqMt[post->selector])(post, spId, l2mUlThrpMeasReq); @@ -283,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); @@ -364,18 +322,13 @@ 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; - TRC2(rlcUtlFreeUlRBuf) /* Free SS_RNG_BUF_ULMAC_TO_ULRLC */ while((SDeqSRngBuf (SS_RNG_BUF_ULMAC_TO_ULRLC, &elem) == ROK)) { @@ -386,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]); } } } @@ -395,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; @@ -418,35 +359,23 @@ Void *staRsp; if (NULLP != elem) { staRspInfo = (RguDStaRspInfo *)elem; - cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo)); + memcpy(staRspInfo, staRsp, sizeof(RguDStaRspInfo)); staRspInfo->post = *post; SRngIncrWIndx(SS_RNG_BUF_DLRLC_TO_DLMAC); SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].pktRate++; } 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; @@ -464,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