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=37badc1a711fc7802d2f0b67924f3c15e569a7d5;hp=9eda4f39aa61d0138982a0232e75363d036442b7;hpb=9634ca974c4418c0800090e33d37ef1fe7e8cb30;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 9eda4f39a..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; @@ -7377,35 +7379,39 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg) } case ProtocolIE_ID_id_RRCDeliveryStatusRequest: { - duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true; + if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu) + { + duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true; + } + else + { + DU_LOG("\nIgnoring delivery report, since rrcContainer is not present"); + } 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; @@ -7667,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