X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ptli.c;h=532aea359e44e0b250fdb7f749281d9d3a0c1be7;hb=b9a6860b8d95b57307e3e30b95642c83a762241e;hp=c41ca381daf4e5d1036a537bd861204a98c290ee;hpb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ptli.c b/src/5gnrrlc/kw_ptli.c index c41ca381d..532aea359 100755 --- a/src/5gnrrlc/kw_ptli.c +++ b/src/5gnrrlc/kw_ptli.c @@ -62,10 +62,6 @@ #include "ss_rbuf.h" #include "ss_rbuf.x" -#ifdef EGTP_TEST -#include "mac_stub.h" -#endif /* EGTP_TEST */ - #ifndef LCKWLIRGU #define PTKWRGU #endif @@ -75,7 +71,7 @@ #endif #ifdef __cplusplus -EXTERN "C" { +extern "C" { #endif /* __cplusplus */ @@ -88,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 @@ -126,49 +122,6 @@ RguBndReq kwLiRguUbndReqMt[] = #endif /* LCRGUIRGU */ }; -/* RGU Dedicated Channel Data Request primitive */ - -RlcMacDlData rlcMacSendDlDataOpts[] = -{ -#ifdef EGTP_TEST - macStubSendDlData, - macStubSendDlData, - macStubSendDlData, -#else /* EGTP_TEST */ -#ifdef LCKWLIRGU - packDlData, /* 0 - loosely coupled */ -#endif /* LCRGUIRGU */ -#ifdef RG - MacRlcProcDlData, /* 1 - tightly coupled, MAC */ -#endif /* RG */ -#ifdef LCKWLIRGU - packDlData, /* 0 - loosely coupled */ -#endif /* LCRGUIRGU */ -#endif /* EGTP_TEST */ -}; - - -/* RLC logical Channel Status primitive */ - -RlcMacBoStatus rlcMacSendBOStatusOpts[] = -{ -#ifdef EGTP_TEST - macStubBOStatus, - macStubBOStatus, - macStubBOStatus, -#else /* EGTP_TEST */ -#ifdef LCKWLIRGU - packBOStatus, /* 0 - loosely coupled */ -#endif /* LCRGUIRGU */ -#ifdef RG - MacRlcProcBOStatus, /* 1 - tightly coupled, MAC */ -#endif /* RG */ -#ifdef LCKWLIRGU - packBOStatus, /* 0 - LWLC loosely coupled */ -#endif /* LCRGUIRGU */ -#endif /* EGTP_TEST */ -}; - /* kw005.201 added support for L2 Measurement */ #ifdef LTE_L2_MEAS #ifdef LTE_RLC_R9 @@ -210,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); @@ -253,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); @@ -276,113 +208,6 @@ Reason reason; } /* end of RlcLiRguUbndReq */ - -/** - * - * @brief - * - * Handler for sending PDU(s) from RLC to MAC for dedicated logical channels. - * - * @b Description: - * - * This function sends PDU(s) to MAC via one or more dedicated - * logical channels along with the Buffer Occupancy of these - * channels. - * - * @param[in] post Post structure - * @param[in] spId Service Provider ID - * @param[in] datIndInfo Data Request Information - * - * @return S16 - * -# ROK - * -# RFAILED - * - */ -#ifdef ANSI -S16 RlcMacSendDlData -( -Pst *post, -SpId spId, -RlcMacData *dlData -) -#else -S16 RlcMacSendDlData(post, spId, dlData) -Pst *post; -SpId spId; -RlcMacData *dlData; -#endif -{ - TRC3(RlcMacSendDlData) -#ifdef RLC_MAC_DAT_REQ_RBUF - post->event=EVTRGUDDATREQ; - if((rlcLiRguDatReqRbuf(post, spId, datReq)) != ROK) - { - - SPutStaticBuffer(post->region, post->pool, - (Data *) datReq, sizeof(RguDDatReqInfo), 0); - return RFAILED; - } -#else - /* jump to specific primitive depending on configured selector */ - (*rlcMacSendDlDataOpts[post->selector])(post, spId, dlData); -#endif - return ROK; - -} /* end of RlcLiRguDDatReq */ - - - -/** - * - * @brief - * - * Handler for reporting the Buffer Occupancy to MAC - * for logical channels. - * - * @b Description: - * - * This function reports the Buffer Occupancy of one or more - * logical channels to MAC. - * - * @param[in] post Post structure - * @param[in] spId Service Provider ID - * @param[in] boSta BO Status Information - * - * @return S16 - * -# ROK - * -# RFAILED - * - */ -#ifdef ANSI -S16 RlcMacSendBOStatus -( -Pst *post, -SpId spId, -RlcMacBOStatus *boSta -) -#else -S16 RlcMacSendBOStatus(post, spId, staRsp) -Pst *post; -SpId spId; -RlcMacBOStatus *boSta; -#endif -{ - TRC3(RlcMacSendBOStatus) -#if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF) - post->event= EVTRGUDSTARSP; - if((rlcLiRguStaRspRbuf(post, spId, staRsp)) != ROK) - { - return RFAILED; - } -#endif - /* jump to specific primitive depending on configured selector */ - (*rlcMacSendBOStatusOpts[post->selector])(post, spId, boSta); - - return ROK; - -} /* end of RlcMacSendBOStatus */ - - /* kw005.201 added support for L2 Measurement */ #ifdef LTE_L2_MEAS #ifdef LTE_RLC_R9 @@ -408,21 +233,8 @@ RlcMacBOStatus *boSta; * -# 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); @@ -437,37 +249,29 @@ 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) { - RlcLiRguDDatInd(&rlcUlRbfuPst, 0, datInd); + RlcProcDedLcUlData(&rlcUlRbfuPst, 0, datInd); } else { @@ -491,7 +295,7 @@ Void; while(NULLP != elmIndx) { datInd = (RguDDatIndInfo *)elmIndx; - RlcLiRguDDatInd(&rlcUlRbfuPst, 0, datInd); + RlcProcDedLcUlData(&rlcUlRbfuPst, 0, datInd); elmIndx = NULLP; datInd = NULLP; @@ -518,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)) { @@ -540,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]); } } } @@ -549,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; @@ -572,7 +359,7 @@ 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++; @@ -588,19 +375,7 @@ Void *staRsp; #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;