From: lal.harshita Date: Tue, 17 May 2022 10:30:27 +0000 (+0530) Subject: [Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-450] PAGING memory fixes X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fl2.git;a=commitdiff_plain;h=f85fe1240cfd15efa41597ba278e2c6bcafb502d [Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-450] PAGING memory fixes Signed-off-by: lal.harshita Change-Id: If39cc14cf3d767d58c2bbeaea8283480594f8dc1 Signed-off-by: lal.harshita --- diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 3595da0ae..3db4b1c0e 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -276,6 +276,19 @@ uint8_t fillSchUeCb(Inst inst, SchUeCb *ueCb, SchUeCfg *ueCfg) if(ueCfg->spCellCfgPres == true) { + if(ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfgPres == true) + { + if(ueCb->ueCfg.spCellCfgPres && ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfgPres == true) + { + for(uint8_t idx = 0; idx < ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.numTimeDomRsrcAlloc; idx++) + { + if(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0 && ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0) + { + SCH_FREE(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0, sizeof(uint8_t)); + } + } + } + } memcpy(&ueCb->ueCfg.spCellCfg , &ueCfg->spCellCfg, sizeof(SchSpCellCfg)); covertFreqDomRsrcMapToIAPIFormat(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdcchCfg.cRSetToAddModList[0].freqDomainRsrc,\ @@ -1134,6 +1147,7 @@ void deleteSchCellCb(SchCellCb *cellCb) uint8_t sliceIdx=0, slotIdx=0; CmLListCp *list=NULL; CmLList *node=NULL, *next=NULL; + SchPageInfo *tempNode = NULLP; if(cellCb->schDlSlotInfo) { @@ -1179,6 +1193,24 @@ void deleteSchCellCb(SchCellCb *cellCb) } SCH_FREE(cellCb->cellCfg.plmnInfoList.snssai, cellCb->cellCfg.plmnInfoList.numSliceSupport*sizeof(Snssai*)); } + + for(uint16_t idx =0; idxpageCb.pageIndInfoRecord[idx]; + node = list->first; + while(node) + { + next = node->next; + if(node->node) + { + tempNode = (SchPageInfo*)(node->node); + SCH_FREE(tempNode->pagePdu, tempNode->msgLen); + SCH_FREE(node->node, sizeof(SchPageInfo)); + } + deleteNodeFromLList(list, node); + node = next; + } + } /* Remove all UE from ueToBeScheduled list and deallocate */ node = cellCb->ueToBeScheduled.first; diff --git a/src/du_app/du_cell_mgr.c b/src/du_app/du_cell_mgr.c index 926dc7c5d..4762d6545 100644 --- a/src/du_app/du_cell_mgr.c +++ b/src/du_app/du_cell_mgr.c @@ -228,6 +228,7 @@ uint8_t checkPagingRecord(DuCellCb *cellCb) }while(pagInfo != NULLP); cmHashListDelete(&(cellCb->pagingInfoMap), (PTR)pagInfoLLFromPF); + DU_FREE(pagInfoLLFromPF, sizeof(DuPagInfoList)); return ROK; } @@ -390,8 +391,9 @@ uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId) uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *deleteRsp) { uint8_t ret = ROK; - uint16_t cellIdx=0; - + uint16_t cellIdx=0, pfIdx=0; + DuPagInfoList *pagInfoLLFromPF=NULLP; + if(deleteRsp) { if(deleteRsp->result == SUCCESSFUL_RSP) @@ -400,6 +402,16 @@ uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *deleteRsp) DU_LOG("\nINFO --> DU APP : MAC CELL Delete Response : SUCCESS [CELL IDX : %d]", deleteRsp->cellId); if(duCb.actvCellLst[cellIdx] && (duCb.actvCellLst[cellIdx]->cellId == deleteRsp->cellId)) { + for(pfIdx =0; pfIdx < MAX_SFN; pfIdx++) + { + pagInfoLLFromPF = findPagingInfoFromMap(pfIdx, &(duCb.actvCellLst[cellIdx]->pagingInfoMap)); + if(pagInfoLLFromPF) + { + cmHashListDelete(&(duCb.actvCellLst[cellIdx]->pagingInfoMap), (PTR)pagInfoLLFromPF); + DU_FREE(pagInfoLLFromPF, sizeof(DuPagInfoList)); + } + } + memset(duCb.actvCellLst[cellIdx], 0, sizeof(DuCellCb)); gCellStatus = CELL_DOWN; @@ -563,7 +575,7 @@ void freePcchPdu(PCCH_Message_t *pcchMsg) { if(pagingMsg->pagingRecordList) { - if(pagingMsg->pagingRecordList->list.array == NULLP) + if(pagingMsg->pagingRecordList->list.array != NULLP) { for(recordIdx = 0; recordIdx < pagingMsg->pagingRecordList->list.count; recordIdx++) { diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index dfcbb473b..2bdb40a00 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -15429,7 +15429,7 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb) break; } FreeUeContextModResp(f1apMsg); -return ret; + return ret; } /******************************************************************* * diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index b2c434436..842e6a060 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -2465,13 +2465,12 @@ uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp) { DU_LOG("\nINFO --> DU APP : MAC UE Create Response : SUCCESS [DU UE F1AP ID : %d]", cfgRsp->ueId); - if(duCb.actvCellLst[cellIdx] && - (duCb.actvCellLst[cellIdx]->ueCb[cfgRsp->ueId -1].gnbDuUeF1apId == cfgRsp->ueId)) + if(duCb.actvCellLst[cellIdx] && (duCb.actvCellLst[cellIdx]->ueCb[cfgRsp->ueId -1].gnbDuUeF1apId == cfgRsp->ueId)) { duCb.actvCellLst[cellIdx]->ueCb[cfgRsp->ueId -1].macUeCfg.macUeCfgState = UE_CREATE_COMPLETE; - if((duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].ueState == UE_HANDIN_IN_PROGRESS) && - (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].macUeCfg.macUeCfgState == UE_CREATE_COMPLETE) && + if((duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].ueState == UE_HANDIN_IN_PROGRESS) && + (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].macUeCfg.macUeCfgState == UE_CREATE_COMPLETE) && (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState == UE_CREATE_COMPLETE)) { if((ret = duUpdateDuUeCbCfg(cfgRsp->ueId, cfgRsp->cellId)) == ROK)