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");
402 dlRrcMsg = &f1apMsg->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
406 for(ieIdx=0; ieIdx<dlRrcMsg->protocolIEs.list.count; ieIdx++)
408 switch(dlRrcMsg->protocolIEs.list.array[ieIdx]->id)
410 case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
412 gnbCuUeF1apId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
415 case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
417 gnbDuUeF1apId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
420 case ProtocolIE_ID_id_SRBID:
422 srbId = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.SRBID;
425 case ProtocolIE_ID_id_ExecuteDuplication:
430 case ProtocolIE_ID_id_RRCContainer:
432 if(dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size > 0)
434 rrcMsgSize = dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size;
435 DU_ALLOC(rrcMsgPdu, rrcMsgSize);
438 DU_LOG("\nDU_APP : Memory allocation failed in procDlRrcMsgTrans");
441 for(byteIdx = 0; byteIdx < rrcMsgSize; byteIdx++)
443 rrcMsgPdu[byteIdx] = \
444 dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf[byteIdx];
449 DU_LOG("\nDU_APP : RRC Container Size is invalid:%ld",\
450 dlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size);
455 case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
457 deliveryStaRpt = true;
461 DU_LOG("\nDU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
462 dlRrcMsg->protocolIEs.list.array[ieIdx]->id);
466 if(srbId == SRB1_LCID) //RRC connection setup
468 for(ueIdx=0; ueIdx < duCb.numUe; ueIdx++)
470 if(gnbDuUeF1apId == duCb.ueCcchCtxt[ueIdx].gnbDuUeF1apId)
472 ueCcchCtxtFound = true;
473 crnti = duCb.ueCcchCtxt[ueIdx].crnti;
474 cellId = duCb.ueCcchCtxt[ueIdx].cellId;
481 ret = duBuildAndSendDlCcchInd(&cellId, &crnti, RRC_SETUP, rrcMsgSize, rrcMsgPdu);
484 DU_LOG("\nDU_APP: Falied at duBuildAndSendDlCcchInd()");
488 if(duCb.actvCellLst[cellId-1]->numActvUes < MAX_NUM_UE)
490 ret = duCreateUeCb(&duCb.ueCcchCtxt[ueIdx], gnbCuUeF1apId);
493 DU_LOG("\nDU_APP: Failed at duCreateUeCb for cellId [%d]", \
494 duCb.ueCcchCtxt[ueIdx].cellId);
500 DU_LOG("\nDU_APP: Max Active UEs has reached");
507 for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++)
509 for(ueIdx = 0 ; ueIdx < MAX_NUM_UE; ueIdx++)
511 if((gnbCuUeF1apId == duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId)
512 && (gnbDuUeF1apId == duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId))
515 ret = duBuildAndSendDlRrcMsgToRlc(duCb.actvCellLst[cellIdx]->cellId, \
516 duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, srbId, \
517 execDup, deliveryStaRpt, rrcMsgSize, rrcMsgPdu);
530 /******************************************************************
532 * @brief Generates GNB DU Ue F1AP ID
536 * Function : genGnbDuUeF1apId
538 * Functionality: Generates GNB DU Ue F1AP ID
541 * @return gnbDuF1apId
543 * ****************************************************************/
544 uint32_t genGnbDuUeF1apId()
546 static uint32_t gnbDuUeF1apId = 0;
548 return ++gnbDuUeF1apId;
551 /******************************************************************
553 * @brief Processes UL CCCH Ind recvd from MAC
557 * Function : duProcUlCcchInd
559 * Functionality: Processes UL CCCH Ind recvd from MAC
561 * @params[in] UlCcchIndInfo *ulCcchIndInfo
562 * @return ROK - success
565 * ****************************************************************/
566 uint8_t duProcUlCcchInd(UlCcchIndInfo *ulCcchIndInfo)
570 uint32_t gnbDuUeF1apId = 0;
572 gnbDuUeF1apId = genGnbDuUeF1apId();
574 /* Store Ue mapping */
575 duCb.ueCcchCtxt[duCb.numUe].gnbDuUeF1apId = gnbDuUeF1apId;
576 duCb.ueCcchCtxt[duCb.numUe].crnti = ulCcchIndInfo->crnti;
577 duCb.ueCcchCtxt[duCb.numUe].cellId = ulCcchIndInfo->cellId;
581 ret = (BuildAndSendInitialRrcMsgTransfer(gnbDuUeF1apId, ulCcchIndInfo->crnti, ulCcchIndInfo->ulCcchMsgLen,
582 ulCcchIndInfo->ulCcchMsg));
585 DU_LOG("\nDU_APP : BuildAndSendInitialRrcMsgTransfer failed");
588 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo->ulCcchMsg, ulCcchIndInfo->ulCcchMsgLen);
589 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo, sizeof(UlCcchIndInfo));
595 /******************************************************************
597 * @brief Fills Initial DL Bandwidth Part
601 * Function : fillInitDlBwp
603 * Functionality: Fills Initial DL Bandwidth Part
606 *****************************************************************/
607 void fillInitDlBwp(InitialDlBwp *initDlBwp)
610 uint8_t freqDomainResource[FREQ_DOM_RSRC_SIZE] = {0};
611 uint8_t coreset0EndPrb, coreset1StartPrb, coreset1NumPrb;
616 /* Filling PDCCH Config */
617 initDlBwp->pdcchPresent = TRUE;
618 if(initDlBwp->pdcchPresent)
620 initDlBwp->pdcchCfg.numCRsetToAddMod = PDCCH_CTRL_RSRC_SET_ONE_ID;
621 memset(initDlBwp->pdcchCfg.cRSetToAddModList, 0, MAX_NUM_CRSET);
622 if(initDlBwp->pdcchCfg.numCRsetToAddMod <= MAX_NUM_CRSET)
624 initDlBwp->pdcchCfg.cRSetToAddModList[idx].cRSetId = \
625 PDCCH_CTRL_RSRC_SET_ONE_ID;
626 memset(initDlBwp->pdcchCfg.cRSetToAddModList[idx].freqDomainRsrc, 0,\
628 coreset0EndPrb = CORESET0_END_PRB;
629 coreset1StartPrb = coreset0EndPrb +6;
630 coreset1NumPrb = CORESET1_NUM_PRB;
631 /* calculate the PRBs */
632 schAllocFreqDomRscType0(((coreset1StartPrb)/6), (coreset1NumPrb/6), freqDomainResource);
633 memcpy(initDlBwp->pdcchCfg.cRSetToAddModList[idx].freqDomainRsrc, freqDomainResource,
636 initDlBwp->pdcchCfg.cRSetToAddModList[idx].duration = \
637 PDCCH_CTRL_RSRC_SET_ONE_DURATION;
638 initDlBwp->pdcchCfg.cRSetToAddModList[idx].cceRegMappingType = \
639 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED;
640 initDlBwp->pdcchCfg.cRSetToAddModList[idx].precoderGranularity = \
642 initDlBwp->pdcchCfg.cRSetToAddModList[idx].dmrsScramblingId = \
645 initDlBwp->pdcchCfg.numCRsetToRel = 0;
646 /* Filling Serach Space */
647 initDlBwp->pdcchCfg.numSearchSpcToAddMod = PDCCH_CTRL_RSRC_SET_ONE_ID;
648 memset(initDlBwp->pdcchCfg.searchSpcToAddModList, 0, MAX_NUM_CRSET);
649 if(initDlBwp->pdcchCfg.numSearchSpcToAddMod <= MAX_NUM_CRSET)
651 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].searchSpaceId =\
652 PDCCH_SRCH_SPC_TWO_ID;
653 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].cRSetId = \
654 PDCCH_CTRL_RSRC_SET_ONE_ID;
655 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].\
656 mSlotPeriodicityAndOffset = SLOTPERIODICITYANDOFFSET_PR_SL1;
657 memset(initDlBwp->pdcchCfg.searchSpcToAddModList[idx].mSymbolsWithinSlot, 0,\
658 MONITORING_SYMB_WITHIN_SLOT_SIZE);
659 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].mSymbolsWithinSlot[idx] =\
660 PDCCH_SYMBOL_WITHIN_SLOT;
661 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel1 =\
663 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel2 =\
665 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel4 =\
667 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel8 =\
669 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].numCandidatesAggLevel16 =\
671 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].searchSpaceType = \
672 SEARCHSPACETYPE_PR_UE_SPECIFIC;
673 initDlBwp->pdcchCfg.searchSpcToAddModList[idx].ueSpecificDciFormat =\
674 PDCCH_SRCH_SPC_TWO_UE_SPEC_DCI_FORMAT;
676 initDlBwp->pdcchCfg.numSearchSpcToRel = 0;
680 /* Filling PDSCH Config */
681 initDlBwp->pdschPresent = TRUE;
682 if(initDlBwp->pdschPresent)
684 initDlBwp->pdschCfg.dmrsDlCfgForPdschMapTypeA.addPos = ADDITIONALPOSITION_POS0;
685 initDlBwp->pdschCfg.resourceAllocType = RESOURCEALLOCATION_TYPE1;
686 initDlBwp->pdschCfg.numTimeDomRsrcAlloc = 1;
687 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].mappingType = \
689 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].startSymbol = PDSCH_START_SYMBOL;
690 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].symbolLength = PDSCH_LENGTH_SYMBOL;
691 initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].startSymbolAndLength = \
692 calcSliv(PDSCH_START_SYMBOL, PDSCH_LENGTH_SYMBOL);
693 initDlBwp->pdschCfg.rbgSize = RBG_SIZE_CONFIG1;
694 initDlBwp->pdschCfg.numCodeWordsSchByDci = CODEWORDS_SCHED_BY_DCI_N1;
695 initDlBwp->pdschCfg.bundlingType = TYPE_STATIC_BUNDLING;
701 /******************************************************************
703 * @brief Fills Initial UL Bandwidth Part
707 * Function : fillInitUlBwp
709 * Functionality: Fills Initial UL Bandwidth Part
712 *****************************************************************/
713 void fillInitUlBwp(InitialUlBwp *initUlBwp)
718 initUlBwp->pucchPresent = FALSE;
720 /*Filling PUSCH Config */
721 initUlBwp->puschPresent = TRUE;
722 if(initUlBwp->puschPresent)
724 initUlBwp->puschCfg.dmrsUlCfgForPuschMapTypeA.addPos = ADDITIONALPOSITION_POS0;
725 initUlBwp->puschCfg.dmrsUlCfgForPuschMapTypeA.transPrecodDisabled. \
726 scramblingId0 = SCRAMBLING_ID;
727 initUlBwp->puschCfg.resourceAllocType = RESOURCEALLOCATION_TYPE1;
728 initUlBwp->puschCfg.numTimeDomRsrcAlloc = 1;
730 if(initUlBwp->puschCfg.numTimeDomRsrcAlloc <= MAX_NUM_UL_ALLOC)
732 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].k2 = PUSCH_K2;
733 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].mappingType =\
735 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbol = PUSCH_START_SYMBOL;
736 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].symbolLength = PUSCH_LENGTH_SYMBOL;
737 initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbolAndLength =\
738 calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
740 initUlBwp->puschCfg.transformPrecoder = TRANSFORM_PRECODER_DISABLED;
745 DU_LOG("\n DUAPP: Memory is NULL of InitalUlBwp");
749 /******************************************************************
751 * @brief Fills SpCell Group Info
755 * Function : fillSpCellGrpInfo
757 * Functionality: Fills Sp Cell Group Info
760 *****************************************************************/
761 void fillSpCellGrpInfo(SpCellCfg *spCell)
765 spCell->servCellIdx = SERV_CELL_IDX;
766 /* Filling Initial Dl Bwp */
767 fillInitDlBwp(&spCell->servCellCfg.initDlBwp);
769 spCell->servCellCfg.numDlBwpToAdd = 0;
770 spCell->servCellCfg.firstActvDlBwpId = ACTIVE_DL_BWP_ID;
771 spCell->servCellCfg.defaultDlBwpId = ACTIVE_DL_BWP_ID;
772 spCell->servCellCfg.bwpInactivityTmr = NULLP;
773 spCell->servCellCfg.pdschServCellCfg.maxMimoLayers = NULLP;
774 spCell->servCellCfg.pdschServCellCfg.maxCodeBlkGrpPerTb = NULLP;
775 spCell->servCellCfg.pdschServCellCfg.codeBlkGrpFlushInd = NULLP;
776 spCell->servCellCfg.pdschServCellCfg.xOverhead = NULLP;
777 spCell->servCellCfg.pdschServCellCfg.numHarqProcForPdsch =\
778 NUM_HARQ_PROC_FOR_PDSCH_N_16;
779 /* Filling Initial UL Bwp*/
780 fillInitUlBwp(&spCell->servCellCfg.initUlBwp);
781 spCell->servCellCfg.numUlBwpToAdd = 0;
782 spCell->servCellCfg.firstActvUlBwpId = ACTIVE_DL_BWP_ID;
786 DU_LOG("\n DU_APP: Memory is NULL for SpCellGrp");
790 /******************************************************************
792 * @brief Fills Physical Cell Group Info
796 * Function : fillPhyCellGrpInfo
798 * Functionality: Fills Physical Cell Group Info
801 *****************************************************************/
802 void fillPhyCellGrpInfo(PhyCellGrpCfg *cellGrp)
806 cellGrp->pdschHarqAckCodebook = PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC;
807 cellGrp->pNrFr1 = P_NR_FR1;
811 DU_LOG("\nDUAPP: Memory is NULL for Physical Cell Group");
815 /******************************************************************
817 * @brief Fills Mac Cell Group Info
821 * Function : fillMacCellGrpInfo
823 * Functionality: Fills Mac Cell Group Info
826 *****************************************************************/
827 void fillMacCellGrpInfo(MacCellGrpCfg *cellGrp)
833 /* Filling Scheduling Request Config */
834 cellGrp->schReqCfg.addModListCount = 1;
835 if(cellGrp->schReqCfg.addModListCount <= MAX_NUM_SR_CFG_PER_CELL_GRP)
837 for(idx = 0; idx < cellGrp->schReqCfg.addModListCount; idx++)
839 cellGrp->schReqCfg.addModList[idx].schedReqId = SCH_REQ_ID;
840 cellGrp->schReqCfg.addModList[idx].srProhibitTmr = SR_PROHIBIT_MS_32;
841 cellGrp->schReqCfg.addModList[idx].srTransMax = SR_TRANS_MAX_N_16;
844 cellGrp->schReqCfg.relListCount = 0;
846 /* Filling Tag config */
847 cellGrp->tagCfg.addModListCount = 1;
848 if(cellGrp->tagCfg.addModListCount <= MAC_NUM_TAGS)
850 for(idx = 0; idx < cellGrp->tagCfg.addModListCount; idx++)
852 cellGrp->tagCfg.addModList[idx].tagId = TAG_ID;
853 cellGrp->tagCfg.addModList[idx].timeAlignTimer = TIME_ALIGNMENT_TIMER_INFINITY;
856 cellGrp->tagCfg.relListCount = 0;
858 /* Filling BSR config */
859 cellGrp->bsrTmrCfg.periodicTimer = PERIODIC_BSR_TMR;
860 cellGrp->bsrTmrCfg.retxTimer = RETX_BSR_TMR;
861 cellGrp->bsrTmrCfg.srDelayTimer = SR_DELAY_TMR;
863 /* Filling PHR config */
864 cellGrp->phrCfgSetupPres = true;
865 cellGrp->phrCfg.periodicTimer = PHR_PERIODIC_TIMER_INFINITY;
866 cellGrp->phrCfg.prohibitTimer = PHR_PROHIBIT_TIMER_SF_0;
867 cellGrp->phrCfg.txPowerFactor = PHR_TX_PWR_FACTOR_CHANGE_INFINITY;
868 cellGrp->phrCfg.multiplePHR = false;
869 cellGrp->phrCfg.dummy = false;
870 cellGrp->phrCfg.phrType2OtherCell = false;
871 cellGrp->phrCfg.phrOtherCG = PHR_MODE_OTHER_CG_REAL;
876 DU_LOG("\nDUAPP: Memory is NULL for Master Cell Group");
880 /******************************************************************
882 * @brief Fills Logical Channel Config List
886 * Function : fillLcCfgList
888 * Functionality: Fills Logical channel Config List
891 *****************************************************************/
892 void fillLcCfgList(LcCfg *lcCfgInfo)
896 lcCfgInfo->lcId = SRB1_LCID;
897 lcCfgInfo->drbQos = NULLP;
898 lcCfgInfo->snssai = NULLP;
899 lcCfgInfo->ulLcCfg = NULLP;
900 lcCfgInfo->dlLcCfg.lcp = LC_PRIORITY_1;
903 /* TODO: To be filled on receving UE CONTEXT SETUP from CU */
904 /* Filling Qos characteristics */
905 lcCfgInfo->drbQos.fiveQiType = QoS_Characteristics_PR_non_Dynamic_5QI;
906 lcCfgInfo->drbQos.u.nonDyn5Qi.fiveQi = 0;
907 lcCfgInfo->drbQos.u.nonDyn5Qi.priorLevel = 0;
908 lcCfgInfo->drbQos.u.nonDyn5Qi.avgWindow = 0;
909 lcCfgInfo->drbQos.u.nonDyn5Qi.maxDataBurstVol = 0;
912 lcCfgInfo->drbQos.ngRanRetPri.priorityLevel = PriorityLevel_highest;
913 lcCfgInfo->drbQos.ngRanRetPri.preEmptionCap = \
914 Pre_emptionCapability_may_trigger_pre_emption;
915 lcCfgInfo->drbQos.ngRanRetPri.preEmptionVul = \
916 Pre_emptionVulnerability_not_pre_emptable;
918 /* Filling Grb Qos */
919 lcCfgInfo->drbQos.grbQosInfo.maxFlowBitRateDl = 0;
920 lcCfgInfo->drbQos.grbQosInfo.maxFlowBitRateUl = 0;
921 lcCfgInfo->drbQos.grbQosInfo.guarFlowBitRateDl = 0;
922 lcCfgInfo->drbQos.grbQosInfo.guarFlowBitRateUl = 0;
924 /* Filling S-NSSAI */
925 /* TODO :To be filled when UE Context Setup Request is sent from CU */
926 /* Filling UL Logical Channel Config */
927 lcCfgInfo->ulLcCfg.priority = 0;
928 lcCfgInfo->ulLcCfg.lcGroup = 0;
929 lcCfgInfo->ulLcCfg.schReqId = 0;
930 lcCfgInfo->ulLcCfg.pbr = 0;
931 lcCfgInfo->ulLcCfg.bsd = 0;
933 /* Filling DL Logical Channel Config */
934 lcCfgInfo->dlLcCfg.lcp = 0;
939 DU_LOG("\n Memory is null for LcCfgList");
943 /******************************************************************
945 * @brief Fills MacUeCfg structure
949 * Function : fillMacUeCfg
951 * Functionality: Fills MacUeCfg
954 *****************************************************************/
955 void fillMacUeCfg(uint16_t cellId, uint8_t ueIdx,\
956 uint16_t crnti, MacUeCfg *ueCfg)
959 ueCfg->cellId = cellId;
960 ueCfg->ueIdx = ueIdx;
961 ueCfg->crnti = crnti;
962 /* Filling MacCellGroup Config */
963 fillMacCellGrpInfo(&ueCfg->macCellGrpCfg);
964 /* Filling PhyCellGroup Config */
965 fillPhyCellGrpInfo(&ueCfg->phyCellGrpCfg);
966 /* Filling SpCellGroup Config */
967 fillSpCellGrpInfo(&ueCfg->spCellCfg);
968 /* Filling AMBR for UL and DL */
969 ueCfg->maxAggrBitRate = NULLP;
970 /* Filling LC Context */
971 ueCfg->numLcs = SRB1_LCID;
972 if(ueCfg->numLcs < MAX_NUM_LC)
974 for(idx = 0; idx < ueCfg->numLcs; idx++)
976 fillLcCfgList(&ueCfg->lcCfgList[idx]);
982 /******************************************************************
984 * @brief Fills Rlc AM Information
988 * Function : fillAmInfo
990 * Functionality: Fills Rlc AM Information
993 *****************************************************************/
994 void fillAmInfo(AmBearerCfg *amCfg)
997 amCfg->dlAmCfg.snLenDl = AM_SIZE_12;
998 amCfg->dlAmCfg.pollRetxTmr = POLL_RETX_TMR_45MS;
999 amCfg->dlAmCfg.pollPdu = POLL_PDU_TMR_INFINITY;
1000 amCfg->dlAmCfg.pollByte = POLL_BYTES_INFINITY;
1001 amCfg->dlAmCfg.maxRetxTh = RETX_TH_8;
1004 amCfg->ulAmCfg.snLenUl = AM_SIZE_12;
1005 amCfg->ulAmCfg.reAssemTmr = RE_ASM_40MS;
1006 amCfg->ulAmCfg.statProhTmr = PROH_35MS;
1010 /******************************************************************
1012 * @brief Fills RLC UM Bi Directional Information
1016 * Function : fillUmBiDirInfo
1018 * Functionality: Fills RLC UM Bi Directional Information
1021 *****************************************************************/
1022 void fillUmBiDirInfo(UmBiDirBearerCfg *umBiDirCfg)
1024 /* UL UM BI DIR INFO */
1025 umBiDirCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
1026 umBiDirCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
1028 /* DL UM BI DIR INFO */
1029 umBiDirCfg->dlUmCfg.snLenDlUm = UM_SIZE_12;
1033 /******************************************************************
1035 * @brief Fills RLC UM Uni Directional UL Information
1039 * Function : fillUmUniDirUlInfo
1041 * Functionality: Fills RLC UM Uni Directional Info
1044 *****************************************************************/
1045 void fillUmUniDirUlInfo(UmUniDirUlBearerCfg *umUniDirUlCfg)
1047 umUniDirUlCfg->ulUmCfg.snLenUlUm = UM_SIZE_12;
1048 umUniDirUlCfg->ulUmCfg.reAssemTmr = RE_ASM_40MS;
1051 /******************************************************************
1053 * @brief Fills RLC UM Uni Directional DL Information
1057 * Function : fillUmUniDirDlInfo
1059 * Functionality: Fills RLC UM Uni Directional DL Info
1062 *****************************************************************/
1063 void fillUmUniDirDlInfo(UmUniDirDlBearerCfg *umUniDirDlCfg)
1065 umUniDirDlCfg->dlUmCfg.snLenDlUm = UM_SIZE_12;
1068 /******************************************************************
1070 * @brief Fills RlcBearerCfg structure
1074 * Function : fillRlcBearerCfg
1076 * Functionality: Fills Rlc Bearer Cfg
1079 *****************************************************************/
1080 void fillRlcBearerCfg(uint16_t cellId, uint8_t ueIdx, RlcUeCfg *ueCfg)
1083 ueCfg->cellId = cellId;
1084 ueCfg->ueIdx = ueIdx;
1085 ueCfg->numLcs = SRB1_LCID;
1087 for(idx = 0; idx < ueCfg->numLcs; idx++)
1089 ueCfg->rlcBearerCfg[idx].rbId = RB_ID_SRB;
1090 ueCfg->rlcBearerCfg[idx].rbType = RB_TYPE_SRB;
1091 ueCfg->rlcBearerCfg[idx].lcId = SRB1_LCID;
1092 ueCfg->rlcBearerCfg[idx].lcType = LCH_DCCH;
1093 ueCfg->rlcBearerCfg[idx].rlcMode = RLC_AM;
1094 switch(ueCfg->rlcBearerCfg[idx].rlcMode)
1097 memset(&ueCfg->rlcBearerCfg[idx].u.amCfg, 0, sizeof(AmBearerCfg));
1098 fillAmInfo(&ueCfg->rlcBearerCfg[idx].u.amCfg);
1100 case RLC_UM_BI_DIRECTIONAL:
1101 memset(&ueCfg->rlcBearerCfg[idx].u.umBiDirCfg, 0, sizeof(UmBiDirBearerCfg));
1102 fillUmBiDirInfo(&ueCfg->rlcBearerCfg[idx].u.umBiDirCfg);
1104 case RLC_UM_UNI_DIRECTIONAL_UL:
1105 memset(&ueCfg->rlcBearerCfg[idx].u.umUniDirUlCfg, 0, sizeof(UmUniDirUlBearerCfg));
1106 fillUmUniDirUlInfo(&ueCfg->rlcBearerCfg[idx].u.umUniDirUlCfg);
1108 case RLC_UM_UNI_DIRECTIONAL_DL:
1109 memset(&ueCfg->rlcBearerCfg[idx].u.umUniDirDlCfg, 0, sizeof(UmUniDirDlBearerCfg));
1110 fillUmUniDirDlInfo(&ueCfg->rlcBearerCfg[idx].u.umUniDirDlCfg);
1113 DU_LOG("\nDU_APP: Rlc Mode invalid %d", ueCfg->rlcBearerCfg[idx].rlcMode);
1119 /******************************************************************
1121 * @brief creates UE context
1125 * Function : duCreateUeCb
1127 * Functionality: Creates UE Conetxt
1129 * @params[in] UeCcchCtxt Pointer
1132 * @return ROK - success
1134 * ****************************************************************/
1135 uint8_t duCreateUeCb(UeCcchCtxt *ueCcchCtxt, uint32_t gnbCuUeF1apId)
1137 uint8_t cellIdx = 0;
1141 for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++)
1143 if(ueCcchCtxt->cellId == duCb.actvCellLst[cellIdx]->cellId)
1145 GET_UE_IDX(ueCcchCtxt->crnti, ueIdx);
1146 DU_LOG("\nDU_APP: Filling UeCb for ueIdx [%d]", ueIdx);
1148 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbDuUeF1apId = ueCcchCtxt->gnbDuUeF1apId;
1149 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbCuUeF1apId = gnbCuUeF1apId;
1150 duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].ueState = UE_ACTIVE;
1152 /* Filling Mac Ue Config */
1153 memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].macUeCfg, 0, sizeof(MacUeCfg));
1154 ret = duBuildAndSendUeCreateReqToMac(ueCcchCtxt->cellId, ueIdx, ueCcchCtxt->crnti,\
1155 &duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].macUeCfg);
1157 DU_LOG("\nDU_APP: Failed to send UE create request to MAC");
1159 /* Filling Rlc Ue Config */
1160 memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].rlcUeCfg, 0, sizeof(RlcUeCfg));
1161 ret = duBuildAndSendUeCreateReqToRlc(ueCcchCtxt->cellId, ueIdx, \
1162 &duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].rlcUeCfg);
1164 DU_LOG("\nDU_APP: Failed to send UE create request to RLC");
1166 duCb.actvCellLst[cellIdx]->numActvUes++;
1167 memset(ueCcchCtxt, 0, sizeof(UeCcchCtxt));
1173 /******************************************************************
1175 * @brief Builds and Send UE Create Request to MAC
1179 * Function : duBuildAndSendUeCreateReqToMac
1181 * Functionality: Builds and Send UE Create Request to MAC
1183 * @Params[in] cellId,
1185 * @return ROK - success
1188 * ****************************************************************/
1190 uint8_t duBuildAndSendUeCreateReqToMac(uint16_t cellId, uint8_t ueIdx,\
1191 uint16_t crnti, MacUeCfg *duMacUeCfg)
1194 MacUeCfg *macUeCfg = NULLP;
1196 memset(&pst, 0, sizeof(Pst));
1198 fillMacUeCfg(cellId, ueIdx, crnti, duMacUeCfg);
1201 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_UE_CREATE_REQ);
1203 /* Copying ueCb to a sharable buffer */
1204 DU_ALLOC_SHRABL_BUF(macUeCfg, sizeof(MacUeCfg));
1207 memset(macUeCfg, 0, sizeof(MacUeCfg));
1208 memcpy(macUeCfg, &duCb.actvCellLst[cellId - 1]->ueCb[ueIdx -1].macUeCfg, sizeof(MacUeCfg));
1209 DU_LOG("\nDU_APP: Sending UE create request to MAC");
1211 /* Processing one Ue at a time to MAC */
1212 ret = (*packMacUeCreateReqOpts[pst.selector])(&pst, macUeCfg);
1215 DU_LOG("\nDU_APP : Failure in sending Ue Create Req to MAC");
1216 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macUeCfg, sizeof(MacUeCfg));
1222 DU_LOG("\n DU_APP: Memory alloc failed at duBuildAndSendUeCreateReqToMac()");
1228 /*******************************************************************
1230 * @brief Handle UE create response from MAC
1234 * Function : DuHandleMacUeCreateRsp
1236 * Functionality: Handle UE create response from MAC
1238 * @params[in] Pointer to MacUeCfgRsp and Pst
1239 * @return ROK - success
1242 * ****************************************************************/
1243 uint8_t DuHandleMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
1245 if(cfgRsp->result == MAC_DU_APP_RSP_OK)
1247 DU_LOG("\nDU APP : MAC UE Create Response : SUCCESS [UE IDX : %d]", cfgRsp->ueIdx);
1251 DU_LOG("\nDU APP : MAC UE Create Response : FAILURE [UE IDX : %d]", cfgRsp->ueIdx);
1256 /*******************************************************************
1258 * @brief Processes UE create Req to RLC UL
1262 * Function : duBuildAndSendUeCreateReqToRlc
1265 * Processes UE create Req to RLC UL
1267 * @params[in] cellId,
1269 * Pointer to RlcUeCfg
1270 * @return ROK - success
1273 *****************************************************************/
1275 uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t ueIdx, RlcUeCfg *duRlcUeCfg)
1278 RlcUeCfg *rlcUeCfg = NULLP;
1280 memset(&pst, 0, sizeof(Pst));
1282 fillRlcBearerCfg(cellId, ueIdx, duRlcUeCfg);
1283 FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UL_UE_CREATE_REQ);
1285 /* Copying ueCfg to a sharable buffer */
1286 DU_ALLOC_SHRABL_BUF(rlcUeCfg, sizeof(RlcUeCfg));
1289 memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
1290 memcpy(rlcUeCfg, duRlcUeCfg, sizeof(RlcUeCfg));
1291 /* Processing one Ue at a time to RLC */
1292 DU_LOG("\nDU_APP: Sending UE create request to RLC UL");
1293 ret = (*packRlcUlUeCreateReqOpts[pst.selector])(&pst, rlcUeCfg);
1296 DU_LOG("\nDU_APP : Failure in sending Ue Create Req to RLC");
1297 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeCfg, sizeof(RlcUeCfg));
1303 DU_LOG("\n DU_APP: Memory alloc failed at duBuildAndSendUeCreateReqToRlc()");
1311 /*******************************************************************
1313 * @brief Processes UE create Rsp received from RLC UL
1317 * Function : DuProcRlcUlUeCfgRsp
1320 * Processes UE create Rsp received from RLC UL
1322 * @params[in] Post structure
1323 * Pointer to RlcCfgCfm
1324 * @return ROK - success
1327 *****************************************************************/
1329 uint8_t DuProcRlcUlUeCreateRsp(Pst *pst, RlcUeCfgRsp *cfgRsp)
1335 if(cfgRsp->result == RLC_DU_APP_RSP_OK)
1337 DU_LOG("\nDU_APP: RLC UE Create Response : SUCCESS [UE IDX:%d]", cfgRsp->ueIdx);
1341 DU_LOG("\nDU_APP: RLC UE Create Response : FAILED [UE IDX:%d, REASON :%d]",\
1342 cfgRsp->ueIdx, cfgRsp->reason);
1345 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
1349 DU_LOG("\nDU_APP: Received RLC Ue Create Response is NULL");
1355 /**********************************************************************
1357 ***********************************************************************/