*
* @details
*
- * Function : MacProcCellStartReq
+ * Function : MacProcCellStart
*
* Functionality:
* Handles cell start reuqest from DU APP
*
* @params[in] Post structure pointer
- * Cell Start Request info pointer
+ * Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo)
+uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId)
{
DU_LOG("\nMAC : Handling cell start request");
- sendToLowerMac(START_REQUEST, 0, cellStartInfo);
+ gSlotCount = 0;
+ sendToLowerMac(START_REQUEST, 0, cellId);
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellStartInfo, \
- sizeof(MacCellStartInfo));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, \
+ sizeof(OduCellId));
return ROK;
}
/*******************************************************************
*
- * @brief Handles cell stop request from DU APP
+ * @brief Handles cell stop from DU APP
*
* @details
*
- * Function : MacProcCellStartReq
+ * Function : MacProcCellStop
*
* Functionality:
- * Handles cell stop request from DU APP
+ * Handles cell stop from DU APP
*
* @params[in] Post structure pointer
- * Mac Cell stop information
+ * Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo)
+uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId)
{
#ifdef INTEL_FAPI
uint16_t cellIdx;
SlotIndInfo slotInfo;
DU_LOG("\nMAC : Sending cell stop request to Lower Mac");
- GET_CELL_IDX(cellStopInfo->cellId, cellIdx);
- slotInfo.cellId = cellStopInfo->cellId;
+ GET_CELL_IDX(cellId->cellId, cellIdx);
+ slotInfo.cellId = cellId->cellId;
slotInfo.sfn = macCb.macCell[cellIdx]->currTime.sfn;
slotInfo.slot = macCb.macCell[cellIdx]->currTime.slot;
sendToLowerMac(FAPI_STOP_REQUEST, 0, &slotInfo);
#endif
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellStopInfo, \
- sizeof(MacCellStopInfo));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, \
+ sizeof(OduCellId));
return ROK;
}
/*******************************************************************
*
- * @brief Send slot indication to DU APP
+ * @brief Send cell up indication to DU APP
*
* @details
*
- * Function : sendSlotIndMacToDuApp
+ * Function : sendCellUpIndMacToDuApp
*
* Functionality:
- * Send slot indication to DU APP
+ * Send cell up indication to DU APP
*
- * @params[in] Slot indication info
+ * @params[in] Cell Up indication info
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-int sendSlotIndMacToDuApp(SlotIndInfo *slotInd)
+int sendCellUpIndMacToDuApp(uint16_t cellId)
{
Pst pst;
uint16_t ret;
- SlotIndInfo *slotInfo;
+ OduCellId *oduCellId;
/* Allocate sharable memory */
- MAC_ALLOC_SHRABL_BUF(slotInfo, sizeof(SlotIndInfo));
- if(!slotInfo)
+ MAC_ALLOC_SHRABL_BUF(oduCellId, sizeof(OduCellId));
+ if(!oduCellId)
{
- DU_LOG("\nMAC : Slot Indication memory allocation failed");
+ DU_LOG("\nMAC : Memory allocation failed for cell up indication");
return RFAILED;
}
-
- slotInfo->cellId = slotInd->cellId;
- slotInfo->sfn = slotInd->sfn;
- slotInfo->slot = slotInd->slot;
+ oduCellId->cellId = cellId;
/* Fill Pst */
- FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_SLOT_IND);
+ FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_CELL_UP_IND);
- ret = MacDuAppSlotInd(&pst, slotInfo);
+ ret = MacDuAppCellUpInd(&pst, oduCellId);
if(ret != ROK)
{
- DU_LOG("\nMAC: Failed to send slot indication to DU APP");
- MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, slotInfo, sizeof(SlotIndInfo));
+ DU_LOG("\nMAC: Failed to send cell up indication to DU APP");
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, oduCellId, sizeof(OduCellId));
}
return ret;
-} /* sendSlotIndMacToDuApp */
+} /* sendCellUpIndMacToDuApp */
/*******************************************************************
*
#endif
/*starting Task*/
ODU_START_TASK(&startTime, PID_MAC_TTI_IND);
+ gSlotCount++;
/* When testing L2 with Intel-L1, any changes specific to
* timer mode testing must be guarded under INTEL_TIMER_MODE*/
#endif
/* send slot indication to du app */
- ret = sendSlotIndMacToDuApp(slotInd);
- if(ret != ROK)
+ if(gSlotCount == 1)
{
- DU_LOG("\nMAC :Sending of slot ind msg from MAC to DU APP failed");
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
- return ret;
+ ret = sendCellUpIndMacToDuApp(slotInd->cellId);
+ if(ret != ROK)
+ {
+ DU_LOG("\nMAC :Sending of slot ind msg from MAC to DU APP failed");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
+ return ret;
+ }
}
/*stoping Task*/
{
Pst pst;
uint8_t ret = ROK;
- MacCellStopInfo *cellStopInd;
+ OduCellId *oduCellId;
/* Allocate sharable memory */
- MAC_ALLOC_SHRABL_BUF(cellStopInd, sizeof(MacCellStopInfo));
- if(!cellStopInd)
+ MAC_ALLOC_SHRABL_BUF(oduCellId, sizeof(OduCellId));
+ if(!oduCellId)
{
DU_LOG("\nMAC : Stop Indication memory allocation failed");
return RFAILED;
}
- cellStopInd->cellId = cellId;
+ oduCellId->cellId = cellId;
/* Fill Pst */
FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_STOP_IND);
- ret = MacDuAppStopInd(&pst, cellStopInd);
+ ret = MacDuAppStopInd(&pst, oduCellId);
if(ret != ROK)
{
DU_LOG("\nMAC: Failed to send stop indication to DU APP");
- MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, cellStopInd, sizeof(MacCellStopInfo));
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, oduCellId, sizeof(OduCellId));
}
return ROK;
}
#include "rlc_mac_inf.h"
#include "mac_upr_inf_api.h"
-/* Funtion pointer options for slot indication */
-DuMacSlotInd packMacSlotIndOpts[] =
+/* Funtion pointer options for cell up indication */
+DuMacCellUpInd packMacCellUpIndOpts[] =
{
- packMacSlotInd,
- duHandleSlotInd,
- packMacSlotInd
+ packMacCellUpInd,
+ duHandleCellUpInd,
+ packMacCellUpInd
};
/* Funtion pointer options for stop indication */
DuMacStopInd packMacStopIndOpts[] =
/*******************************************************************
*
- * @brief Send slot indication to MAC
+ * @brief Send cell up indication to DU APP
*
* @details
*
- * Function : MacDuAppSlotInd
+ * Function : MacDuAppCellUpInd
*
* Functionality:
* Select appropriate function using selector value and
- * send to MAC
+ * send cell up indication to DU APP
*
* @params[in] Post structure pointer
- * Slot info pointer
+ * Cell UP info
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacDuAppSlotInd(Pst *pst, SlotIndInfo *slotInfo)
+uint8_t MacDuAppCellUpInd(Pst *pst, OduCellId *cellId)
{
- return (*packMacSlotIndOpts[pst->selector])(pst, slotInfo);
+ return (*packMacCellUpIndOpts[pst->selector])(pst, cellId);
}
/*******************************************************************
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacDuAppStopInd(Pst *pst, MacCellStopInfo *cellStopId)
+uint8_t MacDuAppStopInd(Pst *pst, OduCellId *cellId)
{
- return (*packMacStopIndOpts[pst->selector])(pst, cellStopId);
+ return (*packMacStopIndOpts[pst->selector])(pst, cellId);
}
/*******************************************************************
/* This file contains the definitions for Upper Interface APIs that are
* invoked from MAC */
-uint8_t MacDuAppSlotInd(Pst *pst, SlotIndInfo *slotInfo);
-uint8_t MacDuAppStopInd(Pst *pst, MacCellStopInfo *cellStopId);
+uint8_t MacDuAppCellUpInd(Pst *pst, OduCellId *cellId);
+uint8_t MacDuAppStopInd(Pst *pst, OduCellId *cellId);
uint8_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData);
uint8_t MacSendSchedResultRptToRlc(Pst *pst, RlcSchedResultRpt *schedRpt);
/* Process MAC cell config */
unpackDuMacCellCfg(MacProcCellCfgReq, pst, mBuf);
break;
- case EVENT_MAC_CELL_START_REQ:
+ case EVENT_MAC_CELL_START:
/* Process MAC cell start request */
- unpackMacCellStartReq(MacProcCellStartReq, pst, mBuf);
+ unpackMacCellStart(MacProcCellStart, pst, mBuf);
break;
- case EVENT_MAC_CELL_STOP_REQ:
+ case EVENT_MAC_CELL_STOP:
/* Process MAC cell stop request */
- unpackMacCellStopReq(MacProcCellStopReq, pst, mBuf);
+ unpackMacCellStop(MacProcCellStop, pst, mBuf);
break;
case EVENT_MAC_DL_CCCH_IND:
/* Process DL CCCH Ind */
_bitPos = __builtin_ctz(_in); \
}
+typedef enum
+{
+ UE_CFG_INACTIVE,
+ UE_CREATE_COMPLETE,
+ UE_RECFG_COMPLETE
+}UeCfgState;
+
+typedef enum
+{
+ CONFIG_UNKNOWN,
+ CONFIG_ADD,
+ CONFIG_MOD,
+ CONFIG_DEL
+}ConfigType;
+
typedef struct slotIndInfo
{
uint16_t cellId;
uint8_t mnc[3];
}Plmn;
-typedef enum
+typedef struct oduCellId
{
- UE_CFG_INACTIVE,
- UE_CREATE_COMPLETE,
- UE_RECFG_COMPLETE
-}UeCfgState;
+ uint16_t cellId;
+}OduCellId;
-typedef enum
-{
- CONFIG_UNKNOWN,
- CONFIG_ADD,
- CONFIG_MOD,
- CONFIG_DEL
-}ConfigType;
+uint64_t gSlotCount;
void freqDomRscAllocType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
void oduCpyFixBufToMsg(uint8_t *fixBuf, Buffer *mBuf, uint16_t len);
*
* @details
*
- * Function : packMacCellStartReq
+ * Function : packMacCellStart
*
* Functionality:
* Packs and Sends Cell Start Request to MAC
*
* @params[in] Post structure pointer
- * MacCellStartInfo pointer
+ * Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo)
+uint8_t packMacCellStart(Pst *pst, OduCellId *cellId)
{
Buffer *mBuf = NULLP;
}
/* pack the address of the structure */
- CMCHKPK(oduPackPointer,(PTR)cellStartInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellId, mBuf);
}
return ODU_POST_TASK(pst,mBuf);
*
* @details
*
- * Function : unpackMaCellStartReq
+ * Function : unpackMaCellStart
*
* Functionality:
* Unpacks MAC Cell Start Request from DU APP
*
* @params[in] Function pointer of cell start request handler
* Post structure pointer
- * Cell Start Request Info Pointer
+ * Message Buffer
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf)
+uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf)
{
- MacCellStartInfo *cellStartInfo;
+ OduCellId *cellId;
if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
- CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStartInfo, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellId, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, cellStartInfo);
+ return (*func)(pst, cellId);
}
else
{
*
* @details
*
- * Function : packMacCellStopReq
+ * Function : packMacCellStop
*
* Functionality:
* Packs and Send cell stop request to MAC
*
* @params[in] Post structure pointer
- * Cell stop info structure
+ * Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo)
+uint8_t packMacCellStop(Pst *pst, OduCellId *cellId)
{
if(pst->selector == ODU_SELECTOR_LC)
{
}
/* pack the address of the structure */
- CMCHKPK(oduPackPointer,(PTR)cellStopInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellId, mBuf);
return ODU_POST_TASK(pst,mBuf);
}
*
* @details
*
- * Function : unpackMaCellStopReq
+ * Function : unpackMaCellStop
*
* Functionality:
* Unpacks cell stop request from DU APP
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf)
+uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf)
{
- MacCellStopInfo *cellStopInfo;
-
+ OduCellId *cellId;
+
if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
- CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStopInfo, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellId, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, cellStopInfo);
+ return (*func)(pst, cellId);
}
else
{
/*******************************************************************
*
- * @brief Packs and Sends slot ind from MAC to DUAPP
+ * @brief Packs and Sends cell up ind from MAC to DUAPP
*
* @details
*
- * Function : packMacSlotInd
+ * Function : packMacCellUpInd
*
* Functionality:
- * Packs and Sends slot ind from MAC to DUAPP
+ * Packs and Sends cell up ind from MAC to DUAPP
*
* @params[in] Post structure pointer
- * Slot Info pointer
+ * Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo )
+uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId)
{
Buffer *mBuf = NULLP;
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for packMacSlotInd");
+ DU_LOG("\nDU APP : Memory allocation failed for packMacCellUpInd");
return RFAILED;
}
if(pst->selector == ODU_SELECTOR_LC)
{
- CMCHKPK(oduUnpackUInt16, slotInfo->cellId, mBuf);
- CMCHKPK(oduUnpackUInt16, slotInfo->sfn, mBuf);
- CMCHKPK(oduUnpackUInt16, slotInfo->slot, mBuf);
-
- CM_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotIndInfo));
- slotInfo = NULL;
+ CMCHKPK(oduUnpackUInt16, cellId->cellId, mBuf);
+ CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, sizeof(OduCellId));
+ cellId = NULL;
}
else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
- CMCHKPK(oduPackPointer,(PTR)slotInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellId, mBuf);
}
else
{
ODU_PUT_MSG_BUF(mBuf);
}
- return ODU_POST_TASK(pst,mBuf);
+ return ODU_POST_TASK(pst, mBuf);
}
/*******************************************************************
*
- * @brief Unpacks slot indication from MAC
+ * @brief Unpacks cell up indication from MAC
*
* @details
*
- * Function : unpackMacSlotInd
+ * Function : unpackMacCellUpInd
*
* Functionality:
- * Unpacks slot indication from MAC
+ * Unpacks cell up indication from MAC
*
* @params[in] Pointer to Handler
* Post structure pointer
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf)
+uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf)
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- SlotIndInfo *slotInfo;
+ OduCellId *cellId;
/* unpack the address of the structure */
- CMCHKUNPK(oduUnpackPointer, (PTR *)&slotInfo, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellId, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, slotInfo);
+ return (*func)(pst, cellId);
}
else if(pst->selector == ODU_SELECTOR_LC)
{
- SlotIndInfo slotInfo;
-
- CMCHKUNPK(oduPackUInt16, &(slotInfo.slot), mBuf);
- CMCHKUNPK(oduPackUInt16, &(slotInfo.sfn), mBuf);
- CMCHKUNPK(oduPackUInt16, &(slotInfo.cellId), mBuf);
-
+ OduCellId cellId;
+ CMCHKUNPK(oduPackUInt16, &cellId.cellId, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, &slotInfo);
-
+ return (*func)(pst, &cellId);
}
else
{
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellStopId)
+uint8_t packMacStopInd(Pst *pst, OduCellId *cellId)
{
Buffer *mBuf = NULLP;
{
/*pack the payload here*/
DU_LOG("\nDU APP : Packed CellId");
- CMCHKPK(oduUnpackUInt16, cellStopId->cellId, mBuf);
- CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellStopId, sizeof(MacCellStopInfo));
- cellStopId = NULL;
+ CMCHKPK(oduUnpackUInt16, cellId->cellId, mBuf);
+ CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, sizeof(OduCellId));
+ cellId = NULL;
}
else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
- CMCHKPK(oduPackPointer,(PTR)cellStopId, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellId, mBuf);
}
else
{
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- MacCellStopInfo *cellStopId;
+ OduCellId *cellId;
/* unpack the address of the structure */
- CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStopId, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellId, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, cellStopId);
+ return (*func)(pst, cellId);
}
else if(pst->selector == ODU_SELECTOR_LC)
{
- MacCellStopInfo cellStopId;
- CMCHKUNPK(oduPackUInt16, &(cellStopId.cellId), mBuf);
+ OduCellId cellId;
+ CMCHKUNPK(oduPackUInt16, &(cellId.cellId), mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, &cellStopId);
+ return (*func)(pst, &cellId);
}
else
/* Event IDs */
#define EVENT_MAC_CELL_CONFIG_REQ 200
#define EVENT_MAC_CELL_CONFIG_CFM 201
-#define EVENT_MAC_CELL_START_REQ 202
-#define EVENT_MAC_CELL_STOP_REQ 203
-#define EVENT_MAC_SLOT_IND 204
+#define EVENT_MAC_CELL_START 202
+#define EVENT_MAC_CELL_STOP 203
+#define EVENT_MAC_CELL_UP_IND 204
#define EVENT_MAC_STOP_IND 205
#define EVENT_MAC_UL_CCCH_IND 206
#define EVENT_MAC_DL_CCCH_IND 207
typedef struct macCellCfgCfm
{
- uint16_t cellId;
+ uint16_t cellId;
uint8_t rsp;
}MacCellCfgCfm;
-typedef struct macCellStartInfo
-{
- uint16_t cellId;
-}MacCellStartInfo;
-
-typedef struct macCellStopInfo
-{
- uint16_t cellId;
-}MacCellStopInfo;
-
typedef struct ulCcchInd
{
uint16_t cellId;
}MacUeCfgRsp;
/* Functions for slot Ind from MAC to DU APP*/
-typedef uint8_t (*DuMacSlotInd) ARGS((
+typedef uint8_t (*DuMacCellUpInd) ARGS((
Pst *pst,
- SlotIndInfo *slotInfo ));
+ OduCellId *cellId ));
/* Functions for stop Ind from MAC to DU APP*/
typedef uint8_t (*DuMacStopInd) ARGS((
- Pst *pst,
- MacCellStopInfo *cellId ));
+ Pst *pst,
+ OduCellId *cellId ));
/* Functions for mac cell start req */
-typedef uint8_t (*DuMacCellStartReq) ARGS((
- Pst *pst,
- MacCellStartInfo *cellStartInfo ));
+typedef uint8_t (*DuMacCellStart) ARGS((
+ Pst *pst,
+ OduCellId *cellId));
/* Functions for mac cell stop request */
-typedef uint8_t (*DuMacCellStopReq) ARGS((
- Pst *pst,
- MacCellStopInfo *cellStopInfo ));
+typedef uint8_t (*DuMacCellStop) ARGS((
+ Pst *pst,
+ OduCellId *cellId ));
/* Function pointers for packing macCellCfg Request and Confirm */
typedef uint8_t (*packMacCellCfgReq) ARGS((
Pst *pst,
MacUeCfg *ueCfg ));
-uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo );
-uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
-uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo);
-uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
-uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
-uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
-uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
+uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
+uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
+uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
+uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
+uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
+uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
+uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
+uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
+uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
-uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId);
+uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
-uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId);
+uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
/*******************************************************************
*
- * @brief Packs Slot indication and sends to EGTP
+ * @brief Packs Polling requesting and sends to EGTP
*
* @details
*
- * Function : packEgtpSlotInd
+ * Function : packEgtpStartPollingReq
*
* Functionality:
- * Packs slot indication and sends tp EGTP
+ * Packs polling request and sends to EGTP
*
* @params[in] Post structure
* @return ROK - success
* RFAILED - failure
*
*******************************************************************/
-uint8_t packEgtpSlotInd(Pst *pst)
+uint8_t packEgtpStartPollingReq(Pst *pst)
{
Buffer *mBuf;
ODU_POST_TASK(pst, mBuf);
return ROK;
-
}
-/*******************************************************************
- *
- * @brief Unpacks slot indication
- *
- * @details
- *
- * Function : unpackEgtpSlotInd
- *
- * Functionality:
- * Unpacks slot indication
- *
- * @params[in]
- * @return ROK - success
- * RFAILED - failure
- *
-******************************************************************/
-uint8_t unpackEgtpSlotInd(EgtpSlotInd func, Pst *pst, Buffer *mBuf)
-{
- return ((*func)());
-}
+/**********************************************************************
+ End of file
+**********************************************************************/
uint8_t unpackEgtpSrvOpenCfm(EgtpSrvOpenCfm func, Buffer *mBuf);
uint8_t packEgtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt);
uint8_t unpackEgtpTnlMgmtReq(EgtpTnlMgmtReq func, Pst *pst, Buffer *mBuf);
+uint8_t egtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt);
uint8_t packEgtpTnlMgmtCfm(Pst *pst, EgtpTnlEvt tnlEvt);
+uint8_t duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm);
uint8_t unpackEgtpTnlMgmtCfm(EgtpTnlMgmtCfm func, Buffer *mBuf);
-uint8_t packEgtpSlotInd(Pst *pst);
-uint8_t unpackEgtpSlotInd(EgtpSlotInd func, Pst *pst, Buffer *mBuf);
-
+uint8_t packEgtpStartPollingReq(Pst *pst);
#endif
#define UE_CONTEXT_SETUP_RSP 4
#define SECURITY_MODE_COMPLETE 5
#define RRC_RECONFIG 6
+
typedef struct f1apDb
{
uint8_t dlRrcMsgCount;
uint8_t tst()
{
+ int retVal=0;
+ pthread_t conThrdId;
+ pthread_attr_t attr;
+
init_log();
- DU_LOG("\nStarting CU_STUB");
+ DU_LOG("\nStarting CU_STUB\n");
+
+ /* Start thread to receive console input */
+ pthread_attr_init(&attr);
+ pthread_attr_setstacksize(&attr, (size_t)NULLD);
+ pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ retVal = pthread_create(&conThrdId, &attr, cuConsoleHandler, NULLP);
+ if(retVal != 0)
+ {
+ DU_LOG("\nCU_STUB: Thread creation failed. Cause %d", retVal);
+ }
+ pthread_attr_destroy(&attr);
+
/* Read CU configurations */
readCuCfg();
cuCfgParams.egtpParams.maxTunnelId = 10;
} /* End of readCuCfg */
+
+/*******************************************************************
+ *
+ * @brief Handles Console input
+ *
+ * @details
+ *
+ * Function : cuConsoleHandler
+ *
+ * Functionality: Handles Console input
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+void *cuConsoleHandler(void *args)
+{
+ char ch;
+ while(true)
+ {
+ /* Send DL user data to CU when user enters 'd' on console */
+ if((ch = getchar()) == 'd')
+ {
+ /* Start Pumping data from CU to DU */
+ DU_LOG("\nEGTP: Sending DL User Data");
+ cuEgtpDatReq();
+ }
+ }
+}
/**********************************************************************
End of file
**********************************************************************/
void cuAppInmsgHdlr(Buffer *mBuf);
void sctpNtfyInd(CmInetSctpNotification *ntfy);
uint8_t egtpInitReq();
+void *cuConsoleHandler(void *);
#endif
cuEgtpDecodeHdr(mBuf);
/* Start Pumping data from CU to DU */
- return (cuEgtpDatReq());
+ //return (cuEgtpDatReq());
}
BuildEgtpMsg(&egtpMsg);
/* Send Message to peer */
- while(cnt < 1)
+ while(cnt < 200)
{
DU_LOG("\nEGTP : Sending message[%d]", cnt+1);
cuEgtpSendMsg(egtpMsg.msg);
#include "du_app_rlc_inf.h"
#include "du_cfg.h"
#include "du_mgr.h"
+#include "du_utils.h"
#include "du_cell_mgr.h"
/*******************************************************************
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Handles cell up indication from MAC
+ *
+ * @details
+ *
+ * Function : duHandleCellUpInd
+ *
+ * Functionality:
+ * Handles cell up indication from MAC
+ *
+ * @params[in] Post structure pointer
+ * cell Up info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId)
+{
+ DuCellCb *cellCb = NULLP;
+
+ if(cellId->cellId <=0 || cellId->cellId > MAX_NUM_CELL)
+ {
+ DU_LOG("\nDU APP : Invalid Cell Id %d in duHandleCellUpInd()", cellId->cellId);
+ return RFAILED;
+ }
+
+ if(duGetCellCb(cellId->cellId, &cellCb) != ROK)
+ return RFAILED;
+
+ if((cellCb != NULL) && (cellCb->cellStatus == ACTIVATION_IN_PROGRESS))
+ {
+ DU_LOG("\nDU APP : 5G-NR Cell %d is UP", cellId->cellId);
+ cellCb->cellStatus = ACTIVATED;
+
+#ifdef O1_ENABLE
+ DU_LOG("\nDU APP : Raise cell UP alarm for cell id=%d", cellId->cellId);
+ raiseCellAlrm(CELL_UP_ALARM_ID, cellId->cellId);
+#endif
+ }
+
+ if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, sizeof(OduCellId));
+ return ROK;
+}
+
/**********************************************************************
End of file
**********************************************************************/
ret = unpackEgtpTnlMgmtReq(egtpTnlMgmtReq, pst, mBuf);
break;
}
- case EVTSLOTIND:
+ default:
{
- ret = unpackEgtpSlotInd(egtpSlotInd, pst, mBuf);
+ DU_LOG("\nEGTP : Invalid event %d", pst->event);
+ ODU_PUT_MSG_BUF(mBuf);
+ ret = RFAILED;
+ }
+ }
+ break;
+ }
+ case ENTEGTP:
+ {
+ switch(pst->event)
+ {
+ case EVTSTARTPOLL:
+ {
+ DU_LOG("\nEGTP : Starting Socket Polling");
+ egtpRecvMsg();
ODU_PUT_MSG_BUF(mBuf);
break;
}
ODU_PUT_MSG_BUF(mBuf);
ret = RFAILED;
}
- }
- break;
+ }
+ break;
}
case ENTRLC:
{
uint8_t egtpSrvOpenReq(Pst *pst)
{
- uint8_t ret; /* Return value */
- Pst rspPst; /* Response Pst structure */
- CmStatus cfm; /* Confirmation status */
- uint8_t sockType; /* Socket type */
+ uint8_t ret; /* Return value */
+ Pst rspPst; /* Response Pst structure */
+ Pst egtpPst; /* Self post */
+ CmStatus cfm; /* Confirmation status */
+ uint8_t sockType; /* Socket type */
DU_LOG("\nEGTP : Received EGTP open server request");
DU_LOG("\nEGTP : Receiver socket[%d] and Sender socket[%d] open", egtpCb.recvTptSrvr.sockFd.fd, egtpCb.dstCb.sendTptSrvr.sockFd.fd);
- /* Filling and seing response */
+ /* Start Socket polling */
+ memset(&egtpPst, 0, sizeof(egtpPst));
+ egtpPst.srcEnt = (Ent)ENTEGTP;
+ egtpPst.srcInst = (Inst)EGTP_INST;
+ egtpPst.srcProcId = DU_PROC;
+ egtpPst.dstEnt = (Ent)ENTEGTP;
+ egtpPst.dstInst = (Inst)EGTP_INST;
+ egtpPst.dstProcId = DU_PROC;
+ egtpPst.event = EVTSTARTPOLL;
+ egtpPst.selector = ODU_SELECTOR_LC;
+ egtpPst.pool= DU_POOL;
+ packEgtpStartPollingReq(&egtpPst);
+
+ /* Filling and sending response */
cfm.status = LCM_PRIM_OK;
cfm.reason = LCM_REASON_NOT_APPL;
* Functionality:
* This function handles EGTP tunnel managament request
*
- * @param[in] Pst *pst, post structure
- * Tunnel Eveny structure
+ * @param[in] Tunnel Eveny structure
* @return ROK - success
* RFAILED - failure
*
uint8_t egtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt)
{
S8 ret;
- Pst rspPst;
DU_LOG("\nEGTP : Received tunnel management request");
switch(tnlEvt.action)
}
DU_LOG("\nEGTP : Sending Tunnel management confirmation");
- egtpFillRspPst(pst, &rspPst);
- rspPst.event = EVTTNLMGMTCFM;
- packEgtpTnlMgmtCfm(&rspPst, tnlEvt);
+ duHdlEgtpTnlMgmtCfm(tnlEvt);
return ROK;
}
return ROK;
}
-/*******************************************************************
- *
- * @brief Handles Slot Indication from PHY
- *
- * @details
- *
- * Function : egtpSlotInd
- *
- * Functionality:
- * Handles TTI Indication from PHY
- *
- * @params[in]
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-uint8_t egtpSlotInd()
-{
- egtpRecvMsg();
- return ROK;
-}
-
/*******************************************************************
*
* @brief Receives EGTP message from UDP socket
CmInetAddr fromAddr; /* Egtp data sender address */
CmInetMemInfo memInfo; /* Buffer allocation info */
-
- DU_LOG("\nEGTP : Received Slot Indication");
-
nMsg = 0;
memInfo.region = DU_APP_MEM_REGION;
memInfo.pool = DU_POOL;
fromAddr.port = egtpCb.dstCb.dstPort;
fromAddr.address = egtpCb.dstCb.dstIp;
- while(nMsg < EGTP_MAX_MSG_RECV)
+ while(true)
{
bufLen = -1;
ret = cmInetRecvMsg(&(egtpCb.recvTptSrvr.sockFd), &fromAddr, &memInfo, \
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Handles DL User data received from CU
+ *
+ * @details
+ *
+ * Function : egtpHdlRecvData
+ *
+ * Functionality: Handles DL User data received from CU
+ *
+ * @params[in] DL Usre data buffer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
uint8_t egtpHdlRecvData(Buffer *mBuf)
{
EgtpMsg egtpMsg;
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Decodes EGTP header from DL User data
+ *
+ * @details
+ *
+ * Function : egtpDecodeHdr
+ *
+ * Functionality: Decodes EGTP header from DL User data
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
uint8_t egtpDecodeHdr(Buffer *mBuf, EgtpMsg *egtpMsg)
{
uint8_t tmpByte[5]; /* Holds 5 byte of data after Decoding */
return ROK;
}
+/**********************************************************************
+ End of file
+**********************************************************************/
if(!ueCapRatContList)
{
DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
- return RFAILED;
+ return NULLP;
}
memset(ueCapRatContList, 0, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
memset(&rval, 0, sizeof(asn_dec_rval_t));
{
DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
DU_FREE(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
- return RFAILED;
+ return NULLP;
}
memset(ueNrCap, 0, sizeof(UE_NR_Capability_t));
memset(&rval, 0, sizeof(asn_dec_rval_t));
CellCfgParams cellInfo; /* Cell info */
/* pointer to store the address of macCellCfg params used to send du-app to MAC */
MacCellCfg *duMacCellCfg;
- bool firstSlotIndRcvd;
CellStatus cellStatus; /* Cell status */
uint32_t numActvUes; /* Total Active UEs */
DuUeCb ueCb[MAX_NUM_UE]; /* UE CONTEXT */
uint8_t duSendEgtpSrvOpenReq();
uint8_t duHdlEgtpSrvOpenComplete(CmStatus cfm);
uint8_t duSendEgtpTnlMgmtReq(uint8_t action, uint32_t lclTeid, uint32_t remTeid);
-uint8_t duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm);
uint8_t duSendEgtpTestData();
uint8_t duSendEgtpDatInd(Buffer *mBuf);
uint8_t duHdlSchCfgComplete(Pst *pst, RgMngmt *cfm);
-uint8_t duBuildAndSendMacCellStartReq();
-uint8_t duBuildAndSendMacCellStopReq();
+uint8_t duBuildAndSendMacCellStart();
+uint8_t duBuildAndSendMacCellStop();
#endif
/**********************************************************************
ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
break;
}
- case EVENT_MAC_SLOT_IND:
+ case EVENT_MAC_CELL_UP_IND:
{
- ret = unpackMacSlotInd(duHandleSlotInd, pst, mBuf);
+ ret = unpackMacCellUpInd(duHandleCellUpInd, pst, mBuf);
break;
}
case EVENT_MAC_STOP_IND:
* ****************************************************************/
uint8_t duAppInit(SSTskId sysTskId)
{
- /* Register DU APP TAPA Task for DU */
- if(ODU_REG_TTSK((Ent)ENTDUAPP, (Inst)DU_INST, (Ttype)TTNORM, (Prior)PRIOR0,
- duActvInit, (ActvTsk)duActvTsk) != ROK)
+ /* Register DU APP TAPA Task for DU */
+ if(ODU_REG_TTSK((Ent)ENTDUAPP, (Inst)DU_INST, (Ttype)TTNORM, (Prior)PRIOR0,
+ duActvInit, (ActvTsk)duActvTsk) != ROK)
{
return RFAILED;
}
uint8_t commonInit()
{
/* Declare system task Ids */
- SSTskId du_app_stsk, sctp_stsk, rlc_ul_stsk, rlc_mac_cl_stsk, lwr_mac_stsk;
+ SSTskId du_app_stsk, egtp_stsk, sctp_stsk, rlc_ul_stsk, rlc_mac_cl_stsk, lwr_mac_stsk;
pthread_attr_t attr;
}
ODU_SET_THREAD_AFFINITY(&du_app_stsk, SS_AFFINITY_MODE_EXCL, 15, 0);
+ /* system task for EGTP */
+ if(ODU_CREATE_TASK(PRIOR0, &egtp_stsk) != ROK)
+ {
+ DU_LOG("\nDU_APP : System Task creation for EGTP failed");
+ return RFAILED;
+ }
+ ODU_SET_THREAD_AFFINITY(&egtp_stsk, SS_AFFINITY_MODE_EXCL, 16, 0);
+
/* system task for RLC_DL and MAC */
if(ODU_CREATE_TASK(PRIOR0, &rlc_mac_cl_stsk) != ROK)
{
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 16, 0);
+ ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 17, 0);
/* system task for RLC UL */
if(ODU_CREATE_TASK(PRIOR1, &rlc_ul_stsk) != ROK)
DU_LOG("\nDU_APP : System Task creation for RLC UL failed");
return RFAILED;
}
- ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 17, 0);
+ ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 18, 0);
/* system task for SCTP receiver thread */
if(ODU_CREATE_TASK(PRIOR0, &sctp_stsk) != ROK)
DU_LOG("\nDU_APP : System Task creation for SCTP failed");
return RFAILED;
}
- ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 18, 0);
+ ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 19, 0);
/* system task for lower-mac receiver thread */
if(ODU_CREATE_TASK(PRIOR0, &lwr_mac_stsk) != ROK)
DU_LOG("\nDU_APP : System Task creation for Lower MAC failed");
return RFAILED;
}
- ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 19, 0);
+ ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 20, 0);
/* Create TAPA tasks */
if(duAppInit(du_app_stsk) != ROK)
return RFAILED;
}
- if(egtpInit(du_app_stsk) != ROK)
+ if(egtpInit(egtp_stsk) != ROK)
{
DU_LOG("\nDU_APP : EGTP TAPA Task initialization failed");
return RFAILED;
{
ret = RFAILED;
}
-
return ret;
}
{
openlog("ODU",LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
}
+
/*******************************************************************
*
* @brief Entry point for the DU APP
* ****************************************************************/
uint8_t tst(void)
{
- init_log();
+ init_log();
- //Initialize TAPA layers
- if(duInit() != ROK)
- {
+ //Initialize TAPA layers
+ if(duInit() != ROK)
+ {
return RFAILED;
}
-
//Read all the configs from du_utils.c into duCfgParams
duReadCfg();
packMacCellCfg, /* packing for light weight loosly coupled */
};
-DuMacCellStartReq packMacCellStartReqOpts[] =
+DuMacCellStart packMacCellStartOpts[] =
{
- packMacCellStartReq, /* Loose coupling */
- MacProcCellStartReq, /* TIght coupling */
- packMacCellStartReq /* Light weight-loose coupling */
+ packMacCellStart, /* Loose coupling */
+ MacProcCellStart, /* TIght coupling */
+ packMacCellStart /* Light weight-loose coupling */
};
-DuMacCellStopReq packMacCellStopReqOpts[] =
+DuMacCellStop packMacCellStopOpts[] =
{
- packMacCellStopReq, /* Loose coupling */
- MacProcCellStopReq, /* TIght coupling */
- packMacCellStopReq /* Light weight-loose coupling */
+ packMacCellStop, /* Loose coupling */
+ MacProcCellStop, /* TIght coupling */
+ packMacCellStop /* Light weight-loose coupling */
};
/**************************************************************************
tnlEvt.remTeid = remTeid;
DU_LOG("\nDU_APP : Sending EGTP tunnel management request");
-
duFillEgtpPst(&pst, EVTTNLMGMTREQ);
- packEgtpTnlMgmtReq(&pst, tnlEvt);
-
+ egtpTnlMgmtReq(&pst, tnlEvt);
return ROK;
}
if(tnlEvtCfm.cfmStatus.status == LCM_PRIM_OK)
{
DU_LOG("\nDU_APP : Tunnel management confirm OK");
+#ifdef EGTP_TEST
+ duSendEgtpTestData();
+#endif
}
else
{
return (ret);
}
+/*******************************************************************
+ *
+ * @brief Sends UL user data over to EGTP
+ *
+ * @details
+ *
+ * Function : duSendEgtpDatInd
+ *
+ * Functionality: Sends UL user data over to EGTP
+ *
+ * @params[in] UL data buffer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
uint8_t duSendEgtpDatInd(Buffer *mBuf)
{
EgtpMsg egtpMsg;
return ROK;
}
-/*******************************************************************
- *
- * @brief Sends Slot indication to EGTP
- *
- * @details
- *
- * Function : duSendEgtpSlotInd
- *
- * Functionality:
- * Sends Slot indication to EGTP
- *
- * @params[in]
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-uint8_t duSendEgtpSlotInd()
-{
- Pst pst;
-
- duFillEgtpPst(&pst, EVTSLOTIND);
- packEgtpSlotInd(&pst);
-
- return ROK;
-
-}
-
/**************************************************************************
* @brief Function to fill and send MacCellconfig
*
ret = BuildAndSendDUConfigUpdate();
/* Build and Send Cell Start Req to MAC */
- ret = duBuildAndSendMacCellStartReq();
+ ret = duBuildAndSendMacCellStart();
}
else
{
return ret;
}
-/*******************************************************************
- *
- * @brief Handles slot indication from MAC
- *
- * @details
- *
- * Function : duHandleSlotInd
- *
- * Functionality:
- * Handles slot indication from MAC
- *
- * @params[in] Post structure pointer
- * Slot Info pointer
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo)
-{
- DuCellCb *cellCb = NULLP;
-
- if(slotInfo->cellId <=0 || slotInfo->cellId > MAX_NUM_CELL)
- {
- DU_LOG("\nDU APP : Invalid Cell Id %d in duHandleSlotInd()", slotInfo->cellId);
- return RFAILED;
- }
-
- if(duGetCellCb(slotInfo->cellId, &cellCb) != ROK)
- return RFAILED;
-
- if(!cellCb->firstSlotIndRcvd)
- {
- DU_LOG("\nDU APP : Slot Indication received");
- cellCb->firstSlotIndRcvd = true;
- if((cellCb != NULL) && (cellCb->cellStatus == ACTIVATION_IN_PROGRESS))
- {
- DU_LOG("\nDU APP : 5G-NR Cell %d is UP", slotInfo->cellId);
- cellCb->cellStatus = ACTIVATED;
-
-#ifdef O1_ENABLE
- DU_LOG("\nDU APP : Raise cell UP alarm for cell id=%d", slotInfo->cellId);
- raiseCellAlrm(CELL_UP_ALARM_ID, slotInfo->cellId);
-#endif
- }
- }
-
- /* TODO : Slot Indication to be moved out of EGTP_TEST when
- * data path is established */
-#ifdef EGTP_TEST
- duSendEgtpSlotInd();
-#endif
-
- if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
- DU_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotIndInfo));
- return ROK;
-}
-
/*******************************************************************
*
* @brief Builds and sends cell start request to MAC
*
* @details
*
- * Function : duBuildAndSendMacCellStartReq
+ * Function : duBuildAndSendMacCellStart
*
* Functionality:
* Builds and sends cell start request to MAC
* RFAILED - failure
*
* ****************************************************************/
-uint8_t duBuildAndSendMacCellStartReq()
+uint8_t duBuildAndSendMacCellStart()
{
Pst pst;
- MacCellStartInfo *cellStartInfo = NULL;
+ OduCellId *cellId = NULL;
DU_LOG("\nDU APP : Building and Sending cell start request to MAC");
/* Send Cell Start Request to MAC */
- DU_ALLOC_SHRABL_BUF(cellStartInfo, sizeof(MacCellStartInfo));
- if(!cellStartInfo)
+ DU_ALLOC_SHRABL_BUF(cellId, sizeof(OduCellId));
+ if(!cellId)
{
DU_LOG("\nDU APP : Memory alloc failed while building cell start request");
return RFAILED;
{
if(duCb.actvCellLst[id])
{
- duCb.actvCellLst[id]->firstSlotIndRcvd = FALSE;
- cellStartInfo->cellId = duCb.actvCellLst[id]->cellId;
+ cellId->cellId = duCb.actvCellLst[id]->cellId;
/* Fill Pst */
- FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START_REQ);
+ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START);
- return (*packMacCellStartReqOpts[pst.selector])(&pst, cellStartInfo);
+ return (*packMacCellStartOpts[pst.selector])(&pst, cellId);
}
}
return ROK;
*
* @details
*
- * Function : duBuildAndSendMacCellStopReq
+ * Function : duBuildAndSendMacCellStop
*
* Functionality:
* Builds and sends cell stop request to MAC
* RFAILED - failure
*
* ****************************************************************/
-uint8_t duBuildAndSendMacCellStopReq()
+uint8_t duBuildAndSendMacCellStop()
{
Pst pst;
- MacCellStopInfo *cellStopInfo = NULL;
+ OduCellId *cellId = NULL;
DU_LOG("\nDU APP : Building and Sending cell stop request to MAC");
/* Send Cell Stop Request to MAC */
- DU_ALLOC_SHRABL_BUF(cellStopInfo, sizeof(MacCellStopInfo));
- if(!cellStopInfo)
+ DU_ALLOC_SHRABL_BUF(cellId, sizeof(OduCellId));
+ if(!cellId)
{
DU_LOG("\nDU APP : Memory alloc failed while building cell stop request");
return RFAILED;
}
- cellStopInfo->cellId = duCb.actvCellLst[0]->cellId;
+ cellId->cellId = duCb.actvCellLst[0]->cellId;
/* Fill Pst */
- FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_STOP_REQ);
+ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_STOP);
- return (*packMacCellStopReqOpts[pst.selector])(&pst, cellStopInfo);
+ return (*packMacCellStopOpts[pst.selector])(&pst, cellId);
}
/*******************************************************************
* RFAILED - failure
*
* ****************************************************************/
-uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellStopId)
+uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId)
{
DuCellCb *cellCb = NULLP;
-
- if(cellStopId->cellId <=0 || cellStopId->cellId > MAX_NUM_CELL)
+
+ if(cellId->cellId <=0 || cellId->cellId > MAX_NUM_CELL)
{
- DU_LOG("\nDU APP : Invalid Cell Id %d in duHandleStopInd()", cellStopId->cellId);
+ DU_LOG("\nDU APP : Invalid Cell Id %d in duHandleStopInd()", cellId->cellId);
}
- if(duGetCellCb(cellStopId->cellId, &cellCb) != ROK)
+ if(duGetCellCb(cellId->cellId, &cellCb) != ROK)
return RFAILED;
- if(cellCb->firstSlotIndRcvd)
+ if((cellCb->cellStatus == ACTIVATED))
{
- cellCb->firstSlotIndRcvd = false;
- if((cellCb->cellStatus == ACTIVATED))
- {
- DU_LOG("\nDU APP : 5G-NR Cell %d is DOWN", cellStopId->cellId);
- cellCb->cellStatus = DELETION_IN_PROGRESS;
+ DU_LOG("\nDU APP : 5G-NR Cell %d is DOWN", cellId->cellId);
+ cellCb->cellStatus = DELETION_IN_PROGRESS;
#ifdef O1_ENABLE
- DU_LOG("\nDU APP : Raise cell down alarm for cell id=%d", cellStopId->cellId);
- raiseCellAlrm(CELL_DOWN_ALARM_ID, cellStopId->cellId);
+ DU_LOG("\nDU APP : Raise cell down alarm for cell id=%d", cellId->cellId);
+ raiseCellAlrm(CELL_DOWN_ALARM_ID, cellId->cellId);
#endif
- }
}
+
if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
- DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellStopId, sizeof(MacCellStopInfo));
+ DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellId, sizeof(OduCellId));
cellCb->cellStatus = CELL_OUT_OF_SERVICE; //TODO: cell status must be set to OOS after all UE and cell cleanup which is not
//supported now
-
return ROK;
}
pst.srcProcId = DU_PROC;
pst.region = duCb.init.region;
- cmPkKwuDatReq(&pst, &datReqInfo, egtpMsg->msg);
+ //cmPkKwuDatReq(&pst, &datReqInfo, egtpMsg->msg);
#else
//duBuildAndSendDlRrcMsgToRlc();
#endif
{ SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
{ SS_POOL_STATIC, 0 }
}
+ },
+ {
+ SS_DFLT_REGION + 6, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
}
+
#endif /* SS_LOCKLESS_MEMORY */
};
/* mt003.301 Modifications - File Based task registration made
{SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
{SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
}
+ },
+ {
+ SS_DFLT_REGION + 6, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
}
#if ((defined (SPLIT_RLC_DL_TASK)) && (!defined (L2_L3_SPLIT)))
,
{
- SS_DFLT_REGION + 4, /* region id */
+ SS_DFLT_REGION + 7, /* region id */
MT_MAX_BKTS, /* number of buckets */
{
/* block size, no. of blocks, Upper threshold, lower threshold */
{MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
}
},
+ {
+ SS_DFLT_REGION + 5, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
{
SS_DFLT_REGION + 5, /* region id */
MT_MAX_BKTS, /* number of buckets */
#define SS_MAX_TTSKS 100
#ifndef SS_MULTICORE_SUPPORT
-#define SS_MAX_STSKS 6
+#define SS_MAX_STSKS 7
#else
/* mt001.301 : Additions */
#ifdef SPLIT_RLC_DL_TASK
#define SS_MAX_STSKS 5
#endif
#else
-#define SS_MAX_STSKS 6
+#define SS_MAX_STSKS 7
#endif
#endif /* SS_MULTICORE_SUPPORT */
#else /* SS_MULTIPLE_PROCS */
#define SS_MAX_TTSKS 1000
-#define SS_MAX_STSKS 6
+#define SS_MAX_STSKS 7
#endif /* SS_MULTIPLE_PROCS */
#ifdef SS_DRVR_SUPPORT
#ifdef SS_MULTICORE_SUPPORT
#define SS_MAX_REGS SS_MAX_STSKS
#else
-#define SS_MAX_REGS 6
+#define SS_MAX_REGS 7
#endif
#ifdef CMM_MAX_BKT_ENT