return ret;
} /* sendCellUpIndMacToDuApp */
+/*******************************************************************
+ *
+ * @brief Send slot indication to DU APP
+ *
+ * @details
+ *
+ * Function : sendSlotIndToDuApp
+ *
+ * Functionality:
+ * Send cell up indication to DU APP
+ *
+ * @params[in] Cell Up indication info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t sendSlotIndToDuApp(SlotTimingInfo *slotInd)
+{
+ Pst pst;
+ uint16_t ret;
+ SlotTimingInfo *slotIndInfo;
+
+ /* Allocate sharable memory */
+ MAC_ALLOC_SHRABL_BUF(slotIndInfo, sizeof(SlotTimingInfo));
+ if(!slotIndInfo)
+ {
+ DU_LOG("\nERROR --> MAC : Memory allocation failed for slot indication");
+ return RFAILED;
+ }
+ memcpy(slotIndInfo, slotInd,sizeof(SlotTimingInfo));
+
+ /* Fill Pst */
+ FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_SLOT_IND);
+
+ ret = MacDuAppSlotInd(&pst, slotIndInfo);
+ if(ret != ROK)
+ {
+ DU_LOG("\nERROR --> MAC: Failed to send slot up indication to DU APP");
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, slotIndInfo, sizeof(SlotTimingInfo));
+ }
+
+ return ret;
+}
/*******************************************************************
*
* @brief Process slot indication at MAC
}
#endif
- /* send slot indication to du app */
+ /*First Slot Ind is for CellUp. Any other Slot, will be notified to DUAPP as
+ * SLOT_IND*/
if(gSlotCount == 1)
{
+ /* send cell up indication to du app */
ret = sendCellUpIndMacToDuApp(slotInd->cellId);
- if(ret != ROK)
- {
- DU_LOG("\nERROR --> MAC :Sending of slot ind msg from MAC to DU APP failed");
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotTimingInfo));
- return ret;
- }
+
+ }
+ else
+ {
+ /* send slot indication to du app */
+ ret = sendSlotIndToDuApp(slotInd);
+ }
+
+ if(ret != ROK)
+ {
+ DU_LOG("\nERROR --> MAC :Sending of slot ind msg from MAC to DU APP failed");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotTimingInfo));
+ return ret;
}
/*stoping Task*/
duHandleCellUpInd,
packMacCellUpInd
};
+
+DuMacSlotInd packMacSlotIndOpts[] =
+{
+ packMacSlotInd,
+ duHandleSlotInd,
+ packMacSlotInd
+};
+
/* Funtion pointer options for stop indication */
DuMacStopInd packMacStopIndOpts[] =
{
return (*packMacCellUpIndOpts[pst->selector])(pst, cellId);
}
+/*******************************************************************
+ *
+ * @brief Send slot indication to DU APP
+ *
+ * @details
+ *
+ * Function : MacDuAppSlotInd
+ *
+ * Functionality:
+ * send slot indication to DU APP
+ *
+ * @params[in] Post structure pointer, SlotTimingInfo *slotIndInfo
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t MacDuAppSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo)
+{
+ return (*packMacSlotIndOpts[pst->selector])(pst, slotIndInfo);
+}
/*******************************************************************
*
* @brief Send stop indication to MAC
uint8_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData);
uint8_t MacSendSchedResultRptToRlc(Pst *pst, RlcSchedResultRpt *schedRpt);
+uint8_t MacDuAppSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
/**********************************************************************
End of file
uint8_t ret = ROK;
RlcCfgInfo *rlcUeCfg = NULLP; //Seed code Rlc cfg struct
RlcCb *rlcUeCb = NULLP;
- RlcCfgCfmInfo *cfgRsp;
+ RlcCfgCfmInfo cfgRsp;
Pst rspPst;
DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEID[%d]",ueCfg->cellId, ueCfg->ueId);
{
DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeReconfigReq()");
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
- memset(cfgRsp, 0, sizeof(RlcCfgCfmInfo));
- fillRlcCfgFailureRsp(cfgRsp, ueCfg);
- SendRlcUeCfgRspToDu(&rspPst, cfgRsp);
+ fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
+ SendRlcUeCfgRspToDu(&rspPst, &cfgRsp);
}
else
{
/*Paging Functions*/
void schProcPagingCfg(SchCellCb *cell);
void schCfgPdcchMonOccOfPO(SchCellCb *cell);
+void schIncrSlot(SlotTimingInfo *timingInfo, uint8_t incr, uint16_t numSlotsPerRF);
+
/**********************************************************************
End of file
**********************************************************************/
_isLcidValid = ((_lcId >= SRB0_LCID && _lcId <= MAX_DRB_LCID) ? 1 : 0);\
}
-#define GET_PAGING_CYCLE(enmValue, T) { \
- if (enmValue == 0) T = 32; \
- else if (enmValue == 1) T = 64; \
- else if (enmValue == 2) T = 128; \
- else if (enmValue == 3) T = 256; \
- else T = 0; \
-}
-
-#define GET_NUM_PAGING_OCC(enmValue, PO) { \
- if (enmValue == 0) PO = 4; \
- else if (enmValue == 1) PO = 2; \
- else if (enmValue == 2) PO = 1; \
- else PO = 0; \
-}
typedef enum
{
UE_CFG_INACTIVE,
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
+
+/*******************************************************************
+ *
+ * @brief Pack and send Slot ind from MAC to DU APP
+ *
+ * @details
+ *
+ * Function : packDuMacSliceReCfgRsp
+ *
+ * Functionality:
+ * Pack and send Slot ind from MAC to DU APP
+ *
+ * @params[in] Pst *pst, SlotTimingInfo *slotIndInfo
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packMacSlotInd");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)slotIndInfo, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packMacSlotInd");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+ *
+ * @brief Unpack Slot indication from MAC to DU APP
+ *
+ * @details
+ *
+ * Function :unpackDuMacSlotInd
+ *
+ * Functionality: Unpack Slot Indication from MAC to DU APP
+ *
+ * @params[in] DuMacSlotInd func, Pst *pst, Buffer *mBuf
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ SlotTimingInfo *slotIndInfo;
+
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&slotIndInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, slotIndInfo);
+ }
+
+ ODU_PUT_MSG_BUF(mBuf);
+ return RFAILED;
+}
/**********************************************************************
End of file
**********************************************************************/
#define EVENT_MAC_SLICE_CFG_RSP 217
#define EVENT_MAC_SLICE_RECFG_REQ 218
#define EVENT_MAC_SLICE_RECFG_RSP 219
+#define EVENT_MAC_SLOT_IND 220
#define BSR_PERIODIC_TIMER_SF_10 10
#define BSR_RETX_TIMER_SF_320 320
#define BSR_SR_DELAY_TMR_2560 2560
+#define GET_PAGING_CYCLE(enmValue, T) { \
+ if (enmValue == 0) T = 32; \
+ else if (enmValue == 1) T = 64; \
+ else if (enmValue == 2) T = 128; \
+ else if (enmValue == 3) T = 256; \
+ else T = 0; \
+}
+
+#define GET_NUM_PAGING_OCC(enmValue, PO) { \
+ if (enmValue == 0) PO = 4; \
+ else if (enmValue == 1) PO = 2; \
+ else if (enmValue == 2) PO = 1; \
+ else PO = 0; \
+}
+
+#define PAGING_SCHED_DELTA 4
+
typedef enum
{
MAC_DU_APP_RSP_NOK,
Pst *pst,
OduCellId *cellId ));
+/* Functions for slot Ind from MAC to DU APP*/
+typedef uint8_t (*DuMacSlotInd) ARGS((
+ Pst *pst,
+ SlotTimingInfo *slotIndInfo));
+
/* Functions for stop Ind from MAC to DU APP*/
typedef uint8_t (*DuMacStopInd) ARGS((
Pst *pst,
uint8_t DuProcMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
uint8_t packDuMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
uint8_t unpackDuMacSliceReCfgRsp(MacDuSliceReCfgRspFunc func, Pst *pst, Buffer *mBuf);
+uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
+uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
+uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
#endif
return ROK;
}
+/*****************************************************************
+* @brief Handles slot indication from MAC
+*
+* @details
+*
+* Function : duHandleSlotInd
+*
+* Functionality:
+* Handles slot indication from MAC
+*
+* @params[in] Post structure pointer
+* SlotTimingInfo *slotIndInfo
+* @return ROK - success
+* RFAILED - failure
+*
+*
+*****************************************************************/
+uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo)
+{
+ uint8_t cellIdx = 0, ret = ROK;
+ DuCellCb *duCellCb;
+
+ if(slotIndInfo)
+ {
+ GET_CELL_IDX(slotIndInfo->cellId, cellIdx);
+ duCellCb = duCb.actvCellLst[cellIdx];
+
+ if(duCellCb)
+ {
+ duCellCb->currSlotInfo.sfn = slotIndInfo->sfn;
+ duCellCb->currSlotInfo.slot = slotIndInfo->slot;
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : CellId[%d] doesnot exist", slotIndInfo->cellId);
+ ret = RFAILED;
+ }
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, slotIndInfo, sizeof(SlotTimingInfo));
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : Recevied null pointer from MAC");
+ ret = RFAILED;
+ }
+ return(ret);
+}
/*******************************************************************
*
* @brief Handles cell up indication from MAC
duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING;
/* Plmn And SNSSAI Configuration */
- memset(&duCfgParam.macCellCfg.plmnInfoList.plmn, &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn,\
+ memcpy(&duCfgParam.macCellCfg.plmnInfoList.plmn, &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn,\
sizeof(Plmn));
taiSliceSuppLst = &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst;
duCfgParam.macCellCfg.plmnInfoList.numSupportedSlice = taiSliceSuppLst->numSupportedSlices;
if(e2NodeAddItem->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentID.choice.e2nodeComponentInterfaceTypeF1)
{
DU_FREE(e2NodeAddItem->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentID.choice.\
- e2nodeComponentInterfaceTypeF1->gNB_DU_ID.buf,\
+ e2nodeComponentInterfaceTypeF1->gNB_DU_ID.buf,\
e2NodeAddItem->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentID.choice.\
e2nodeComponentInterfaceTypeF1->gNB_DU_ID.size);
DU_FREE(e2NodeAddItem->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentID.choice.e2nodeComponentInterfaceTypeF1,\
{
srbItem = &srbCfg->list.array[srbIdx]->value.choice.SRBs_ToBeSetup_Item;
if(ueCfgDb->numMacLcs > MAX_NUM_LC)
- {
+ {
DU_LOG("\nERROR --> F1AP: MAX LC Reached in MAC");
- ret = RFAILED;
- break;
- }
+ ret = RFAILED;
+ break;
+ }
if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
- {
+ {
DU_LOG("\nERROR --> F1AP: MAX LC Reached in RLC");
- ret = RFAILED;
- break;
- }
- memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
- memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
+ ret = RFAILED;
+ break;
+ }
+ memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
+ memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
ret = procSrbListToSetup(srbItem, &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs],\
- &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs]);
- ueCfgDb->numRlcLcs++;
- ueCfgDb->numMacLcs++;
- DU_LOG("\nDEBUG --> DUAPP: extractSrbListToSetup: SRBID: %d [RLC,MAC,NumDrb]:[%x,%x,%x]",\
- srbItem->sRBID, ueCfgDb->numRlcLcs, ueCfgDb->numMacLcs, ueCfgDb->numDrb);
- if(ret == RFAILED)
- {
+ &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs]);
+ ueCfgDb->numRlcLcs++;
+ ueCfgDb->numMacLcs++;
+ DU_LOG("\nDEBUG --> DUAPP: extractSrbListToSetup: SRBID: %ld [RLC,MAC,NumDrb]:[%x,%x,%x]",\
+ srbItem->sRBID, ueCfgDb->numRlcLcs, ueCfgDb->numMacLcs, ueCfgDb->numDrb);
+ if(ret == RFAILED)
+ {
DU_LOG("\nERROR --> F1AP: Failed at extractSrbListToSetup()");
- break;
- }
+ break;
+ }
}
}
else
uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg)
{
uint8_t ieIdx=0, ret=ROK, ueIdx=0;
- uint16_t cellIdx =0, cellId = 0, crnti = 0;
+ uint16_t cellIdx =0, cellId = 0;
bool ueIdxFound = false;
uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0;
DuUeCb *duUeCb = NULLP;
(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
{
cellId = duCb.actvCellLst[cellIdx]->cellId;
- crnti = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].crnti;
duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx];
ueIdxFound = true;
break;
RlcUeCfg rlcUeCfg; /* Rlc Ue Cfg */
}DuUeCb;
+typedef struct slotInfo
+{
+ uint16_t sfn;
+ uint16_t slot;
+}SlotInfo;
+
typedef struct duCellCb
{
uint16_t cellId; /* Internal cell Id */
CellStatus cellStatus; /* Cell status */
uint32_t numActvUes; /* Total Active UEs */
DuUeCb ueCb[MAX_NUM_UE]; /* UE CONTEXT */
+ SlotInfo currSlotInfo;
}DuCellCb;
typedef struct duLSapCb
strcpy(message,"EVENT_MAC_CELL_UP_IND");
break;
}
+ case EVENT_MAC_SLOT_IND:
+ {
+ strcpy(message,"EVENT_MAC_SLOT_IND");
+ break;
+ }
case EVENT_MAC_STOP_IND:
{
strcpy(message,"EVENT_MAC_STOP_IND");
ret = unpackMacCellUpInd(duHandleCellUpInd, pst, mBuf);
break;
}
+ case EVENT_MAC_SLOT_IND:
+ {
+ ret = unpackDuMacSlotInd(duHandleSlotInd, pst, mBuf);
+ break;
+ }
case EVENT_MAC_STOP_IND:
{
ret = unpackMacStopInd(duHandleStopInd, pst, mBuf);
uint8_t duProcCfgComplete()
{
uint8_t ret = ROK;
- uint16_t cellId = 0;
uint16_t idx;
for(idx=0; idx< DEFAULT_CELLS; idx++)
{
for(sliceRecord = 0; sliceRecord < sliceStats->numSlice; sliceRecord++)
{
- DU_LOG("\nINFO --> DU_APP: SliceIndx:%d, DlTput %.5lf, UlTput:%.5lf", sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier,\
- sliceStats->sliceRecord[sliceRecord].ThpDl, sliceStats->sliceRecord[sliceRecord].ThpUl);
+ DU_LOG("\nINFO --> DU_APP: SliceId[SST-SD]:%d-%d, DlTput %.5lf, UlTput:%.5lf", sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier.sst,\
+ sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier.sd,sliceStats->sliceRecord[sliceRecord].ThpDl,\
+ sliceStats->sliceRecord[sliceRecord].ThpUl);
}
#ifdef O1_ENABLE
if(sliceStats)
*
* @return void
***************************************************************************/
-uint8_t callFlowSctpActvTsk(Pst *pst)
+void callFlowSctpActvTsk(Pst *pst)
{
char sourceTask[50];
char destTask[50]="ENTSCTP";