X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrrlc%2Fkw_amm_dl.c;h=1bc8ef5440b458d696fb7e9eb80de086ddb8c073;hb=2b5e7ba18453db526316b51476673c1ea69c1a94;hp=8d642d40102b54072c5c371541163a1498cd6b34;hpb=762bc0a2a50222d74b01d9a88071bfaf5d90979b;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_amm_dl.c b/src/5gnrrlc/kw_amm_dl.c index 8d642d401..1bc8ef544 100755 --- a/src/5gnrrlc/kw_amm_dl.c +++ b/src/5gnrrlc/kw_amm_dl.c @@ -35,9 +35,6 @@ File: kw_amm_dl.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="AMM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=189; /* header include files (.h) */ #include "common_def.h" #include "lkw.h" /* LKW defines */ @@ -96,7 +93,7 @@ Void rlcAmmDlHndlStatusPdu ARGS ((RlcCb *gCb, {\ Buffer *_pduInfo; \ SSegMsg((_retx)->seg, (_retx)->hdrSz, &_pduInfo); \ - RLC_FREE_BUF((_retx)->seg); \ + ODU_PUT_MSG_BUF((_retx)->seg); \ (_retx)->seg = _pduInfo; \ }\ (_rbCb)->m.amDl.estHdrSz -= retx->hdrSz;\ @@ -282,9 +279,9 @@ static Void rlcAmmDlCheckAndStopPollTmr(RlcCb *gCb,RlcDlRbCb *rbCb,RlcSn mAckSn) if (mPollSn <= mAckSn) { - if (rlcChkTmr(gCb, (PTR)rbCb, RLC_EVT_AMDL_POLL_RETX_TMR)) + if (rlcChkTmr(gCb, (PTR)rbCb, EVENT_RLC_AMDL_POLL_RETX_TMR)) { - rlcStopTmr(gCb, (PTR)rbCb, RLC_EVT_AMDL_POLL_RETX_TMR); + rlcStopTmr(gCb, (PTR)rbCb, EVENT_RLC_AMDL_POLL_RETX_TMR); } } @@ -364,7 +361,7 @@ RlcDlPduInfo *pduInfo #if (ERRCLASS & ERRCLS_ADD_RES) if (*retx == NULLP) { - RLOG0(L_FATAL, "Memory allocation failed"); + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed"); return; } #endif /* ERRCLASS & ERRCLS_RES */ @@ -429,7 +426,7 @@ KwuDatCfmInfo ** datCfm CmLList *lnk; CmLList *nextLnk; - txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, nackSnInfo->sn); + txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, nackSnInfo->sn); if (txBuf == NULLP) { return; @@ -466,13 +463,13 @@ KwuDatCfmInfo ** datCfm nextLnk = lnk->next; /* Delete node from the txBuf Pdu lst */ cmLListDelFrm(&txBuf->pduLst, lnk); - RLC_FREE_WC(gCb, pduInfo, sizeof(RlcDlPduInfo)); + RLC_FREE(gCb, pduInfo, sizeof(RlcDlPduInfo)); lnk = nextLnk; } if(!txBuf->pduLst.count) { /*No more Sdu byte segment are left. Hence delete txBuf*/ - rlcUtlDelTxBuf(AMDL.txBufLst, txBuf,gCb); + rlcUtlDelTxBuf(RLC_AMDL.txBufLst, txBuf,gCb); } return; @@ -512,7 +509,7 @@ KwuDatCfmInfo **datCfm /* if the NACK_SN is in the transmit buffer, move it to the re- transmit buffer */ - txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, nackSnInfo->sn); + txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, nackSnInfo->sn); if (txBuf != NULLP) { if(nackSnInfo->isSegment) @@ -553,14 +550,12 @@ KwuDatCfmInfo **datCfm if ((nackSnInfo->isSegment) && ((retx->soEnd < nackSnInfo->soStart) /*|| (retx->amHdr.so > soEnd)*/)) { - RLOG_ARG3(L_DEBUG, DBG_RBID, rbCb->rlcId.rbId, - "rlcHndlStaRsp: Handle ACK for byte segment, Its " + DU_LOG( "\nDEBUG --> RLC_DL : rlcHndlStaRsp: Handle ACK for byte segment, Its " "sn = %d UEID:%d CELLID:%d", nackSnInfo->sn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); - RLOG_ARG4(L_DEBUG, DBG_RBID, rbCb->rlcId.rbId, - "soStart and soEnd = %d, %d, UEID:%d CELLID:%d", + DU_LOG("\nDEBUG --> RLC_DL : soStart and soEnd = %d, %d, UEID:%d CELLID:%d", retx->amHdr.so, retx->soEnd, rbCb->rlcId.ueId, rbCb->rlcId.cellId); @@ -717,7 +712,7 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) rlckwuSap = gCb->u.dlCb->rlcKwuDlSap + RLC_UI_PDCP; /* store the re-transmission bo, to check if it changes due to the processing of the status pdu */ - oldRetxBo = AMDL.retxBo; + oldRetxBo = RLC_AMDL.retxBo; /* Allocate memory for datCfm Info */ RLC_SHRABL_STATIC_BUF_ALLOC(rlckwuSap->pst.region, rlckwuSap->pst.pool, datCfm, sizeof(KwuDatCfmInfo)); @@ -725,8 +720,7 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) #if (ERRCLASS & ERRCLS_ADD_RES) if (datCfm == NULLP) { - RLOG_ARG2(L_FATAL,DBG_RBID,rbCb->rlcId.rbId, - "Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); RLC_SHRABL_STATIC_BUF_FREE(rlckwuSap->pst.region, rlckwuSap->pst.pool, datCfm, sizeof(KwuDatCfmInfo)); @@ -737,16 +731,15 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) datCfm->numSduIds = 0; datCfm->rlcId = rbCb->rlcId; - MODAMT(pStaPdu->ackSn, mAckSn, AMDL.txNextAck,AMDL.snModMask); - MODAMT(AMDL.txNext,mTxNext, AMDL.txNextAck,AMDL.snModMask); + MODAMT(pStaPdu->ackSn, mAckSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); + MODAMT(RLC_AMDL.txNext,mTxNext, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); if(mAckSn > mTxNext) { - RLOG_ARG4(L_WARNING,DBG_RBID, rbCb->rlcId.rbId, - "Invalid ACK SN = %d received. Current Vta =%d" + DU_LOG("\nERROR --> RLC_DL : Invalid ACK SN = %d received. Current Vta =%d" "UEID:%d CELLID:%d", pStaPdu->ackSn, - AMDL.txNextAck, + RLC_AMDL.txNextAck, rbCb->rlcId.ueId, rbCb->rlcId.cellId); /* RLC_SHRABL_STATIC_BUF_ALLOC(rlckwuSap->pst.region, rlckwuSap->pst.pool, datCfm, sizeof(KwuDatCfmInfo)); */ @@ -759,7 +752,7 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) rlcAmmDlCheckAndStopPollTmr(gCb, rbCb, mAckSn); /* Set the first node in retx list to retxNode */ - retxNode = AMDL.retxLst.first; + retxNode = RLC_AMDL.retxLst.first; /* If NACK exists in control PDU */ if (pStaPdu->nackCnt) @@ -768,7 +761,7 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) RlcNackInfo nackSnInfo; RlcSn mNackSn; RlcSn txNextAck; - RlcSn transWinStartSn = AMDL.txNextAck; /*used to track the SN from which + RlcSn transWinStartSn = RLC_AMDL.txNextAck; /*used to track the SN from which to start processing the transmission buffer */ uint32_t idx = 0; @@ -785,8 +778,7 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) nackSnInfo.nackRange = pStaPdu->nackInfo[idx].nackRange; nackSnInfo.sn = pStaPdu->nackInfo[idx].sn; - RLOG_ARG3(L_DEBUG,DBG_RBID, rbCb->rlcId.rbId, - "rlcHndlStaRsp: NACK SN = %d UEID:%d CELLID:%d", + DU_LOG("\nDEBUG --> RLC_DL : rlcHndlStaRsp: NACK SN = %d UEID:%d CELLID:%d", nackSnInfo.sn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); @@ -801,16 +793,15 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) /* move transWinStartSn to nackSnInfo.sn + 1, as the pdu's before that will be removed from the buffer */ transWinStartSn = (nackSnInfo.sn + (nackSnInfo.nackRange ?\ - (nackSnInfo.nackRange - 1) : 0) + 1) & AMDL.snModMask; + (nackSnInfo.nackRange - 1) : 0) + 1) & RLC_AMDL.snModMask; /* Clear the acked SNs from the retx list */ - MODAMT(nackSnInfo.sn, mNackSn, AMDL.txNextAck,AMDL.snModMask); + MODAMT(nackSnInfo.sn, mNackSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); if ((mNackSn > mAckSn) || (mNackSn >= mTxNext)) { /* Erroneous NACK_SN, we should raise an error towards L3 */ - RLOG_ARG2(L_ERROR,DBG_RBID, rbCb->rlcId.rbId, - "Status Pdu is not correct UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Status Pdu is not correct UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); RLC_SHRABL_STATIC_BUF_FREE(rlckwuSap->pst.region, rlckwuSap->pst.pool, datCfm, sizeof(KwuDatCfmInfo)); @@ -833,12 +824,12 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) * nack sn*/ do { - RlcDlAmmGetNackSnInfoFrmNackRangeIdx(&AMDL, &pStaPdu->nackInfo[idx], + RlcDlAmmGetNackSnInfoFrmNackRangeIdx(&RLC_AMDL, &pStaPdu->nackInfo[idx], retxNode, &nackSnInfo, idx1); rlcAmmDlUpdateTxAndReTxBufForNackSn(gCb, rbCb, &nackSnInfo, &retxNode, &datCfm); - nackSnInfo.sn = ((nackSnInfo.sn + 1) & (AMDL.snModMask)); + nackSnInfo.sn = ((nackSnInfo.sn + 1) & (RLC_AMDL.snModMask)); gRlcStats.amRlcStats.numRlcAmCellNackRx++; }while((++idx1) < (nackSnInfo.nackRange)); @@ -852,14 +843,13 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) rlcAmmDlUpdateTxAndReTxBufForAckSn(gCb,rbCb, mAckSn, retxNode, &datCfm); /* Update txNextAck */ - rlcAmmDlSetTxNextAck(&AMDL,txNextAck); + rlcAmmDlSetTxNextAck(&RLC_AMDL,txNextAck); } else { rlcStatusAckCnt++; /* For All ACKs */ - RLOG_ARG2(L_UNUSED,DBG_RBID, rbCb->rlcId.rbId, - "rlcHndlStaRsp: Received All ACKS UEID:%d CELLID:%d", + DU_LOG("\nDEBUG --> RLC_DL : rlcHndlStaRsp: Received All ACKS UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); @@ -867,15 +857,14 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) rlcAmmDlUpdateTxAndReTxBufForAckSn(gCb,rbCb, mAckSn, retxNode, &datCfm); /* update txNextAck */ - rlcAmmDlSetTxNextAck(&AMDL, pStaPdu->ackSn); + rlcAmmDlSetTxNextAck(&RLC_AMDL, pStaPdu->ackSn); } if(datCfm->numSduIds != 0) { if(datCfm->numSduIds > 1024) { - RLOG_ARG4(L_DEBUG,DBG_RBID,datCfm->rlcId.rbId, - "Sending [%lu] SDU Cfms to PDCP & [%lu] lost for" + DU_LOG("\nDEBUG --> RLC_DL : Sending [%u] SDU Cfms to PDCP & [%u] lost for" "UEID:%d CELLID:%d", datCfm->numSduIds, datCfm->numSduIds-1024, @@ -893,12 +882,12 @@ Void rlcAmmDlHndlStatusPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcUdxStaPdu *pStaPdu) } /* Fix for memory corruption */ - RLC_LLIST_FIRST_RETX(AMDL.retxLst, AMDL.nxtRetx); - /* BO update, if retransmission BO has changed. AMDL.retxBo would have + RLC_LLIST_FIRST_RETX(RLC_AMDL.retxLst, RLC_AMDL.nxtRetx); + /* BO update, if retransmission BO has changed. RLC_AMDL.retxBo would have canged inside the above called functions */ - if (oldRetxBo != AMDL.retxBo) + if (oldRetxBo != RLC_AMDL.retxBo) { - rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL); + rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL); } return; @@ -989,7 +978,7 @@ void rlcAmmQSdu(RlcCb *gCb, RlcDlRbCb *rbCb, Buffer *mBuf, KwuDatReqInfo *datReq #if (ERRCLASS & ERRCLS_ADD_RES) if (sdu == NULLP) { - DU_LOG("\n RLC : rlcAmmQSdu : Memory allocation failed UEID:%d CELLID:%d",\ + DU_LOG("\nERROR --> RLC_DL : rlcAmmQSdu : Memory allocation failed UEID:%d CELLID:%d",\ rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -1018,26 +1007,26 @@ dlrate_kwu += sdu->sduSz; #endif /* Update nxtTx to point to the added sdu if this is the first SDU in the * queue */ - if (AMDL.nxtTx == NULLP) + if (RLC_AMDL.nxtTx == NULLP) { - DU_LOG("\nRLC : rlcAmmQSdu: Received SDU will be transmitted next \ + DU_LOG("\nDEBUG --> RLC_DL : rlcAmmQSdu: Received SDU will be transmitted next \ UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); - AMDL.nxtTx = sdu; + RLC_AMDL.nxtTx = sdu; } /* Add sdu to the sdu list */ - cmLListAdd2Tail(&AMDL.sduQ, &sdu->lstEnt); + cmLListAdd2Tail(&RLC_AMDL.sduQ, &sdu->lstEnt); sdu->lstEnt.node = (PTR)sdu; #ifdef LTE_L2_MEAS #ifndef L2_L3_SPLIT #ifdef TENB_STATS if (rbCb->ueCb->tenbStats) { - if (AMDL.sduQ.count > rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxPktsInSduQ) + if (RLC_AMDL.sduQ.count > rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxPktsInSduQ) { - rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxPktsInSduQ = AMDL.sduQ.count; + rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxPktsInSduQ = RLC_AMDL.sduQ.count; } - rlcWinSz = RLC_AM_TRANS_WIN_SIZE(&AMDL); + rlcWinSz = RLC_AM_TRANS_WIN_SIZE(&RLC_AMDL); if (rlcWinSz > rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxWindowSz) { rbCb->ueCb->tenbStats->stats.nonPersistent.rlc.dlMaxWindowSz = rlcWinSz; @@ -1047,14 +1036,14 @@ dlrate_kwu += sdu->sduSz; #endif #endif /* Update BO and estimate header size for the current BO */ - AMDL.bo = AMDL.bo + sdu->sduSz; - if(AMDL.snLen == RLC_AM_CFG_12BIT_SN_LEN) + RLC_AMDL.bo = RLC_AMDL.bo + sdu->sduSz; + if(RLC_AMDL.snLen == RLC_AM_CFG_12BIT_SN_LEN) { - AMDL.estHdrSz += 2; + RLC_AMDL.estHdrSz += 2; } else { - AMDL.estHdrSz += 3; + RLC_AMDL.estHdrSz += 3; } #ifdef LTE_L2_MEAS_RLC /* Update numActUe if it is not active */ @@ -1068,7 +1057,7 @@ dlrate_kwu += sdu->sduSz; if(!rlcDlUtlIsReestInProgress(rbCb)) { - rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL); + rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL); } return; @@ -1114,17 +1103,17 @@ static void rlcAmmDlAssembleCntrlInfo(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rl sapCb->suId, &(rbCb->rlcId)); /* Update number of pdus in pduInfo */ - rlcDatReq->pduInfo.mBuf[rlcDatReq->pduInfo.numPdu] = AMDL.mBuf; + rlcDatReq->pduInfo.mBuf[rlcDatReq->pduInfo.numPdu] = RLC_AMDL.mBuf; rlcDatReq->pduInfo.numPdu++; gRlcStats.amRlcStats.numDLStaPduSent++; RLC_FREE_SHRABL_BUF(gCb->u.dlCb->udxDlSap->pst.region, gCb->u.dlCb->udxDlSap->pst.pool, - AMDL.pStaPdu, + RLC_AMDL.pStaPdu, sizeof(RlcUdxDlStaPdu)); - AMDL.pStaPdu = NULLP; - AMDL.mBuf = NULLP; + RLC_AMDL.pStaPdu = NULLP; + RLC_AMDL.mBuf = NULLP; gRlcStats.amRlcStats.numDLStaPduSent++; } @@ -1165,53 +1154,53 @@ void rlcAmmProcessSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq, bool f * flag will always be TRUE. In CA case, for PCELL it is TRUE and for SCEll * it is FALSE */ - if ((AMDL.cntrlBo != 0) + if ((RLC_AMDL.cntrlBo != 0) #ifdef LTE_ADV && (fillCtrlPdu) #endif ) { rlcDatReq->boRep.staPduPrsnt = TRUE; - rlcDatReq->boRep.staPduBo = AMDL.cntrlBo; + rlcDatReq->boRep.staPduBo = RLC_AMDL.cntrlBo; - if (AMDL.pStaPdu != NULLP) + if (RLC_AMDL.pStaPdu != NULLP) { rlcAmmDlAssembleCntrlInfo (gCb, rbCb, rlcDatReq); } else { - DU_LOG("\nRLC: rlcAmmProcessSdus: Miscomputation of control Bo. \ + DU_LOG("\nERROR --> RLC_DL : rlcAmmProcessSdus: Miscomputation of control Bo. \ UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); } - AMDL.cntrlBo = 0; + RLC_AMDL.cntrlBo = 0; } /* Retransmit PDUs /portions of PDUs available in retxLst */ - if ((rlcDatReq->pduSz > 0) && (AMDL.nxtRetx != NULLP)) + if ((rlcDatReq->pduSz > 0) && (RLC_AMDL.nxtRetx != NULLP)) { rlcResegRetxPdus (gCb,rbCb, rlcDatReq); } /* Assemble SDUs to form new PDUs */ - if ((rlcDatReq->pduSz > 0) && (AMDL.nxtTx != 0)) + if ((rlcDatReq->pduSz > 0) && (RLC_AMDL.nxtTx != 0)) { rlcAssembleSdus(gCb,rbCb, rlcDatReq); } - if (AMDL.nxtRetx != NULLP) + if (RLC_AMDL.nxtRetx != NULLP) { - rlcDatReq->boRep.oldestSduArrTime = AMDL.nxtRetx->sduMap.sdu->arrTime; + rlcDatReq->boRep.oldestSduArrTime = RLC_AMDL.nxtRetx->sduMap.sdu->arrTime; } - else if (AMDL.nxtTx != NULLP) + else if (RLC_AMDL.nxtTx != NULLP) { - rlcDatReq->boRep.oldestSduArrTime = AMDL.nxtTx->arrTime; + rlcDatReq->boRep.oldestSduArrTime = RLC_AMDL.nxtTx->arrTime; } /* Accumulate bo */ - rlcDatReq->boRep.bo = rlcAmmCalculateBo(&AMDL); - rlcDatReq->boRep.staPduBo = AMDL.cntrlBo; + rlcDatReq->boRep.bo = rlcAmmCalculateBo(&RLC_AMDL); + rlcDatReq->boRep.staPduBo = RLC_AMDL.cntrlBo; /* Hdr estimation is moved to kwAmmCreatePDu */ - rlcDatReq->boRep.estHdrSz = AMDL.estHdrSz; + rlcDatReq->boRep.estHdrSz = RLC_AMDL.estHdrSz; if(rlcDatReq->pduSz > 0) { @@ -1241,7 +1230,7 @@ void rlcAmmProcessSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq, bool f static void rlcSplitPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcRetx *crnt, RlcRetx *next, uint16_t size) { uint8_t si; - RlcAmDl *amDl = &AMDL; + RlcAmDl *amDl = &RLC_AMDL; /* Set the SN for the new segment */ next->amHdr.sn = crnt->amHdr.sn; @@ -1310,9 +1299,9 @@ static void rlcSplitPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcRetx *crnt, RlcRetx *nex } /* Add the next to the retx list */ - AMDL.retxLst.crnt = &crnt->lstEnt; - CM_LLIST_INS_AFT_CRNT(AMDL.retxLst, next); - AMDL.nxtRetx = next; + RLC_AMDL.retxLst.crnt = &crnt->lstEnt; + CM_LLIST_INS_AFT_CRNT(RLC_AMDL.retxLst, next); + RLC_AMDL.nxtRetx = next; amDl->estHdrSz += next->hdrSz; return; @@ -1358,7 +1347,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) uint8_t numSdus; #endif - amDl = &AMDL; + amDl = &RLC_AMDL; #ifdef LTE_L2_MEAS /* TODO : This shoould be taken care in new Trasmissions */ /* This lchInfo should be retrieved there */ @@ -1390,7 +1379,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* kw003.201 - Eliminate MAC Header Size based on bites needed */ tmpSz = RLC_MIN((retx->segSz + retx->hdrSz), rlcDatReq->pduSz); pduSz = (retx->segSz + retx->hdrSz); - /* 5GNR_RLC: length field in 5GNR MAC Hdr is 8/16 btis*/ + /* 5GNR_RLC_DL : length field in 5GNR MAC Hdr is 8/16 btis*/ rlcDatReq->pduSz -= (tmpSz < 255) ? RLC_MAC_HDR_SZ2 : RLC_MAC_HDR_SZ3; /* kw003.201 - We should have at least one more than basic header */ @@ -1405,7 +1394,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) { uint8_t pollBit; - DU_LOG("\nRLC: rlcResegRetxPdus: Send retx buf without segmentation " + DU_LOG("\nINFO --> RLC_DL : rlcResegRetxPdus: Send retx buf without segmentation " "UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); if (retx->yetToConst) @@ -1423,7 +1412,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) RLC_UPD_POLL_BIT(gCb, retx, pollBit); rlcDatReq->pduSz -= pduSz; - AMDL.estHdrSz -= retx->hdrSz; + RLC_AMDL.estHdrSz -= retx->hdrSz; #ifdef LTE_L2_MEAS if (rbCb->rlcId.rbType == CM_LTE_DRB) @@ -1446,7 +1435,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* Segment this pdu / portion of pdu. Insert this segment into */ /* retxLst and update offset */ - DU_LOG("\nRLC: rlcResegRetxPdus: Segment retx buf UEID:%d CELLID:%d", + DU_LOG("\nINFO --> RLC_DL : rlcResegRetxPdus: Segment retx buf UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); /* Eliminate fixed header size if the pdu is segmented for the */ @@ -1483,7 +1472,7 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) #if (ERRCLASS & ERRCLS_ADD_RES) if (tNode == NULLP) { - DU_LOG("\nRLC: rlcResegRetxPdus: Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : rlcResegRetxPdus: Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -1543,10 +1532,10 @@ static void rlcResegRetxPdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) amDl->retxBo -= retx->segSz; } #ifndef ALIGN_64BIT - DU_LOG("\nRLC: rlcResegRetxPdus: retxBo after resegmentation = %ld" + DU_LOG("\nINFO --> RLC_DL : rlcResegRetxPdus: retxBo after resegmentation = %ld" "UEID:%d CELLID:%d", amDl->retxBo, rbCb->rlcId.ueId, rbCb->rlcId.cellId); #else - DU_LOG("\nRLC: rlcResegRetxPdus: retxBo after resegmentation = %d " + DU_LOG("\nINFO --> RLC_DL : rlcResegRetxPdus: retxBo after resegmentation = %d " "UEID:%d CELLID:%d", amDl->retxBo, rbCb->rlcId.ueId, rbCb->rlcId.cellId); #endif @@ -1578,7 +1567,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) { Buffer *pdu = NULLP; MsgLen macGrntSz = rlcDatReq->pduSz; - RlcAmDl *amDl = &AMDL; + RlcAmDl *amDl = &RLC_AMDL; RlcSdu *sdu = amDl->nxtTx; RlcSduMap sduMap; bool nxtTxUpd = FALSE; @@ -1631,7 +1620,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) #if (ERRCLASS & ERRCLS_ADD_RES) if (discSduInfo == NULLP) { - DU_LOG("\nRLC: rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -1684,7 +1673,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* store the info for sending it to PDCP */ if(discSduInfo->numSduIds > 500) { - DU_LOG("\nRLC: rlcAssembleSdus: This is a big error, we shouldn't be here" + DU_LOG("\nERROR --> RLC_DL : rlcAssembleSdus: This is a big error, we shouldn't be here" "UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); break; } @@ -1722,7 +1711,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) if (RLC_AM_IS_TRANS_WIN_STALLED(amDl)) { //int *a = NULLP; - printf("\n Window stalled \n"); + DU_LOG("\nINFO --> RLC_DL : Window stalled \n"); gRlcStats.amRlcStats.numRlcAmCellWinStall++; //*a = 10; break; @@ -1763,7 +1752,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) { uint32_t avblMem = 0; SRegInfoShow(gCb->init.region, &avblMem); - DU_LOG("\nRLC: rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -1782,7 +1771,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) { uint32_t avblMem = 0; SRegInfoShow(gCb->init.region, &avblMem); - DU_LOG("\nRLC: rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : rlcAssembleSdus: Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -1808,7 +1797,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* Update Framing Info */ if (sdu->mode.am.isSegmented) { - /*5GNR RLC: SN should be same for all segment of a SDU*/ + /*5GNR RLC_DL : SN should be same for all segment of a SDU*/ pduInfo->amHdr.sn = sdu->mode.am.sn; pduInfo->amHdr.si = RLC_SI_LAST_SEG; /* binary 10 */ pduInfo->amHdr.so = sdu->actSz - sdu->sduSz; @@ -1816,7 +1805,8 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) gRlcStats.amRlcStats.numRlcAmCellSduTx++; - //printf("\n 5GNRLOG: last segment of lcId %d SduId %u So %u macGrntSz %u sduActSz %u sdu->sduSz %u\n", + //DU_LOG("\nINFO --> RLC_DL : 5GNRLOG: last segment of lcId %d SduId %u So %u macGrntSz\ + %u sduActSz %u sdu->sduSz %u\n", // rbCb->lch.lChId, sdu->mode.am.sduId, pduInfo->amHdr.so, macGrntSz, sdu->actSz, sdu->sduSz); } else @@ -1827,7 +1817,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* Create PDU with hdr and data */ rlcAmmCreatePdu(gCb,rbCb, amHdr, pduInfo, pdu); - //printf("\n Segmentation not required case: numPdu %d pdu %p \n",rlcDatReq->pduInfo.numPdu, pdu); + //DU_LOG("\nINFO --> Segmentation not required case: numPdu %d pdu %p \n",rlcDatReq->pduInfo.numPdu, pdu); #ifdef LTE_L2_MEAS_RLC rlcUtlUpdSduSnMap(rbCb, sdu, rlcDatReq, TRUE); @@ -1870,7 +1860,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) Buffer *remSeg = NULLP; - //printf("\n SDU segmentation case: numPdu %d pdu %p \n", rlcDatReq->pduInfo.numPdu, pdu); + //DU_LOG("\nINFO --> SDU segmentation case: numPdu %d pdu %p \n", rlcDatReq->pduInfo.numPdu, pdu); #ifdef LTE_L2_MEAS if(RLC_MEAS_IS_DL_IP_MEAS_ON_FOR_RB(gCb,rbCb) || RLC_MEAS_IS_DL_DELAY_MEAS_ON_FOR_RB(gCb,rbCb) || @@ -1910,24 +1900,26 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) /* Update SI and SN */ if (sdu->mode.am.isSegmented) { - /*5GNR RLC: SN should be same for all segment of a SDU. + /*5GNR RLC_DL : SN should be same for all segment of a SDU. * Sdu was already segmented and segmenting again*/ pduInfo->amHdr.sn = sdu->mode.am.sn; pduInfo->amHdr.si = RLC_SI_MID_SEG; /* binary 11 */ pduInfo->amHdr.so = sdu->actSz - sdu->sduSz; - //printf("\n 5GNRLOG: mid segment of lcId %d SduId %u So %u macGrntSz %u sduActSz %u sdu->sduSz %u\n", + //DU_LOG("\nINFO --> RLC_DL : 5GNRLOG: mid segment of lcId %d SduId %u So %u macGrntSz %u sduActSz\ + %u sdu->sduSz %u\n", // rbCb->lch.lChId, sdu->mode.am.sduId, txBuf->amHdr.so, macGrntSz, sdu->actSz, sdu->sduSz); } else { - /*5GNR RLC: This means it is the first*/ + /*5GNR RLC_DL : This means it is the first*/ pduInfo->amHdr.si = RLC_SI_FIRST_SEG; /* binary 01 */ - /*5GNR_RLC: Store SN so that in sub-seqent SDU segments will use this SN*/ + /*5GNR_RLC_DL : Store SN so that in sub-seqent SDU segments will use this SN*/ sdu->mode.am.sn = pduInfo->amHdr.sn; pduInfo->amHdr.so = 0; - //printf("\n 5GNRLOG: First segment of lcId %d SduId %u So %u macGrntSz %u sduActSz %u sdu->sduSz %u\n", + //DU_LOG("\nINFO --> RLC_DL : 5GNRLOG: First segment of lcId %d SduId %u So\ + %u macGrntSz %u sduActSz %u sdu->sduSz %u\n", // rbCb->lch.lChId, sdu->mode.am.sduId, txBuf->amHdr.so, macGrntSz, sdu->actSz, sdu->sduSz); } @@ -2032,7 +2024,7 @@ static void rlcAssembleSdus(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDatReq) RLC_SHRABL_STATIC_BUF_FREE(rlckwuSap->pst.region, rlckwuSap->pst.pool, discSduInfo, sizeof(KwuDiscSduInfo)); } - DU_LOG("\nRLC: rlcAssembleSdus: BO after assembly = %d UEID:%d CELLID:%d", + DU_LOG("\nDEBUG --> RLC_DL : rlcAssembleSdus: BO after assembly = %d UEID:%d CELLID:%d", amDl->bo, rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; } @@ -2094,7 +2086,7 @@ static bool rlcAmmDlCheckAndSetPoll(RlcCb *gCb, RlcDlRbCb *rbCb, bool newPdu, Ms amDl->pollSn = (amDl->txNext - 1) & amDl->snModMask; - DU_LOG("\nRLC: rlcAmmDlCheckAndSetPoll: Poll SN = %d UEID:%d CELLID:%d", + DU_LOG("\nINFO --> RLC_DL : rlcAmmDlCheckAndSetPoll: Poll SN = %d UEID:%d CELLID:%d", amDl->pollSn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); /* kw005.201: Fix for poll retransmission timer. @@ -2102,12 +2094,12 @@ static bool rlcAmmDlCheckAndSetPoll(RlcCb *gCb, RlcDlRbCb *rbCb, bool newPdu, Ms * then starting the timer. Fixes crs * ccpu00117216 and ccpu00118284 . * */ - if( TRUE == rlcChkTmr(gCb,(PTR)rbCb,RLC_EVT_AMDL_POLL_RETX_TMR) ) + if( TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMDL_POLL_RETX_TMR) ) { - rlcStopTmr(gCb,(PTR)rbCb, RLC_EVT_AMDL_POLL_RETX_TMR); + rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMDL_POLL_RETX_TMR); } - rlcStartTmr(gCb,(PTR)rbCb, RLC_EVT_AMDL_POLL_RETX_TMR); + rlcStartTmr(gCb,(PTR)rbCb, EVENT_RLC_AMDL_POLL_RETX_TMR); } return (pollBit); @@ -2141,10 +2133,10 @@ RlcDlPduInfo *pduInfo, Buffer *pdu) /* Update sn */ amHdr->sn = amDl->txNext; - /*5GNR RLC: Increment txNext only if no segmentation of it is a last segment */ + /*5GNR RLC_DL : Increment txNext only if no segmentation of it is a last segment */ if((!amHdr->si) || (amHdr->si == RLC_SI_LAST_SEG)) { - //printf("\n 5GNRLOG: no segment/last seg SDU with lcId %d Sn %u txNext %u So %u\n", + //DU_LOG("\nINFO --> RLC_DL : 5GNRLOG: no segment/last seg SDU with lcId %d Sn %u txNext %u So %u\n", // rbCb->lch.lChId, amHdr->sn, amDl->txNext, amHdr->so); amDl->txNext = (amDl->txNext + 1) & amDl->snModMask; } @@ -2199,17 +2191,17 @@ RlcDlPduInfo *pduInfo, Buffer *pdu) */ static Void rlcRemRetxPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx) { - cmLListDelFrm(&AMDL.retxLst, &retx->lstEnt); + cmLListDelFrm(&RLC_AMDL.retxLst, &retx->lstEnt); - if( AMDL.retxLst.count == 0) + if( RLC_AMDL.retxLst.count == 0) { - AMDL.nxtRetx = NULLP; + RLC_AMDL.nxtRetx = NULLP; } if(retx->pendingReTrans == TRUE) { - AMDL.retxBo -= retx->segSz; - AMDL.estHdrSz -= retx->hdrSz; + RLC_AMDL.retxBo -= retx->segSz; + RLC_AMDL.estHdrSz -= retx->hdrSz; } rlcUtlAddReTxPduToBeFreedQueue(gCb, retx); @@ -2236,7 +2228,7 @@ static Void rlcRemRetxPdu(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx) */ static Void rlcAmmDlMarkPduForReTx(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx) { - if (AMDL.maxReTxReached == TRUE) + if (RLC_AMDL.maxReTxReached == TRUE) { return; } @@ -2246,10 +2238,10 @@ static Void rlcAmmDlMarkPduForReTx(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx) retx->pendingReTrans = TRUE; ++retx->retxCnt; - AMDL.retxBo += retx->segSz; - AMDL.estHdrSz += retx->hdrSz; + RLC_AMDL.retxBo += retx->segSz; + RLC_AMDL.estHdrSz += retx->hdrSz; - if (retx->retxCnt > AMDL.maxRetx) + if (retx->retxCnt > RLC_AMDL.maxRetx) { /* RLC_DL_MAX_RETX fix */ /* Marking the RB stalled for DL scheduling. This is to avoid unnecessary */ @@ -2273,9 +2265,9 @@ static Void rlcAmmDlMarkPduForReTx(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx) } - if (AMDL.nxtRetx == NULLP) + if (RLC_AMDL.nxtRetx == NULLP) { - AMDL.nxtRetx = retx; + RLC_AMDL.nxtRetx = retx; } gRlcStats.amRlcStats.numDLRetransPdus++; @@ -2339,8 +2331,7 @@ KwuDatCfmInfo **datCfm #if (ERRCLASS & ERRCLS_ADD_RES) if (*datCfm == NULLP) { - RLOG_ARG2(L_FATAL,DBG_RBID,rbCb->rlcId.rbId, - "Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; @@ -2355,7 +2346,7 @@ KwuDatCfmInfo **datCfm } /* Remove SDU from the sduQ */ - cmLListDelFrm(&AMDL.sduQ, &sdu->lstEnt); + cmLListDelFrm(&RLC_AMDL.sduQ, &sdu->lstEnt); rlcUtlAddSduToBeFreedQueue(gCb, sdu); rlcUtlRaiseDlCleanupEvent(gCb); } @@ -2388,7 +2379,7 @@ KwuDatCfmInfo **datCfm { CmLList *pduNode; - RlcTx *txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, sn); + RlcTx *txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, sn); if (txBuf == NULLP) { @@ -2408,7 +2399,7 @@ KwuDatCfmInfo **datCfm rlcUtlAddTxPduToBeFreedQueue(gCb, txBuf); rlcUtlRaiseDlCleanupEvent(gCb); /* so that it is not processed again */ - rlcUtlRemovTxBuf(AMDL.txBufLst, txBuf, gCb); + rlcUtlRemovTxBuf(RLC_AMDL.txBufLst, txBuf, gCb); return; } @@ -2446,8 +2437,7 @@ RlcRetx *retx #if (ERRCLASS & ERRCLS_ADD_RES) if (staInd == NULLP) { - RLOG_ARG2(L_FATAL,DBG_RBID,rbCb->rlcId.rbId, - "Memory allocation failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed UEID:%d CELLID:%d", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return; @@ -2558,8 +2548,7 @@ RlcDlRbCb *rbCb if (ROK != rlcDbmFetchDlUeCb(gCb,rlcId.ueId, rlcId.cellId, &ueCb)) { - RLOG_ARG2(L_ERROR,DBG_CELLID, rlcId.cellId, - "UeId [%d]: UeCb not found RBID;%d", + DU_LOG("\nERROR --> RLC_DL : UeId [%d]: UeCb not found RBID;%d", rlcId.ueId, rlcId.rbId); return; @@ -2683,12 +2672,12 @@ Void rlcAmmPollRetxTmrExp(RlcCb *gCb,RlcDlRbCb *rbCb) { rlcAmmDlMoveFrmTxtoRetxBuffer(gCb,amDl, &retx, sn); - if (AMDL.nxtRetx == NULLP) + if (RLC_AMDL.nxtRetx == NULLP) { - AMDL.nxtRetx = retx; + RLC_AMDL.nxtRetx = retx; } - rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL); + rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL); return; } /* Get the last node in retxLst */ @@ -2698,7 +2687,7 @@ Void rlcAmmPollRetxTmrExp(RlcCb *gCb,RlcDlRbCb *rbCb) if (retx != NULLP) { rlcAmmDlMarkPduForReTx(gCb, rbCb, retx); - rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL); + rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL); } } @@ -2742,7 +2731,7 @@ KwuDatCfmInfo **datCfm { retx = (RlcRetx *)(retxNode->node); retxNode = retxNode->next; - MODAMT(retx->amHdr.sn, mSn, AMDL.txNextAck,AMDL.snModMask); + MODAMT(retx->amHdr.sn, mSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); if (mSn < mAckSn) { rlcAmmDlProcessSuccessfulReTx(gCb,rbCb, retx, datCfm); @@ -2753,16 +2742,16 @@ KwuDatCfmInfo **datCfm acknowledged by the ACK_SN*/ /* start from the starting of the transmission window and remove till just before ACK_SN*/ - mSn = 0; /* same as MODAMT(AMDL.txNextAck, mSn, AMDL.txNextAck);*/ - sn = AMDL.txNextAck; + mSn = 0; /* same as MODAMT(RLC_AMDL.txNextAck, mSn, RLC_AMDL.txNextAck);*/ + sn = RLC_AMDL.txNextAck; while(mSn < mAckSn) { - txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, sn); + txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, sn); if (txBuf != NULLP) { - RLOG_ARG3(L_UNUSED,DBG_RBID,rbCb->rlcId.rbId, - "rlcAmmDlUpdateTxAndReTxBufForAckSn: ACK for PDU " - "with sn = %ld UEID:%ld CELLID:%ld", + + DU_LOG("\nDEBUG --> RLC_DL : rlcAmmDlUpdateTxAndReTxBufForAckSn: ACK for PDU " + "with sn = %d UEID:%d CELLID:%d", sn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); @@ -2770,8 +2759,8 @@ KwuDatCfmInfo **datCfm rlcAmmDlProcessSuccessfulTxPdu(gCb,rbCb, sn, datCfm); } - sn = (sn + 1) & AMDL.snModMask; - MODAMT(sn, mSn, AMDL.txNextAck,AMDL.snModMask); + sn = (sn + 1) & RLC_AMDL.snModMask; + MODAMT(sn, mSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); } return; @@ -2811,7 +2800,7 @@ KwuDatCfmInfo **datCfm while (*retxNode) { retx = (RlcRetx *)((*retxNode)->node); - MODAMT(retx->amHdr.sn, mSn, AMDL.txNextAck,AMDL.snModMask); + MODAMT(retx->amHdr.sn, mSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); if (mSn < mNackSn) { (*retxNode) = (*retxNode)->next; @@ -2824,16 +2813,15 @@ KwuDatCfmInfo **datCfm } /* Remove all pdus with SN < NACK_SN from the transmission buffer */ - MODAMT(sn, mSn, AMDL.txNextAck,AMDL.snModMask); + MODAMT(sn, mSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); while (mSn < mNackSn) { /* this if check seems redundant,why should mSn ever be mTxSn (which actually is VT(A) */ - txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, sn); + txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, sn); if ((txBuf != NULLP)) { - RLOG_ARG3(L_DEBUG,DBG_RBID, rbCb->rlcId.rbId, - "rlcHndlStaRsp: Handle ACK (sn = %d) UEID:%d CELLID:%d", + DU_LOG("\nDEBUG --> RLC_DL : rlcHndlStaRsp: Handle ACK (sn = %d) UEID:%d CELLID:%d", sn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); @@ -2842,8 +2830,8 @@ KwuDatCfmInfo **datCfm rlcAmmDlProcessSuccessfulTxPdu(gCb,rbCb, sn, datCfm); } - sn = (sn + 1) & AMDL.snModMask; - MODAMT(sn, mSn, AMDL.txNextAck,AMDL.snModMask); + sn = (sn + 1) & RLC_AMDL.snModMask; + MODAMT(sn, mSn, RLC_AMDL.txNextAck,RLC_AMDL.snModMask); } return; @@ -2994,7 +2982,7 @@ RlcSn sn #if (ERRCLASS & ERRCLS_ADD_RES) if (*retx == NULLP) { - RLOG0(L_FATAL, "Memory allocation failed"); + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed"); return; } #endif /* ERRCLASS & ERRCLS_RES */ @@ -3007,7 +2995,7 @@ RlcSn sn /* Delete node from the txBuf Pdu lst */ cmLListDelFrm(&txBuf->pduLst, txBuf->pduLst.first); - RLC_FREE_WC(gCb, pduInfo, sizeof(RlcDlPduInfo)); + RLC_FREE(gCb, pduInfo, sizeof(RlcDlPduInfo)); } /* Remove PDU from txBuf */ rlcUtlDelTxBuf(amDl->txBufLst, txBuf,gCb); @@ -3033,9 +3021,9 @@ RlcSn sn Void rlcAmmFreeDlRbCb(RlcCb *gCb,RlcDlRbCb *rbCb) { /* stop the re-transmission timer */ - if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,RLC_EVT_AMDL_POLL_RETX_TMR)) + if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMDL_POLL_RETX_TMR)) { - rlcStopTmr(gCb,(PTR)rbCb, RLC_EVT_AMDL_POLL_RETX_TMR); + rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMDL_POLL_RETX_TMR); } /* store the entire Rb pointer */ @@ -3077,7 +3065,7 @@ static void rlcAmmCreateStatusPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDat RlcNackInfo *rlcNackInfo; uint16_t nkCnt = 0; - pStaPdu = AMDL.pStaPdu; + pStaPdu = RLC_AMDL.pStaPdu; /* D/C| CPT| */ @@ -3197,7 +3185,7 @@ static void rlcAmmCreateStatusPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDat /* set ACK SN */ { - DU_LOG("\nRLC: rlcAssembleCntrlInfo: ACK PDU's SN = %d"\ + DU_LOG("\nINFO --> RLC_DL : rlcAssembleCntrlInfo: ACK PDU's SN = %d"\ "UEID:%d CELLID:%d", ack_sn, rbCb->rlcId.ueId, rbCb->rlcId.cellId); cntrlPdu[0] |= (ack_sn & 0xF00)>> 8; @@ -3315,7 +3303,7 @@ static void rlcAmmCreateStatusPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDat /* set ACK SN */ { - DU_LOG("\nRLC: rlcAssembleCntrlInfo: ACK PDU's SN = %d" + DU_LOG("\nINFO --> RLC_DL : rlcAssembleCntrlInfo: ACK PDU's SN = %d" "UEID:%d CELLID:%d", ack_sn, rbCb->rlcId.ueId,rbCb->rlcId.cellId); cntrlPdu[0] |= (ack_sn & 0x3C000) >> 14; @@ -3327,7 +3315,7 @@ static void rlcAmmCreateStatusPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDat else { /* ERROR Log */ - DU_LOG("\nRLC: rlcAssembleCntrlInfo:Conf SN LEN %d is INVALID !!!! \ + DU_LOG("\nERROR --> RLC_DL : rlcAssembleCntrlInfo:Conf SN LEN %d is INVALID !!!! \ UEID:%d CELLID:%d", rbCb->m.amDl.snLen, rbCb->rlcId.ueId, rbCb->rlcId.cellId); } @@ -3346,8 +3334,8 @@ static void rlcAmmCreateStatusPdu(RlcCb *gCb, RlcDlRbCb *rbCb, RlcDatReq *rlcDat ODU_ADD_POST_MSG_MULT(cntrlPdu, cntrlPduSz, mBuf); rlcDatReq->pduSz -= cntrlPduSz; - /* Add mBuf to AMDL.mBuf */ - AMDL.mBuf = mBuf; + /* Add mBuf to RLC_AMDL.mBuf */ + RLC_AMDL.mBuf = mBuf; return; } @@ -3611,7 +3599,7 @@ S16 rlcProcDlStatusPdu(Pst *udxPst,SuId suId, if( ROK != rlcDbmFetchDlUeCb(gCb,rnti,cellId,&(ueCb))) { - printf("\n RLC UECb Not found...\n"); + DU_LOG("\nERROR --> RLC_DL : RLC UECb Not found...\n"); return RFAILED; } @@ -3619,7 +3607,7 @@ S16 rlcProcDlStatusPdu(Pst *udxPst,SuId suId, rbCb = ueCb->lCh[lcId - 1].dlRbCb; /* Skip if mode is not AM */ - if((rbCb == NULLP) || (rbCb->mode != CM_LTE_MODE_AM)) + if((rbCb == NULLP) || (rbCb->mode != RLC_MODE_AM)) { return RFAILED; } @@ -3627,7 +3615,7 @@ S16 rlcProcDlStatusPdu(Pst *udxPst,SuId suId, if(ROK != SExamMsg((Data *)(&fByte), rlcSdu, 0)) { - printf("\n Failure in Rlc Hdr SExamMsg\n"); + DU_LOG("\nERROR --> RLC_DL : Failure in Rlc Hdr SExamMsg\n"); return RFAILED; }