X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_f1ap_msg_hdl.c;h=85f3396e47562d3bdfb23a58c1f3cd6d9a3d2567;hb=343c8e8a51dcd313d21310887af0d77023c2af0f;hp=22c8286e902141d264f67a0de0086696c688dc37;hpb=d1086166f17ae851cba5296a7ce1c5c5d1a553b9;p=o-du%2Fl2.git diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index 22c8286e9..85f3396e4 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -18,6 +18,7 @@ /* This file contains F1AP message handler functions */ #include "common_def.h" +#include "du_tmr.h" #include "ckw.h" #include "ckw.x" #include "kwu.h" @@ -33,6 +34,8 @@ #include "du_app_mac_inf.h" #include "du_cfg.h" #include "du_app_rlc_inf.h" +#include "du_e2ap_mgr.h" +#include "du_e2ap_msg_hdl.h" #include "du_mgr_main.h" #include "du_mgr.h" #include "du_utils.h" @@ -160,7 +163,6 @@ #include "UPTransportLayerInformation.h" #include "GTPTunnel.h" #include "SupportedSULFreqBandItem.h" -#include "du_e2ap_msg_hdl.h" #include "du_f1ap_conversions.h" #include "CNUEPagingIdentity.h" #include "PCCH-Config.h" @@ -174,12 +176,15 @@ #include "CFRA-SSB-Resource.h" #include "BWP-UplinkCommon.h" #include "ReconfigurationWithSync.h" +#include "BCCH-DL-SCH-Message.h" #include "du_sys_info_hdl.h" #include "DRX-ConfigRrc.h" #include "MeasurementTimingConfigurationRrc.h" #include "MeasurementTimingConfigurationRrc-IEs.h" #include "MeasTimingList.h" #include "MeasTiming.h" +#include "Cells-Status-List.h" +#include "Cells-Status-Item.h" #ifdef O1_ENABLE #include "CmInterface.h" @@ -1046,19 +1051,19 @@ uint8_t BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) for(plmnidx=0; plmnidxlist.array[plmnidx],\ - sizeof(GNB_DU_Served_Cells_ItemIEs_t)); + sizeof(GNB_DU_Served_Cells_ItemIEs_t)); if(duServedCell->list.array[plmnidx] == NULLP) { - return RFAILED; + return RFAILED; } } idx = 0; duServedCell->list.array[idx]->id = ProtocolIE_ID_id_GNB_DU_Served_Cells_Item; duServedCell->list.array[idx]->criticality = Criticality_reject; duServedCell->list.array[idx]->value.present = \ - GNB_DU_Served_Cells_ItemIEs__value_PR_GNB_DU_Served_Cells_Item; + GNB_DU_Served_Cells_ItemIEs__value_PR_GNB_DU_Served_Cells_Item; srvCellItem = \ - &duServedCell->list.array[idx]->value.choice.GNB_DU_Served_Cells_Item; + &duServedCell->list.array[idx]->value.choice.GNB_DU_Served_Cells_Item; /*nRCGI*/ BuildNrcgiret = BuildNrcgi(&srvCellItem->served_Cell_Information.nRCGI); if(BuildNrcgiret != ROK) @@ -1067,7 +1072,7 @@ uint8_t BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) } /*nRPCI*/ srvCellItem->served_Cell_Information.nRPCI = \ - duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrPci; + duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrPci; /* fiveGS_TAC */ BuildFiveGSTacret = BuildFiveGSTac(&srvCellItem->served_Cell_Information); @@ -1096,7 +1101,7 @@ uint8_t BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) /* GNB DU System Information */ DU_ALLOC(srvCellItem->gNB_DU_System_Information, - sizeof(GNB_DU_System_Information_t)); + sizeof(GNB_DU_System_Information_t)); if(!srvCellItem->gNB_DU_System_Information) { return RFAILED; @@ -1104,20 +1109,20 @@ uint8_t BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) /* MIB */ srvCellItem->gNB_DU_System_Information->mIB_message.size = duCfgParam.srvdCellLst[0].duSysInfo.mibLen; DU_ALLOC(srvCellItem->gNB_DU_System_Information->mIB_message.buf, - srvCellItem->gNB_DU_System_Information->mIB_message.size); + srvCellItem->gNB_DU_System_Information->mIB_message.size); if(!srvCellItem->gNB_DU_System_Information->mIB_message.buf) { return RFAILED; } memcpy(srvCellItem->gNB_DU_System_Information->mIB_message.buf, duCfgParam.srvdCellLst[0].duSysInfo.mibMsg, \ - srvCellItem->gNB_DU_System_Information->mIB_message.size); + srvCellItem->gNB_DU_System_Information->mIB_message.size); /* SIB1 */ srvCellItem->gNB_DU_System_Information->sIB1_message.size =\ - duCfgParam.srvdCellLst[0].duSysInfo.sib1Len; + duCfgParam.srvdCellLst[0].duSysInfo.sib1Len; DU_ALLOC(srvCellItem->gNB_DU_System_Information->sIB1_message.buf, - srvCellItem->gNB_DU_System_Information->sIB1_message.size); + srvCellItem->gNB_DU_System_Information->sIB1_message.size); if(!srvCellItem->gNB_DU_System_Information->sIB1_message.buf) { return RFAILED; @@ -1125,7 +1130,7 @@ uint8_t BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) for(int x=0; xgNB_DU_System_Information->sIB1_message.size; x++) { srvCellItem->gNB_DU_System_Information->sIB1_message.buf[x]=\ - duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg[x]; + duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg[x]; } return ROK; } @@ -1631,7 +1636,7 @@ uint8_t BuildAndSendF1SetupReq() elementCnt = 5; f1SetupReq->protocolIEs.list.count = elementCnt; - f1SetupReq->protocolIEs.list.size = elementCnt * sizeof(F1SetupRequestIEs_t ); + f1SetupReq->protocolIEs.list.size = elementCnt * sizeof(F1SetupRequestIEs_t *); /* Initialize the F1Setup members */ DU_ALLOC(f1SetupReq->protocolIEs.list.array,f1SetupReq->protocolIEs.list.size); @@ -1751,23 +1756,22 @@ uint8_t BuildAndSendF1SetupReq() printf("%x",encBuf[ieIdx]); } #endif + - duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize = encBufSize; - DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, encBufSize); - if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP) - { - DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the encoding of f1setup req"); - return RFAILED; - } - memcpy(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, &encBuf, duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize); } - + /* Sending msg */ if(sendF1APMsg() != ROK) { DU_LOG("\nERROR --> F1AP : Sending F1 Setup request failed"); break; } + + if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_ADD, encBufSize, encBuf) !=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list"); + break; + } ret=ROK; break; @@ -1882,7 +1886,7 @@ void freeCellsToModifyItem(Served_Cells_To_Modify_Item_t *modifyItem) } } DU_FREE(modifyItem->served_Cell_Information.measurementTimingConfiguration.buf,\ - modifyItem->served_Cell_Information.measurementTimingConfiguration.size); + modifyItem->served_Cell_Information.measurementTimingConfiguration.size); } /******************************************************************* @@ -1903,12 +1907,13 @@ void freeCellsToModifyItem(Served_Cells_To_Modify_Item_t *modifyItem) * ****************************************************************/ void FreeDUConfigUpdate(F1AP_PDU_t *f1apDuCfg) { - uint8_t ieIdx=0, cellModifyIdx=0, cellDeleteIdx=0; + uint8_t idx=0,ieIdx=0, cellModifyIdx=0, cellDeleteIdx=0; GNBDUConfigurationUpdate_t *duCfgUpdate = NULLP; Served_Cells_To_Modify_List_t *cellsToModify=NULLP; Served_Cells_To_Delete_List_t *cellsToDelete=NULLP; Served_Cells_To_Delete_Item_t *deleteItem = NULLP; Served_Cells_To_Delete_ItemIEs_t *deleteItemIe = NULLP; + Cells_Status_ItemIEs_t *cellStatusItemIE; if(f1apDuCfg != NULLP) { @@ -1976,6 +1981,18 @@ void FreeDUConfigUpdate(F1AP_PDU_t *f1apDuCfg) duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.size); break; } + case ProtocolIE_ID_id_Cells_Status_List: + { + for(idx = 0; idx < duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List.list.count; idx++) + { + cellStatusItemIE = (Cells_Status_ItemIEs_t *)duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List.list.array[idx]; + DU_FREE(cellStatusItemIE->value.choice.Cells_Status_Item.nRCGI.nRCellIdentity.buf, cellStatusItemIE->value.choice.Cells_Status_Item.nRCGI.nRCellIdentity.size); + DU_FREE(cellStatusItemIE->value.choice.Cells_Status_Item.nRCGI.pLMN_Identity.buf, cellStatusItemIE->value.choice.Cells_Status_Item.nRCGI.pLMN_Identity.size); + DU_FREE(duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List.list.array[idx],sizeof(Cells_Status_ItemIEs_t)); + } + DU_FREE(duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List.list.array,\ + duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List.list.size); + } } DU_FREE(duCfgUpdate->protocolIEs.list.array[ieIdx],\ sizeof(GNBDUConfigurationUpdateIEs_t)); @@ -2468,6 +2485,7 @@ uint8_t fillCellToDeleteItem(struct Served_Cells_To_Delete_ItemIEs *deleteItemIe fillBitString(&deleteItem->oldNRCGI.nRCellIdentity, ODU_VALUE_FOUR, ODU_VALUE_FIVE, duCfgParam.sib1Params.cellIdentity); return ROK; } + /******************************************************************* * * @brief Builds ServCellToDeleteList @@ -2519,6 +2537,56 @@ uint8_t buildServCellToDeleteList(Served_Cells_To_Delete_List_t *cellsToDelete) return ROK; } +/******************************************************************* + * + * @brief Builds CellsStatusList + * + * @details + * + * Function : buildCellsStatusList + * + * Functionality: Builds the Cell Status List + * + * @params[in] Pointer to Cells_Status_List_t * + * + * @return ROK - success + * RFAILED - failure + * + *****************************************************************/ +uint8_t buildCellsStatusList(Cells_Status_List_t *cellStatusList) +{ + uint8_t elementCnt = 0, idx = 0, ret = ROK; + Cells_Status_ItemIEs_t *cellStatusItemIE; + + elementCnt = 1; + cellStatusList->list.count = elementCnt; + cellStatusList->list.size = elementCnt * sizeof(Cells_Status_ItemIEs_t *); + DU_ALLOC(cellStatusList->list.array, cellStatusList->list.size); + + for(idx = 0; idx < elementCnt; idx++) + { + DU_ALLOC(cellStatusList->list.array[idx], sizeof(Cells_Status_ItemIEs_t)); + if(!cellStatusList->list.array[idx]) + { + DU_LOG("ERROR --> F1AP: buildCellsStatusList() memory allocation failure"); + return RFAILED; + } + } + idx = 0; + cellStatusItemIE = (Cells_Status_ItemIEs_t *)cellStatusList->list.array[idx]; + cellStatusItemIE->id = ProtocolIE_ID_id_Cells_Status_Item; + cellStatusItemIE->criticality = Criticality_reject; + cellStatusItemIE->value.present = Cells_Status_ItemIEs__value_PR_Cells_Status_Item; + ret = BuildNrcgi(&cellStatusItemIE->value.choice.Cells_Status_Item.nRCGI); + if(ret == RFAILED) + { + DU_LOG("ERROR --> F1AP: buildCellsStatusList() NRCGI failed"); + return RFAILED; + } + cellStatusItemIE->value.choice.Cells_Status_Item.service_status.service_state = Service_State_in_service; + return ROK; +} + /******************************************************************* * * @brief Builds and sends the DUConfigUpdate @@ -2574,7 +2642,7 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction) InitiatingMessage__value_PR_GNBDUConfigurationUpdate; duCfgUpdate = &f1apDuCfg->choice.initiatingMessage->value.\ choice.GNBDUConfigurationUpdate; - elementCnt = 3; + elementCnt = 4; duCfgUpdate->protocolIEs.list.count = elementCnt; duCfgUpdate->protocolIEs.list.size = \ elementCnt * sizeof(GNBDUConfigurationUpdateIEs_t*); @@ -2641,7 +2709,21 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction) } } - // NOTE :GNB DU SYS INFO:MIB AND SIB1 INFORMATION TO BE BUILT AND FILLED HERE + // TODO :GNB DU SYS INFO:MIB AND SIB1 INFORMATION TO BE BUILT AND FILLED HERE + + /*Cell Status List*/ + ieIdx++; + duCfgUpdate->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_Cells_Status_List; + duCfgUpdate->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject; + duCfgUpdate->protocolIEs.list.array[ieIdx]->value.present = \ + GNBDUConfigurationUpdateIEs__value_PR_Cells_Status_List; + ret = buildCellsStatusList(&duCfgUpdate->protocolIEs.list.array[ieIdx]->value.choice.Cells_Status_List); + if(ret == RFAILED) + { + DU_LOG("ERROR --> DU APP : BuildAndSendDUConfigUpdate(): Cell Status List building failed"); + break; + } + /*GNB DU ID */ ieIdx++; duCfgUpdate->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_ID; @@ -2682,12 +2764,19 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction) } #endif } + /* Sending msg */ if(sendF1APMsg() != ROK) { DU_LOG("\nERROR --> F1AP : Sending GNB-DU Config Update failed"); break; } + + if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, encBufSize, encBuf)!=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list"); + break; + } ret = ROK; break; @@ -3206,7 +3295,8 @@ uint8_t BuildRlcConfigAm(AmBearerCfg *amCfg, struct RLC_Config *rlcConfig) /* Fill default AM UL configuration if input pointer to DU database is NULL */ if(amCfg == NULLP) { - *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN; + + *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN_12BIT; /*As per Spec 38.331, "Network configures only value size12 in SN-FieldLengthAM for SRB"*/ rlcConfig->choice.am->ul_AM_RLC.t_PollRetransmit = T_POLL_RETRANSMIT; rlcConfig->choice.am->ul_AM_RLC.pollPDU = POLL_PDU; rlcConfig->choice.am->ul_AM_RLC.pollByte = POLL_BYTE; @@ -3233,7 +3323,7 @@ uint8_t BuildRlcConfigAm(AmBearerCfg *amCfg, struct RLC_Config *rlcConfig) /* Fill default AM DL configuration if input pointer to DU database is NULL */ if(amCfg == NULLP) { - *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN; + *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN_12BIT; /*As per Spec 38.331, "Network configures only value size12 in SN-FieldLengthAM for SRB"*/ rlcConfig->choice.am->dl_AM_RLC.t_Reassembly = T_REASSEMBLY; rlcConfig->choice.am->dl_AM_RLC.t_StatusProhibit = T_STATUS_PROHIBHIT; } @@ -3864,6 +3954,76 @@ uint8_t BuildControlRSetToAddModList(PdcchConfig *pdcchCfg, struct PDCCH_Config_ return ROK; } /* End BuildControlRSetToAddModList */ +/******************************************************************* + * + * @brief build SlotOffset for SearchSpace + * + * @details + * + * Function : BuildSearchSpcSlotOffset + * + * Functionality: Build Slot Offset for search space to add/modify list + * + * @params[in] SearchSpace__monitoringSlotPeriodicityAndOffset *mSlotPeriodicityAndOffset + * uint16_t slotOffset + * @return void + * + * ****************************************************************/ +void BuildSearchSpcSlotOffset(struct SearchSpace__monitoringSlotPeriodicityAndOffset *mSlotPeriodicityAndOffset, uint16_t slotOffset) +{ + switch(mSlotPeriodicityAndOffset->present) + { + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1: + mSlotPeriodicityAndOffset->choice.sl1 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2: + mSlotPeriodicityAndOffset->choice.sl2 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4: + mSlotPeriodicityAndOffset->choice.sl4 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5: + mSlotPeriodicityAndOffset->choice.sl5 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8: + mSlotPeriodicityAndOffset->choice.sl8 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10: + mSlotPeriodicityAndOffset->choice.sl10 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16: + mSlotPeriodicityAndOffset->choice.sl16 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20: + mSlotPeriodicityAndOffset->choice.sl20 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl40: + mSlotPeriodicityAndOffset->choice.sl40 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl80: + mSlotPeriodicityAndOffset->choice.sl80 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl160: + mSlotPeriodicityAndOffset->choice.sl160 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl320: + mSlotPeriodicityAndOffset->choice.sl320 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl640: + mSlotPeriodicityAndOffset->choice.sl640 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1280: + mSlotPeriodicityAndOffset->choice.sl1280 = slotOffset; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2560: + mSlotPeriodicityAndOffset->choice.sl2560 = slotOffset; + break; + default: + break; + } +} + + /******************************************************************* * * @brief Build search space to add/modify list @@ -3946,7 +4106,12 @@ uint8_t BuildSearchSpcToAddModList(PdcchConfig *pdcchCfg, struct PDCCH_Config__s if(pdcchCfg == NULLP) searchSpc->monitoringSlotPeriodicityAndOffset->present = SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1; else - searchSpc->monitoringSlotPeriodicityAndOffset->present = pdcchCfg->searchSpcToAddModList[idx].mSlotPeriodicityAndOffset; + { + searchSpc->monitoringSlotPeriodicityAndOffset->present = \ + pdcchCfg->searchSpcToAddModList[idx].mSlotPeriodicityAndOffset.mSlotPeriodicity; + BuildSearchSpcSlotOffset(searchSpc->monitoringSlotPeriodicityAndOffset, \ + pdcchCfg->searchSpcToAddModList[idx].mSlotPeriodicityAndOffset.mSlotOffset); + } searchSpc->duration = NULLP; searchSpc->monitoringSymbolsWithinSlot = NULLP; @@ -4092,7 +4257,6 @@ uint8_t BuildBWPDlDedPdcchCfg(PdcchConfig *pdcchCfgDb, struct PDCCH_Config *pdcc } /******************************************************************* - * * @brief Builds DMRS DL PDSCH Mapping type A * * @details @@ -10946,6 +11110,80 @@ void extractTagReconfig(TAG_Config_t *cuTagCfg, TagCfg *macTagCfg) } } +/******************************************************************* + * + * @brief Fills SlotOffset value for SearchSpace received by CU + * + * @details + * + * Function : extractSlotOffset + * + * Functionality: Fills SlotOffset received by CU + * + * @params[in] SearchSpace__monitoringSlotPeriodicityAndOffset *mSlotPeriodicityOffset, + * uint16_t *slotOffset + * @return void + * + * + ****************************************************************/ +void extractSlotOffset(struct SearchSpace__monitoringSlotPeriodicityAndOffset *mSlotPeriodicityAndOffset, uint16_t *slotOffset) +{ + switch(mSlotPeriodicityAndOffset->present) + { + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_NOTHING: + *slotOffset = NULLD; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl1; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl2; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl4; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl5; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl8; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl10; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl16; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl20; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl40: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl40; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl80: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl80; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl160: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl160; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl320: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl320; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl640: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl640; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1280: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl1280; + break; + case SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2560: + *slotOffset = mSlotPeriodicityAndOffset->choice.sl2560; + break; + default: + *slotOffset = 0; + } +} + + /******************************************************************* * * @brief Fills PdcchCfg received by CU @@ -11038,8 +11276,10 @@ void extractPdcchCfg(PDCCH_Config_t *cuPdcchCfg, PdcchConfig *macPdcchCfg) *(srchSpcToAddModList->list.array[srchSpcIdx]->controlResourceSetId); if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset) { - macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset =\ - srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present; + macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset.mSlotPeriodicity =\ + srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present; + extractSlotOffset(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset,\ + &macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset.mSlotOffset); } if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot) { @@ -15465,15 +15705,12 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf) duProcF1SetupRsp(); freeAperDecodeF1SetupRsp(f1SetRspMsg); - - duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize = recvBufLen; - DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize); - if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP) + + if(fillE2NodeComponentRspInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_ADD, recvBufLen, recvBuf) !=ROK) { - DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the buf of F1setup response"); + DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list"); return RFAILED; } - memcpy(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, recvBuf, recvBufLen); if(BuildAndSendE2SetupReq() != ROK) { @@ -15651,11 +15888,12 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId) * * Functionality: added free part for the memory allocated by aper_decoder * -* @params[in] F1AP_PDU_t *f1apMsg +* @params[in] F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf * @return void * * ****************************************************************/ -uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) + +uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf) { uint8_t ieIdx=0,transId=0; GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck = NULLP; @@ -15698,6 +15936,13 @@ uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) #endif freeAperDecodeGnbDuAck(gnbDuAck); + + if(fillE2NodeComponentRspInfo(F1,duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, recvBufLen, recvBuf) !=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list"); + return RFAILED; + } + return ROK; } /****************************************************************** @@ -16133,6 +16378,13 @@ void FreeUeContextModResp(F1AP_PDU_t *f1apMsg) break; case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID: break; + case ProtocolIE_ID_id_DUtoCURRCInformation: + { + DU_FREE(ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.DUtoCURRCInformation.\ + cellGroupConfig.buf, ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.\ + DUtoCURRCInformation.cellGroupConfig.size); + break; + } case ProtocolIE_ID_id_DRBs_SetupMod_List: { FreeDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\ @@ -16380,6 +16632,7 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb) ret = ROK; break; } + FreeUeContextModResp(f1apMsg); return ret; } @@ -17872,7 +18125,7 @@ void F1APMsgHdlr(Buffer *mBuf) case SuccessfulOutcome__value_PR_GNBDUConfigurationUpdateAcknowledge: { - procF1GNBDUCfgUpdAck(f1apMsg); + procF1GNBDUCfgUpdAck(f1apMsg, recvBufLen, recvBuf); break; }