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 *******************************************************************************/
19 /* This file contains message handling functionality for DU APP */
20 #include "common_def.h"
28 #include "du_app_mac_inf.h"
29 #include "du_app_rlc_inf.h"
31 #include "du_app_rlc_inf.h"
35 #include "du_f1ap_msg_hdl.h"
36 #include "du_ue_mgr.h"
39 #include "lphy_stub.h"
41 #include "du_cell_mgr.h"
45 #include "AlarmInterface.h"
50 uint8_t numRlcDlSaps = 0;
52 uint8_t numRlcMacSaps = 0;
54 uint8_t macCfgInst = 0;
56 DuCfgParams duCfgParam;
57 uint8_t packRlcConfigReq(Pst *pst, RlcMngmt *cfg);
58 uint8_t cmPkLkwCntrlReq(Pst *pst, RlcMngmt *cfg);
59 uint8_t cmPkLrgCfgReq(Pst *pst, RgMngmt *cfg);
60 uint8_t BuildAndSendE2SetupReq();
61 uint8_t egtpHdlDatInd(EgtpMsg egtpMsg);
62 uint8_t BuildAndSendDUConfigUpdate();
63 uint16_t getTransId();
64 uint8_t cmPkLrgSchCfgReq(Pst * pst,RgMngmt * cfg);
66 packMacCellCfgReq packMacCellCfgOpts[] =
68 packMacCellCfg, /* packing for loosely coupled */
69 MacProcCellCfgReq, /* packing for tightly coupled */
70 packMacCellCfg, /* packing for light weight loosly coupled */
73 DuMacCellStart packMacCellStartOpts[] =
75 packMacCellStart, /* Loose coupling */
76 MacProcCellStart, /* TIght coupling */
77 packMacCellStart /* Light weight-loose coupling */
80 DuMacCellStop packMacCellStopOpts[] =
82 packMacCellStop, /* Loose coupling */
83 MacProcCellStop, /* TIght coupling */
84 packMacCellStop /* Light weight-loose coupling */
87 /**************************************************************************
88 * @brief Function to fill configs required by RLC
92 * Function : duBuildRlcCfg
95 * Initiates general Configs towards RLC
97 * @param[in] Inst Specifies if RLC UL or RLC DL instance
98 * @return ROK - success
101 ***************************************************************************/
102 uint8_t duBuildRlcCfg(Inst inst)
105 RlcGenCfg *genCfg = NULLP;
108 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
109 DU_SET_ZERO(&pst, sizeof(Pst));
111 genCfg = &(rlcMngmt.t.cfg.s.gen);
113 /*----------- Fill General Configuration Parameters ---------*/
114 genCfg->maxUe = duCfgParam.maxUe;
115 genCfg->maxKwuSaps = 2;
116 genCfg->maxUdxSaps = 1;
117 genCfg->rlcMode = (inst == RLC_UL_INST) ?
118 LKW_RLC_MODE_UL : LKW_RLC_MODE_DL;
120 genCfg->maxRguSaps = DEFAULT_CELLS;
122 /*----------- Fill lmPst
123 * Parameters ---------*/
124 genCfg->lmPst.dstProcId = DU_PROC;
125 genCfg->lmPst.srcProcId = DU_PROC;
126 genCfg->lmPst.dstEnt = ENTDUAPP;
127 genCfg->lmPst.dstInst = DU_INST;
128 genCfg->lmPst.srcEnt = ENTRLC;
129 genCfg->lmPst.srcInst = inst;
130 genCfg->lmPst.prior = PRIOR0;
131 genCfg->lmPst.route = RTESPEC;
132 genCfg->lmPst.region = (inst == RLC_UL_INST) ?
133 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
134 genCfg->lmPst.pool = RLC_POOL;
135 genCfg->lmPst.selector = ODU_SELECTOR_LC;
138 rlcMngmt.hdr.msgType = TCFG;
139 rlcMngmt.hdr.msgLen = 0;
140 rlcMngmt.hdr.entId.ent = ENTRLC;
141 rlcMngmt.hdr.entId.inst = (Inst)0;
142 rlcMngmt.hdr.elmId.elmnt = STGEN;
143 rlcMngmt.hdr.seqNmb = 0;
144 rlcMngmt.hdr.version = 0;
145 rlcMngmt.hdr.transId = 0;
146 rlcMngmt.hdr.response.prior = PRIOR0;
147 rlcMngmt.hdr.response.route = RTESPEC;
148 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
149 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
150 rlcMngmt.hdr.response.mem.pool = DU_POOL;
151 rlcMngmt.hdr.response.selector = ODU_SELECTOR_LC;
154 pst.selector = ODU_SELECTOR_LC;
155 pst.srcEnt = ENTDUAPP;
158 pst.dstProcId = DU_PROC;
159 pst.srcProcId = DU_PROC;
160 pst.region = duCb.init.region;
162 DU_LOG("\nDEBUG --> DU_APP : RLC Gen Cfg Req sent for inst %d", inst);
164 /* Send the request to RLC */
165 packRlcConfigReq(&pst, &rlcMngmt);
170 /**************************************************************************
171 * @brief Function to fill configs required by RLC
175 * Function : duBuildRlcLsapCfg
178 * Initiates general Configs towards RLC
180 * @param[in] Inst Specifies if RLC UL or RLC DL instance
181 * @return ROK - success
184 ***************************************************************************/
185 uint8_t duBuildRlcLsapCfg(Ent ent, Inst inst, uint8_t lsapInst)
189 RlcSapCfg *lSap = NULLP;
192 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
193 DU_SET_ZERO(&pst, sizeof(Pst));
196 rlcMngmt.hdr.msgType = TCFG;
197 rlcMngmt.hdr.entId.ent = ENTRLC;
198 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
199 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
201 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
204 pst.selector = ODU_SELECTOR_LC;
205 pst.srcEnt = ENTDUAPP;
207 pst.dstProcId = DU_PROC;
209 pst.srcProcId = DU_PROC;
210 pst.region = duCb.init.region;
211 lSap = &(rlcMngmt.t.cfg.s.sap);
213 lSap->mem.region = (inst == RLC_UL_INST) ?
214 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
215 lSap->mem.pool = RLC_POOL;
217 lSap->bndTmrIntvl = 10;
218 lSap->priority = PRIOR0;
219 lSap->route = RTESPEC;
222 lSap->procId = DU_PROC;
224 lSap->inst = lsapInst;
225 lSap->sapId = lsapInst; /* SapId will be stored as suId in MAC */
226 lSap->selector = (inst == RLC_UL_INST) ? ODU_SELECTOR_LWLC : ODU_SELECTOR_TC;
227 rlcMngmt.hdr.elmId.elmnt = STRGUSAP;
228 DU_LOG("\nDEBUG --> DU_APP : RLC MAC Lower Sap Cfg Req sent for inst %d", inst);
233 lSap->procId = DU_PROC;
235 lSap->inst = (inst == RLC_UL_INST) ?
236 RLC_DL_INST : RLC_UL_INST;
238 lSap->selector = ODU_SELECTOR_LC;
239 rlcMngmt.hdr.elmId.elmnt = STUDXSAP;
240 DU_LOG("\nDEBUG --> DU_APP : RLC DL/UL Lower Sap Cfg Req sent for inst %d", inst);
243 packRlcConfigReq(&pst, &rlcMngmt);
247 /**************************************************************************
248 * @brief Function to fill configs required by RLC
252 * Function : duBuildRlcUsapCfg
255 * Initiates general Configs towards RLC
257 * @param[in] Inst Specifies if RLC UL or RLC DL instance
258 * @return ROK - success
261 ***************************************************************************/
262 uint8_t duBuildRlcUsapCfg(uint8_t elemId, Ent ent, Inst inst)
265 RlcSapCfg *uSap = NULLP;
268 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
269 DU_SET_ZERO(&pst, sizeof(Pst));
271 uSap = &(rlcMngmt.t.cfg.s.sap);
273 uSap->selector = ODU_SELECTOR_LC;
274 uSap->mem.region = (inst == RLC_UL_INST) ?
275 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
276 uSap->mem.pool = RLC_POOL;
279 uSap->procId = DU_PROC;
283 uSap->inst = (inst == RLC_UL_INST) ?
284 RLC_DL_INST : RLC_UL_INST;
285 uSap->bndTmrIntvl = 1000;
286 uSap->priority = PRIOR0;
287 uSap->route = RTESPEC;
290 rlcMngmt.hdr.msgType = TCFG;
291 rlcMngmt.hdr.entId.ent = ENTRLC;
292 rlcMngmt.hdr.elmId.elmnt = STUDXSAP;
293 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
294 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
296 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
299 pst.selector = ODU_SELECTOR_LC;
300 pst.srcEnt = ENTDUAPP;
302 pst.dstProcId = DU_PROC;
304 pst.srcProcId = DU_PROC;
305 pst.region = duCb.init.region;
307 DU_LOG("\nDEBUG --> DU_APP : RLC Kwu Upper Sap Cfg Req sent for inst %d", inst);
308 packRlcConfigReq(&pst, &rlcMngmt);
313 /**************************************************************************
314 * @brief Function to populate internal DS of DU APP
318 * Function : duProcCfgComplete
321 * Populates internal data structures of DU APP after
322 * receiving configurations.
325 * @return ROK - success
328 ***************************************************************************/
329 uint8_t duProcCfgComplete()
332 static uint16_t cellId = 0;
334 for(idx=0; idx< DEFAULT_CELLS; idx++)
336 DuCellCb *cell = NULLP;
337 DU_ALLOC(cell, sizeof(DuCellCb))
340 DU_LOG("\nERROR --> DU_APP : Memory Allocation failed in duProcCfgComplete");
346 memset(cell, 0, sizeof(DuCellCb));
347 cell->cellId = ++cellId;
348 memset(&cell->cellInfo.nrEcgi.plmn, 0, sizeof(Plmn));
349 cell->cellInfo.nrEcgi.plmn.mcc[0] = PLMN_MCC0;
350 cell->cellInfo.nrEcgi.plmn.mcc[1] = PLMN_MCC1;
351 cell->cellInfo.nrEcgi.plmn.mcc[2] = PLMN_MCC2;
352 cell->cellInfo.nrEcgi.plmn.mnc[0] = PLMN_MNC0;
353 cell->cellInfo.nrEcgi.plmn.mnc[1] = PLMN_MNC1;
354 cell->cellInfo.nrEcgi.cellId = NR_CELL_ID;
355 cell->cellInfo.nrPci = NR_PCI;
356 cell->cellInfo.fiveGsTac = DU_TAC;
357 memset(&cell->cellInfo.plmn[idx1], 0, sizeof(Plmn));
358 for(idx1=0; idx1<MAX_PLMN; idx1++)
360 cell->cellInfo.plmn[idx1].mcc[0] = PLMN_MCC0;
361 cell->cellInfo.plmn[idx1].mcc[1] = PLMN_MCC1;
362 cell->cellInfo.plmn[idx1].mcc[2] = PLMN_MCC2;
363 cell->cellInfo.plmn[idx1].mnc[0] = PLMN_MNC0;
364 cell->cellInfo.plmn[idx1].mnc[1] = PLMN_MNC1;
366 cell->cellInfo.maxUe = duCfgParam.maxUe;
367 cell->cellStatus = CELL_OUT_OF_SERVICE;
369 duCb.cfgCellLst[duCb.numCfgCells] = cell;
375 //Start layer configs
376 ret = duSendRlcUlCfg();
380 /**************************************************************************
381 * @brief Function to invoke DU Layer Configs
385 * Function : duSendRlcUlCfg
388 * Initiates Configs towards layers of DU
391 * @return ROK - success
394 ***************************************************************************/
395 uint8_t duSendRlcUlCfg()
399 duBuildRlcCfg((Inst)RLC_UL_INST);
400 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
402 duBuildRlcLsapCfg(ENTMAC, (Inst)RLC_UL_INST, cellIdx);
404 duBuildRlcLsapCfg(ENTRLC, (Inst)RLC_UL_INST, 0);
409 /**************************************************************************
410 * @brief Function to invoke DU Layer Configs
414 * Function : duSendRlcDlCfg
417 * Initiates Configs towards layers of DU
420 * @return ROK - success
423 ***************************************************************************/
424 uint8_t duSendRlcDlCfg()
428 duBuildRlcCfg((Inst)RLC_DL_INST);
429 duBuildRlcUsapCfg(STUDXSAP, ENTRLC, (Inst)RLC_DL_INST);
430 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
432 duBuildRlcLsapCfg(ENTMAC, (Inst)RLC_DL_INST, cellIdx);
437 /**************************************************************************
438 * @brief Function to handle Config Confirm from RLC
442 * Function : DuHdlRlcCfgComplete
445 * Handles Gen Config Confirm from RLC
447 * @param[in] Pst *pst, Post structure of the primitive.
448 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC
449 * @return ROK - success
452 ***************************************************************************/
453 uint8_t DuHdlRlcCfgComplete(Pst *pst, RlcMngmt *cfm)
456 if (pst->srcInst == RLC_UL_INST)
458 ret = duProcRlcUlCfgComplete(pst, cfm);
462 ret = duProcRlcDlCfgComplete(pst, cfm);
467 /**************************************************************************
468 * @brief Function to handle Control Config Confirm from RLC
472 * Function : duHdlRlcCntrlCfgComplete
475 * Handles Control Config Confirm from RLC
477 * @param[in] Pst *pst, Post structure of the primitive.
478 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC
479 * @return ROK - success
482 ***************************************************************************/
483 uint8_t duHdlRlcCntrlCfgComplete(Pst *pst, RlcMngmt *cntrl)
487 if (cntrl->cfm.status == LCM_PRIM_OK)
489 switch (cntrl->hdr.elmId.elmnt)
493 if (pst->srcInst == RLC_DL_INST)
495 DU_LOG("\nDEBUG --> DU_APP : BIND OF RLC DL TO MAC (RGU) SAP SUCCESSFUL");
497 if(macCfgInst < DEFAULT_CELLS)
500 duBindUnbindRlcToMacSap((Inst) RLC_DL_INST, ABND);
504 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
509 DU_LOG("\nDEBUG --> DU_APP : BIND OF RLC UL TO MAC (RGU) SAP SUCCESSFUL");
511 if(macCfgInst < DEFAULT_CELLS)
513 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
527 /**************************************************************************
528 * @brief Function to handle Config Confirm from RLC UL
532 * Function : duHdlRlcUlCfgComplete
535 * Handles Config Confirm from RLC UL
537 * @param[in] Pst *pst, Post structure of the primitive.
538 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC UL
539 * @return ROK - success
542 ***************************************************************************/
543 uint8_t duProcRlcUlCfgComplete(Pst *pst, RlcMngmt *cfm)
547 DU_LOG("\nDEBUG --> DU_APP : RLC UL Cfg Status %d", cfm->cfm.status);
548 if (cfm->cfm.status == LCM_PRIM_OK)
550 switch(cfm->hdr.elmId.elmnt)
554 rlcUlCfg |= RLC_GEN_CFG;
560 if(numRlcMacSaps == DEFAULT_CELLS)
562 rlcUlCfg |= RLC_MAC_SAP_CFG;
569 rlcUlCfg |= RLC_UDX_SAP_CFG;
576 DU_LOG("\nDEBUG --> DU_APP : RLC UL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
577 if(rlcUlCfg == DU_RLC_UL_CONFIGURED)
581 //Start configuration of RLC DL
588 DU_LOG("\nERROR --> DU_APP : Config confirm NOK from RLC UL");
594 /**************************************************************************
595 * @brief Function to handle Config Confirm from RLC DL
599 * Function : duHdlRlcDlCfgComplete
602 * Handles Config Confirm from RLC DL
604 * @param[in] Pst *pst, Post structure of the primitive.
605 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC DL
606 * @return ROK - success
609 ***************************************************************************/
610 uint8_t duProcRlcDlCfgComplete(Pst *pst, RlcMngmt *cfm)
612 DU_LOG("\nDEBUG --> DU_APP : RLC DL Cfg Status %d", cfm->cfm.status);
613 if (cfm->cfm.status == LCM_PRIM_OK)
615 switch(cfm->hdr.elmId.elmnt)
619 rlcDlCfg |= RLC_GEN_CFG;
625 if(numRlcMacSaps == DEFAULT_CELLS)
627 rlcDlCfg |= RLC_MAC_SAP_CFG;
634 rlcDlCfg |= RLC_UDX_SAP_CFG;
642 DU_LOG("\nDEBUG --> DU_APP : RLC DL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
643 if(rlcDlCfg == DU_RLC_DL_CONFIGURED)
646 //Start configuration of MAC
653 DU_LOG("\nERROR --> DU_APP : Config confirm NOK from RLC DL");
658 /**************************************************************************
659 * @brief Function to send configs to MAC
663 * Function : duSendMacCfg
666 * Initiates Configs towards MAC layer
669 * @return ROK - success
672 ***************************************************************************/
673 uint8_t duSendMacCfg()
676 duBuildMacUsapCfg(RLC_UL_INST);
677 duBuildMacUsapCfg(RLC_DL_INST);
682 /**************************************************************************
683 * @brief Function to fill gen config required by MAC
687 * Function : duBuildMacGenCfg
690 * Initiates general Configs towards MAC
693 * @return ROK - success
696 ***************************************************************************/
697 uint8_t duBuildMacGenCfg()
700 RgGenCfg *genCfg=NULLP;
703 DU_SET_ZERO(&pst, sizeof(Pst));
704 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
706 genCfg = &(rgMngmt.t.cfg.s.genCfg);
708 /*----------- Fill General Configuration Parameters ---------*/
709 genCfg->mem.region = MAC_MEM_REGION;
710 genCfg->mem.pool = MAC_POOL;
712 genCfg->numRguSaps = 2;
714 genCfg->lmPst.dstProcId = DU_PROC;
715 genCfg->lmPst.srcProcId = DU_PROC;
716 genCfg->lmPst.dstEnt = ENTDUAPP;
717 genCfg->lmPst.dstInst = 0;
718 genCfg->lmPst.srcEnt = ENTMAC;
719 genCfg->lmPst.srcInst = macCfgInst;
720 genCfg->lmPst.prior = PRIOR0;
721 genCfg->lmPst.route = RTESPEC;
722 genCfg->lmPst.region = MAC_MEM_REGION;
723 genCfg->lmPst.pool = MAC_POOL;
724 genCfg->lmPst.selector = ODU_SELECTOR_LC;
727 rgMngmt.hdr.msgType = TCFG;
728 rgMngmt.hdr.msgLen = 0;
729 rgMngmt.hdr.entId.ent = ENTMAC;
730 rgMngmt.hdr.entId.inst = (Inst)0;
731 rgMngmt.hdr.elmId.elmnt = STGEN;
732 rgMngmt.hdr.seqNmb = 0;
733 rgMngmt.hdr.version = 0;
734 rgMngmt.hdr.transId = 0;
736 rgMngmt.hdr.response.prior = PRIOR0;
737 rgMngmt.hdr.response.route = RTESPEC;
738 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
739 rgMngmt.hdr.response.mem.pool = MAC_POOL;
740 rgMngmt.hdr.response.selector = ODU_SELECTOR_LC;
743 pst.selector = ODU_SELECTOR_LC;
744 pst.srcEnt = ENTDUAPP;
746 pst.dstInst = macCfgInst;
747 pst.dstProcId = DU_PROC;
748 pst.srcProcId = DU_PROC;
749 pst.region = duCb.init.region;
751 DU_LOG("\nDEBUG --> DU_APP : MAC Gen Cfg Req sent");
753 /* Send the request to MAC */
754 cmPkLrgCfgReq(&pst, &rgMngmt);
759 /**************************************************************************
760 * @brief Function to fill USAP config required by MAC
764 * Function : duBuildMacUsapCfg
767 * Initiates USAP Configs towards MAC
769 * @param[in] SpId Specifies if RLC UL or RLC DL instance
770 * @return ROK - success
773 ***************************************************************************/
774 uint8_t duBuildMacUsapCfg(SpId sapId)
777 RgUpSapCfg *uSap = NULLP;
780 DU_SET_ZERO(&pst, sizeof(Pst));
781 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
783 uSap = &(rgMngmt.t.cfg.s.rguSap);
785 uSap->mem.region = MAC_MEM_REGION;
786 uSap->mem.pool = MAC_POOL;
789 uSap->procId = DU_PROC;
792 uSap->prior = PRIOR0;
793 uSap->route = RTESPEC;
794 uSap->selector = ODU_SELECTOR_LC ;
797 rgMngmt.hdr.msgType = TCFG;
798 rgMngmt.hdr.entId.ent = ENTMAC;
799 rgMngmt.hdr.entId.inst = (Inst)0;
800 rgMngmt.hdr.elmId.elmnt = STRGUSAP;
801 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
802 rgMngmt.hdr.response.mem.pool = MAC_POOL;
805 pst.selector = ODU_SELECTOR_LC;
806 pst.srcEnt = ENTDUAPP;
808 pst.dstInst = macCfgInst;
809 pst.dstProcId = DU_PROC;
810 pst.srcProcId = DU_PROC;
811 pst.region = duCb.init.region;
813 DU_LOG("\nDEBUG --> DU_APP : MAC Rgu USap Cfg Req sent");
815 /* Send the request to MAC */
816 cmPkLrgCfgReq(&pst, &rgMngmt);
821 /**************************************************************************
822 * @brief Function to handle Config Confirm from MAC
826 * Function : duHdlMacCfgComplete
829 * Handles Gen Config Confirm from MAC
831 * @param[in] Pst *pst, Post structure of the primitive.
832 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
833 * @return ROK - success
836 ***************************************************************************/
837 uint8_t duHdlMacCfgComplete(Pst *pst, RgMngmt *cfm)
841 if (cfm->cfm.status == LCM_PRIM_OK)
843 switch (cfm->hdr.elmId.elmnt)
847 macCfg |= MAC_GEN_CFG;
852 macCfg |= MAC_SAP_CFG;
859 DU_LOG("\nDEBUG --> DU_APP : MAC Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
860 if(macCfg == MAC_CONFIGURED && numRlcMacSaps == MAX_MAC_SAP)
863 DU_LOG("\nDEBUG --> DU_APP : Completed sending Configs");
865 duBindUnbindRlcToMacSap(RLC_DL_INST, ABND);
871 DU_LOG("\nERROR --> DU_APP : Config confirm NOK from MAC");
877 /**************************************************************************
878 * @brief Function to bind/unbind RLC to MAC SAP
882 * Function : duBindUnbindRlcToMacSap
885 * Initiates Bind/Unbind from RLC to MAC
887 * @param[in] Inst Specifies if RLC UL or RLC DL instance
888 * @param[in] action Specifies if action is bind or unbind
889 * @return ROK - success
892 ***************************************************************************/
893 uint8_t duBindUnbindRlcToMacSap(uint8_t inst, uint8_t action)
895 RlcCntrl *cntrl = NULLP;
900 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
901 DU_SET_ZERO(&pst, sizeof(Pst));
905 DU_LOG("\nDEBUG --> DU_APP : Cntrl Req to RLC inst %d to bind MAC sap", inst);
909 DU_LOG("\nDEBUG --> DU_APP : Cntrl Req to RLC inst %d to unbind MAC sap", inst);
911 cntrl = &(rlcMngmt.t.cntrl);
913 cntrl->action = action;
914 cntrl->subAction = DU_ZERO_VAL;
915 cntrl->s.sapCntrl.suId = macCfgInst;
916 cntrl->s.sapCntrl.spId = inst;
919 rlcMngmt.hdr.msgType = TCNTRL;
920 rlcMngmt.hdr.entId.ent = ENTRLC;
921 rlcMngmt.hdr.entId.inst = inst;
922 rlcMngmt.hdr.elmId.elmnt = 186; /* ambiguous defines in lkw.h and lrg.h so direct hardcoded*/
923 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
924 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
925 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
928 pst.selector = ODU_SELECTOR_LC;
929 pst.srcEnt = ENTDUAPP;
931 pst.dstProcId = DU_PROC;
933 pst.srcProcId = DU_PROC;
934 pst.region = duCb.init.region;
936 cmPkLkwCntrlReq(&pst, &rlcMngmt);
940 /*******************************************************************
942 * @brief Handles SCTP notifications
946 * Function : duSctpNtfyHdl
949 * Handles SCTP notification
951 * @params[in] Message Buffer
954 * @return ROK - success
957 * ****************************************************************/
959 uint8_t duSctpNtfyHdl(Buffer *mBuf, CmInetSctpNotification *ntfy)
961 if(f1Params.assocId == ntfy->u.assocChange.assocId)
963 if(BuildAndSendF1SetupReq() != ROK)
968 else if(ricParams.assocId == ntfy->u.assocChange.assocId)
970 if(BuildAndSendE2SetupReq() != ROK)
977 DU_LOG("\nERROR --> DU_APP : Invalid assocId %d received", ntfy->u.assocChange.assocId);
983 /*******************************************************************
985 * @brief Fills Pst struct for ENTEGTP
989 * Function : duFillEgtpPst
992 * Fills Pst struct for ENTEGTP
995 * @return ROK - success
998 * ****************************************************************/
999 uint8_t duFillEgtpPst(Pst *pst, Event event)
1001 memset(pst, 0, sizeof(Pst));
1002 pst->srcEnt = (Ent)ENTDUAPP;
1003 pst->srcInst = (Inst)DU_INST;
1004 pst->srcProcId = DU_PROC;
1005 pst->dstEnt = (Ent)ENTEGTP;
1006 pst->dstInst = (Inst)EGTP_INST;
1007 pst->dstProcId = pst->srcProcId;
1009 pst->selector = ODU_SELECTOR_LC;
1016 /*******************************************************************
1018 * @brief Function to configure EGTP
1022 * Function : duBuildEgtpCfgReq
1025 * Function to configure EGTP
1028 * @return ROK - success
1031 * ****************************************************************/
1033 uint8_t duBuildEgtpCfgReq()
1038 DU_LOG("\nDEBUG --> DU_APP : Sending EGTP config request");
1040 memset(&egtpCfg, 0, sizeof(EgtpConfig));
1041 memcpy(&egtpCfg, &duCfgParam.egtpParams, sizeof(EgtpConfig));
1043 duFillEgtpPst(&pst, EVTCFGREQ);
1044 packEgtpCfgReq(&pst, egtpCfg);
1049 /*******************************************************************
1051 * @brief Function to configure EGTP
1055 * Function : duBuildEgtpCfgReq
1058 * Function to configure EGTP
1061 * @return ROK - success
1064 * ****************************************************************/
1065 uint8_t duHdlEgtpCfgComplete(CmStatus cfm)
1069 if(cfm.status == LCM_PRIM_OK)
1071 DU_LOG("\nDEBUG --> DU_APP : EGTP configuraton complete");
1073 duSendEgtpSrvOpenReq();
1078 DU_LOG("\nERROR --> DU_APP : EGTP configuraton failed");
1085 /*******************************************************************
1087 * @brief Sends server open request to EGTP
1091 * Function : duSendEgtpSrvOpenReq
1094 * Sends server open request to EGTP
1097 * @return ROK - success
1100 * ****************************************************************/
1102 uint8_t duSendEgtpSrvOpenReq()
1106 DU_LOG("\nDEBUG --> DU_APP : Sending EGTP server open request");
1108 duFillEgtpPst(&pst, EVTSRVOPENREQ);
1109 packEgtpSrvOpenReq(&pst);
1114 /*******************************************************************
1116 * @brief Handles server open confirmation
1120 * Function : duHdlEgtpSrvOpenComplete
1123 * Handles server open confirmation
1126 * @return ROK - success
1129 *****************************************************************/
1131 uint8_t duHdlEgtpSrvOpenComplete(CmStatus cfm)
1135 if(cfm.status == LCM_PRIM_OK)
1137 DU_LOG("\nDEBUG --> DU_APP : EGTP server opened successfully");
1141 DU_LOG("\nERROR --> DU_APP : EGTP server opening failed");
1148 /*******************************************************************
1150 * @brief Sends tunnel management request
1154 * Function : duSendEgtpTnlMgmtReq
1157 * Builds and sends tunnel management request to EGTP
1159 * @params[in] Action
1160 * Local tunnel endpoint id
1161 * Remote tunnel endpoint id
1162 * @return ROK - success
1165 * ****************************************************************/
1167 uint8_t duSendEgtpTnlMgmtReq(uint8_t action, uint32_t teIdTobeMod, GtpTnlCfg *ueCbTnlCfg)
1173 DU_LOG("\nDEBUG --> DU_APP : Sending EGTP tunnel management request for teId [%d]", ueCbTnlCfg->teId);
1175 /* ADD/MOD/DEL per tunnel */
1176 tnlEvt.action = action;
1177 tnlEvt.remTeid = ueCbTnlCfg->teId;
1178 if(action != EGTP_TNL_MGMT_ADD)
1180 tnlEvt.lclTeid = teIdTobeMod;
1184 tnlEvt.lclTeid = ueCbTnlCfg->teId;
1186 duFillEgtpPst(&pst, EVTTNLMGMTREQ);
1187 ret = egtpTnlMgmtReq(&pst, tnlEvt);
1191 /*******************************************************************
1193 * @brief Handles Tunnel management confirm
1197 * Function : duHdlEgtpTnlMgmtCfm
1200 * Handles tunnel management confirm received from Egtp
1202 * @params[in] Tunnel Event
1203 * @return ROK - success
1206 * ****************************************************************/
1207 uint8_t duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm)
1211 if(tnlEvtCfm.cfmStatus.status == LCM_PRIM_OK)
1213 DU_LOG("\nDEBUG --> DU_APP: Tunnel management confirm OK");
1217 DU_LOG("\nERROR --> DU_APP: Tunnel management failed");
1224 /*******************************************************************
1226 * @brief Sends UL user data over to EGTP
1230 * Function : duSendEgtpDatInd
1232 * Functionality: Sends UL user data over to EGTP
1234 * @params[in] UL data buffer
1235 * @return ROK - success
1238 * ****************************************************************/
1239 uint8_t duSendEgtpDatInd(Buffer *mBuf)
1243 /* Fill EGTP header */
1244 egtpMsg.msgHdr.msgType = EGTPU_MSG_GPDU;
1245 egtpMsg.msgHdr.nPdu.pres = FALSE;
1246 egtpMsg.msgHdr.seqNum.pres = FALSE;
1247 egtpMsg.msgHdr.extHdr.udpPort.pres = FALSE;
1248 egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
1249 egtpMsg.msgHdr.teId = 1;
1252 egtpHdlDatInd(egtpMsg);
1258 /**************************************************************************
1259 * @brief Function to send configs to SCH
1263 * Function : duSendSchCfg
1266 * Sends general config to Scheduler via MAC layer
1269 * @return ROK - success
1272 ***************************************************************************/
1273 uint8_t duSendSchCfg()
1276 RgSchInstCfg *cfg = NULLP;
1279 DU_SET_ZERO(&pst, sizeof(Pst));
1280 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
1282 cfg = &(rgMngmt.t.cfg.s.schInstCfg);
1284 /* Filling of Instance Id */
1285 cfg->instId = DEFAULT_CELLS + 1;
1286 /* Filling of Gen config */
1287 cfg->genCfg.mem.region = MAC_MEM_REGION;
1288 cfg->genCfg.mem.pool = MAC_POOL;
1289 cfg->genCfg.tmrRes = 10;
1292 cfg->genCfg.forceCntrlSrbBoOnPCel = FALSE;
1293 cfg->genCfg.isSCellActDeactAlgoEnable = TRUE;
1295 cfg->genCfg.startCellId = 1;
1296 cfg->genCfg.lmPst.dstProcId = DU_PROC;
1297 cfg->genCfg.lmPst.srcProcId = DU_PROC;
1298 cfg->genCfg.lmPst.dstEnt = ENTDUAPP;
1299 cfg->genCfg.lmPst.dstInst = DU_INST;
1300 cfg->genCfg.lmPst.srcEnt = ENTMAC;
1301 cfg->genCfg.lmPst.srcInst = DEFAULT_CELLS + 1;
1302 cfg->genCfg.lmPst.prior = PRIOR0;
1303 cfg->genCfg.lmPst.route = RTESPEC;
1304 cfg->genCfg.lmPst.region = MAC_MEM_REGION;
1305 cfg->genCfg.lmPst.pool = MAC_POOL;
1306 cfg->genCfg.lmPst.selector = ODU_SELECTOR_LC;
1309 rgMngmt.hdr.msgType = TCFG;
1310 rgMngmt.hdr.entId.ent = ENTMAC;
1311 rgMngmt.hdr.entId.inst = DU_INST;
1312 rgMngmt.hdr.elmId.elmnt = STSCHINST;
1313 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
1314 rgMngmt.hdr.response.mem.pool = MAC_POOL;
1317 pst.selector = ODU_SELECTOR_LC;
1318 pst.srcEnt = ENTDUAPP;
1319 pst.dstEnt = ENTMAC;
1320 pst.dstProcId = DU_PROC;
1321 pst.srcProcId = DU_PROC;
1322 pst.srcInst = DU_INST;
1324 pst.region = duCb.init.region;
1325 pst.event = (Event) EVTMACSCHGENCFGREQ;
1327 DU_LOG("\nDEBUG --> DU_APP : MAC Sch Cfg sent");
1329 /* Send the request to MAC */
1330 cmPkLrgSchCfgReq(&pst, &rgMngmt);
1336 /**************************************************************************
1337 * @brief Function to configure SCTP params and
1338 * responsible for F1 and E2 interfaces
1342 * Function : duLayerConfigComplete
1345 * Configures SCTP Params and responsible for handling
1346 * F1 and E2 interface.
1349 * @return ROK - success
1352 ***************************************************************************/
1353 uint8_t duLayerConfigComplete()
1357 DU_LOG("\nINFO --> DU_APP : Configuring all Layer is complete");
1359 if((ret = duSctpCfgReq(duCfgParam.sctpParams)) != ROK)
1361 DU_LOG("\nERROR --> DU_APP : Failed configuring Sctp Params");
1364 if((ret = duSctpAssocReq(F1_INTERFACE)) != ROK)
1366 DU_LOG("\nERROR --> DU_APP : Failed to send AssocReq F1");
1369 if((ret = duSctpAssocReq(E2_INTERFACE)) != ROK)
1371 DU_LOG("\nERROR --> DU_APP : Failed to send AssocReq E2");
1378 /**************************************************************************
1379 * @brief Function to handle SCH Config Confirm from MAC
1383 * Function : duHdlSchCfgComplete
1386 * Handles Scheduler Gen Config Confirm from MAC
1388 * @param[in] Pst *pst, Post structure of the primitive.
1389 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
1390 * @return ROK - success
1393 ***************************************************************************/
1394 uint8_t duHdlSchCfgComplete(Pst *pst, RgMngmt *cfm)
1396 if (cfm->cfm.status == LCM_PRIM_OK)
1398 switch (cfm->hdr.elmId.elmnt)
1402 DU_LOG("\nDEBUG --> DU_APP : Received SCH CFG CFM at DU APP");
1409 duLayerConfigComplete();
1410 duBuildEgtpCfgReq();
1414 /**************************************************************************
1415 * @brief Function to fill and send MacCellconfig
1419 * Function : duBuildAndSendMacCellCfg
1422 * Initiates MAC Configs towards MAC
1425 * @return ROK - success
1428 ***************************************************************************/
1429 uint8_t duBuildAndSendMacCellCfg(uint16_t cellId)
1432 MacCellCfg *duMacCellCfg = NULLP;
1434 DU_ALLOC_SHRABL_BUF(duMacCellCfg, sizeof(MacCellCfg));
1435 if(duMacCellCfg == NULLP)
1440 /* store the address in the duCellCb so that we can free on confirm msg */
1441 duCb.actvCellLst[cellId-1]->duMacCellCfg = duMacCellCfg;
1443 /* copy the mac config structure from duCfgParams */
1444 memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
1447 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_CONFIG_REQ);
1449 /* Send MAC cell config to MAC */
1450 return (*packMacCellCfgOpts[pst.selector])(&pst, duMacCellCfg);
1453 /**************************************************************************
1454 * @brief Function to Handle MAC cell config confirm
1458 * Function : duHandleMacCellCfgCfm
1461 * Initiates general Configs towards MAC
1464 * @return ROK - success
1467 ***************************************************************************/
1468 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
1470 uint8_t actvCellIdx = 0;
1473 for(actvCellIdx = 0; actvCellIdx < MAX_NUM_CELL; actvCellIdx++)
1475 if(macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId)
1477 duCb.actvCellLst[actvCellIdx]->duMacCellCfg = NULLP;
1480 if(macCellCfgCfm->rsp == ROK)
1482 /* Build and send GNB-DU config update */
1483 ret = BuildAndSendDUConfigUpdate();
1485 /* Build and Send Cell Start Req to MAC */
1486 ret = duBuildAndSendMacCellStart();
1490 /* TODO : Action to be taken if cell configuration fails.
1491 * Should CU be informed? */
1493 DU_LOG("\nERROR --> DU_APP : Mac cell cfg failed");
1499 /*******************************************************************
1501 * @brief Builds and sends cell start request to MAC
1505 * Function : duBuildAndSendMacCellStart
1508 * Builds and sends cell start request to MAC
1511 * @return ROK - success
1514 * ****************************************************************/
1515 uint8_t duBuildAndSendMacCellStart()
1518 OduCellId *cellId = NULL;
1520 DU_LOG("\nINFO --> DU APP : Building and Sending cell start request to MAC");
1522 /* Send Cell Start Request to MAC */
1523 DU_ALLOC_SHRABL_BUF(cellId, sizeof(OduCellId));
1526 DU_LOG("\nERROR --> DU APP : Memory alloc failed while building cell start request");
1530 for(uint8_t id = 0; id < duCb.numActvCells; id++)
1532 if(duCb.actvCellLst[id])
1534 cellId->cellId = duCb.actvCellLst[id]->cellId;
1537 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START);
1539 return (*packMacCellStartOpts[pst.selector])(&pst, cellId);
1545 /*******************************************************************
1547 * @brief Builds and sends cell stop request to MAC
1551 * Function : duBuildAndSendMacCellStop
1554 * Builds and sends cell stop request to MAC
1557 * @return ROK - success
1560 * ****************************************************************/
1561 uint8_t duBuildAndSendMacCellStop()
1564 OduCellId *cellId = NULL;
1566 DU_LOG("\nINFO --> DU APP : Building and Sending cell stop request to MAC");
1568 /* Send Cell Stop Request to MAC */
1569 DU_ALLOC_SHRABL_BUF(cellId, sizeof(OduCellId));
1572 DU_LOG("\nERROR --> DU APP : Memory alloc failed while building cell stop request");
1575 cellId->cellId = duCb.actvCellLst[0]->cellId;
1578 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_STOP);
1580 return (*packMacCellStopOpts[pst.selector])(&pst, cellId);
1583 /*******************************************************************
1585 * @brief Handles stop indication from MAC
1589 * Function : duHandleStopInd
1592 * Handles stop indication from MAC
1594 * @params[in] Post structure pointer
1595 * @return ROK - success
1598 * ****************************************************************/
1599 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId)
1601 DuCellCb *cellCb = NULLP;
1603 if(cellId->cellId <=0 || cellId->cellId > MAX_NUM_CELL)
1605 DU_LOG("\nERROR --> DU APP : Invalid Cell Id %d in duHandleStopInd()", cellId->cellId);
1608 if(duGetCellCb(cellId->cellId, &cellCb) != ROK)
1611 if((cellCb->cellStatus == ACTIVATED))
1613 DU_LOG("\nINFO --> DU APP : 5G-NR Cell %d is DOWN", cellId->cellId);
1614 cellCb->cellStatus = DELETION_IN_PROGRESS;
1617 DU_LOG("\nINFO --> DU APP : Raise cell down alarm for cell id=%d", cellId->cellId);
1618 raiseCellAlrm(CELL_DOWN_ALARM_ID, cellId->cellId);
1622 if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
1623 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellId, sizeof(OduCellId));
1625 cellCb->cellStatus = CELL_OUT_OF_SERVICE; //TODO: cell status must be set to OOS after all UE and cell cleanup which is not
1631 /*******************************************************************
1633 * @brief Handles slot indication from MAC
1637 * Function : duHandleUlCcchInd
1640 * Handles UL CCCH indication from MAC
1642 * @params[in] Post structure pointer
1643 * UL CCCH Ind pointer
1644 * @return ROK - success
1647 * ****************************************************************/
1648 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
1651 DU_LOG("\nINFO --> DU APP : UL CCCH Indication received");
1653 return (duProcUlCcchInd(ulCcchIndInfo));
1656 /*******************************************************************
1658 * @brief Process UL RRC Message from RLC
1662 * Function : DuProcRlcUlRrcMsgTrans
1664 * Functionality: Process UL RRC Message from RLC
1666 * @params[in] Post structure
1667 * UL RRC Message Info
1668 * @return ROK - success
1671 * ****************************************************************/
1672 uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
1674 DuCellCb *cellCb = NULLP;
1677 if(duGetCellCb(ulRrcMsgInfo->cellId, &cellCb) != ROK)
1679 if(ulRrcMsgInfo->ueIdx > 0)
1681 ueCb = cellCb->ueCb[ulRrcMsgInfo->ueIdx -1];
1684 BuildAndSendULRRCMessageTransfer(ueCb, ulRrcMsgInfo->lcId, ulRrcMsgInfo->msgLen, \
1685 ulRrcMsgInfo->rrcMsg);
1687 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo->rrcMsg, ulRrcMsgInfo->msgLen);
1688 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo, sizeof(RlcUlRrcMsgInfo));
1693 /*******************************************************************
1695 * @brief Process RRC delivery report from RLC
1699 * Function : DuProcRlcRrcDeliveryReport
1701 * Functionality: Process RRC delivery Message from RLC
1703 * @params[in] Post structure
1704 * UL RRC Message Info
1705 * @return ROK - success
1708 * ****************************************************************/
1709 uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport)
1711 DuCellCb *cellCb = NULLP;
1713 uint8_t ret = RFAILED;
1715 if(duGetCellCb(rrcDeliveryReport->cellId, &cellCb) != ROK)
1718 ueCb = cellCb->ueCb[rrcDeliveryReport->ueIdx -1];
1719 ret = BuildAndSendRrcDeliveryReport(ueCb.gnbCuUeF1apId, ueCb.gnbDuUeF1apId,rrcDeliveryReport);
1721 DU_FREE_SHRABL_BUF(pst->region, pst->pool, rrcDeliveryReport, sizeof(RrcDeliveryReport));
1725 /*******************************************************************
1727 * @brief Process UL user data from RLC
1731 * Function : DuProcRlcUlUserDataTrans
1733 * Functionality: Process UL user data from RLC
1735 * @params[in] Post structure
1737 * @return ROK - success
1740 * ****************************************************************/
1741 uint8_t DuProcRlcUlUserDataTrans(Pst *pst, RlcUlUserDatInfo *ulUserData)
1747 DU_LOG("\nDEBUG --> DU APP : Received UL user data");
1749 /* Fill EGTP header */
1750 egtpMsg.msgHdr.msgType = EGTPU_MSG_GPDU;
1751 egtpMsg.msgHdr.nPdu.pres = FALSE;
1752 egtpMsg.msgHdr.seqNum.pres = FALSE;
1753 egtpMsg.msgHdr.extHdr.udpPort.pres = FALSE;
1754 egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
1756 /* Fetch EGTP tunnel info */
1757 for(rbIdx = 0; rbIdx < duCb.numDrb; rbIdx++)
1759 if((duCb.upTnlCfg[rbIdx] != NULLP) && (duCb.upTnlCfg[rbIdx]->drbId == ulUserData->rbId))
1761 if(duCb.upTnlCfg[rbIdx]->tnlCfg1)
1763 egtpMsg.msgHdr.teId = duCb.upTnlCfg[rbIdx]->tnlCfg1->teId; /*As we are supporting only 1 tunnel per DRB*/
1769 if (ODU_GET_MSG_BUF(DU_APP_MEM_REGION, DU_POOL, &mBuf) != ROK)
1771 DU_LOG("\nERROR --> DU APP : Failed to allocated buffer memory in DuProcRlcUlUserDataTrans");
1772 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulUserData->userData, ulUserData->msgLen);
1773 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulUserData, sizeof(RlcUlUserDatInfo));
1776 oduCpyFixBufToMsg(ulUserData->userData, mBuf, ulUserData->msgLen);
1777 ODU_PRINT_MSG(mBuf, 0, 0);
1779 egtpHdlDatInd(egtpMsg);
1781 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulUserData->userData, ulUserData->msgLen);
1782 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulUserData, sizeof(RlcUlUserDatInfo));
1786 /**********************************************************************
1788 **********************************************************************/