/* Timer events */
#define EVENT_RLC_UMUL_REASSEMBLE_TMR 1
-#define EVENT_RLC_AMUL_REORD_TMR 2
+#define EVENT_RLC_AMUL_REASSEMBLE_TMR 2
#define EVENT_RLC_AMUL_STA_PROH_TMR 3
#define EVENT_RLC_AMDL_POLL_RETX_TMR 4
#define EVENT_RLC_WAIT_BNDCFM 5
uint32_t numDLMaxRetx;
uint32_t numDLRetransPdus;
uint32_t numULPdusDiscarded;
- uint32_t numULReOrdTimerExpires;
+ uint32_t numULReAsmblTimerExpires;
uint32_t numULStaPduRcvd;
uint32_t numULNackInStaPduRcvd;
uint32_t numRlcAmCellSduTx; /* Count of SDUs transmitted in DL for all UEs */
uint32_t numDLBytesUnused;
uint32_t numDLMaxRetx;
uint32_t numULPdusDiscarded;
- uint32_t numULReOrdTimerExpires;
+ uint32_t numULReAsmblTimerExpires;
uint32_t numULPdusOutsideWindow;
}UMRLCStats;
}
}
- /* Check if reOrdTmr is running and update rxNextStatusTrig accordingly */
- tmrRunning = rlcChkTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ /* Check if reAsmblTmr is running and update rxNextStatusTrig accordingly */
+ tmrRunning = rlcChkTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
if (tmrRunning)
{
Bool snInWin = RLC_AM_CHK_SN_WITHIN_RECV_WINDOW(amUl->rxNextStatusTrig, amUl);
-
- if ( (amUl->rxNextStatusTrig == amUl->rxNext) || ( (!snInWin) &&
- (amUl->rxNextStatusTrig != amUl->vrMr) ) )
+ /* spec 38.322v15.3.0 - 5.2.3.2.3 */
+ if((amUl->rxNextStatusTrig == amUl->rxNext) || ( (!snInWin) &&
+ (amUl->rxNextStatusTrig != amUl->vrMr) )||
+ (amUl->rxNextStatusTrig == amUl->rxNext && recBuf &&recBuf->noMissingSeg))
{
- rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
tmrRunning = FALSE;
+ DU_LOG("\nINFO --> RLC_UL: rlcAmmProcessPdus: Stopped ReAssembly Timer rxNextStatusTigger = %d"
+ "rxNextReassembly = %d", amUl->rxNextStatusTrig, amUl->rxNext);
}
}
if (!tmrRunning)
{
- if (amUl->rxNextHighestRcvd > amUl->rxNext)
+ /* spec 38.322v15.3.0 - 5.2.3.2.3 */
+ if((amUl->rxNextHighestRcvd > amUl->rxNext) || ((amUl->rxNextHighestRcvd == amUl->rxNext) &&
+ (recBuf && (!recBuf->noMissingSeg))))
{
- rlcStartTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ rlcStartTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
amUl->rxNextStatusTrig = amUl->rxNextHighestRcvd;
- DU_LOG("\nDEBUG --> RLC_UL : rlcAmmProcessPdus: Updated rxNextStatusTrig = %d \
- UEID:%d CELLID:%d", amUl->rxNextStatusTrig, rbCb->rlcId.ueId,
+ DU_LOG("\nDEBUG --> RLC_UL : rlcAmmProcessPdus: Updated rxNextStatusTrig = %d"
+ "UEID:%d CELLID:%d", amUl->rxNextStatusTrig, rbCb->rlcId.ueId,
rbCb->rlcId.cellId);
}
}
amHdr->sn = sn;
}
- if ((amHdr->si != 0) && (amHdr->si != 0x01))
+ if ((amHdr->si != 0) && (amHdr->si != RLC_SI_FIRST_SEG))
{
hdrInfo.len = RLC_SO_LEN_5GNR;
rlcAmmExtractElmnt(gCb, pdu, &hdrInfo);
* staTrg flag.
* - If staProhTmr is not running, calculate cntrlBo, else it'll be
* updated at the expiry of staProhTmr.
- * - Expiry of reOrdTmr also will set staTrg flag.
+ * - Expiry of reAsmblTmr also will set staTrg flag.
*
* @param[in] gCb RLC instance control block
* @param[in] rbCb Uplink RB control block
ODU_PUT_MSG_BUF(RLC_AMUL.partialSdu);
}
- //if (amHdr->fi & RLC_FI_FIRST_SEG)
- if (amHdr->si == 0x01)
+ if (amHdr->si == RLC_SI_FIRST_SEG)
{/* first Segment of the SDU */
if (RLC_AMUL.partialSdu != NULLP)
{ /* Some old SDU may be present */
RLC_AMUL.partialSdu = pdu;
pdu = NULLP;
}
- else if(amHdr->si == 0x03)
+ else if(amHdr->si == RLC_SI_MID_SEG)
{/* Middle or last segment of the SUD */
ODU_CAT_MSG(RLC_AMUL.partialSdu,pdu, M1M2);
ODU_PUT_MSG_BUF(pdu);
pdu = NULLP;
}
- else if (amHdr->si == 0x02)
+ else if (amHdr->si == RLC_SI_LAST_SEG)
{
ODU_CAT_MSG(pdu,RLC_AMUL.partialSdu,M2M1);
ODU_PUT_MSG_BUF(RLC_AMUL.partialSdu);
/* Discard remaining PDUs and bytesegments in recBuf */
/* Stop all timers and reset variables */
- if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_REORD_TMR))
+ if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_REASSEMBLE_TMR))
{
- rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
}
if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_STA_PROH_TMR))
{
*
*/
-Void rlcAmmReOrdTmrExp(RlcCb *gCb,RlcUlRbCb *rbCb)
+Void rlcAmmReAsmblTmrExp(RlcCb *gCb,RlcUlRbCb *rbCb)
{
RlcAmUl *amUl = &(rbCb->m.amUl);
RlcSn sn;
if (!tmrRunning)
{
- gRlcStats.amRlcStats.numULReOrdTimerExpires++;
+ gRlcStats.amRlcStats.numULReAsmblTimerExpires++;
amUl->gatherStaPduInfo = TRUE;
rlcAmmUlAssembleCntrlInfo(gCb, rbCb);
}
/* Update rxNextStatusTrig */
MODAMR(amUl->rxNextHighestRcvd, mrxNextHighestRcvd, amUl->rxNext, amUl->snModMask);
MODAMR(amUl->rxHighestStatus, mrxHighestStatus, amUl->rxNext, amUl->snModMask);
- if (mrxNextHighestRcvd > mrxHighestStatus)
+ /* spec 38.322v15.3.0 - 5.2.3.2.4 */
+ if((mrxNextHighestRcvd > mrxHighestStatus) || ((mrxNextHighestRcvd == mrxHighestStatus) &&
+ ((recBuf) && !(recBuf->noMissingSeg))))
{
- rlcStartTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ rlcStartTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
amUl->rxNextStatusTrig = amUl->rxNextHighestRcvd;
}
return;
-} /* rlcAmmReOrdTmrExp */
+} /* rlcAmmReAsmblTmrExp */
/**
* @brief Handler for status prohibit timer expiry
{
return;
}
-
+ recBuf->noMissingSeg = FALSE;
newExpSo = seg->soEnd + 1;
recBuf->expSo = newExpSo;
- //lstRcvd = seg->amHdr.lsf;
- if(seg->amHdr.si == 0x2)
+ if(seg->amHdr.si == RLC_SI_LAST_SEG)
{
lstRcvd = TRUE;
}
{
/* keep going ahead as long as the expectedSo match with the header so
else store the expSo for later checking again */
- if(seg->amHdr.si == 0x2)
+ if(seg->amHdr.si == RLC_SI_LAST_SEG)
{
lstRcvd = TRUE;
}
{
newExpSo = seg->soEnd + 1;
recBuf->expSo = newExpSo;
- //lstRcvd = seg->amHdr.lsf;
RLC_LLIST_NEXT_SEG(recBuf->segLst, seg);
}
else
recBuf->allRcvd = TRUE;
gRlcStats.amRlcStats.numRlcAmCellSduRx++;
}
-
+ recBuf->noMissingSeg = TRUE;
return;
}
windSz = (RLC_AM_GET_WIN_SZ(rbCb->m.amUl.snLen)) << 1;
- if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_REORD_TMR))
+ if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_REASSEMBLE_TMR))
{
- rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REORD_TMR);
+ rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_REASSEMBLE_TMR);
}
if(TRUE == rlcChkTmr(gCb,(PTR)rbCb,EVENT_RLC_AMUL_STA_PROH_TMR))
{
rbCb->dir = RLC_DIR_BOTH;
rbCb->m.amUl.staProhTmrInt = entCfg->m.amInfo.ul.staProhTmr;
- rbCb->m.amUl.reOrdTmrInt = entCfg->m.amInfo.ul.reOrdTmr;
+ rbCb->m.amUl.reAsmblTmrInt = entCfg->m.amInfo.ul.reAsmblTmr;
rbCb->m.amUl.snLen = entCfg->m.amInfo.ul.snLen; /* 5GNR */
rbCb->m.amUl.snModMask = (1 << RLC_SN_LEN_18BITS) - 1; /* 5GNR */
}
- cmInitTimers(&(rbCb->m.amUl.reOrdTmr), 1);
+ cmInitTimers(&(rbCb->m.amUl.reAsmblTmr), 1);
cmInitTimers(&(rbCb->m.amUl.staProhTmr), 1);
rbCb->m.amUl.vrMr = rbCb->m.amUl.rxNext + (RLC_AM_GET_WIN_SZ(rbCb->m.amUl.snLen));
rbCb->lch.lChId = entCfg->lCh[1].lChId;
rbCb->lch.lChType = entCfg->lCh[1].type;
rbCb->m.amUl.staProhTmrInt = entCfg->m.amInfo.ul.staProhTmr;
- rbCb->m.amUl.reOrdTmrInt = entCfg->m.amInfo.ul.reOrdTmr;
+ rbCb->m.amUl.reAsmblTmrInt = entCfg->m.amInfo.ul.reAsmblTmr;
break;
}
}
arg.max = RLC_MAX_UM_TMR;
break;
}
- case EVENT_RLC_AMUL_REORD_TMR:
+ case EVENT_RLC_AMUL_REASSEMBLE_TMR:
{
RlcAmUl* amUl = &(((RlcUlRbCb *)cb)->m.amUl);
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait, amUl->reOrdTmrInt, gCb->genCfg.timeRes);
+ RLC_TMR_CALCUATE_WAIT(arg.wait, amUl->reAsmblTmrInt, gCb->genCfg.timeRes);
- arg.timers = &amUl->reOrdTmr;
+ arg.timers = &amUl->reAsmblTmr;
arg.max = RLC_MAX_AM_TMR;
break;
}
arg.max = RLC_MAX_UM_TMR;
break;
}
- case EVENT_RLC_AMUL_REORD_TMR:
+ case EVENT_RLC_AMUL_REASSEMBLE_TMR:
{
- arg.timers = &((RlcUlRbCb *)cb)->m.amUl.reOrdTmr;
+ arg.timers = &((RlcUlRbCb *)cb)->m.amUl.reAsmblTmr;
arg.max = RLC_MAX_AM_TMR;
break;
}
break;
}
- case EVENT_RLC_AMUL_REORD_TMR:
+ case EVENT_RLC_AMUL_REASSEMBLE_TMR:
{
RlcUlRbCb *ulRbCb = (RlcUlRbCb *)cb;
- rlcAmmReOrdTmrExp(RLC_GET_RLCCB(ulRbCb->inst), ulRbCb);
+ rlcAmmReAsmblTmrExp(RLC_GET_RLCCB(ulRbCb->inst), ulRbCb);
break;
}
case EVENT_RLC_AMUL_STA_PROH_TMR:
return (((RlcUlRbCb *)cb)->m.umUl.reAsmblTmr.tmrEvnt ==
EVENT_RLC_UMUL_REASSEMBLE_TMR);
}
- case EVENT_RLC_AMUL_REORD_TMR:
+ case EVENT_RLC_AMUL_REASSEMBLE_TMR:
{
- return (((RlcUlRbCb *)cb)->m.amUl.reOrdTmr.tmrEvnt ==
- EVENT_RLC_AMUL_REORD_TMR);
+ return (((RlcUlRbCb *)cb)->m.amUl.reAsmblTmr.tmrEvnt ==
+ EVENT_RLC_AMUL_REASSEMBLE_TMR);
}
case EVENT_RLC_AMUL_STA_PROH_TMR:
{
uint16_t expSo; /**< Next expected seg offset */
Bool allRcvd; /**< All bytes received or not */
Bool isDelvUpperLayer; /**< Is it sent to upper layer */
+ Bool noMissingSeg; /*!< Flag to check all the bytes are received before the last byte of segment */
}RlcAmRecBuf;
/** @addtogroup ammode */
* - expSo : The expected SO for reassembly
* - staProhTmr : The Status Probihit Timer
* - staProhTmrInt : Status Prohibit Timer interval (in ??)
- * - reOrdTmr : The Reordering Timer
- * - reOrdTmrInt : Re-ordering timer interval
+ * - reAsmblTmr : The Reordering Timer
+ * - reAsmblTmrInt : Re-ordering timer interval
* - gatherStaPduInfo : Whether to gather information required to create
* the STATUS PDU
*
uint16_t expSo; /**< Expected SO for reassembly */
CmTimer staProhTmr; /**< T_status_prohibit Timer */
uint16_t staProhTmrInt; /**< Timer Interval */
- CmTimer reOrdTmr; /**< T_reordering Timer */
- uint8_t reOrdTmrInt; /**< Timer Interval */
+ CmTimer reAsmblTmr; /**< T_reordering Timer */
+ uint8_t reAsmblTmrInt; /**< Timer Interval */
Bool gatherStaPduInfo; /**< Gather STATUS PDU creation info*/
Bool isOutOfSeq; /**< To identify whether packets are Out-Of-Seq or not */
uint8_t snLen; /*!< Sequence number length:12 bit or 18 bit : 5GNR RLC */
KwPduInfo *pduInfo));
#endif
-Void rlcAmmReOrdTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
+Void rlcAmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
gRlcStats.amRlcStats.numDLPollTimerExpiresDrb, gRlcStats.amRlcStats.numDLMaxRetx,
gRlcStats.amRlcStats.numDLRetransPdus);
DU_LOG("\nINFO --> RLC_DL : RLC Stats: AMUL: "
- " PdusDiscarded:%lu ReOrdTimerExpires:%lu StaPduRcvd:%lu NackInStaPduRcvd:%lu ",
- gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReOrdTimerExpires,
+ " PdusDiscarded:%lu ReAsmblTimerExpires:%lu StaPduRcvd:%lu NackInStaPduRcvd:%lu ",
+ gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReAsmblTimerExpires,
gRlcStats.amRlcStats.numULStaPduRcvd, gRlcStats.amRlcStats.numULNackInStaPduRcvd);
RTLIN_DUMP_DEBUG("RLC Stats: PDUs Sent = (%ld), PdusRext = (%ld), TimeOut = (%ld), SduDiscarded = (%ld)\n",
ulInst->genSts.errorPdusRecv);
RTLIN_DUMP_DEBUG("RLC Stats:"
"RLC_AMDL: StaPduSent:%lu NacksInStaPdu:%lu BytesUnused:%lu PollTimerExpires SRB:%lu DRB:%lu MaxRetx:%lu RetransPdus:%lu \n"
- "RLC_AMUL: PdusDiscarded:%lu ReOrdTimerExpires:%lu StaPduRcvd:%lu NackInStaPduRcvd:%lu \n",
+ "RLC_AMUL: PdusDiscarded:%lu ReAsmblTimerExpires:%lu StaPduRcvd:%lu NackInStaPduRcvd:%lu \n",
gRlcStats.amRlcStats.numDLStaPduSent, gRlcStats.amRlcStats.numDLNacksInStaPdu, gRlcStats.amRlcStats.numDLBytesUnused,
gRlcStats.amRlcStats.numDLPollTimerExpiresSrb, gRlcStats.amRlcStats.numDLPollTimerExpiresDrb, gRlcStats.amRlcStats.numDLMaxRetx,
- gRlcStats.amRlcStats.numDLRetransPdus, gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReOrdTimerExpires,
+ gRlcStats.amRlcStats.numDLRetransPdus, gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReAsmblTimerExpires,
gRlcStats.amRlcStats.numULStaPduRcvd, gRlcStats.amRlcStats.numULNackInStaPduRcvd);
}
#else
gRlcStats.amRlcStats.numDLPollTimerExpiresDrb, gRlcStats.amRlcStats.numDLMaxRetx,
gRlcStats.amRlcStats.numDLRetransPdus);
DU_LOG("\nINFO --> RLC_DL : RLC Stats: AMUL: "
- " PdusDiscarded:%u ReOrdTimerExpires:%u StaPduRcvd:%u NackInStaPduRcvd:%u ",
- gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReOrdTimerExpires,
+ " PdusDiscarded:%u ReAsmblTimerExpires:%u StaPduRcvd:%u NackInStaPduRcvd:%u ",
+ gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReAsmblTimerExpires,
gRlcStats.amRlcStats.numULStaPduRcvd, gRlcStats.amRlcStats.numULNackInStaPduRcvd);
/* RTLIN_DUMP_DEBUG("AM RLC Stats:"
"RLC_AMDL: SDUs Tx :(%u) SDU Bytes Tx :(%u) SDUs Retx :(%u) MaxRetx:(%u) WindowStalls: (%u) \n"
RTLIN_DUMP_DEBUG("RLC_AMDL: StaPduSent:%u NacksInStaPdu:%u BytesUnused:%u PollTimerExpires SRB:%u DRB:%u MaxRetx:%u RetransPdus:%u \n"
" SDUs Tx :(%u) SDU Bytes Tx :(%u) SDUs Retx :(%u) WindowStalls: (%u) \n"
- "RLC_AMUL: PdusDiscarded:%u ReOrdTimerExpires:%u StaPduRcvd:%u NackInStaPduRcvd:%u \n"
+ "RLC_AMUL: PdusDiscarded:%u ReAsmblTimerExpires:%u StaPduRcvd:%u NackInStaPduRcvd:%u \n"
" DropOutWinRx :(%u) SDUs Rx :(%u) SDU Bytes Rx :(%u) SDUNack Rx :(%u) Duplicate Pdu Rx:(%u) \n",
gRlcStats.amRlcStats.numDLStaPduSent, gRlcStats.amRlcStats.numDLNacksInStaPdu, gRlcStats.amRlcStats.numDLBytesUnused,
gRlcStats.amRlcStats.numDLPollTimerExpiresSrb, gRlcStats.amRlcStats.numDLPollTimerExpiresDrb,
gRlcStats.amRlcStats.numDLMaxRetx, gRlcStats.amRlcStats.numDLRetransPdus,
gRlcStats.amRlcStats.numRlcAmCellSduTx, gRlcStats.amRlcStats.numRlcAmCellSduBytesTx,
gRlcStats.amRlcStats.numRlcAmCellRetxPdu, gRlcStats.amRlcStats.numRlcAmCellWinStall,
- gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReOrdTimerExpires,
+ gRlcStats.amRlcStats.numULPdusDiscarded, gRlcStats.amRlcStats.numULReAsmblTimerExpires,
gRlcStats.amRlcStats.numULStaPduRcvd, gRlcStats.amRlcStats.numULNackInStaPduRcvd,
gRlcStats.amRlcStats.numRlcAmCellDropOutWinRx, gRlcStats.amRlcStats.numRlcAmCellSduRx,
gRlcStats.amRlcStats.numRlcAmCellSduBytesRx, gRlcStats.amRlcStats.numRlcAmCellNackRx, gRlcStats.amRlcStats.numRlcAmCellDupPduRx);
rlcUeCfg->lCh[lChRbIdx].type = duRlcUeCfg->lcType;
rlcUeCfg->m.amInfo.ul.snLen = duRlcUeCfg->u.amCfg->ulAmCfg.snLenUl;
rlcUeCfg->m.amInfo.ul.staProhTmr = duRlcUeCfg->u.amCfg->ulAmCfg.statProhTmr;
- rlcUeCfg->m.amInfo.ul.reOrdTmr = duRlcUeCfg->u.amCfg->ulAmCfg.reAssemTmr * RLC_REASSEMBLY_TMR_BASE;
+ rlcUeCfg->m.amInfo.ul.reAsmblTmr = duRlcUeCfg->u.amCfg->ulAmCfg.reAssemTmr * RLC_REASSEMBLY_TMR_BASE;
break;
}
case RLC_MODE_UM:
{
/* UP LINK */
- CMCHKPK(oduUnpackUInt8, param->ul.reOrdTmr, mBuf);
+ CMCHKPK(oduUnpackUInt8, param->ul.reAsmblTmr, mBuf);
CMCHKPK(oduUnpackUInt16, param->ul.staProhTmr, mBuf);
CMCHKPK(oduUnpackUInt8, param->ul.snLen, mBuf);
/* UP LINK */
CMCHKUNPK(oduPackUInt8, &(param->ul.snLen), mBuf);
CMCHKUNPK(oduPackUInt16, &(param->ul.staProhTmr), mBuf);
- CMCHKUNPK(oduPackUInt8, &(param->ul.reOrdTmr), mBuf);
+ CMCHKUNPK(oduPackUInt8, &(param->ul.reAsmblTmr), mBuf);
return ROK;
} /* cmUnpkRlcAmInfo */
uint8_t snLen; /*!< Sequence Number length in
bits. Allowed values are 12 and 18 */
uint16_t staProhTmr; /*!< T_status_prohibit Timer in msec*/
- uint8_t reOrdTmr; /*!< T_reordering Timer in msec*/
+ uint8_t reAsmblTmr; /*!< T_reordering Timer in msec*/
}ul; /*!< Up link */
}RlcAmInfo;
UM_SIZE_12
}SnLenUm;
-typedef enum
-{
- RE_ASM_0MS,
- RE_ASM_5MS,
- RE_ASM_10MS,
- RE_ASM_15MS,
- RE_ASM_20MS,
- RE_ASM_25MS,
- RE_ASM_30MS,
- RE_ASM_35MS,
- RE_ASM_40MS,
- RE_ASM_45MS,
- RE_ASM_50MS,
- RE_ASM_55MS,
- RE_ASM_60MS,
- RE_ASM_65MS,
- RE_ASM_70MS,
- RE_ASM_75MS,
- RE_ASM_80MS,
- RE_ASM_85MS,
- RE_ASM_90MS,
- RE_ASM_95MS,
- RE_ASM_100MS,
- RE_ASM_105MS,
- RE_ASM_110MS,
- RE_ASM_115MS,
- RE_ASM_120MS,
- RE_ASM_125MS,
- RE_ASM_130MS,
- RE_ASM_135MS,
- RE_ASM_140MS,
- RE_ASM_145MS,
- RE_ASM_150MS,
- RE_ASM_155MS,
- RE_ASM_160MS,
- RE_ASM_165MS,
- RE_ASM_170MS,
- RE_ASM_175MS,
- RE_ASM_180MS,
- RE_ASM_185MS,
- RE_ASM_190MS,
- RE_ASM_195MS,
- RE_ASM_200MS,
- RE_ASM_SPARE1
-
-}TReAssembleTmr;
-
-typedef enum
-{
- PROH_0MS,
- PROH_5MS,
- PROH_10MS,
- PROH_15MS,
- PROH_20MS,
- PROH_25MS,
- PROH_30MS,
- PROH_35MS,
- PROH_40MS,
- PROH_45MS,
- PROH_50MS,
- PROH_55MS,
- PROH_60MS,
- PROH_65MS,
- PROH_70MS,
- PROH_75MS,
- PROH_80MS,
- PROH_85MS,
- PROH_90MS,
- PROH_95MS,
- PROH_100MS,
- PROH_105MS,
- PROH_110MS,
- PROH_115MS,
- PROH_120MS,
- PROH_125MS,
- PROH_130MS,
- PROH_135MS,
- PROH_140MS,
- PROH_145MS,
- PROH_150MS,
- PROH_155MS,
- PROH_160MS,
- PROH_165MS,
- PROH_170MS,
- PROH_175MS,
- PROH_180MS,
- PROH_185MS,
- PROH_190MS,
- PROH_195MS,
- PROH_200MS,
- PROH_205MS,
- PROH_210MS,
- PROH_215MS,
- PROH_220MS,
- PROH_225MS,
- PROH_230MS,
- PROH_235MS,
- PROH_240MS,
- PROH_245MS,
- PROH_250MS,
- PROH_300MS,
- PROH_350MS,
- PROH_400MS,
- PROH_450MS,
- PROH_500MS,
- PROH_800MS,
- PROH_1000MS,
- PROH_1200MS,
- PROH_1600MS,
- PROH_2000MS,
- PROH_2400MS,
- PROH_SPARE2,
- PROH_SPARE1
-
-}TStatProhTmr;
-
typedef enum
{
RLC_DU_APP_RSP_NOK,
typedef struct ulAmCfg
{
SnLenAm snLenUl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
- TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
- TStatProhTmr statProhTmr; /* T_status_prohibit Timer in msec*/
+ int8_t reAssemTmr; /* T_reassembling Timer in msec*/
+ int16_t statProhTmr; /* T_status_prohibit Timer in msec*/
}UlAmCfg;
typedef struct ulUmCfg
{
SnLenUm snLenUlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
- TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
+ int8_t reAssemTmr; /* T_reassembling Timer in msec*/
}UlUmCfg;
#define POLL_BYTE_VAL -1 /* Value for infinite poll byte */
#define MAX_RETX_THRESHOLD 5 /* Enum for 8 retransmissions */
#define MAX_RETX_THRESHOLD_VAL 8 /* Value for 8 retransmissions */
-#define T_REASSEMBLY 8
-#define T_STATUS_PROHIBHIT 7
+#define T_REASSEMBLY 8 /* enum for RE_ASM_40MS */
+#define T_REASSEMBLY_VAL 40 /* default re assembly timer */
+#define T_STATUS_PROHIBHIT 7 /* enum for PROH_35MS */
+#define T_STATUS_PROHIBHIT_VAL 35 /* default status prohibit timer */
#define MAC_LC_PRIORITY 1
#define PRIORTISIED_BIT_RATE 15
#define BUCKET_SIZE_DURATION 5
* @return Actual value of pollPdu
*
* **********************************************************************/
+
uint16_t getPollRetxTmr(uint8_t pollRetxTmrCfg)
{
uint16_t pollRetxTmr;
return maxRetx;
}
+/*******************************************************************
+ * @brief Converts enum values into actual value of reassembly timer
+ *
+ * @details
+ *
+ * Function : getReAsmblTmr
+ *
+ * Functionality: Converts enum values into actual value of reassembly
+ * timer
+ *
+ * @params[in] Enum value of reassembly timer
+ * @return Actual value of reassembly timer
+ *
+ * **********************************************************************/
+
+int8_t getReAsmblTmr(uint8_t reAsmblTmrCfg)
+{
+ int8_t reAsmblTmr = 0;
+
+ if(reAsmblTmrCfg == T_Reassembly_ms0)
+ {
+ reAsmblTmr = 0;
+ }
+ else if(reAsmblTmrCfg >= T_Reassembly_ms5 || reAsmblTmrCfg <= T_Reassembly_ms100)
+ {
+ /* All values of re assembly timer are at interval of 5ms.
+ * This is valid upto 100ms
+ * Hence converting the enum value to actual value by multiplying it to 5
+ */
+ reAsmblTmr = reAsmblTmrCfg * 5;
+ }
+ else if(reAsmblTmrCfg >= T_Reassembly_ms110 || reAsmblTmrCfg <= T_Reassembly_ms200)
+ {
+ /* All values of re assembly timer are at interval of 10ms.
+ * This is valid upto 200ms
+ * since enum value starts from 20 for 100ms, subtracting 10 and
+ * converting the enum value to actual value by multiplying it to 10
+ */
+ reAsmblTmr = ((reAsmblTmrCfg-10) * 10);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> F1AP : Invalid value of Re Assembly timer %d", reAsmblTmrCfg);
+ reAsmblTmr = -1;
+ }
+ return reAsmblTmr;
+}
+
+/************************************************************************
+ *
+ * @brief Converts enum values into actual value of status prohibit timer
+ *
+ * @details
+ *
+ * Function : getStatProhTmr
+ *
+ * Functionality: Converts enum values into actual value of status prohibit
+ * timer
+ *
+ * @params[in] Enum value of status prohibit timer
+ * @return Actual value of status prohibit timer
+ *
+ * **********************************************************************/
+
+int16_t getStatProhTmr(uint8_t statProhTmrCfg)
+{
+ int16_t statProhTmr =0;
+
+ if(statProhTmrCfg == T_StatusProhibit_ms0)
+ {
+ statProhTmr = 0;
+ }
+ else if(statProhTmrCfg >= T_StatusProhibit_ms5 || statProhTmrCfg <= T_StatusProhibit_ms250)
+ {
+ /* All values of re assembly timer are at interval of 5ms.
+ * This is valid upto 250ms
+ * Hence converting the enum value to actual value by multiplying it to 5
+ */
+ statProhTmr = statProhTmrCfg * 5;
+ }
+ else
+ {
+ switch(statProhTmrCfg)
+ {
+ case T_StatusProhibit_ms300:
+ statProhTmr = 300;
+ break;
+ case T_StatusProhibit_ms350:
+ statProhTmr = 350;
+ break;
+ case T_StatusProhibit_ms400:
+ statProhTmr = 400;
+ break;
+ case T_StatusProhibit_ms450:
+ statProhTmr = 450;
+ break;
+ case T_StatusProhibit_ms500:
+ statProhTmr = 500;
+ break;
+ case T_StatusProhibit_ms800:
+ statProhTmr = 800;
+ break;
+ case T_StatusProhibit_ms1000:
+ statProhTmr = 1000;
+ break;
+ case T_StatusProhibit_ms1200:
+ statProhTmr = 1200;
+ break;
+ case T_StatusProhibit_ms1600:
+ statProhTmr = 1600;
+ break;
+ case T_StatusProhibit_ms2000:
+ statProhTmr = 2000;
+ break;
+ case T_StatusProhibit_ms2400:
+ statProhTmr = 2400;
+ break;
+ default:
+ DU_LOG("\nInvalid value of Status Prohibit timer %d", statProhTmrCfg);
+ statProhTmr = -1;
+ break;
+ }
+ }
+ return statProhTmr;
+}
+
/*******************************************************************
*
* @brief Builds Uplink Info for NR
if(rlcAmCfg->dl_AM_RLC.sn_FieldLength)
{
amCfgToSet->ulAmCfg.snLenUl = *(rlcAmCfg->dl_AM_RLC.sn_FieldLength);
- amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
+ /*TODO: Check the timer value when sent by real CU */
+ amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
amCfgToSet->ulAmCfg.statProhTmr = rlcAmCfg->dl_AM_RLC.t_StatusProhibit;
}
uint8_t duProcDlRrcMsg(F1DlRrcMsg *dlRrcMsg);
uint8_t duProcUeContextSetupRequest(DuUeCb *ueCb);
void duFillModulationDetails(MacUeCfg *ueCfg, MacUeCfg *oldUeCfg, void *ueCap);
+int8_t getReAsmblTmr(uint8_t reAsmblTmrCfg);
+int16_t getStatProhTmr(uint8_t statProhTmrCfg);
/**********************************************************************
End of file
/* UL AM */
amCfg->ulAmCfg.snLenUl = AM_SIZE_12;
- amCfg->ulAmCfg.reAssemTmr = RE_ASM_40MS;
- amCfg->ulAmCfg.statProhTmr = PROH_35MS;
+ amCfg->ulAmCfg.reAssemTmr = T_REASSEMBLY_VAL;
+ amCfg->ulAmCfg.statProhTmr = T_STATUS_PROHIBHIT_VAL;
}
/******************************************************************
{
/* UL UM BI DIR INFO */
umBiDirCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
- umBiDirCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
+ umBiDirCfg->ulUmCfg.reAssemTmr = T_REASSEMBLY_VAL;
/* DL UM BI DIR INFO */
umBiDirCfg->dlUmCfg.snLenDlUm = UM_SIZE_12;
void fillDefaultUmUlInfo(UmUniDirUlBearerCfg *UmUlCfg)
{
UmUlCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
- UmUlCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
+ UmUlCfg->ulUmCfg.reAssemTmr = T_REASSEMBLY_VAL;
}
/******************************************************************
/* Filling PDU */
pdu = (uint8_t *)pduInfo->pduData;
- msgLen = 51;
+ msgLen = 52;
/* For UL User data
MAC subheader format is R/F/LCId/L (2/3 bytes)
LCId is 4 for DRB1
L is length of PDU i.e 50 bytes
From 38.321 section 6.1.1
+ From 38.322 section 6.2.2.4, 6.2.2.3 for AM, UM Header
*/
- uint8_t ulMsg[] = {4, msgLen, 0, 69, 0, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 192, 168, 130, 81, 192, 168, 130, 82, 84, 104,
- 105, 115, 32, 105, 115, 32, 69, 71, 84, 80, 32, 100, 97, 116, 97, 32, 102, 114, 111, 109, 32, 68, 85, 0, 0, 0, 0, 0};
- msgLen += 2; /* 2bytes of header */
- memcpy(pdu, &ulMsg, msgLen);
- byteIdx += msgLen; /* 2 bytes of header */
+ /* Below ulMsg supports 12bit SN for UM mode */
+ /* SI SN */
+ uint8_t ulMsg[] = {4, msgLen, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 192, 168, 130, 81, 192, 168, 130, 82, 84, 104,
+ 105, 115, 32, 105, 115, 32, 69, 71, 84, 80, 32, 100, 97, 116, 97, 32, 102, 114, 111, 109, 32, 68, 85, 0, 0, 0, 0, 0};
+ msgLen += 2; /* 2bytes of header */
+ memcpy(pdu, &ulMsg, msgLen);
+ byteIdx += msgLen; /* 2 bytes of header */
/* Filling MAC SDU for Padding bytes*/
if(byteIdx < pduInfo->pdu_length)
fillMsgHeader(&rxDataInd->header, FAPI_RX_DATA_INDICATION, msgLen);
/* Send Message to peer */
- while(cnt < 200)
+ while(cnt < 2)
{
DU_LOG("\nDEBUG --> PHY STUB : Sending UL User Data[%d] at sfn %d slot %d", cnt+1, sfnValue, slotValue);
/* Sending Rx data indication to MAC */