X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_f1ap_msg_hdl.c;h=fe3430825c13806a92834c95160b5880b706e6b5;hb=135666f5b7d048c76f68c15bd0c6b6566d1e49e2;hp=2d8a8a9cdfdd8b19526fe7a236b41bda1315cee6;hpb=66916eaaf8212d36b38e4dba88bdf159d7637779;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 2d8a8a9cd..fe3430825 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -5531,9 +5531,10 @@ void freeDuUeCfg(DuUeCfg *ueCfg) DU_FREE(ueCfg->cellGrpCfg, sizeof(CellGroupConfigRrc_t)); ueCfg->cellGrpCfg = NULLP; } - if(ueCfg->maxAggrBitRate) + if(ueCfg->ambrCfg) { - DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->maxAggrBitRate, sizeof(MaxAggrBitRate)); + memset(ueCfg->ambrCfg, 0, sizeof(AmbrCfg)); + DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->ambrCfg, sizeof(AmbrCfg)); } for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++) { @@ -5574,6 +5575,7 @@ void freeF1UeDb(F1UeContextSetupDb *f1UeDb) } freeDuUeCfg(&f1UeDb->duUeCfg); memset(f1UeDb, 0, sizeof(F1UeContextSetupDb)); + DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb)); } /******************************************************************* @@ -7250,7 +7252,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg) { uint8_t ret, ieIdx, ueIdx, lcId, cellIdx; bool ueCbFound = false; - uint32_t gnbCuUeF1apId, gnbDuUeF1apId; + uint32_t gnbCuUeF1apId, gnbDuUeF1apId, bitRateSize; DuUeCb *duUeCb = NULLP; UEContextSetupRequest_t *ueSetReq = NULLP; @@ -7387,32 +7389,29 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg) } break; } - //TODO: To handle maxAggrBitRate case, - // Dependency: The protocolIE is not specified in ASN -#if 0 - case ProtocolIE_ID_id_ULPDUSessionAggregateMaximumBitRate: { + case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL: { /* MaximumBitRate Uplink */ bitRateSize = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.size; if(bitRateSize > 0) { - DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.maxAggrBitRate, bitRateSize); - if(!duUeCb->f1UeDb->duUeCfg.maxAggrBitRate) + DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.ambrCfg, bitRateSize); + if(!duUeCb->f1UeDb->duUeCfg.ambrCfg) { DU_LOG("\nDU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq"); ret = RFAILED; } else { - duUeCb->f1UeDb->duUeCfg.maxAggrBitRate->ulBits =\ - *ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf; - duUeCb->f1UeDb->duUeCfg.maxAggrBitRate->dlBits = 0; + memset(duUeCb->f1UeDb->duUeCfg.ambrCfg, 0, sizeof(AmbrCfg)); + memcpy(&duUeCb->f1UeDb->duUeCfg.ambrCfg->ulBr, + ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf, bitRateSize); + duUeCb->f1UeDb->duUeCfg.ambrCfg->dlBr = 0; } } else ret = RFAILED; break; } -#endif default: { break; @@ -7674,6 +7673,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId) choice.DUtoCURRCInformation.cellGroupConfig, cellGrpCfg); /* Free UeContext Db created during Ue context Req */ freeF1UeDb(ueCb->f1UeDb); + ueCb->f1UeDb = NULLP; } } else