* @brief RLC Timer Module
*/
-/**
- * @def RLC_TMR_CALCUATE_WAIT
- *
- * This macro calculates and assigns wait time based on the value of the
- * timer and the timer resolution. Timer value of 0 signifies that the
- * timer is not configured
- *
- * @param[out] _wait Time for which to arm the timer changed to proper
- * value according to the resolution
- * @param[in] _tmrVal Value of the timer
- * @param[in] _timerRes Resolution of the timer
- *
-*/
-#define RLC_TMR_CALCUATE_WAIT(_wait, _tmrVal, _timerRes) \
-{ \
- (_wait) = ((_tmrVal) * SS_TICKS_SEC)/((_timerRes) * 1000); \
- if((0 != (_tmrVal)) && (0 == (_wait))) \
- { \
- (_wait) = 1; \
- } \
-}
-
/* private function declarations */
static Void rlcBndTmrExpiry(PTR cb);
+
/**
* @brief Handler to start timer
*
{
RlcUmUl* umUl = &(((RlcUlRbCb *)cb)->m.umUl);
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait, umUl->reAsmblTmrInt, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, umUl->reAsmblTmrInt, gCb->genCfg.timeRes);
arg.timers = &umUl->reAsmblTmr;
arg.max = RLC_MAX_UM_TMR;
{
RlcAmUl* amUl = &(((RlcUlRbCb *)cb)->m.amUl);
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait, amUl->reAsmblTmrInt, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, amUl->reAsmblTmrInt, gCb->genCfg.timeRes);
arg.timers = &amUl->reAsmblTmr;
arg.max = RLC_MAX_AM_TMR;
{
RlcAmUl* amUl = &(((RlcUlRbCb *)cb)->m.amUl);
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait,
+ TMR_CALCUATE_WAIT(arg.wait,
amUl->staProhTmrInt,
gCb->genCfg.timeRes);
{
RlcAmDl* amDl = &(((RlcDlRbCb *)cb)->m.amDl);
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait,
+ TMR_CALCUATE_WAIT(arg.wait,
amDl->pollRetxTmrInt,
gCb->genCfg.timeRes);
{
RlcRguSapCb* rguSap = (RlcRguSapCb *)cb;
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait, rguSap->bndTmrInt, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, rguSap->bndTmrInt, gCb->genCfg.timeRes);
arg.timers = &rguSap->bndTmr;
arg.max = RLC_MAX_RGUSAP_TMR;
{
measEvtCb = (RlcL2MeasEvtCb *)cb;
/* kw005.201 Changed wait calculation ccpu00117634*/
- RLC_TMR_CALCUATE_WAIT(arg.wait,
+ TMR_CALCUATE_WAIT(arg.wait,
measEvtCb->l2TmrCfg.val,
gCb->genCfg.timeRes);
case EVENT_RLC_UE_THROUGHPUT_TMR:
{
RlcThpt *thptCb = (RlcThpt *)cb;
- RLC_TMR_CALCUATE_WAIT(arg.wait, ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, gConfigInfo.gUeThrptTimeIntervl, gCb->genCfg.timeRes);
arg.timers = &thptCb->ueTputInfo.ueThptTmr;
arg.max = RLC_MAX_THPT_TMR;
break;
case EVENT_RLC_UE_DELETE_TMR:
{
RlcUlUeCb *ulUeCb = (RlcUlUeCb*)cb;
- RLC_TMR_CALCUATE_WAIT(arg.wait, RLC_UE_DELETE_WAIT_TIME, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, RLC_UE_DELETE_WAIT_TIME, gCb->genCfg.timeRes);
arg.timers = &ulUeCb->ueDeleteInfo.ueDelTmr;
arg.max = RLC_MAX_UE_TMR;
break;
case EVENT_RLC_SNSSAI_THROUGHPUT_TMR:
{
RlcThpt *thptCb = (RlcThpt *)cb;
- RLC_TMR_CALCUATE_WAIT(arg.wait, ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes);
+ TMR_CALCUATE_WAIT(arg.wait, gConfigInfo.gSnssaiThrptTimeIntervl, gCb->genCfg.timeRes);
arg.timers = &thptCb->snssaiTputInfo.snssaiThptTmr;
arg.max = RLC_MAX_THPT_TMR;
break;
RlcThpt *rlcThptCb = (RlcThpt*)cb;
/* If cell is not up, throughput details cannot be printed */
- if(gCellStatus != CELL_UP)
+ if(gConfigInfo.gCellStatus != CELL_UP)
{
/* Restart timer */
rlcStartTmr(RLC_GET_RLCCB(rlcThptCb->inst), (PTR)(rlcThptCb), EVENT_RLC_UE_THROUGHPUT_TMR);
* Since our dataVol is in bytes, multiplying 0.008 to covert into kilobits i.e.
* Throughput[kbits/sec] = (dataVol * 0.008 * 1000)/time in ms
*/
- tpt = (double)(rlcThptCb->ueTputInfo.thptPerUe[ueIdx].dataVol * 8)/(double)ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL;
+ tpt = (double)(rlcThptCb->ueTputInfo.thptPerUe[ueIdx].dataVol * 8)/(double)gConfigInfo.gUeThrptTimeIntervl;
DU_LOG("\nUE Id : %d DL Tpt : %.2Lf", rlcThptCb->ueTputInfo.thptPerUe[ueIdx].ueId, tpt);
rlcThptCb->ueTputInfo.thptPerUe[ueIdx].dataVol = 0;
*/
void rlcSnssaiThptTmrExpiry(PTR cb)
{
- long double tpt;
RlcThpt *rlcThptCb = (RlcThpt*)cb;
+ static uint8_t snssaiCntDl = 0, snssaiCntUl = 0;
+ /*Bit map to keep record of reception of DL and UL Snssai Tput expiry*/
+ static uint8_t snssaiTputBitmap = DIR_NONE;
+
/* If cell is not up, throughput details cannot be printed */
- if(gCellStatus != CELL_UP)
+ if(gConfigInfo.gCellStatus != CELL_UP)
{
/* Restart timer */
rlcStartTmr(RLC_GET_RLCCB(rlcThptCb->inst), (PTR)(rlcThptCb), EVENT_RLC_SNSSAI_THROUGHPUT_TMR);
return;
}
-
- DU_LOG("\n==================================================================");
- if(rlcThptCb->snssaiTputInfo.tputPerSnssaiList != NULLP)
+
+ if(rlcThptCb->snssaiTputInfo.dlTputPerSnssaiList != NULLP)
{
- DU_LOG("\n===================== DL Throughput Per SNSSAI ==============================");
-
- rlcCalculateTputPerSnssai(rlcThptCb->snssaiTputInfo.tputPerSnssaiList);
- DU_LOG("\n==================================================================");
+ snssaiCntDl = rlcCalculateTputPerSnssai(rlcThptCb->snssaiTputInfo.dlTputPerSnssaiList, DIR_DL);
+ snssaiTputBitmap |= DIR_DL;
+ arrTputPerSnssai[DIR_DL] = rlcThptCb->snssaiTputInfo.dlTputPerSnssaiList;
+ }
+ if(rlcThptCb->snssaiTputInfo.ulTputPerSnssaiList != NULLP)
+ {
+ snssaiCntUl = rlcCalculateTputPerSnssai(rlcThptCb->snssaiTputInfo.ulTputPerSnssaiList, DIR_UL);
+ snssaiTputBitmap |= DIR_UL;
+ arrTputPerSnssai[DIR_UL] = rlcThptCb->snssaiTputInfo.ulTputPerSnssaiList;
+ }
+ if(snssaiTputBitmap == DIR_BOTH)
+ {
+ //call the function
+ BuildSliceReportToDu(MAX(snssaiCntUl, snssaiCntDl));
+ snssaiTputBitmap = DIR_NONE;
}
/* Restart timer */
rlcStartTmr(RLC_GET_RLCCB(rlcThptCb->inst), (PTR)rlcThptCb, EVENT_RLC_SNSSAI_THROUGHPUT_TMR);
if(RlcProcCfgReq(&ueCb->ueDeleteInfo.pst, rlcUeCfg) != ROK)
{
DU_LOG("\nERROR --> RLC: rlcUeDeleteTmrExpiry(): Failed to delete UE");
- if(sendRlcUeDeleteRspToDu(rlcUeCfg->cellId, rlcUeCfg->ueId, INVALID_UEID) != ROK)
+ if(sendRlcUeDeleteRspToDu(rlcUeCfg->cellId, rlcUeCfg->ueId, UEID_INVALID) != ROK)
{
DU_LOG("ERROR --> RLC: rlcUeDeleteTmrExpiry(): Failed to send UE delete response ");
return RFAILED;