+
+ /* SNSSAI And RRM policy Configuration */
+ taiSliceSuppLst = &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst;
+ duCfgParam.macCellCfg.numSupportedSlice = taiSliceSuppLst->numSupportedSlices;
+ if(taiSliceSuppLst->snssai)
+ {
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.snssai, (duCfgParam.macCellCfg.numSupportedSlice) * sizeof(Snssai*));
+ if(duCfgParam.macCellCfg.snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ }
+ for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
+ {
+ if(taiSliceSuppLst->snssai[sliceIdx] != NULLP)
+ {
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ if(duCfgParam.macCellCfg.snssai[sliceIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ memcpy(duCfgParam.macCellCfg.snssai[sliceIdx], taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
+ }
+ }
+
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.rrmPolicy, sizeof(RrmPolicy));
+ if(duCfgParam.macCellCfg.rrmPolicy == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ memset(duCfgParam.macCellCfg.rrmPolicy, 0, sizeof(RrmPolicy));
+ /* TODO Check the exact data type of resource type once will receive the
+ * information from O1 interface */
+ duCfgParam.macCellCfg.rrmPolicy->rsrcType = RSRC_PRB;
+ memcpy(&duCfgParam.macCellCfg.rrmPolicy->memberList.snssai, duCfgParam.macCellCfg.snssai[DEDICATED_SLICE_INDEX],\
+ sizeof(Snssai));
+ duCfgParam.macCellCfg.rrmPolicy->policyMaxRatio = MAX_RATIO;
+ duCfgParam.macCellCfg.rrmPolicy->policyMinRatio = MIN_RATIO;
+ duCfgParam.macCellCfg.rrmPolicy->policyDedicatedRatio = DEDICATED_RATIO;