From 051044374d0ed16423e2ef98c70395fde934f0ce Mon Sep 17 00:00:00 2001 From: "lal.harshita" Date: Thu, 8 Sep 2022 10:05:15 +0530 Subject: [PATCH] [Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-471] Storing drx configuration in cell configuration and sending it SCH Signed-off-by: lal.harshita Change-Id: Ie6ff8700ce94312a73db1ae90c5a796916a781ec Signed-off-by: lal.harshita --- build/odu/makefile | 2 +- src/5gnrmac/mac_cfg_hdl.c | 22 ++++++++++++++++++ src/5gnrsch/sch_ue_mgr.c | 1 - src/cm/du_app_mac_inf.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++ src/cm/mac_sch_interface.h | 44 ++++++++++++++++++++++++++++++++++- src/du_app/du_cfg.c | 22 ++++++++++++++++++ 6 files changed, 146 insertions(+), 3 deletions(-) diff --git a/build/odu/makefile b/build/odu/makefile index fd75f8aac..9a9a641a6 100644 --- a/build/odu/makefile +++ b/build/odu/makefile @@ -74,7 +74,7 @@ endif # macro for output file name and makefile name # -PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DCALL_FLOW_DEBUG_LOG -DODU_MEMORY_DEBUG_LOG -DODU_SLOT_IND_DEBUG_LOG +PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DNR_DRX -DCALL_FLOW_DEBUG_LOG -DODU_MEMORY_DEBUG_LOG -DODU_SLOT_IND_DEBUG_LOG ifeq ($(MODE),TDD) PLTFRM_FLAGS += -DNR_TDD diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index f354fa430..c36c72ebd 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -387,6 +387,28 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) } } } +#ifdef NR_DRX + /* Drx configuration */ + + schCellCfg.drxInfo.drxOnDurationTimer.onDurationTimerValInMs = macCellCfg->drxInfo.drxOnDurationTimer.onDurationTimerValInMs; + if(!macCellCfg->drxInfo.drxOnDurationTimer.onDurationTimerValInMs) + schCellCfg.drxInfo.drxOnDurationTimer.onDurationtimerValue.subMilliSeconds = \ + macCellCfg->drxInfo.drxOnDurationTimer.onDurationtimerValue.subMilliSeconds; + else + schCellCfg.drxInfo.drxOnDurationTimer.onDurationtimerValue.milliSeconds = \ + macCellCfg->drxInfo.drxOnDurationTimer.onDurationtimerValue.milliSeconds; + schCellCfg.drxInfo.drxInactivityTimer = macCellCfg->drxInfo.drxInactivityTimer; + schCellCfg.drxInfo.drxHarqRttTimerDl = macCellCfg->drxInfo.drxHarqRttTimerDl; + schCellCfg.drxInfo.drxHarqRttTimerUl = macCellCfg->drxInfo.drxHarqRttTimerUl; + schCellCfg.drxInfo.drxRetransmissionTimerDl = macCellCfg->drxInfo.drxRetransmissionTimerDl; + schCellCfg.drxInfo.drxRetransmissionTimerUl = macCellCfg->drxInfo.drxRetransmissionTimerUl; + schCellCfg.drxInfo.drxLongCycleStartOffset.drxLongCycleStartOffsetChoice = macCellCfg->drxInfo.drxLongCycleStartOffset.\ + drxLongCycleStartOffsetChoice; + schCellCfg.drxInfo.drxLongCycleStartOffset.drxLongCycleStartOffsetVal = macCellCfg->drxInfo.drxLongCycleStartOffset.drxLongCycleStartOffsetVal; + schCellCfg.drxInfo.shortDrx.drxShortCycle = macCellCfg->drxInfo.shortDrx.drxShortCycle; + schCellCfg.drxInfo.shortDrx.drxShortCycleTimer = macCellCfg->drxInfo.shortDrx.drxShortCycleTimer; + schCellCfg.drxInfo.drxSlotOffset = macCellCfg->drxInfo.drxSlotOffset; +#endif #ifdef NR_TDD memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg)); diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 2dcbee080..aa74c06b5 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -1072,7 +1072,6 @@ void deleteSchUeCb(SchUeCb *ueCb) uint8_t timeDomRsrcIdx = 0, ueLcIdx = 0, idx =0; SchPucchCfg *pucchCfg = NULLP; SchPdschConfig *pdschCfg = NULLP; - CmLList *node = NULLP, *next = NULLP; if(ueCb) { diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index b0e13be7b..113eb0cae 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -91,6 +91,23 @@ #define PAGING_SCHED_DELTA 4 +#ifdef NR_DRX +/* 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_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_VAL 8 +#define DRX_SHORT_CYCLE 2 +#define DRX_SHORT_CYCLE_TIMER 2 +#define DRX_SLOT_OFFSET 0 +#endif + typedef enum { MAC_DU_APP_RSP_NOK, @@ -699,6 +716,44 @@ typedef struct plmnInfoList Snssai **snssai; /* List of supporting snssai*/ }PlmnInfoList; +#ifdef NR_DRX +/* The following list of structures is taken from the DRX-Config section of specification 33.331. */ +typedef struct drxOnDurationTimer +{ + bool onDurationTimerValInMs; + union + { + uint8_t subMilliSeconds; + uint16_t milliSeconds; + }onDurationtimerValue; +}DrxOnDurationTimer; + +typedef struct drxLongCycleStartOffset +{ + uint16_t drxLongCycleStartOffsetChoice; + uint16_t drxLongCycleStartOffsetVal; +}DrxLongCycleStartOffset; + +typedef struct shortDrx +{ + uint16_t drxShortCycle; + uint8_t drxShortCycleTimer; +}ShortDrx; + +typedef struct drxInfo +{ + DrxOnDurationTimer drxOnDurationTimer; + uint16_t drxInactivityTimer; + uint8_t drxHarqRttTimerDl; + uint8_t drxHarqRttTimerUl; + uint16_t drxRetransmissionTimerDl; + uint16_t drxRetransmissionTimerUl; + DrxLongCycleStartOffset drxLongCycleStartOffset; + ShortDrx shortDrx; + uint8_t drxSlotOffset; +}DrxInfo; +#endif + typedef struct macCellCfg { uint16_t cellId; /* Cell Id */ @@ -721,6 +776,9 @@ typedef struct macCellCfg uint8_t dmrsTypeAPos; /* DMRS Type A position */ PlmnInfoList plmnInfoList; /* Consits of PlmnId and Snssai list */ //RrmPolicy *rrmPolicy; /* RRM policy details */ +#ifdef NR_DRX + DrxInfo drxInfo; /* Drx info */ +#endif }MacCellCfg; typedef struct macCellCfgCfm diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 1ab00fb56..0e1c862eb 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -772,6 +772,45 @@ typedef struct schHqCfgParam uint8_t maxUlDataHqTx; }SchHqCfg; +#ifdef NR_DRX +/* The following list of structures is taken from the DRX-Config section of specification 33.331. */ + +typedef struct schDrxOnDurationTimer +{ + bool onDurationTimerValInMs; + union + { + uint8_t subMilliSeconds; + uint16_t milliSeconds; + }onDurationtimerValue; +}SchDrxOnDurationTimer; + +typedef struct schDrxLongCycleStartOffset +{ + uint16_t drxLongCycleStartOffsetChoice; + uint16_t drxLongCycleStartOffsetVal; +}SchDrxLongCycleStartOffset; + +typedef struct schShortDrx +{ + uint16_t drxShortCycle; + uint8_t drxShortCycleTimer; +}SchShortDrx; + +typedef struct schDrxInfo +{ + SchDrxOnDurationTimer drxOnDurationTimer; + uint16_t drxInactivityTimer; + uint8_t drxHarqRttTimerDl; + uint8_t drxHarqRttTimerUl; + uint16_t drxRetransmissionTimerDl; + uint16_t drxRetransmissionTimerUl; + SchDrxLongCycleStartOffset drxLongCycleStartOffset; + SchShortDrx shortDrx; + uint8_t drxSlotOffset; +}SchDrxInfo; +#endif + typedef struct schCellCfg { uint16_t cellId; /* Cell Id */ @@ -790,7 +829,10 @@ typedef struct schCellCfg SchHqCfg schHqCfg; #ifdef NR_TDD TDDCfg tddCfg; /* TDD Cfg */ -#endif +#endif +#ifdef NR_DRX + SchDrxInfo drxInfo; /* Drx configuration */ +#endif }SchCellCfg; typedef struct schCellCfgCfm diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index e1c28a76e..8c0849142 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -416,6 +416,28 @@ uint8_t readMacCfg() cpyRrmPolicyInDuCfgParams(&rrmPolicy, 1, &duCfgParam.tempSliceCfg); +#endif + +#ifdef NR_DRX + /* Storing the DRX configuration */ + memset(&duCfgParam.macCellCfg.drxInfo, 0, sizeof(DrxInfo)); + duCfgParam.macCellCfg.drxInfo.drxOnDurationTimer.onDurationTimerValInMs = DRX_ONDURATION_TIMER_VALUE_PRESENT_IN_MS; + if(!duCfgParam.macCellCfg.drxInfo.drxOnDurationTimer.onDurationTimerValInMs) + duCfgParam.macCellCfg.drxInfo.drxOnDurationTimer.onDurationtimerValue.subMilliSeconds = \ + DRX_ONDURATION_TIMER_VALUE_IN_SUBMS; + else + duCfgParam.macCellCfg.drxInfo.drxOnDurationTimer.onDurationtimerValue.milliSeconds = \ + DRX_ONDURATION_TIMER_VALUE_IN_MS; + duCfgParam.macCellCfg.drxInfo.drxInactivityTimer = DRX_INACTIVITY_TIMER; + duCfgParam.macCellCfg.drxInfo.drxHarqRttTimerDl = DRX_HARQ_RTT_TIMER_DL; + duCfgParam.macCellCfg.drxInfo.drxHarqRttTimerUl = DRX_HARQ_RTT_TIMER_UL; + duCfgParam.macCellCfg.drxInfo.drxRetransmissionTimerDl = DRX_RETRANSMISSION_TIMER_DL; + duCfgParam.macCellCfg.drxInfo.drxRetransmissionTimerUl = DRX_RETRANSMISSION_TIMER_UL; + duCfgParam.macCellCfg.drxInfo.drxLongCycleStartOffset.drxLongCycleStartOffsetChoice = DRX_LONG_CYCLE_START_OFFSET_CHOICE; + duCfgParam.macCellCfg.drxInfo.drxLongCycleStartOffset.drxLongCycleStartOffsetVal = DRX_LONG_CYCLE_START_OFFSET_VAL; + duCfgParam.macCellCfg.drxInfo.shortDrx.drxShortCycle = DRX_SHORT_CYCLE; + duCfgParam.macCellCfg.drxInfo.shortDrx.drxShortCycleTimer = DRX_SHORT_CYCLE_TIMER; + duCfgParam.macCellCfg.drxInfo.drxSlotOffset = DRX_SLOT_OFFSET; #endif return ROK; } -- 2.16.6