1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
18 /* This file contains UE management handling functionality for DU APP */
19 #include "common_def.h"
29 #include "du_app_mac_inf.h"
30 #include "du_app_rlc_inf.h"
33 #include<ProtocolIE-Field.h>
36 #include "du_f1ap_msg_hdl.h"
37 #include "du_ue_mgr.h"
43 DuMacDlCcchInd packMacDlCcchIndOpts[] =
45 packMacDlCcchInd, /* Loose coupling */
46 MacProcDlCcchInd, /* TIght coupling */
47 packMacDlCcchInd /* Light weight-loose coupling */
50 DuMacUeCreateReq packMacUeCreateReqOpts[] =
52 packDuMacUeCreateReq, /* Loose coupling */
53 MacProcUeCreateReq, /* TIght coupling */
54 packDuMacUeCreateReq, /* Light weight-loose coupling */
57 DuRlcUlUeCreateReq packRlcUlUeCreateReqOpts[] =
59 packDuRlcUlUeCreateReq, /* Loose coupling */
60 RlcUlProcUeCreateReq, /* TIght coupling */
61 packDuRlcUlUeCreateReq, /* Light weight-loose coupling */
64 DuDlRrcMsgToRlcFunc duSendDlRrcMsgToRlcOpts[] =
66 packDlRrcMsgToRlc, /* Loose coupling */
67 RlcProcDlRrcMsgTransfer, /* Tight coupling */
68 packDlRrcMsgToRlc /* Light weight-loose coupling */
71 /*******************************************************************
73 * @brief Handles EGTP data from CU
77 * Function : duHdlEgtpData
80 * Processes EGTP header and sends data to RLC
82 * @params[in] Pointer to EGTP Message
83 * @return ROK - success
86 * ****************************************************************/
87 uint8_t duHdlEgtpDlData(EgtpMsg *egtpMsg)
90 /* TODO : Extract RbId/UeID/CellID/SduId from database
91 using tunnel id in egtp header */
93 DU_LOG("\nDU_APP : Processing DL data");
96 KwuDatReqInfo datReqInfo;
98 datReqInfo.rlcId.rbId = RB_ID;
99 datReqInfo.rlcId.rbType = CM_LTE_DRB;
100 datReqInfo.rlcId.ueId = UE_ID;
101 datReqInfo.rlcId.cellId = NR_CELL_ID;
103 datReqInfo.sduId = ++sduId;
104 datReqInfo.lcType = CM_LTE_LCH_DTCH;
106 /* Filling pst and Sending to RLC DL */
107 pst.selector = ODU_SELECTOR_LWLC;
108 pst.srcEnt = ENTDUAPP;
110 pst.dstInst = RLC_DL_INST;
111 pst.dstProcId = DU_PROC;
112 pst.srcProcId = DU_PROC;
113 pst.region = duCb.init.region;
115 cmPkKwuDatReq(&pst, &datReqInfo, egtpMsg->msg);
117 //duBuildAndSendDlRrcMsgToRlc();
122 /******************************************************************
124 * @brief Builds and Sends DL CCCH Ind to MAC
128 * Function : duBuildAndSendDlCcchInd
130 * Functionality: Builds and sends DL CCCH Ind Msg to MAC
132 * @params[in] dlCcchMsg - uint8_t*
133 * @return ROK - success
136 * ****************************************************************/
137 uint8_t duBuildAndSendDlCcchInd(uint16_t *cellId, uint16_t *crnti, \
138 DlCcchMsgType msgType, uint16_t dlCcchMsgSize, uint8_t *dlCcchMsg)
142 DlCcchIndInfo *dlCcchIndInfo = NULLP;
144 memset(&pst, 0, sizeof(Pst));
146 DU_LOG("\nDU APP : Building and Sending DL CCCH Ind to MAC");
148 DU_ALLOC_SHRABL_BUF(dlCcchIndInfo, sizeof(DlCcchIndInfo));
152 DU_LOG("\nDU APP : Memory alloc failed while building DL CCCH Ind");
156 dlCcchIndInfo->cellId = *cellId;
157 dlCcchIndInfo->crnti = *crnti;
158 dlCcchIndInfo->msgType = msgType;
159 dlCcchIndInfo->dlCcchMsgLen = dlCcchMsgSize;
161 DU_ALLOC_SHRABL_BUF(dlCcchIndInfo->dlCcchMsg, dlCcchIndInfo->dlCcchMsgLen);
162 if(!dlCcchIndInfo->dlCcchMsg)
164 DU_LOG("\nDU APP : Memory alloc failed while building DL CCCH Ind");
165 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlCcchIndInfo, sizeof(DlCcchIndInfo));
168 for(idx2 = 0; idx2 < dlCcchIndInfo->dlCcchMsgLen; idx2++)
170 dlCcchIndInfo->dlCcchMsg[idx2] = dlCcchMsg[idx2];
172 DU_FREE(dlCcchMsg, dlCcchMsgSize);
175 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_DL_CCCH_IND);
176 ret = (*packMacDlCcchIndOpts[pst.selector])(&pst, dlCcchIndInfo);
179 DU_LOG("\nDU_APP : Failure in sending DL CCCH to MAC");
180 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlCcchIndInfo->dlCcchMsg,\
181 dlCcchIndInfo->dlCcchMsgLen);
182 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlCcchIndInfo, \
183 sizeof(DlCcchIndInfo));
191 /*******************************************************************
193 * @brief Build and Send DL RRC Message transfer to RLC
197 * Function : duBuildAndSendDlRrcMsgToRlc
200 * Build and Send DL RRC Message transfer to RLC
202 * @params[in] Cell ID
204 * Logical Channgel ID
207 * @return ROK - success
210 * ****************************************************************/
211 uint8_t duBuildAndSendDlRrcMsgToRlc(uint16_t cellId, RlcUeCfg ueCfg, \
212 uint8_t lcId, bool execDup, bool deliveryStaReq, uint16_t rrcMsgLen, uint8_t *rrcMsg)
217 RlcDlRrcMsgInfo *dlRrcMsgInfo;
219 DU_ALLOC_SHRABL_BUF(dlRrcMsgInfo, sizeof(RlcDlRrcMsgInfo));
222 DU_LOG("\nDU APP : Memory allocation failed for dlRrcMsgInfo in \
223 duBuildAndSendDlRrcMsgToRlc");
224 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rrcMsg, rrcMsgLen);
228 /* Filling up the RRC msg info */
229 dlRrcMsgInfo->cellId = cellId;
230 dlRrcMsgInfo->ueIdx = ueCfg.ueIdx;
231 for(lcIdx = 0; lcIdx <= MAX_NUM_LC; lcIdx++)
233 if(ueCfg.rlcBearerCfg[lcIdx].lcId == lcId)
235 dlRrcMsgInfo->rbType = ueCfg.rlcBearerCfg[lcIdx].rbType;
236 dlRrcMsgInfo->rbId = ueCfg.rlcBearerCfg[lcIdx].rbId;
237 dlRrcMsgInfo->lcType = ueCfg.rlcBearerCfg[lcIdx].lcType;
238 dlRrcMsgInfo->lcId = ueCfg.rlcBearerCfg[lcIdx].lcId;
242 dlRrcMsgInfo->execDup = execDup;
243 dlRrcMsgInfo->deliveryStaRpt = deliveryStaReq;
244 dlRrcMsgInfo->rrcMsg = rrcMsg;
245 dlRrcMsgInfo->msgLen = rrcMsgLen;
247 /* Filling post structure and sending msg */
248 memset(&pst, 0, sizeof(Pst));
249 FILL_PST_DUAPP_TO_RLC(pst, RLC_DL_INST, EVENT_DL_RRC_MSG_TRANS_TO_RLC);
250 ret = (*duSendDlRrcMsgToRlcOpts[pst.selector])(&pst, dlRrcMsgInfo);
253 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rrcMsg, rrcMsgLen);
254 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlRrcMsgInfo, sizeof(RlcDlRrcMsgInfo));
261 /*******************************************************************
263 * @brief Process UE context setup request from CU
267 * Function : procUeCintextSetupReq
269 * Functionality: Process UE context setup request from CU
271 * @params[in] F1AP message
272 * @return ROK - success
275 * ****************************************************************/
276 uint8_t procUeContextSetupReq(F1AP_PDU_t *f1apMsg)
279 uint8_t ieIdx, ueIdx;
280 uint8_t *rrcMsg = NULLP;
282 uint16_t cellId, cellIdx;
283 uint32_t gnbDuUeF1apId; /* GNB DU UE F1AP ID */
284 uint32_t gnbCuUeF1apId; /* GNB CU UE F1AP ID */
285 bool deliveryStaReq = false; /* RRC msg delivery status request */
286 DuUeCb *ueCb = NULLP;
287 UEContextSetupRequest_t *ueSetReq = NULLP;
289 ueSetReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextSetupRequest;
291 /* TODO : fetch remaining values from f1ap msg */
292 for(ieIdx=0; ieIdx < ueSetReq->protocolIEs.list.count; ieIdx++)
294 switch(ueSetReq->protocolIEs.list.array[ieIdx]->id)
296 case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
298 gnbCuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
301 case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
303 gnbDuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
306 case ProtocolIE_ID_id_ServCellIndex:
308 cellIdx = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.ServCellIndex;
311 case ProtocolIE_ID_id_RRCContainer:
313 rrcMsgLen = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size;
316 DU_LOG("\nDU APP : Invalid RRC Msg Length %d in Ue Ctxt Setup Req", rrcMsgLen);
319 DU_ALLOC_SHRABL_BUF(rrcMsg, rrcMsgLen);
322 DU_LOG("\nDU APP : Memory allocation failed for RRC Msg in procUeCtxtSetupReq");
325 memcpy(rrcMsg, ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf,\
329 case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
331 deliveryStaReq = true;
341 cellId = duCb.actvCellLst[cellIdx]->cellId;
342 for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
344 if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId) &&
345 (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId &&
346 duCb.actvCellLst[cellIdx]->ueCb[ueIdx].ueState == UE_ACTIVE))
348 ueCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx];
353 /* TODO : send RB config to MAC/RLC */
355 /* Sending DL RRC Message to RLC */
356 if(ueIdx != MAX_NUM_UE)
358 ret = duBuildAndSendDlRrcMsgToRlc(cellId, ueCb->rlcUeCfg, SRB1_LCID, \
359 false, deliveryStaReq, rrcMsgLen, rrcMsg);
363 DU_LOG("\nDU APP : No UE found for CuUeF1apId[%d] and DuUeF1apId[%d]", \
364 gnbCuUeF1apId, gnbDuUeF1apId);
365 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rrcMsg, rrcMsgLen);
372 /******************************************************************
374 * @brief Processes DL RRC Message Transfer sent by CU
378 * Function : procDlRrcMsgTrans
380 * Functionality: Processes DL RRC Message Transfer sent by CU
382 * @params[in] F1AP_PDU_t ASN decoded F1AP message
383 * @return ROK - success
386 * ****************************************************************/
387 uint8_t procDlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
389 DLRRCMessageTransfer_t *dlRrcMsg = NULLP;
390 uint8_t *rrcMsgPdu = NULLP;
391 uint8_t ieIdx, ueIdx, cellIdx;
393 uint16_t byteIdx, crnti, cellId, rrcMsgSize;
394 uint32_t gnbCuUeF1apId, gnbDuUeF1apId;
395 bool execDup = false;
396 bool deliveryStaRpt = false;
397 bool ueFound = false;
398 bool ueCcchCtxtFound = false;
400 DU_LOG("\nDU_APP : DL RRC message transfer Recevied");
401 dlRrcMsg = &f1apMsg->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
405 for(ieIdx=0; ieIdx<dlRrcMsg->protocolIEs.list.count; ieIdx++)
407 switch(dlRrcMsg->protocolIEs.list.array[ieIdx]->id)
409 case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
411 gnbCuUeF1apId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
414 case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
416 gnbDuUeF1apId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
419 case ProtocolIE_ID_id_SRBID:
421 srbId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.SRBID;
424 case ProtocolIE_ID_id_ExecuteDuplication:
429 case ProtocolIE_ID_id_RRCContainer:
431 if(dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size > 0)
433 rrcMsgSize = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size;
434 DU_ALLOC(rrcMsgPdu, rrcMsgSize);
437 DU_LOG("\nDU_APP : Memory allocation failed in procDlRrcMsgTrans");
440 for(byteIdx = 0; byteIdx < rrcMsgSize; byteIdx++)
442 rrcMsgPdu[byteIdx] = \
443 dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf[byteIdx];
448 DU_LOG("\nDU_APP : RRC Container Size is invalid:%ld",\
449 dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size);
454 case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
456 deliveryStaRpt = true;
460 DU_LOG("\nDU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
461 dlRrcMsg->protocolIEs.list.array[ieIdx]->id);
465 if(srbId == SRB1_LCID) //RRC connection setup
467 for(ueIdx=0; ueIdx < duCb.numUe; ueIdx++)
469 if(gnbDuUeF1apId == duCb.ueCcchCtxt[ueIdx].gnbDuUeF1apId)
471 ueCcchCtxtFound = true;
472 crnti = duCb.ueCcchCtxt[ueIdx].crnti;
473 cellId = duCb.ueCcchCtxt[ueIdx].cellId;
480 ret = duBuildAndSendDlCcchInd(&cellId, &crnti, RRC_SETUP, rrcMsgSize, rrcMsgPdu);
483 DU_LOG("\nDU_APP: Falied at duBuildAndSendDlCcchInd()");
487 if(duCb.actvCellLst[cellId-1]->numActvUes < MAX_NUM_UE)
489 ret = duCreateUeCb(&duCb.ueCcchCtxt[ueIdx], gnbCuUeF1apId);
492 DU_LOG("\nDU_APP: Failed at duCreateUeCb for cellId [%d]", \
493 duCb.ueCcchCtxt[ueIdx].cellId);
499 DU_LOG("\nDU_APP: Max Active UEs has reached");
506 for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++)
508 for(ueIdx = 0 ; ueIdx < MAX_NUM_UE; ueIdx++)
510 if((gnbCuUeF1apId == duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId)
511 && (gnbDuUeF1apId == duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId))
514 ret = duBuildAndSendDlRrcMsgToRlc(duCb.actvCellLst[cellIdx]->cellId, \
515 duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, srbId, \
516 execDup, deliveryStaRpt, rrcMsgSize, rrcMsgPdu);
529 /******************************************************************
531 * @brief Generates GNB DU Ue F1AP ID
535 * Function : genGnbDuUeF1apId
537 * Functionality: Generates GNB DU Ue F1AP ID
540 * @return gnbDuF1apId
542 * ****************************************************************/
543 uint32_t genGnbDuUeF1apId()
545 static uint32_t gnbDuUeF1apId = 0;
547 return ++gnbDuUeF1apId;
550 /******************************************************************
552 * @brief Processes UL CCCH Ind recvd from MAC
556 * Function : duProcUlCcchInd
558 * Functionality: Processes UL CCCH Ind recvd from MAC
560 * @params[in] UlCcchIndInfo *ulCcchIndInfo
561 * @return ROK - success
564 * ****************************************************************/
565 uint8_t duProcUlCcchInd(UlCcchIndInfo *ulCcchIndInfo)
569 uint32_t gnbDuUeF1apId = 0;
571 gnbDuUeF1apId = genGnbDuUeF1apId();
573 /* Store Ue mapping */
574 duCb.ueCcchCtxt[duCb.numUe].gnbDuUeF1apId = gnbDuUeF1apId;
575 duCb.ueCcchCtxt[duCb.numUe].crnti = ulCcchIndInfo->crnti;
576 duCb.ueCcchCtxt[duCb.numUe].cellId = ulCcchIndInfo->cellId;
580 ret = (BuildAndSendInitialRrcMsgTransfer(gnbDuUeF1apId, ulCcchIndInfo->crnti, ulCcchIndInfo->ulCcchMsgLen,
581 ulCcchIndInfo->ulCcchMsg));
584 DU_LOG("\nDU_APP : BuildAndSendInitialRrcMsgTransfer failed");
587 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo->ulCcchMsg, ulCcchIndInfo->ulCcchMsgLen);
588 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo, sizeof(UlCcchIndInfo));
594 /******************************************************************
596 * @brief Fills Initial DL Bandwidth Part
600 * Function : fillInitDlBwp
602 * Functionality: Fills Initial DL Bandwidth Part
605 *****************************************************************/
606 void fillInitDlBwp(InitialDlBwp *initDlBwp)
609 uint8_t freqDomainResource[FREQ_DOM_RSRC_SIZE] = {0};
610 uint8_t coreset0EndPrb, coreset1StartPrb, coreset1NumPrb;
615 /* Filling PDCCH Config */
616 initDlBwp->pdcchPresent = TRUE;
617 if(initDlBwp->pdcchPresent)
619 initDlBwp->pdcchCfg.numCRsetToAddMod = PDCCH_CTRL_RSRC_SET_ONE_ID;
620 memset(initDlBwp->pdcchCfg.cRSetToAddModList, 0, MAX_NUM_CRSET);
621 if(initDlBwp->pdcchCfg.numCRsetToAddMod <= MAX_NUM_CRSET)
623 initDlBwp->pdcchCfg.cRSetToAddModList[idx].cRSetId = \
624 PDCCH_CTRL_RSRC_SET_ONE_ID;
625 memset(initDlBwp->pdcchCfg.cRSetToAddModList[idx].freqDomainRsrc, 0,\
627 coreset0EndPrb = CORESET0_END_PRB;
628 coreset1StartPrb = coreset0EndPrb +6;
629 coreset1NumPrb = CORESET1_NUM_PRB;
630 /* calculate the PRBs */
631 schAllocFreqDomRscType0(((coreset1StartPrb)/6), (coreset1NumPrb/6), freqDomainResource);
632 memcpy(initDlBwp->pdcchCfg.cRSetToAddModList[idx].freqDomainRsrc, freqDomainResource,
635 initDlBwp->pdcchCfg.cRSetToAddModList[idx].duration = \
636 PDCCH_CTRL_RSRC_SET_ONE_DURATION;
637 initDlBwp->pdcchCfg.cRSetToAddModList[idx].cceRegMappingType = \
638 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED;
639 initDlBwp->pdcchCfg.cRSetToAddModList[idx].precoderGranularity = \
641 initDlBwp->pdcchCfg.cRSetToAddModList[idx].dmrsScramblingId = \
644 initDlBwp->pdcchCfg.numCRsetToRel = 0;
645 /* Filling Serach Space */
646 initDlBwp->pdcchCfg.numSearchSpcToAddMod = PDCCH_CTRL_RSRC_SET_ONE_ID;
647 memset(initDlBwp->pdcchCfg.searchSpcToAddModList, 0, MAX_NUM_CRSET);
648 if(initDlBwp->pdcchCfg.numSearchSpcToAddMod <= MAX_NUM_CRSET)
650 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].searchSpaceId =\
651 PDCCH_SRCH_SPC_TWO_ID;
652 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].cRSetId = \
653 PDCCH_CTRL_RSRC_SET_ONE_ID;
654 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].\
655 mSlotPeriodicityAndOffset = SLOTPERIODICITYANDOFFSET_PR_SL1;
656 memset(initDlBwp->pdcchCfg.searchSpcToAddModList[idx].mSymbolsWithinSlot, 0,\
657 MONITORING_SYMB_WITHIN_SLOT_SIZE);
658 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].mSymbolsWithinSlot[idx] =\
659 PDCCH_SYMBOL_WITHIN_SLOT;
660 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel1 =\
662 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel2 =\
664 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel4 =\
666 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel8 =\
668 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel16 =\
670 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].searchSpaceType = \
671 SEARCHSPACETYPE_PR_UE_SPECIFIC;
672 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].ueSpecificDciFormat =\
673 PDCCH_SRCH_SPC_TWO_UE_SPEC_DCI_FORMAT;
675 initDlBwp->pdcchCfg.numSearchSpcToRel = 0;
679 /* Filling PDSCH Config */
680 initDlBwp->pdschPresent = TRUE;
681 if(initDlBwp->pdschPresent)
683 initDlBwp->pdschCfg.dmrsDlCfgForPdschMapTypeA.addPos = ADDITIONALPOSITION_POS0;
684 initDlBwp->pdschCfg.resourceAllocType = RESOURCEALLOCATION_TYPE1;
685 initDlBwp->pdschCfg.numTimeDomRsrcAlloc = 1;
686 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].mappingType = \
688 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].startSymbol = PDSCH_START_SYMBOL;
689 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].symbolLength = PDSCH_LENGTH_SYMBOL;
690 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].startSymbolAndLength = \
691 calcSliv(PDSCH_START_SYMBOL, PDSCH_LENGTH_SYMBOL);
692 initDlBwp->pdschCfg.rbgSize = RBG_SIZE_CONFIG1;
693 initDlBwp->pdschCfg.numCodeWordsSchByDci = CODEWORDS_SCHED_BY_DCI_N1;
694 initDlBwp->pdschCfg.bundlingType = TYPE_STATIC_BUNDLING;
700 /******************************************************************
702 * @brief Fills Initial UL Bandwidth Part
706 * Function : fillInitUlBwp
708 * Functionality: Fills Initial UL Bandwidth Part
711 *****************************************************************/
712 void fillInitUlBwp(InitialUlBwp *initUlBwp)
717 initUlBwp->pucchPresent = FALSE;
719 /*Filling PUSCH Config */
720 initUlBwp->puschPresent = TRUE;
721 if(initUlBwp->puschPresent)
723 initUlBwp->puschCfg.dmrsUlCfgForPuschMapTypeA.addPos = ADDITIONALPOSITION_POS0;
724 initUlBwp->puschCfg.dmrsUlCfgForPuschMapTypeA.transPrecodDisabled. \
725 scramblingId0 = SCRAMBLING_ID;
726 initUlBwp->puschCfg.resourceAllocType = RESOURCEALLOCATION_TYPE1;
727 initUlBwp->puschCfg.numTimeDomRsrcAlloc = 1;
729 if(initUlBwp->puschCfg.numTimeDomRsrcAlloc <= MAX_NUM_UL_ALLOC)
731 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].k2 = PUSCH_K2;
732 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].mappingType =\
734 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbol = PUSCH_START_SYMBOL;
735 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].symbolLength = PUSCH_LENGTH_SYMBOL;
736 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbolAndLength =\
737 calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
739 initUlBwp->puschCfg.transformPrecoder = TRANSFORM_PRECODER_DISABLED;
744 DU_LOG("\n DUAPP: Memory is NULL of InitalUlBwp");
748 /******************************************************************
750 * @brief Fills SpCell Group Info
754 * Function : fillSpCellGrpInfo
756 * Functionality: Fills Sp Cell Group Info
759 *****************************************************************/
760 void fillSpCellGrpInfo(SpCellCfg *spCell)
764 spCell->servCellIdx = SERV_CELL_IDX;
765 /* Filling Initial Dl Bwp */
766 fillInitDlBwp(&spCell->servCellCfg.initDlBwp);
768 spCell->servCellCfg.numDlBwpToAdd = 0;
769 spCell->servCellCfg.firstActvDlBwpId = ACTIVE_DL_BWP_ID;
770 spCell->servCellCfg.defaultDlBwpId = ACTIVE_DL_BWP_ID;
771 spCell->servCellCfg.bwpInactivityTmr = NULLP;
772 spCell->servCellCfg.pdschServCellCfg.maxMimoLayers = NULLP;
773 spCell->servCellCfg.pdschServCellCfg.maxCodeBlkGrpPerTb = NULLP;
774 spCell->servCellCfg.pdschServCellCfg.codeBlkGrpFlushInd = NULLP;
775 spCell->servCellCfg.pdschServCellCfg.xOverhead = NULLP;
776 spCell->servCellCfg.pdschServCellCfg.numHarqProcForPdsch =\
777 NUM_HARQ_PROC_FOR_PDSCH_N_16;
778 /* Filling Initial UL Bwp*/
779 fillInitUlBwp(&spCell->servCellCfg.initUlBwp);
780 spCell->servCellCfg.numUlBwpToAdd = 0;
781 spCell->servCellCfg.firstActvUlBwpId = ACTIVE_DL_BWP_ID;
785 DU_LOG("\n DU_APP: Memory is NULL for SpCellGrp");
789 /******************************************************************
791 * @brief Fills Physical Cell Group Info
795 * Function : fillPhyCellGrpInfo
797 * Functionality: Fills Physical Cell Group Info
800 *****************************************************************/
801 void fillPhyCellGrpInfo(PhyCellGrpCfg *cellGrp)
805 cellGrp->pdschHarqAckCodebook = PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC;
806 cellGrp->pNrFr1 = P_NR_FR1;
810 DU_LOG("\nDUAPP: Memory is NULL for Physical Cell Group");
814 /******************************************************************
816 * @brief Fills Mac Cell Group Info
820 * Function : fillMacCellGrpInfo
822 * Functionality: Fills Mac Cell Group Info
825 *****************************************************************/
826 void fillMacCellGrpInfo(MacCellGrpCfg *cellGrp)
832 /* Filling Scheduling Request Config */
833 cellGrp->schReqCfg.addModListCount = 1;
834 if(cellGrp->schReqCfg.addModListCount <= MAX_NUM_SR_CFG_PER_CELL_GRP)
836 for(idx = 0; idx < cellGrp->schReqCfg.addModListCount; idx++)
838 cellGrp->schReqCfg.addModList[idx].schedReqId = SCH_REQ_ID;
839 cellGrp->schReqCfg.addModList[idx].srProhibitTmr = SR_PROHIBIT_MS_32;
840 cellGrp->schReqCfg.addModList[idx].srTransMax = SR_TRANS_MAX_N_16;
843 cellGrp->schReqCfg.relListCount = 0;
845 /* Filling Tag config */
846 cellGrp->tagCfg.addModListCount = 1;
847 if(cellGrp->tagCfg.addModListCount <= MAC_NUM_TAGS)
849 for(idx = 0; idx < cellGrp->tagCfg.addModListCount; idx++)
851 cellGrp->tagCfg.addModList[idx].tagId = TAG_ID;
852 cellGrp->tagCfg.addModList[idx].timeAlignTimer = TIME_ALIGNMENT_TIMER_INFINITY;
855 cellGrp->tagCfg.relListCount = 0;
857 /* Filling BSR config */
858 cellGrp->bsrTmrCfg.periodicTimer = PERIODIC_BSR_TMR;
859 cellGrp->bsrTmrCfg.retxTimer = RETX_BSR_TMR;
860 cellGrp->bsrTmrCfg.srDelayTimer = SR_DELAY_TMR;
862 /* Filling PHR config */
863 cellGrp->phrCfgSetupPres = true;
864 cellGrp->phrCfg.periodicTimer = PHR_PERIODIC_TIMER_INFINITY;
865 cellGrp->phrCfg.prohibitTimer = PHR_PROHIBIT_TIMER_SF_0;
866 cellGrp->phrCfg.txPowerFactor = PHR_TX_PWR_FACTOR_CHANGE_INFINITY;
867 cellGrp->phrCfg.multiplePHR = false;
868 cellGrp->phrCfg.dummy = false;
869 cellGrp->phrCfg.phrType2OtherCell = false;
870 cellGrp->phrCfg.phrOtherCG = PHR_MODE_OTHER_CG_REAL;
875 DU_LOG("\nDUAPP: Memory is NULL for Master Cell Group");
879 /******************************************************************
881 * @brief Fills Logical Channel Config List
885 * Function : fillLcCfgList
887 * Functionality: Fills Logical channel Config List
890 *****************************************************************/
891 void fillLcCfgList(LcCfg *lcCfgInfo)
895 lcCfgInfo->lcId = SRB1_LCID;
896 lcCfgInfo->drbQos = NULLP;
897 lcCfgInfo->snssai = NULLP;
898 lcCfgInfo->ulLcCfg = NULLP;
899 lcCfgInfo->dlLcCfg.lcp = LC_PRIORITY_1;
902 /* TODO: To be filled on receving UE CONTEXT SETUP from CU */
903 /* Filling Qos characteristics */
904 lcCfgInfo->drbQos.fiveQiType = QoS_Characteristics_PR_non_Dynamic_5QI;
905 lcCfgInfo->drbQos.u.nonDyn5Qi.fiveQi = 0;
906 lcCfgInfo->drbQos.u.nonDyn5Qi.priorLevel = 0;
907 lcCfgInfo->drbQos.u.nonDyn5Qi.avgWindow = 0;
908 lcCfgInfo->drbQos.u.nonDyn5Qi.maxDataBurstVol = 0;
911 lcCfgInfo->drbQos.ngRanRetPri.priorityLevel = PriorityLevel_highest;
912 lcCfgInfo->drbQos.ngRanRetPri.preEmptionCap = \
913 Pre_emptionCapability_may_trigger_pre_emption;
914 lcCfgInfo->drbQos.ngRanRetPri.preEmptionVul = \
915 Pre_emptionVulnerability_not_pre_emptable;
917 /* Filling Grb Qos */
918 lcCfgInfo->drbQos.grbQosInfo.maxFlowBitRateDl = 0;
919 lcCfgInfo->drbQos.grbQosInfo.maxFlowBitRateUl = 0;
920 lcCfgInfo->drbQos.grbQosInfo.guarFlowBitRateDl = 0;
921 lcCfgInfo->drbQos.grbQosInfo.guarFlowBitRateUl = 0;
923 /* Filling S-NSSAI */
924 /* TODO :To be filled when UE Context Setup Request is sent from CU */
925 /* Filling UL Logical Channel Config */
926 lcCfgInfo->ulLcCfg.priority = 0;
927 lcCfgInfo->ulLcCfg.lcGroup = 0;
928 lcCfgInfo->ulLcCfg.schReqId = 0;
929 lcCfgInfo->ulLcCfg.pbr = 0;
930 lcCfgInfo->ulLcCfg.bsd = 0;
932 /* Filling DL Logical Channel Config */
933 lcCfgInfo->dlLcCfg.lcp = 0;
938 DU_LOG("\n Memory is null for LcCfgList");
942 /******************************************************************
944 * @brief Fills MacUeCfg structure
948 * Function : fillMacUeCfg
950 * Functionality: Fills MacUeCfg
953 *****************************************************************/
954 void fillMacUeCfg(uint16_t cellId, uint8_t ueIdx,\
955 uint16_t crnti, MacUeCfg *ueCfg)
958 ueCfg->cellId = cellId;
959 ueCfg->ueIdx = ueIdx;
960 ueCfg->crnti = crnti;
961 /* Filling MacCellGroup Config */
962 fillMacCellGrpInfo(&ueCfg->macCellGrpCfg);
963 /* Filling PhyCellGroup Config */
964 fillPhyCellGrpInfo(&ueCfg->phyCellGrpCfg);
965 /* Filling SpCellGroup Config */
966 fillSpCellGrpInfo(&ueCfg->spCellCfg);
967 /* Filling AMBR for UL and DL */
968 ueCfg->maxAggrBitRate = NULLP;
969 /* Filling LC Context */
970 ueCfg->numLcs = SRB1_LCID;
971 if(ueCfg->numLcs < MAX_NUM_LC)
973 for(idx = 0; idx < ueCfg->numLcs; idx++)
975 fillLcCfgList(&ueCfg->lcCfgList[idx]);
981 /******************************************************************
983 * @brief Fills Rlc AM Information
987 * Function : fillAmInfo
989 * Functionality: Fills Rlc AM Information
992 *****************************************************************/
993 void fillAmInfo(AmBearerCfg *amCfg)
996 amCfg->dlAmCfg.snLenDl = AM_SIZE_12;
997 amCfg->dlAmCfg.pollRetxTmr = POLL_RETX_TMR_45MS;
998 amCfg->dlAmCfg.pollPdu = POLL_PDU_TMR_INFINITY;
999 amCfg->dlAmCfg.pollByte = POLL_BYTES_INFINITY;
1000 amCfg->dlAmCfg.maxRetxTh = RETX_TH_8;
1003 amCfg->ulAmCfg.snLenUl = AM_SIZE_12;
1004 amCfg->ulAmCfg.reAssemTmr = RE_ASM_40MS;
1005 amCfg->ulAmCfg.statProhTmr = PROH_35MS;
1009 /******************************************************************
1011 * @brief Fills RLC UM Bi Directional Information
1015 * Function : fillUmBiDirInfo
1017 * Functionality: Fills RLC UM Bi Directional Information
1020 *****************************************************************/
1021 void fillUmBiDirInfo(UmBiDirBearerCfg *umBiDirCfg)
1023 /* UL UM BI DIR INFO */
1024 umBiDirCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
1025 umBiDirCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
1027 /* DL UM BI DIR INFO */
1028 umBiDirCfg->dlUmCfg.snLenDlUm = UM_SIZE_12;
1032 /******************************************************************
1034 * @brief Fills RLC UM Uni Directional UL Information
1038 * Function : fillUmUniDirUlInfo
1040 * Functionality: Fills RLC UM Uni Directional Info
1043 *****************************************************************/
1044 void fillUmUniDirUlInfo(UmUniDirUlBearerCfg *umUniDirUlCfg)
1046 umUniDirUlCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
1047 umUniDirUlCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
1050 /******************************************************************
1052 * @brief Fills RLC UM Uni Directional DL Information
1056 * Function : fillUmUniDirDlInfo
1058 * Functionality: Fills RLC UM Uni Directional DL Info
1061 *****************************************************************/
1062 void fillUmUniDirDlInfo(UmUniDirDlBearerCfg *umUniDirDlCfg)
1064 umUniDirDlCfg->dlUmCfg.snLenDlUm = UM_SIZE_12;
1067 /******************************************************************
1069 * @brief Fills RlcBearerCfg structure
1073 * Function : fillRlcBearerCfg
1075 * Functionality: Fills Rlc Bearer Cfg
1078 *****************************************************************/
1079 void fillRlcBearerCfg(uint16_t cellId, uint8_t ueIdx, RlcUeCfg *ueCfg)
1082 ueCfg->cellId = cellId;
1083 ueCfg->ueIdx = ueIdx;
1084 ueCfg->numLcs = SRB1_LCID;
1086 for(idx = 0; idx < ueCfg->numLcs; idx++)
1088 ueCfg->rlcBearerCfg[idx].rbId = RB_ID_SRB;
1089 ueCfg->rlcBearerCfg[idx].rbType = RB_TYPE_SRB;
1090 ueCfg->rlcBearerCfg[idx].lcId = SRB1_LCID;
1091 ueCfg->rlcBearerCfg[idx].lcType = LCH_DCCH;
1092 ueCfg->rlcBearerCfg[idx].rlcMode = RLC_AM;
1093 switch(ueCfg->rlcBearerCfg[idx].rlcMode)
1096 memset(&ueCfg->rlcBearerCfg[idx].u.amCfg, 0, sizeof(AmBearerCfg));
1097 fillAmInfo(&ueCfg->rlcBearerCfg[idx].u.amCfg);
1099 case RLC_UM_BI_DIRECTIONAL:
1100 memset(&ueCfg->rlcBearerCfg[idx].u.umBiDirCfg, 0, sizeof(UmBiDirBearerCfg));
1101 fillUmBiDirInfo(&ueCfg->rlcBearerCfg[idx].u.umBiDirCfg);
1103 case RLC_UM_UNI_DIRECTIONAL_UL:
1104 memset(&ueCfg->rlcBearerCfg[idx].u.umUniDirUlCfg, 0, sizeof(UmUniDirUlBearerCfg));
1105 fillUmUniDirUlInfo(&ueCfg->rlcBearerCfg[idx].u.umUniDirUlCfg);
1107 case RLC_UM_UNI_DIRECTIONAL_DL:
1108 memset(&ueCfg->rlcBearerCfg[idx].u.umUniDirDlCfg, 0, sizeof(UmUniDirDlBearerCfg));
1109 fillUmUniDirDlInfo(&ueCfg->rlcBearerCfg[idx].u.umUniDirDlCfg);
1112 DU_LOG("\nDU_APP: Rlc Mode invalid %d", ueCfg->rlcBearerCfg[idx].rlcMode);
1118 /******************************************************************
1120 * @brief creates UE context
1124 * Function : duCreateUeCb
1126 * Functionality: Creates UE Conetxt
1128 * @params[in] UeCcchCtxt Pointer
1131 * @return ROK - success
1133 * ****************************************************************/
1134 uint8_t duCreateUeCb(UeCcchCtxt *ueCcchCtxt, uint32_t gnbCuUeF1apId)
1136 uint8_t cellIdx = 0;
1140 for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++)
1142 if(ueCcchCtxt->cellId == duCb.actvCellLst[cellIdx]->cellId)
1144 GET_UE_IDX(ueCcchCtxt->crnti, ueIdx);
1145 DU_LOG("\nDU_APP: Filling UeCb for ueIdx [%d]", ueIdx);
1147 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbDuUeF1apId = ueCcchCtxt->gnbDuUeF1apId;
1148 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbCuUeF1apId = gnbCuUeF1apId;
1149 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].ueState = UE_ACTIVE;
1151 /* Filling Mac Ue Config */
1152 memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].macUeCfg, 0, sizeof(MacUeCfg));
1153 ret = duBuildAndSendUeCreateReqToMac(ueCcchCtxt->cellId, ueIdx, ueCcchCtxt->crnti,\
1154 &duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].macUeCfg);
1156 DU_LOG("\nDU_APP: Failed to send UE create request to MAC");
1158 /* Filling Rlc Ue Config */
1159 memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].rlcUeCfg, 0, sizeof(RlcUeCfg));
1160 ret = duBuildAndSendUeCreateReqToRlc(ueCcchCtxt->cellId, ueIdx, \
1161 &duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].rlcUeCfg);
1163 DU_LOG("\nDU_APP: Failed to send UE create request to RLC");
1165 duCb.actvCellLst[cellIdx]->numActvUes++;
1166 memset(ueCcchCtxt, 0, sizeof(UeCcchCtxt));
1172 /******************************************************************
1174 * @brief Builds and Send UE Create Request to MAC
1178 * Function : duBuildAndSendUeCreateReqToMac
1180 * Functionality: Builds and Send UE Create Request to MAC
1182 * @Params[in] cellId,
1184 * @return ROK - success
1187 * ****************************************************************/
1189 uint8_t duBuildAndSendUeCreateReqToMac(uint16_t cellId, uint8_t ueIdx,\
1190 uint16_t crnti, MacUeCfg *duMacUeCfg)
1193 MacUeCfg *macUeCfg = NULLP;
1195 memset(&pst, 0, sizeof(Pst));
1197 fillMacUeCfg(cellId, ueIdx, crnti, duMacUeCfg);
1200 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_UE_CREATE_REQ);
1202 /* Copying ueCb to a sharable buffer */
1203 DU_ALLOC_SHRABL_BUF(macUeCfg, sizeof(MacUeCfg));
1206 memset(macUeCfg, 0, sizeof(MacUeCfg));
1207 memcpy(macUeCfg, &duCb.actvCellLst[cellId - 1]->ueCb[ueIdx -1].macUeCfg, sizeof(MacUeCfg));
1208 DU_LOG("\nDU_APP: Sending UE create request to MAC");
1210 /* Processing one Ue at a time to MAC */
1211 ret = (*packMacUeCreateReqOpts[pst.selector])(&pst, macUeCfg);
1214 DU_LOG("\nDU_APP : Failure in sending Ue Create Req to MAC");
1215 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macUeCfg, sizeof(MacUeCfg));
1221 DU_LOG("\n DU_APP: Memory alloc failed at duBuildAndSendUeCreateReqToMac()");
1227 /*******************************************************************
1229 * @brief Handle UE create response from MAC
1233 * Function : DuHandleMacUeCreateRsp
1235 * Functionality: Handle UE create response from MAC
1237 * @params[in] Pointer to MacUeCfgRsp and Pst
1238 * @return ROK - success
1241 * ****************************************************************/
1242 uint8_t DuHandleMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
1244 if(cfgRsp->result == MAC_DU_APP_RSP_OK)
1246 DU_LOG("\nDU APP : MAC UE Create Response : SUCCESS [UE IDX : %d]", cfgRsp->ueIdx);
1250 DU_LOG("\nDU APP : MAC UE Create Response : FAILURE [UE IDX : %d]", cfgRsp->ueIdx);
1255 /*******************************************************************
1257 * @brief Processes UE create Req to RLC UL
1261 * Function : duBuildAndSendUeCreateReqToRlc
1264 * Processes UE create Req to RLC UL
1266 * @params[in] cellId,
1268 * Pointer to RlcUeCfg
1269 * @return ROK - success
1272 *****************************************************************/
1274 uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t ueIdx, RlcUeCfg *duRlcUeCfg)
1277 RlcUeCfg *rlcUeCfg = NULLP;
1279 memset(&pst, 0, sizeof(Pst));
1281 fillRlcBearerCfg(cellId, ueIdx, duRlcUeCfg);
1282 FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UL_UE_CREATE_REQ);
1284 /* Copying ueCfg to a sharable buffer */
1285 DU_ALLOC_SHRABL_BUF(rlcUeCfg, sizeof(RlcUeCfg));
1288 memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
1289 memcpy(rlcUeCfg, duRlcUeCfg, sizeof(RlcUeCfg));
1290 /* Processing one Ue at a time to RLC */
1291 DU_LOG("\nDU_APP: Sending UE create request to RLC UL");
1292 ret = (*packRlcUlUeCreateReqOpts[pst.selector])(&pst, rlcUeCfg);
1295 DU_LOG("\nDU_APP : Failure in sending Ue Create Req to RLC");
1296 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeCfg, sizeof(RlcUeCfg));
1302 DU_LOG("\n DU_APP: Memory alloc failed at duBuildAndSendUeCreateReqToRlc()");
1310 /*******************************************************************
1312 * @brief Processes UE create Rsp received from RLC UL
1316 * Function : DuProcRlcUlUeCfgRsp
1319 * Processes UE create Rsp received from RLC UL
1321 * @params[in] Post structure
1322 * Pointer to RlcCfgCfm
1323 * @return ROK - success
1326 *****************************************************************/
1328 uint8_t DuProcRlcUlUeCreateRsp(Pst *pst, RlcUeCfgRsp *cfgRsp)
1334 if(cfgRsp->result == RLC_DU_APP_RSP_OK)
1336 DU_LOG("\nDU_APP: RLC UE Create Response : SUCCESS [UE IDX:%d]", cfgRsp->ueIdx);
1340 DU_LOG("\nDU_APP: RLC UE Create Response : FAILED [UE IDX:%d, REASON :%d]",\
1341 cfgRsp->ueIdx, cfgRsp->reason);
1344 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
1348 DU_LOG("\nDU_APP: Received RLC Ue Create Response is NULL");
1354 /**********************************************************************
1356 ***********************************************************************/