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 */
{\
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;\
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);
}
}
#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 */
CmLList *lnk;
CmLList *nextLnk;
- txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, nackSnInfo->sn);
+ txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, nackSnInfo->sn);
if (txBuf == NULLP)
{
return;
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;
/* 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)
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);
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));
#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));
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)); */
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)
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;
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);
/* 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));
* 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));
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);
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,
}
/* 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;
#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;
}
#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;
#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 */
if(!rlcDlUtlIsReestInProgress(rbCb))
{
- rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL);
+ rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL);
}
return;
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++;
}
* 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)
{
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;
}
/* 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;
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 */
/* 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 */
{
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)
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)
/* 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 */
#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;
}
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
{
Buffer *pdu = NULLP;
MsgLen macGrntSz = rlcDatReq->pduSz;
- RlcAmDl *amDl = &AMDL;
+ RlcAmDl *amDl = &RLC_AMDL;
RlcSdu *sdu = amDl->nxtTx;
RlcSduMap sduMap;
bool nxtTxUpd = FALSE;
#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;
}
/* 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;
}
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;
{
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;
}
{
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;
}
/* 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;
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
/* 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);
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) ||
/* 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);
}
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;
}
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.
* 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);
/* 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;
}
*/
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);
*/
static Void rlcAmmDlMarkPduForReTx(RlcCb *gCb,RlcDlRbCb *rbCb,RlcRetx *retx)
{
- if (AMDL.maxReTxReached == TRUE)
+ if (RLC_AMDL.maxReTxReached == TRUE)
{
return;
}
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 */
}
- if (AMDL.nxtRetx == NULLP)
+ if (RLC_AMDL.nxtRetx == NULLP)
{
- AMDL.nxtRetx = retx;
+ RLC_AMDL.nxtRetx = retx;
}
gRlcStats.amRlcStats.numDLRetransPdus++;
#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;
}
/* Remove SDU from the sduQ */
- cmLListDelFrm(&AMDL.sduQ, &sdu->lstEnt);
+ cmLListDelFrm(&RLC_AMDL.sduQ, &sdu->lstEnt);
rlcUtlAddSduToBeFreedQueue(gCb, sdu);
rlcUtlRaiseDlCleanupEvent(gCb);
}
{
CmLList *pduNode;
- RlcTx *txBuf = rlcUtlGetTxBuf(AMDL.txBufLst, sn);
+ RlcTx *txBuf = rlcUtlGetTxBuf(RLC_AMDL.txBufLst, sn);
if (txBuf == NULLP)
{
rlcUtlAddTxPduToBeFreedQueue(gCb, txBuf);
rlcUtlRaiseDlCleanupEvent(gCb);
/* so that it is not processed again */
- rlcUtlRemovTxBuf(AMDL.txBufLst, txBuf, gCb);
+ rlcUtlRemovTxBuf(RLC_AMDL.txBufLst, txBuf, gCb);
return;
}
#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;
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;
{
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 */
if (retx != NULLP)
{
rlcAmmDlMarkPduForReTx(gCb, rbCb, retx);
- rlcAmmSendDedLcBoStatus(gCb, rbCb, &AMDL);
+ rlcAmmSendDedLcBoStatus(gCb, rbCb, &RLC_AMDL);
}
}
{
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);
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);
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;
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;
}
/* 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);
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;
#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 */
/* 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);
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 */
RlcNackInfo *rlcNackInfo;
uint16_t nkCnt = 0;
- pStaPdu = AMDL.pStaPdu;
+ pStaPdu = RLC_AMDL.pStaPdu;
/* D/C| CPT| */
/* 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;
/* 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;
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);
}
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;
}
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;
}
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;
}
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;
}