[Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-471] Storing drx configuration in cell 07/9007/5
authorlal.harshita <Harshita.Lal@radisys.com>
Thu, 8 Sep 2022 04:35:15 +0000 (10:05 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Tue, 13 Sep 2022 06:54:08 +0000 (12:24 +0530)
configuration and sending it SCH

Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
Change-Id: Ie6ff8700ce94312a73db1ae90c5a796916a781ec
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
build/odu/makefile
src/5gnrmac/mac_cfg_hdl.c
src/5gnrsch/sch_ue_mgr.c
src/cm/du_app_mac_inf.h
src/cm/mac_sch_interface.h
src/du_app/du_cfg.c

index fd75f8a..9a9a641 100644 (file)
@@ -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
index f354fa4..c36c72e 100644 (file)
@@ -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));
index 2dcbee0..aa74c06 100644 (file)
@@ -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)
    {
index b0e13be..113eb0c 100644 (file)
 
 #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
index 1ab00fb..0e1c862 100644 (file)
@@ -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
index e1c28a7..8c08491 100644 (file)
@@ -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;
 }