From: lal.harshita Date: Wed, 21 Oct 2020 12:26:29 +0000 (+0530) Subject: Moved macCellCfg to duCellCb X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=3fb14013a5209cb17f3e2a5a3faf496b5e9cdd95;p=o-du%2Fl2.git Moved macCellCfg to duCellCb Change-Id: I06718c0e5c18897ce03ecfa80d5da38d648cc08d Signed-off-by: lal.harshita --- diff --git a/docs/README b/docs/README index d14d72937..9201a8e06 100644 --- a/docs/README +++ b/docs/README @@ -56,8 +56,8 @@ How to Clean and Build: c. Cleaning RIC Stub binary make clean_ric NODE=TEST_STUB MACHINE=BIT64 MODE=FDD -4. Cleaning ODU and CU Stub - make clean_all MACHINE=BIT64 MODE=FDD +4. Cleaning ODU, CU Stub and RIC Stub: + make clean_all How to execute: --------------- diff --git a/src/du_app/du_cell_mgr.c b/src/du_app/du_cell_mgr.c index 0a49c0d46..655801fb9 100644 --- a/src/du_app/du_cell_mgr.c +++ b/src/du_app/du_cell_mgr.c @@ -37,7 +37,7 @@ #include "du_f1ap_msg_hdl.h" extern DuCfgParams duCfgParam; -extern uint8_t duBuildAndSendMacCellCfg(); +uint8_t duBuildAndSendMacCellCfg(uint16_t cellId); /******************************************************************* * @@ -96,10 +96,14 @@ uint8_t procCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate) duCb.actvCellLst[nci-1] = cellCb; duCb.numActvCells++; /* Build and send Mac Cell Cfg for the number of active cells */ - ret = duBuildAndSendMacCellCfg(); + ret = duBuildAndSendMacCellCfg(cellCb->cellId); if(ret != ROK) { DU_LOG("\nDU APP : macCellCfg build and send failed"); + /* Move cellCb back to cfgCellList */ + duCb.cfgCellLst[nci-1] = duCb.actvCellLst[nci-1]; + duCb.actvCellLst[nci-1] = NULLP; + duCb.numActvCells--; return RFAILED; } } diff --git a/src/du_app/du_mgr.h b/src/du_app/du_mgr.h index d3b5ea2d6..c9b1bc922 100644 --- a/src/du_app/du_mgr.h +++ b/src/du_app/du_mgr.h @@ -93,6 +93,8 @@ typedef struct duCellCb { uint16_t cellId; /* Internal cell Id */ 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 */ @@ -132,8 +134,6 @@ typedef struct duCb DuCellCb* cfgCellLst[MAX_NUM_CELL]; /* List of cells at DU APP of type DuCellCb */ uint8_t numActvCells; DuCellCb* actvCellLst[MAX_NUM_CELL]; /* List of cells activated/to be activated of type DuCellCb */ - /* pointer to store the address of macCellCfg params used to send du-app to MAC */ - MacCellCfg *duMacCellCfg; /* pointer to store params while sending DU-APP to MAC */ uint32_t numUe; /* current number of UEs */ UeCcchCtxt ueCcchCtxt[MAX_NUM_UE]; /* mapping of gnbDuUeF1apId to CRNTI required for CCCH processing*/ }DuCb; diff --git a/src/du_app/du_msg_hdl.c b/src/du_app/du_msg_hdl.c index d7744cb9a..8d20c990c 100644 --- a/src/du_app/du_msg_hdl.c +++ b/src/du_app/du_msg_hdl.c @@ -1539,15 +1539,14 @@ uint8_t duSendEgtpSlotInd() * Functionality: * Initiates MAC Configs towards MAC * - * @param[in] void + * @param[in]cell id * @return ROK - success * RFAILED - failure * ***************************************************************************/ -uint8_t duBuildAndSendMacCellCfg() +uint8_t duBuildAndSendMacCellCfg(uint16_t cellId) { Pst pst; - DU_SET_ZERO(&pst, sizeof(Pst)); MacCellCfg *duMacCellCfg = NULLP; DU_ALLOC_SHRABL_BUF(duMacCellCfg, sizeof(MacCellCfg)); @@ -1556,8 +1555,8 @@ uint8_t duBuildAndSendMacCellCfg() return RFAILED; } - /* store the address in the duCb so that we can free on confirm msg */ - duCb.duMacCellCfg = duMacCellCfg; + /* store the address in the duCellCb so that we can free on confirm msg */ + duCb.actvCellLst[cellId-1]->duMacCellCfg = duMacCellCfg; /* copy the mac config structure from duCfgParams */ memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg)); @@ -1589,29 +1588,30 @@ uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) uint8_t actvCellIdx = 0; uint8_t ret = ROK; - if(macCellCfgCfm->rsp == ROK) + for(actvCellIdx = 0; actvCellIdx < MAX_NUM_CELL; actvCellIdx++) { - for(actvCellIdx = 0 ; actvCellIdx cellId == duCb.actvCellLst[actvCellIdx]->cellId) - { - duCb.duMacCellCfg = NULLP; - /* Build and send GNB-DU config update */ - ret = BuildAndSendDUConfigUpdate(); - - /* TODO: Trigger cell start req once cell up slot ind is received*/ - /* Build and Send Cell Start Req to MAC */ - ret = duBuildAndSendMacCellStartReq(); - - } - } - } - else - { - DU_LOG("\nMac cell cfg failed"); - ret = RFAILED; - } - return ret; + if(macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId) + { + duCb.actvCellLst[actvCellIdx]->duMacCellCfg = NULLP; + } + } + if(macCellCfgCfm->rsp == ROK) + { + /* Build and send GNB-DU config update */ + ret = BuildAndSendDUConfigUpdate(); + + /* Build and Send Cell Start Req to MAC */ + ret = duBuildAndSendMacCellStartReq(); + } + else + { + /* TODO : Action to be taken if cell configuration fails. + * Should CU be informed? */ + + DU_LOG("\nMac cell cfg failed"); + ret = RFAILED; + } + return ret; } /*******************************************************************