From c449cf0b0cc8794c2e2d28dcc4c9bd8b9534e697 Mon Sep 17 00:00:00 2001 From: "lal.harshita" Date: Thu, 17 Nov 2022 10:31:04 +0530 Subject: [PATCH] [Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-472] Implementation of onduration timer Signed-off-by: lal.harshita Change-Id: I22cc0d1a47f88d9efe7604184aca2f50b4a13b05 Signed-off-by: lal.harshita --- src/5gnrsch/sch.h | 4 +- src/5gnrsch/sch_common.c | 23 +++ src/5gnrsch/sch_drx.c | 305 +++++++++++++++++++++++++++++++++++++++- src/5gnrsch/sch_drx.h | 5 +- src/5gnrsch/sch_slot_ind.c | 114 +++++++++------ src/cu_stub/cu_f1ap_msg_hdl.c | 2 +- src/du_app/du_cfg.h | 4 +- src/du_app/du_mgr_main.c | 12 +- src/phy_stub/phy_stub_msg_hdl.c | 2 +- 9 files changed, 407 insertions(+), 64 deletions(-) diff --git a/src/5gnrsch/sch.h b/src/5gnrsch/sch.h index 89eb270dc..57a438175 100644 --- a/src/5gnrsch/sch.h +++ b/src/5gnrsch/sch.h @@ -412,8 +412,8 @@ typedef struct schHqUlMap #ifdef NR_DRX typedef struct schDrxUeCb { - bool drxDlUeActiveStatus; /* variable is used to store the status about downlink active status */ - bool drxUlUeActiveStatus; /* variable is used to store the status about uplink active status */ + uint32_t drxDlUeActiveStatus; /* variable is used to store the status about downlink active status */ + uint32_t drxUlUeActiveStatus; /* variable is used to store the status about uplink active status */ uint32_t onDurationLen; /* length of on duration which is received from ue cfg/recfg in form of ms and subms, informs about after how many slots on duration gets expire */ uint32_t inActvTimerLen; /* length of inActvTimer value received from ue cfg/recfg in form of ms, informs about after how many slots in active gets expire */ uint8_t harqRttDlTimerLen; /* length of harqRttDlTimer received from ue cfg/recfg in form of symbols, inform about after how many slots on the harq drx-HARQ-RTT-TimerDL expire */ diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index c441a0c8c..76758a683 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -413,10 +413,19 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming SchCellCb *cell = schCb[inst].cells[inst]; SchPucchCfgCmn *pucchCfg = NULLP; SchBwpParams *ulBwp = NULLP; + SchUeCb *ueCb = NULLP; uint16_t startPrb; GET_UE_ID(schPucchInfo->rnti, ueId); ueIdx = ueId -1; +#ifdef NR_DRX + ueCb = schGetUeCb(cell, schPucchInfo->rnti); + if(ueCb->ueDrxInfoPres) + { + if(!ueCb->drxUeCb.drxUlUeActiveStatus) + return RFAILED; + } +#endif if(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellCfg.initUlBwp.pucchCfgPres) { /* fill pucch dedicated cfg */ @@ -470,6 +479,7 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) { int ret = ROK; + SchUeCb *ueCb; UlSchedInfo ulSchedInfo; SchUlSlotInfo *schUlSlotInfo = NULLP; SlotTimingInfo ulTimingInfo; @@ -491,6 +501,15 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) if(schUlSlotInfo->schPuschInfo) { ulSchedInfo.crnti = schUlSlotInfo->schPuschInfo->crnti; + /* Check the ue drx status if the UE is active for uplink scheduling or not */ +#ifdef NR_DRX + ueCb = schGetUeCb(cell, ulSchedInfo.crnti); + if(ueCb->ueDrxInfoPres) + { + if(!ueCb->drxUeCb.drxUlUeActiveStatus) + return RFAILED; + } +#endif ulSchedInfo.dataType |= SCH_DATATYPE_PUSCH; memcpy(&ulSchedInfo.schPuschInfo, schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo)); @@ -507,6 +526,10 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo, sizeof(SchPucchInfo)); } + else + { + return RFAILED; + } memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo)); } diff --git a/src/5gnrsch/sch_drx.c b/src/5gnrsch/sch_drx.c index ff0844df7..02e6f1050 100644 --- a/src/5gnrsch/sch_drx.c +++ b/src/5gnrsch/sch_drx.c @@ -78,8 +78,8 @@ void schInitDrxUeCb(SchUeCb *ueCb) ueCb->drxUeCb.onDurationStartDistance = SCH_DRX_INVALID_DISTANCE; ueCb->drxUeCb.onDurationExpiryDistance = SCH_DRX_INVALID_DISTANCE; ueCb->drxUeCb.inActiveTmrExpiryDistance = SCH_DRX_INVALID_DISTANCE; - ueCb->drxUeCb.drxDlUeActiveStatus = false; - ueCb->drxUeCb.drxUlUeActiveStatus = false; + ueCb->drxUeCb.drxDlUeActiveStatus = 0; + ueCb->drxUeCb.drxUlUeActiveStatus = 0; } /* will uncomment this function in next gerrit */ @@ -428,7 +428,7 @@ void schDrxUeReCfgTimer(SchCellCb *cell, SchUeCb *ueCb) uint32_t onDurTime, onDurExpSlotTime, currentSlotTime; uint32_t cycleLen; SlotTimingInfo onDurationOccurance; - + if(ueCb->drxUeCb.shortCyclePresent == false) { /* if short cycle configuration are not recived as a part of UE Recfg then if there is any entry present in short cycle timer list @@ -447,8 +447,9 @@ void schDrxUeReCfgTimer(SchCellCb *cell, SchUeCb *ueCb) { cmLListDelFrm(&cell->drxCb[ueCb->drxUeCb.onDurationStartIndex].onDurationStartList, ueCb->drxUeCb.onDurationStartNodeInfo); SCH_FREE(ueCb->drxUeCb.onDurationStartNodeInfo, sizeof(CmLList)); - ueCb->drxUeCb.onDurationStartIndex = SCH_DRX_INVALID_INDEX; - ueCb->drxUeCb.onDurationStartDistance = SCH_DRX_INVALID_DISTANCE; + ueCb->drxUeCb.onDurationStartIndex= SCH_DRX_INVALID_INDEX; + ueCb->drxUeCb.onDurationStartDistance= SCH_DRX_INVALID_DISTANCE; + } findNextOndurationOccurance(cell, &ueCb->drxUeCb, &onDurationOccurance, 0); @@ -518,6 +519,300 @@ void schAddUeInOndurationList(SchCellCb *cell, SchUeCb *ueCb, uint8_t delta) } } +/** + * @brief Handling of On duration drx start timer + * + * @details + * + * Function : schHdlDrxOnDurStrtTimerForDlDirection + * + * Handling of On duration drx start timer + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ + +void schHdlDrxOnDurStrtTimerForDlDirection(SchCellCb *cell, uint16_t currListIndx) +{ + uint16_t onDurationExpiry=0; + CmLList *drxCurrNode = NULLP; + SchUeCb *ueCb = NULLP; + + drxCurrNode = cell->drxCb[currListIndx].onDurationStartList.first; + if(drxCurrNode) + { + /* Handling of dl On duration drx start list */ + while(drxCurrNode) + { + ueCb = (SchUeCb*)drxCurrNode->node; + drxCurrNode = drxCurrNode->next; + + ueCb->drxUeCb.onDurationStartDistance--; + + if(ueCb->drxUeCb.onDurationStartDistance != SCH_DRX_INVALID_DISTANCE) + { + continue; + } + else + { + ueCb->drxUeCb.drxDlUeActiveStatus |= UE_ACTIVE_FOR_ONDURATION; + + /* If there is any entery present in onDurationExpiry list remove + * the entery from the list and recalculate the + * onDurationExpiry time and add it to list */ + if(ueCb->drxUeCb.onDurationExpiryIndex != SCH_DRX_INVALID_INDEX) + { + cmLListDelFrm(&cell->drxCb[ueCb->drxUeCb.onDurationExpiryIndex].onDurationExpiryList, ueCb->drxUeCb.onDurationExpiryNodeInfo); + SCH_FREE(ueCb->drxUeCb.onDurationExpiryNodeInfo, sizeof(CmLList)); + ueCb->drxUeCb.onDurationExpiryIndex = SCH_DRX_INVALID_INDEX; + ueCb->drxUeCb.onDurationExpiryDistance = SCH_DRX_INVALID_DISTANCE; + } + + /* onDurationExpiry = (current slot + onduration length) % MAX_DRX_SIZE*/ + onDurationExpiry = (currListIndx + ueCb->drxUeCb.onDurationLen)%MAX_DRX_SIZE; + ueCb->drxUeCb.onDurationExpiryDistance = (ueCb->drxUeCb.onDurationLen)/MAX_DRX_SIZE; + schAddDrxTimerIntoList(&cell->drxCb[onDurationExpiry].onDurationExpiryList, ueCb, ueCb->drxUeCb.onDurationExpiryNodeInfo); + ueCb->drxUeCb.onDurationExpiryIndex = onDurationExpiry; + + } + } + } +} + +/** + * @brief Handling of On duration drx start timer + * + * @details + * + * Function : schHdlDrxOnDurStrtTimerForUlDirection + * + * Handling of On duration drx start timer + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ + +void schHdlDrxOnDurStrtTimerForUlDirection(SchCellCb *cell, uint16_t currListIndx) +{ + uint16_t onDurTime=0; + CmLList *drxCurrNode = NULLP; + SchUeCb *ueCb = NULLP; + + drxCurrNode = cell->drxCb[currListIndx].onDurationStartList.first; + if(drxCurrNode) + { + /* Handling of dl On duration drx start list */ + while(drxCurrNode) + { + ueCb = (SchUeCb*)drxCurrNode->node; + drxCurrNode = drxCurrNode->next; + + if(ueCb->drxUeCb.onDurationStartDistance != SCH_DRX_INVALID_DISTANCE) + { + continue; + } + ueCb->drxUeCb.drxUlUeActiveStatus |= UE_ACTIVE_FOR_ONDURATION; + + + /* if there short cycle length is used as the cycle length for onduration calculation then based on the short cycle else long cycle is used for calculating next onduration */ + cmLListDelFrm(&cell->drxCb[currListIndx].onDurationStartList, ueCb->drxUeCb.onDurationStartNodeInfo); + SCH_FREE(ueCb->drxUeCb.onDurationStartNodeInfo, sizeof(CmLList)); + ueCb->drxUeCb.onDurationStartIndex= SCH_DRX_INVALID_INDEX; + + if(ueCb->drxUeCb.longCycleToBeUsed) + { + onDurTime = currListIndx + ueCb->drxUeCb.longCycleLen; + } + else + { + onDurTime = currListIndx + ueCb->drxUeCb.shortCycleLen; + } + SCH_CALCULATE_TIMER_INDEX(onDurTime, ueCb->drxUeCb.onDurationStartIndex); + ueCb->drxUeCb.onDurationStartDistance = ueCb->drxUeCb.longCycleLen/MAX_DRX_SIZE; + schAddDrxTimerIntoList(&cell->drxCb[ueCb->drxUeCb.onDurationStartIndex].onDurationStartList, ueCb, ueCb->drxUeCb.onDurationStartNodeInfo); + } + } +} + +/** + * @brief Handling of On duration drx start timer + * + * @details + * + * Function : schHdlDrxOnDurStrtTimer + * + * Handling of On duration drx start timer + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHdlDrxOnDurStrtTimer(SchCellCb *cell) +{ + uint16_t dlIndx = 0, ulIndx=0; + SlotTimingInfo dlSlotInfo, ulSlotInfo; + + ADD_DELTA_TO_TIME(cell->slotInfo, dlSlotInfo, PHY_DELTA_DL + SCHED_DELTA, cell->numSlots); + ADD_DELTA_TO_TIME(cell->slotInfo, ulSlotInfo, PHY_DELTA_UL + SCHED_DELTA, cell->numSlots); + + dlIndx = (dlSlotInfo.sfn*MAX_SLOTS+dlSlotInfo.slot)%MAX_DRX_SIZE; + ulIndx = (ulSlotInfo.sfn*MAX_SLOTS+ulSlotInfo.slot)%MAX_DRX_SIZE; + schHdlDrxOnDurStrtTimerForDlDirection(cell, dlIndx); + schHdlDrxOnDurStrtTimerForUlDirection(cell, ulIndx); +} + +/** + * @brief Handling of the DRX timers start + * + * @details + * + * Function : schHandleStartDrxTimer + * + * Handling of DRX timers start + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHandleStartDrxTimer(SchCellCb *cell) +{ + /* Handling the onduration start timer */ + schHdlDrxOnDurStrtTimer(cell); +} + +/** + * @brief Handling of the expiry onduration timer in dl direction + * + * @details + * + * Function : schHdlDrxOnDurExpiryTimerForDlDirection + * + * Handling of expiry onduration DRX timers in dl direction + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHdlDrxOnDurExpiryTimerForDlDirection(SchCellCb *cell, uint16_t currListIndx) +{ + CmLList *drxCurrNode; + SchUeCb *ueCb = NULLP; + + drxCurrNode = cell->drxCb[currListIndx].onDurationExpiryList.first; + if(drxCurrNode) + { + /* Handling of dl On duration drx start list */ + while(drxCurrNode) + { + ueCb = (SchUeCb*)drxCurrNode->node; + drxCurrNode = drxCurrNode->next; + + ueCb->drxUeCb.onDurationExpiryDistance--; + + if(ueCb->drxUeCb.onDurationExpiryDistance != SCH_DRX_INVALID_DISTANCE) + { + continue; + } + ueCb->drxUeCb.drxDlUeActiveStatus &= ~UE_ACTIVE_FOR_ONDURATION; + } + } +} + +/** + * @brief Handling of the expiry onduration DRX timers for Ul direction + * + * @details + * + * Function schHdlDrxOnDurExpiryTimerForUlDirection: + * + * Handling of expiry onduration DRX timers in Ul direction + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHdlDrxOnDurExpiryTimerForUlDirection(SchCellCb *cell, uint16_t currListIndx) +{ + CmLList *drxCurrNode; + SchUeCb *ueCb = NULLP; + + drxCurrNode = cell->drxCb[currListIndx].onDurationExpiryList.first; + if(drxCurrNode) + { + /* Handling of dl On duration drx start list */ + while(drxCurrNode) + { + ueCb = (SchUeCb*)drxCurrNode->node; + drxCurrNode = drxCurrNode->next; + + if(ueCb->drxUeCb.onDurationExpiryDistance != SCH_DRX_INVALID_DISTANCE) + { + continue; + } + + ueCb->drxUeCb.drxUlUeActiveStatus &= ~UE_ACTIVE_FOR_ONDURATION; + cmLListDelFrm(&cell->drxCb[ueCb->drxUeCb.onDurationExpiryIndex].onDurationExpiryList, ueCb->drxUeCb.onDurationExpiryNodeInfo); + SCH_FREE(ueCb->drxUeCb.onDurationExpiryNodeInfo, sizeof(CmLList)); + ueCb->drxUeCb.onDurationExpiryIndex = SCH_DRX_INVALID_INDEX; + } + } +} +/** + * @brief Handling of the expiry onduration DRX timers + * + * @details + * + * Function : schHdlDrxOnDurExpiryTimer + * + * Handling of expiry onduration DRX timers + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHdlDrxOnDurExpiryTimer(SchCellCb *cell) +{ + uint16_t dlIndx = 0, ulIndx = 0; + SlotTimingInfo dlSlotInfo, ulSlotInfo; + + ADD_DELTA_TO_TIME(cell->slotInfo, dlSlotInfo, PHY_DELTA_DL + SCHED_DELTA, cell->numSlots); + ADD_DELTA_TO_TIME(cell->slotInfo, ulSlotInfo, PHY_DELTA_UL + SCHED_DELTA, cell->numSlots); + dlIndx = (dlSlotInfo.sfn*MAX_SLOTS+dlSlotInfo.slot)%MAX_DRX_SIZE; + ulIndx = (ulSlotInfo.sfn*MAX_SLOTS+ulSlotInfo.slot)%MAX_DRX_SIZE; + + schHdlDrxOnDurExpiryTimerForDlDirection(cell, dlIndx); + schHdlDrxOnDurExpiryTimerForUlDirection(cell, ulIndx); +} + +/** + * @brief Handling of the expiry DRX timers + * + * @details + * + * Function : schHandleExpiryDrxTimer + * + * Handling of expiry DRX timers + * + * @param[in] SchCellCb *cell + * @return + * -# ROK + * -# RFAILED + **/ +void schHandleExpiryDrxTimer(SchCellCb *cell) +{ + /* Handling the onduration start timer */ + schHdlDrxOnDurExpiryTimer(cell); +} + #endif /********************************************************************** End of file diff --git a/src/5gnrsch/sch_drx.h b/src/5gnrsch/sch_drx.h index c19b710fd..a90e54e70 100644 --- a/src/5gnrsch/sch_drx.h +++ b/src/5gnrsch/sch_drx.h @@ -18,8 +18,11 @@ #define SCH_DRX_INVALID_DISTANCE -1 #define SCH_DRX_INVALID_INDEX 0xFFFFFF -#define SCH_DRX_MAX_DELTA 1 +#define SCH_DRX_MAX_DELTA 3 #define SCH_DRX_TMRS_EXP_DELTA 1 +#define UE_ACTIVE_FOR_ONDURATION 1 +#define UE_ACTIVE_FOR_INACTIVE_TIMER 2 +#define UE_ACTIVE_FOR_SR 4 /** @brief Macro to convert milli second to slots */ #define SCH_CNVRT_MS_TO_SLOT(_numSlot, _timeInMs, _mu)\ diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 3bcff2e01..08774854c 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -41,6 +41,9 @@ File: sch_slot_ind.c #include "mac_sch_interface.h" #include "sch.h" #include "sch_utils.h" +#ifdef NR_DRX +#include "sch_drx.h" +#endif SchMacDlAllocFunc schMacDlAllocOpts[] = { @@ -793,6 +796,10 @@ uint8_t schProcessSlotInd(SlotTimingInfo *slotInd, Inst schInst) dlSchedInfo.cellId = cell->cellId; slot = dlSchedInfo.schSlotValue.broadcastTime.slot; +#ifdef NR_DRX + schHandleStartDrxTimer(cell); +#endif + /* Check for SSB occassion */ dlBrdcstAlloc->ssbTrans = schCheckSsbOcc(cell, dlSchedInfo.schSlotValue.broadcastTime); if(dlBrdcstAlloc->ssbTrans) @@ -893,62 +900,75 @@ uint8_t schProcessSlotInd(SlotTimingInfo *slotInd, Inst schInst) } } - /* DL Data */ - node = cell->ueCb[ueId-1].dlRetxHqList.first; - if(node != NULLP) +#ifdef NR_DRX + if((cell->ueCb[ueId-1].ueDrxInfoPres == true) && (cell->ueCb[ueId-1].drxUeCb.drxDlUeActiveStatus != true)) { - /* DL Data ReTransmisson */ - isDlMsgPending = true; - isDlMsgScheduled = schFillBoGrantDlSchedInfo(cell, *slotInd, ueId, TRUE, ((SchDlHqProcCb**) &(node->node))); - cmLListDelFrm(&cell->ueCb[ueId-1].dlRetxHqList, node); + if(pendingUeNode->node) + { + cmLListAdd2Tail(&cell->ueToBeScheduled, cmLListDelFrm(&cell->ueToBeScheduled, pendingUeNode)); + } } - else + else +#endif { - /* DL Data new transmission */ - if((cell->boIndBitMap) & (1<ueCb[ueId-1].dlRetxHqList.first; + if(node != NULLP) + { + /* DL Data ReTransmisson */ + isDlMsgPending = true; + isDlMsgScheduled = schFillBoGrantDlSchedInfo(cell, *slotInd, ueId, TRUE, ((SchDlHqProcCb**) &(node->node))); + cmLListDelFrm(&cell->ueCb[ueId-1].dlRetxHqList, node); + } + else { - isDlMsgPending = true; - isDlMsgScheduled = schFillBoGrantDlSchedInfo(cell, *slotInd, ueId, FALSE, &hqP); + /* DL Data new transmission */ + if((cell->boIndBitMap) & (1<ueCb[ueId-1].ulRetxHqList.first; - if(node != NULLP) - { - /* UL Data ReTransmisson */ - isUlGrantPending = true; - isUlGrantScheduled = schProcessSrOrBsrReq(cell, *slotInd, ueId, TRUE, (SchUlHqProcCb**) &(node->node)); - cmLListDelFrm(&cell->ueCb[ueId-1].ulRetxHqList, node); - } - else - { - /* UL Data new transmission */ - if(cell->ueCb[ueId-1].srRcvd || cell->ueCb[ueId-1].bsrRcvd) + /* Scheduling of UL grant */ + node = cell->ueCb[ueId-1].ulRetxHqList.first; + if(node != NULLP) { + /* UL Data ReTransmisson */ isUlGrantPending = true; - isUlGrantScheduled = schProcessSrOrBsrReq(cell, *slotInd, ueId, FALSE, &ulHqP); - if(!isUlGrantScheduled) - schUlReleaseHqProcess(ulHqP, FALSE); + isUlGrantScheduled = schProcessSrOrBsrReq(cell, *slotInd, ueId, TRUE, (SchUlHqProcCb**) &(node->node)); + cmLListDelFrm(&cell->ueCb[ueId-1].ulRetxHqList, node); + } + else + { + /* UL Data new transmission */ + if(cell->ueCb[ueId-1].srRcvd || cell->ueCb[ueId-1].bsrRcvd) + { + isUlGrantPending = true; + isUlGrantScheduled = schProcessSrOrBsrReq(cell, *slotInd, ueId, FALSE, &ulHqP); + if(!isUlGrantScheduled) + schUlReleaseHqProcess(ulHqP, FALSE); + } } - } - if(!isUlGrantPending && !isDlMsgPending) - { - /* No action required */ - } - else if((isUlGrantPending && !isUlGrantScheduled) || (isDlMsgPending && !isDlMsgScheduled)) - { - cmLListAdd2Tail(&cell->ueToBeScheduled, cmLListDelFrm(&cell->ueToBeScheduled, pendingUeNode)); - } - else - { - SCH_FREE(ueNode, sizeof(uint8_t)); - deleteNodeFromLList(&cell->ueToBeScheduled, pendingUeNode); + if(!isUlGrantPending && !isDlMsgPending) + { + /* No action required */ + } + else if((isUlGrantPending && !isUlGrantScheduled) || (isDlMsgPending && !isDlMsgScheduled)) + { + cmLListAdd2Tail(&cell->ueToBeScheduled, cmLListDelFrm(&cell->ueToBeScheduled, pendingUeNode)); + } + else + { + SCH_FREE(ueNode, sizeof(uint8_t)); + deleteNodeFromLList(&cell->ueToBeScheduled, pendingUeNode); + } } } } @@ -992,7 +1012,9 @@ uint8_t schProcessSlotInd(SlotTimingInfo *slotInd, Inst schInst) schInitDlSlot(cell->schDlSlotInfo[slot]); schUlResAlloc(cell, schInst); - +#ifdef NR_DRX + schHandleExpiryDrxTimer(cell); +#endif return ret; } diff --git a/src/cu_stub/cu_f1ap_msg_hdl.c b/src/cu_stub/cu_f1ap_msg_hdl.c index fc0982571..1c4eb0ac6 100644 --- a/src/cu_stub/cu_f1ap_msg_hdl.c +++ b/src/cu_stub/cu_f1ap_msg_hdl.c @@ -9072,7 +9072,7 @@ uint8_t fillCuToDuContainer(CuUeCb *ueCb, CUtoDURRCInformation_t *rrcMsg) ******************************************************************/ uint8_t BuildDrxCycle(DRXCycle_t *drxCycle) { - drxCycle->longDRXCycleLength = LongDRXCycleLength_ms40; + drxCycle->longDRXCycleLength = LongDRXCycleLength_ms80; CU_ALLOC(drxCycle->shortDRXCycleLength, sizeof(ShortDRXCycleLength_t)); if(!drxCycle->shortDRXCycleLength) { diff --git a/src/du_app/du_cfg.h b/src/du_app/du_cfg.h index bfda5a5a7..99f2094a9 100644 --- a/src/du_app/du_cfg.h +++ b/src/du_app/du_cfg.h @@ -304,13 +304,13 @@ /* Macros for Drx configuration */ #define DRX_ONDURATION_TIMER_VALUE_PRESENT_IN_MS true #define DRX_ONDURATION_TIMER_VALUE_IN_SUBMS 32 -#define DRX_ONDURATION_TIMER_VALUE_IN_MS 1 +#define DRX_ONDURATION_TIMER_VALUE_IN_MS 10 #define DRX_INACTIVITY_TIMER 2 #define DRX_HARQ_RTT_TIMER_DL 56 #define DRX_HARQ_RTT_TIMER_UL 56 #define DRX_RETRANSMISSION_TIMER_DL 4 #define DRX_RETRANSMISSION_TIMER_UL 4 -#define DRX_LONG_CYCLE_START_OFFSET_CHOICE 20 +#define DRX_LONG_CYCLE_START_OFFSET_CHOICE 40 #define DRX_LONG_CYCLE_START_OFFSET_VAL 8 #define DRX_SHORT_CYCLE_PRESENT true #define DRX_SHORT_CYCLE 2 diff --git a/src/du_app/du_mgr_main.c b/src/du_app/du_mgr_main.c index d4783923d..21312b5b8 100644 --- a/src/du_app/du_mgr_main.c +++ b/src/du_app/du_mgr_main.c @@ -548,7 +548,7 @@ uint8_t commonInit() DU_LOG("\nERROR --> DU_APP : System Task creation for DU APP failed"); return RFAILED; } - //ODU_SET_THREAD_AFFINITY(&du_app_stsk, SS_AFFINITY_MODE_EXCL, 16, 0); + ODU_SET_THREAD_AFFINITY(&du_app_stsk, SS_AFFINITY_MODE_EXCL, 16, 0); /* system task for EGTP */ if(ODU_CREATE_TASK(PRIOR0, &egtp_stsk) != ROK) @@ -556,7 +556,7 @@ uint8_t commonInit() DU_LOG("\nERROR --> DU_APP : System Task creation for EGTP failed"); return RFAILED; } - //ODU_SET_THREAD_AFFINITY(&egtp_stsk, SS_AFFINITY_MODE_EXCL, 27, 0); + ODU_SET_THREAD_AFFINITY(&egtp_stsk, SS_AFFINITY_MODE_EXCL, 27, 0); /* system task for RLC_DL and MAC */ if(ODU_CREATE_TASK(PRIOR0, &rlc_mac_cl_stsk) != ROK) @@ -566,7 +566,7 @@ uint8_t commonInit() } pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - //ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 18, 0); + ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 18, 0); /* system task for RLC UL */ if(ODU_CREATE_TASK(PRIOR1, &rlc_ul_stsk) != ROK) @@ -574,7 +574,7 @@ uint8_t commonInit() DU_LOG("\nERROR --> DU_APP : System Task creation for RLC UL failed"); return RFAILED; } - //ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 22, 0); + ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 22, 0); /* system task for SCTP receiver thread */ if(ODU_CREATE_TASK(PRIOR0, &sctp_stsk) != ROK) @@ -582,7 +582,7 @@ uint8_t commonInit() DU_LOG("\nERROR --> DU_APP : System Task creation for SCTP failed"); return RFAILED; } - //ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 25, 0); + ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 25, 0); /* system task for lower-mac receiver thread */ if(ODU_CREATE_TASK(PRIOR0, &lwr_mac_stsk) != ROK) @@ -590,7 +590,7 @@ uint8_t commonInit() DU_LOG("\nERROR --> DU_APP : System Task creation for Lower MAC failed"); return RFAILED; } - //ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 21, 0); + ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 21, 0); #ifndef INTEL_WLS_MEM /* system task for phy stub's slot indication generator thread */ diff --git a/src/phy_stub/phy_stub_msg_hdl.c b/src/phy_stub/phy_stub_msg_hdl.c index ab3607a27..8021a87cb 100644 --- a/src/phy_stub/phy_stub_msg_hdl.c +++ b/src/phy_stub/phy_stub_msg_hdl.c @@ -1442,7 +1442,7 @@ S16 l1HdlUlDciReq(uint16_t msgLen, void *msg) { if(ulDciReq->pdus[numPdus-1].pduType == 0) { - DU_LOG("\nINFO --> PHY STUB: Received UL DCI Request for PDCCH PDU"); + DU_LOG("\nINFO --> PHY STUB: Received UL DCI Request for PDCCH PDU"); //l1BuildAndSendMsg5(ulDciReq->sfn, ulDciReq->slot); //msg5Sent = true; } -- 2.16.6