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"
43 uint8_t numRlcDlSaps = 0;
45 uint8_t numRlcMacSaps = 0;
47 uint8_t macCfgInst = 0;
49 extern DuCfgParams duCfgParam;
50 extern uint8_t packRlcConfigReq(Pst *pst, RlcMngmt *cfg);
51 extern uint8_t cmPkLkwCntrlReq(Pst *pst, RlcMngmt *cfg);
52 extern uint8_t cmPkLrgCfgReq(Pst *pst, RgMngmt *cfg);
53 extern uint8_t BuildAndSendE2SetupReq();
54 extern uint8_t egtpHdlDatInd(EgtpMsg egtpMsg);
55 extern uint8_t BuildAndSendDUConfigUpdate();
56 extern uint16_t getTransId();
57 extern uint8_t cmPkLrgSchCfgReq(Pst * pst,RgMngmt * cfg);
59 packMacCellCfgReq packMacCellCfgOpts[] =
61 packMacCellCfg, /* packing for loosely coupled */
62 MacProcCellCfgReq, /* packing for tightly coupled */
63 packMacCellCfg, /* packing for light weight loosly coupled */
66 DuMacCellStartReq packMacCellStartReqOpts[] =
68 packMacCellStartReq, /* Loose coupling */
69 MacProcCellStartReq, /* TIght coupling */
70 packMacCellStartReq /* Light weight-loose coupling */
73 DuMacCellStopReq packMacCellStopReqOpts[] =
75 packMacCellStopReq, /* Loose coupling */
76 MacProcCellStopReq, /* TIght coupling */
77 packMacCellStopReq /* Light weight-loose coupling */
80 /**************************************************************************
81 * @brief Function to fill configs required by RLC
85 * Function : duBuildRlcCfg
88 * Initiates general Configs towards RLC
90 * @param[in] Inst Specifies if RLC UL or RLC DL instance
91 * @return ROK - success
94 ***************************************************************************/
95 uint8_t duBuildRlcCfg(Inst inst)
98 RlcGenCfg *genCfg = NULLP;
101 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
102 DU_SET_ZERO(&pst, sizeof(Pst));
104 genCfg = &(rlcMngmt.t.cfg.s.gen);
106 /*----------- Fill General Configuration Parameters ---------*/
107 genCfg->maxUe = duCfgParam.maxUe;
108 genCfg->maxKwuSaps = 2;
109 genCfg->maxUdxSaps = 1;
110 genCfg->rlcMode = (inst == RLC_UL_INST) ?
111 LKW_RLC_MODE_UL : LKW_RLC_MODE_DL;
113 genCfg->maxRguSaps = DEFAULT_CELLS;
115 /*----------- Fill lmPst
116 * Parameters ---------*/
117 genCfg->lmPst.dstProcId = DU_PROC;
118 genCfg->lmPst.srcProcId = DU_PROC;
119 genCfg->lmPst.dstEnt = ENTDUAPP;
120 genCfg->lmPst.dstInst = DU_INST;
121 genCfg->lmPst.srcEnt = ENTRLC;
122 genCfg->lmPst.srcInst = inst;
123 genCfg->lmPst.prior = PRIOR0;
124 genCfg->lmPst.route = RTESPEC;
125 genCfg->lmPst.region = (inst == RLC_UL_INST) ?
126 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
127 genCfg->lmPst.pool = RLC_POOL;
128 genCfg->lmPst.selector = ODU_SELECTOR_LC;
131 rlcMngmt.hdr.msgType = TCFG;
132 rlcMngmt.hdr.msgLen = 0;
133 rlcMngmt.hdr.entId.ent = ENTRLC;
134 rlcMngmt.hdr.entId.inst = (Inst)0;
135 rlcMngmt.hdr.elmId.elmnt = STGEN;
136 rlcMngmt.hdr.seqNmb = 0;
137 rlcMngmt.hdr.version = 0;
138 rlcMngmt.hdr.transId = 0;
139 rlcMngmt.hdr.response.prior = PRIOR0;
140 rlcMngmt.hdr.response.route = RTESPEC;
141 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
142 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
143 rlcMngmt.hdr.response.mem.pool = DU_POOL;
144 rlcMngmt.hdr.response.selector = ODU_SELECTOR_LC;
147 pst.selector = ODU_SELECTOR_LC;
148 pst.srcEnt = ENTDUAPP;
151 pst.dstProcId = DU_PROC;
152 pst.srcProcId = DU_PROC;
153 pst.region = duCb.init.region;
155 DU_LOG("\nDU_APP : RLC Gen Cfg Req sent for inst %d", inst);
157 /* Send the request to RLC */
158 packRlcConfigReq(&pst, &rlcMngmt);
163 /**************************************************************************
164 * @brief Function to fill configs required by RLC
168 * Function : duBuildRlcLsapCfg
171 * Initiates general Configs towards RLC
173 * @param[in] Inst Specifies if RLC UL or RLC DL instance
174 * @return ROK - success
177 ***************************************************************************/
178 uint8_t duBuildRlcLsapCfg(Ent ent, Inst inst, uint8_t lsapInst)
182 RlcSapCfg *lSap = NULLP;
185 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
186 DU_SET_ZERO(&pst, sizeof(Pst));
189 rlcMngmt.hdr.msgType = TCFG;
190 rlcMngmt.hdr.entId.ent = ENTRLC;
191 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
192 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
194 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
197 pst.selector = ODU_SELECTOR_LC;
198 pst.srcEnt = ENTDUAPP;
200 pst.dstProcId = DU_PROC;
202 pst.srcProcId = DU_PROC;
203 pst.region = duCb.init.region;
204 lSap = &(rlcMngmt.t.cfg.s.sap);
206 lSap->mem.region = (inst == RLC_UL_INST) ?
207 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
208 lSap->mem.pool = RLC_POOL;
210 lSap->bndTmrIntvl = 10;
211 lSap->priority = PRIOR0;
212 lSap->route = RTESPEC;
215 lSap->procId = DU_PROC;
217 lSap->inst = lsapInst;
218 lSap->sapId = lsapInst; /* SapId will be stored as suId in MAC */
219 lSap->selector = (inst == RLC_UL_INST) ? ODU_SELECTOR_LWLC : ODU_SELECTOR_TC;
220 rlcMngmt.hdr.elmId.elmnt = STRGUSAP;
221 DU_LOG("\nDU_APP : RLC MAC Lower Sap Cfg Req sent for inst %d", inst);
226 lSap->procId = DU_PROC;
228 lSap->inst = (inst == RLC_UL_INST) ?
229 RLC_DL_INST : RLC_UL_INST;
231 lSap->selector = ODU_SELECTOR_LC;
232 rlcMngmt.hdr.elmId.elmnt = STUDXSAP;
233 DU_LOG("\nDU_APP : RLC DL/UL Lower Sap Cfg Req sent for inst %d", inst);
236 packRlcConfigReq(&pst, &rlcMngmt);
240 /**************************************************************************
241 * @brief Function to fill configs required by RLC
245 * Function : duBuildRlcUsapCfg
248 * Initiates general Configs towards RLC
250 * @param[in] Inst Specifies if RLC UL or RLC DL instance
251 * @return ROK - success
254 ***************************************************************************/
255 uint8_t duBuildRlcUsapCfg(uint8_t elemId, Ent ent, Inst inst)
258 RlcSapCfg *uSap = NULLP;
261 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
262 DU_SET_ZERO(&pst, sizeof(Pst));
264 uSap = &(rlcMngmt.t.cfg.s.sap);
266 uSap->selector = ODU_SELECTOR_LC;
267 uSap->mem.region = (inst == RLC_UL_INST) ?
268 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
269 uSap->mem.pool = RLC_POOL;
272 uSap->procId = DU_PROC;
276 uSap->inst = (inst == RLC_UL_INST) ?
277 RLC_DL_INST : RLC_UL_INST;
278 uSap->bndTmrIntvl = 1000;
279 uSap->priority = PRIOR0;
280 uSap->route = RTESPEC;
283 rlcMngmt.hdr.msgType = TCFG;
284 rlcMngmt.hdr.entId.ent = ENTRLC;
285 rlcMngmt.hdr.elmId.elmnt = STUDXSAP;
286 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
287 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
289 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
292 pst.selector = ODU_SELECTOR_LC;
293 pst.srcEnt = ENTDUAPP;
295 pst.dstProcId = DU_PROC;
297 pst.srcProcId = DU_PROC;
298 pst.region = duCb.init.region;
300 DU_LOG("\nDU_APP : RLC Kwu Upper Sap Cfg Req sent for inst %d", inst);
301 packRlcConfigReq(&pst, &rlcMngmt);
306 /**************************************************************************
307 * @brief Function to populate internal DS of DU APP
311 * Function : duProcCfgComplete
314 * Populates internal data structures of DU APP after
315 * receiving configurations.
318 * @return ROK - success
321 ***************************************************************************/
322 uint8_t duProcCfgComplete()
325 static uint16_t cellId = 0;
327 for(idx=0; idx< DEFAULT_CELLS; idx++)
329 DuCellCb *cell = NULLP;
330 DU_ALLOC(cell, sizeof(DuCellCb))
333 DU_LOG("\nDU_APP : Memory Allocation failed in duProcCfgComplete");
340 memset(cell, 0, sizeof(DuCellCb));
341 cell->cellId = ++cellId;
342 cell->cellInfo.nrEcgi.plmn.mcc[0] = PLMN_MCC0;
343 cell->cellInfo.nrEcgi.plmn.mcc[1] = PLMN_MCC1;
344 cell->cellInfo.nrEcgi.plmn.mcc[2] = PLMN_MCC2;
345 cell->cellInfo.nrEcgi.plmn.mnc[0] = PLMN_MNC0;
346 cell->cellInfo.nrEcgi.plmn.mnc[1] = PLMN_MNC1;
347 cell->cellInfo.nrEcgi.plmn.mnc[2] = PLMN_MNC2;
348 cell->cellInfo.nrEcgi.cellId = NR_CELL_ID;
349 cell->cellInfo.nrPci = NR_PCI;
350 cell->cellInfo.fiveGsTac = DU_TAC;
351 for(idx1=0; idx1<MAX_PLMN; idx1++)
353 cell->cellInfo.plmn[idx1].mcc[0] = PLMN_MCC0;
354 cell->cellInfo.plmn[idx1].mcc[1] = PLMN_MCC1;
355 cell->cellInfo.plmn[idx1].mcc[2] = PLMN_MCC2;
356 cell->cellInfo.plmn[idx1].mnc[0] = PLMN_MNC0;
357 cell->cellInfo.plmn[idx1].mnc[1] = PLMN_MNC1;
358 cell->cellInfo.plmn[idx1].mnc[2] = PLMN_MNC2;
360 cell->cellInfo.maxUe = duCfgParam.maxUe;
361 cell->cellStatus = CELL_OUT_OF_SERVICE;
362 nci = (uint16_t)cell->cellInfo.nrEcgi.cellId;
364 duCb.cfgCellLst[nci-1] = cell;
370 //Start layer configs
371 ret = duSendRlcUlCfg();
375 /**************************************************************************
376 * @brief Function to invoke DU Layer Configs
380 * Function : duSendRlcUlCfg
383 * Initiates Configs towards layers of DU
386 * @return ROK - success
389 ***************************************************************************/
390 uint8_t duSendRlcUlCfg()
394 duBuildRlcCfg((Inst)RLC_UL_INST);
395 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
397 duBuildRlcLsapCfg(ENTMAC, (Inst)RLC_UL_INST, cellIdx);
399 duBuildRlcLsapCfg(ENTRLC, (Inst)RLC_UL_INST, 0);
404 /**************************************************************************
405 * @brief Function to invoke DU Layer Configs
409 * Function : duSendRlcDlCfg
412 * Initiates Configs towards layers of DU
415 * @return ROK - success
418 ***************************************************************************/
419 uint8_t duSendRlcDlCfg()
423 duBuildRlcCfg((Inst)RLC_DL_INST);
424 duBuildRlcUsapCfg(STUDXSAP, ENTRLC, (Inst)RLC_DL_INST);
425 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
427 duBuildRlcLsapCfg(ENTMAC, (Inst)RLC_DL_INST, cellIdx);
432 /**************************************************************************
433 * @brief Function to handle Config Confirm from RLC
437 * Function : DuHdlRlcCfgComplete
440 * Handles Gen Config Confirm from RLC
442 * @param[in] Pst *pst, Post structure of the primitive.
443 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC
444 * @return ROK - success
447 ***************************************************************************/
448 uint8_t DuHdlRlcCfgComplete(Pst *pst, RlcMngmt *cfm)
451 if (pst->srcInst == RLC_UL_INST)
453 ret = duProcRlcUlCfgComplete(pst, cfm);
457 ret = duProcRlcDlCfgComplete(pst, cfm);
462 /**************************************************************************
463 * @brief Function to handle Control Config Confirm from RLC
467 * Function : duHdlRlcCntrlCfgComplete
470 * Handles Control Config Confirm from RLC
472 * @param[in] Pst *pst, Post structure of the primitive.
473 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC
474 * @return ROK - success
477 ***************************************************************************/
478 uint8_t duHdlRlcCntrlCfgComplete(Pst *pst, RlcMngmt *cntrl)
482 if (cntrl->cfm.status == LCM_PRIM_OK)
484 switch (cntrl->hdr.elmId.elmnt)
488 if (pst->srcInst == RLC_DL_INST)
490 DU_LOG("\nDU_APP : BIND OF RLC DL TO MAC (RGU) SAP SUCCESSFUL");
492 if(macCfgInst < DEFAULT_CELLS)
495 duBindUnbindRlcToMacSap((Inst) RLC_DL_INST, ABND);
499 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
504 DU_LOG("\nDU_APP : BIND OF RLC UL TO MAC (RGU) SAP SUCCESSFUL");
506 if(macCfgInst < DEFAULT_CELLS)
508 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
522 /**************************************************************************
523 * @brief Function to handle Config Confirm from RLC UL
527 * Function : duHdlRlcUlCfgComplete
530 * Handles Config Confirm from RLC UL
532 * @param[in] Pst *pst, Post structure of the primitive.
533 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC UL
534 * @return ROK - success
537 ***************************************************************************/
538 uint8_t duProcRlcUlCfgComplete(Pst *pst, RlcMngmt *cfm)
542 DU_LOG("\nDU_APP : RLC UL Cfg Status %d", cfm->cfm.status);
543 if (cfm->cfm.status == LCM_PRIM_OK)
545 switch(cfm->hdr.elmId.elmnt)
549 rlcUlCfg |= RLC_GEN_CFG;
555 if(numRlcMacSaps == DEFAULT_CELLS)
557 rlcUlCfg |= RLC_MAC_SAP_CFG;
564 rlcUlCfg |= RLC_UDX_SAP_CFG;
571 DU_LOG("\nDU_APP : RLC UL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
572 if(rlcUlCfg == DU_RLC_UL_CONFIGURED)
576 //Start configuration of RLC DL
583 DU_LOG("\nDU_APP : Config confirm NOK from RLC UL");
589 /**************************************************************************
590 * @brief Function to handle Config Confirm from RLC DL
594 * Function : duHdlRlcDlCfgComplete
597 * Handles Config Confirm from RLC DL
599 * @param[in] Pst *pst, Post structure of the primitive.
600 * @param[in] RlcMngmt *cfm, Unpacked primitive info received from RLC DL
601 * @return ROK - success
604 ***************************************************************************/
605 uint8_t duProcRlcDlCfgComplete(Pst *pst, RlcMngmt *cfm)
607 DU_LOG("\nDU_APP : RLC DL Cfg Status %d", cfm->cfm.status);
608 if (cfm->cfm.status == LCM_PRIM_OK)
610 switch(cfm->hdr.elmId.elmnt)
614 rlcDlCfg |= RLC_GEN_CFG;
620 if(numRlcMacSaps == DEFAULT_CELLS)
622 rlcDlCfg |= RLC_MAC_SAP_CFG;
629 rlcDlCfg |= RLC_UDX_SAP_CFG;
637 DU_LOG("\nDU_APP : RLC DL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
638 if(rlcDlCfg == DU_RLC_DL_CONFIGURED)
641 //Start configuration of MAC
648 DU_LOG("\nDU_APP : Config confirm NOK from RLC DL");
653 /**************************************************************************
654 * @brief Function to send configs to MAC
658 * Function : duSendMacCfg
661 * Initiates Configs towards MAC layer
664 * @return ROK - success
667 ***************************************************************************/
668 uint8_t duSendMacCfg()
671 duBuildMacUsapCfg(RLC_UL_INST);
672 duBuildMacUsapCfg(RLC_DL_INST);
677 /**************************************************************************
678 * @brief Function to fill gen config required by MAC
682 * Function : duBuildMacGenCfg
685 * Initiates general Configs towards MAC
688 * @return ROK - success
691 ***************************************************************************/
692 uint8_t duBuildMacGenCfg()
695 RgGenCfg *genCfg=NULLP;
698 DU_SET_ZERO(&pst, sizeof(Pst));
699 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
701 genCfg = &(rgMngmt.t.cfg.s.genCfg);
703 /*----------- Fill General Configuration Parameters ---------*/
704 genCfg->mem.region = MAC_MEM_REGION;
705 genCfg->mem.pool = MAC_POOL;
707 genCfg->numRguSaps = 2;
709 genCfg->lmPst.dstProcId = DU_PROC;
710 genCfg->lmPst.srcProcId = DU_PROC;
711 genCfg->lmPst.dstEnt = ENTDUAPP;
712 genCfg->lmPst.dstInst = 0;
713 genCfg->lmPst.srcEnt = ENTMAC;
714 genCfg->lmPst.srcInst = macCfgInst;
715 genCfg->lmPst.prior = PRIOR0;
716 genCfg->lmPst.route = RTESPEC;
717 genCfg->lmPst.region = MAC_MEM_REGION;
718 genCfg->lmPst.pool = MAC_POOL;
719 genCfg->lmPst.selector = ODU_SELECTOR_LC;
722 rgMngmt.hdr.msgType = TCFG;
723 rgMngmt.hdr.msgLen = 0;
724 rgMngmt.hdr.entId.ent = ENTMAC;
725 rgMngmt.hdr.entId.inst = (Inst)0;
726 rgMngmt.hdr.elmId.elmnt = STGEN;
727 rgMngmt.hdr.seqNmb = 0;
728 rgMngmt.hdr.version = 0;
729 rgMngmt.hdr.transId = 0;
731 rgMngmt.hdr.response.prior = PRIOR0;
732 rgMngmt.hdr.response.route = RTESPEC;
733 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
734 rgMngmt.hdr.response.mem.pool = MAC_POOL;
735 rgMngmt.hdr.response.selector = ODU_SELECTOR_LC;
738 pst.selector = ODU_SELECTOR_LC;
739 pst.srcEnt = ENTDUAPP;
741 pst.dstInst = macCfgInst;
742 pst.dstProcId = DU_PROC;
743 pst.srcProcId = DU_PROC;
744 pst.region = duCb.init.region;
746 DU_LOG("\nDU_APP : MAC Gen Cfg Req sent");
748 /* Send the request to MAC */
749 cmPkLrgCfgReq(&pst, &rgMngmt);
754 /**************************************************************************
755 * @brief Function to fill USAP config required by MAC
759 * Function : duBuildMacUsapCfg
762 * Initiates USAP Configs towards MAC
764 * @param[in] SpId Specifies if RLC UL or RLC DL instance
765 * @return ROK - success
768 ***************************************************************************/
769 uint8_t duBuildMacUsapCfg(SpId sapId)
772 RgUpSapCfg *uSap = NULLP;
775 DU_SET_ZERO(&pst, sizeof(Pst));
776 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
778 uSap = &(rgMngmt.t.cfg.s.rguSap);
780 uSap->mem.region = MAC_MEM_REGION;
781 uSap->mem.pool = MAC_POOL;
784 uSap->procId = DU_PROC;
787 uSap->prior = PRIOR0;
788 uSap->route = RTESPEC;
789 uSap->selector = ODU_SELECTOR_LC ;
792 rgMngmt.hdr.msgType = TCFG;
793 rgMngmt.hdr.entId.ent = ENTMAC;
794 rgMngmt.hdr.entId.inst = (Inst)0;
795 rgMngmt.hdr.elmId.elmnt = STRGUSAP;
796 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
797 rgMngmt.hdr.response.mem.pool = MAC_POOL;
800 pst.selector = ODU_SELECTOR_LC;
801 pst.srcEnt = ENTDUAPP;
803 pst.dstInst = macCfgInst;
804 pst.dstProcId = DU_PROC;
805 pst.srcProcId = DU_PROC;
806 pst.region = duCb.init.region;
808 DU_LOG("\nDU_APP : MAC Rgu USap Cfg Req sent");
810 /* Send the request to MAC */
811 cmPkLrgCfgReq(&pst, &rgMngmt);
816 /**************************************************************************
817 * @brief Function to handle Config Confirm from MAC
821 * Function : duHdlMacCfgComplete
824 * Handles Gen Config Confirm from MAC
826 * @param[in] Pst *pst, Post structure of the primitive.
827 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
828 * @return ROK - success
831 ***************************************************************************/
832 uint8_t duHdlMacCfgComplete(Pst *pst, RgMngmt *cfm)
836 if (cfm->cfm.status == LCM_PRIM_OK)
838 switch (cfm->hdr.elmId.elmnt)
842 macCfg |= MAC_GEN_CFG;
847 macCfg |= MAC_SAP_CFG;
854 DU_LOG("\nDU_APP : MAC Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
855 if(macCfg == MAC_CONFIGURED && numRlcMacSaps == MAX_MAC_SAP)
858 DU_LOG("\nDU_APP : Completed sending Configs");
860 duBindUnbindRlcToMacSap(RLC_DL_INST, ABND);
866 DU_LOG("\nDU_APP : Config confirm NOK from MAC");
872 /**************************************************************************
873 * @brief Function to bind/unbind RLC to MAC SAP
877 * Function : duBindUnbindRlcToMacSap
880 * Initiates Bind/Unbind from RLC to MAC
882 * @param[in] Inst Specifies if RLC UL or RLC DL instance
883 * @param[in] action Specifies if action is bind or unbind
884 * @return ROK - success
887 ***************************************************************************/
888 uint8_t duBindUnbindRlcToMacSap(uint8_t inst, uint8_t action)
890 RlcCntrl *cntrl = NULLP;
894 TRC2(smBindKwToRguSap)
896 DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
897 DU_SET_ZERO(&pst, sizeof(Pst));
901 DU_LOG("\nDU_APP : Cntrl Req to RLC inst %d to bind MAC sap", inst);
905 DU_LOG("\nDU_APP : Cntrl Req to RLC inst %d to unbind MAC sap", inst);
907 cntrl = &(rlcMngmt.t.cntrl);
909 cntrl->action = action;
910 cntrl->subAction = DU_ZERO_VAL;
911 cntrl->s.sapCntrl.suId = macCfgInst;
912 cntrl->s.sapCntrl.spId = inst;
915 rlcMngmt.hdr.msgType = TCNTRL;
916 rlcMngmt.hdr.entId.ent = ENTRLC;
917 rlcMngmt.hdr.entId.inst = inst;
918 rlcMngmt.hdr.elmId.elmnt = 186; /* ambiguous defines in lkw.h and lrg.h so direct hardcoded*/
919 rlcMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
920 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
921 rlcMngmt.hdr.response.mem.pool = RLC_POOL;
924 pst.selector = ODU_SELECTOR_LC;
925 pst.srcEnt = ENTDUAPP;
927 pst.dstProcId = DU_PROC;
929 pst.srcProcId = DU_PROC;
930 pst.region = duCb.init.region;
932 cmPkLkwCntrlReq(&pst, &rlcMngmt);
936 /*******************************************************************
938 * @brief Handles SCTP notifications
942 * Function : duSctpNtfyHdl
945 * Handles SCTP notification
947 * @params[in] Message Buffer
950 * @return ROK - success
953 * ****************************************************************/
955 uint8_t duSctpNtfyHdl(Buffer *mBuf, CmInetSctpNotification *ntfy)
957 if(f1Params.assocId == ntfy->u.assocChange.assocId)
959 if(BuildAndSendF1SetupReq() != ROK)
964 else if(ricParams.assocId == ntfy->u.assocChange.assocId)
966 if(BuildAndSendE2SetupReq() != ROK)
973 DU_LOG("\nDU_APP : Invalid assocId %d received", ntfy->u.assocChange.assocId);
979 /*******************************************************************
981 * @brief Fills Pst struct for ENTEGTP
985 * Function : duFillEgtpPst
988 * Fills Pst struct for ENTEGTP
991 * @return ROK - success
994 * ****************************************************************/
995 uint8_t duFillEgtpPst(Pst *pst, Event event)
997 memset((uint8_t *)pst, 0, sizeof(Pst));
998 pst->srcEnt = (Ent)ENTDUAPP;
999 pst->srcInst = (Inst)DU_INST;
1000 pst->srcProcId = DU_PROC;
1001 pst->dstEnt = (Ent)ENTEGTP;
1002 pst->dstInst = (Inst)EGTP_INST;
1003 pst->dstProcId = pst->srcProcId;
1005 pst->selector = ODU_SELECTOR_LC;
1012 /*******************************************************************
1014 * @brief Function to configure EGTP
1018 * Function : duBuildEgtpCfgReq
1021 * Function to configure EGTP
1024 * @return ROK - success
1027 * ****************************************************************/
1029 uint8_t duBuildEgtpCfgReq()
1034 DU_LOG("\nDU_APP : Sending EGTP config request");
1036 memset((uint8_t *)&egtpCfg, 0, sizeof(EgtpConfig));
1037 memcpy((uint8_t *)&egtpCfg, (uint8_t *)&duCfgParam.egtpParams, (PTR)sizeof(EgtpConfig));
1039 duFillEgtpPst(&pst, EVTCFGREQ);
1040 packEgtpCfgReq(&pst, egtpCfg);
1045 /*******************************************************************
1047 * @brief Function to configure EGTP
1051 * Function : duBuildEgtpCfgReq
1054 * Function to configure EGTP
1057 * @return ROK - success
1060 * ****************************************************************/
1061 uint8_t duHdlEgtpCfgComplete(CmStatus cfm)
1065 if(cfm.status == LCM_PRIM_OK)
1067 DU_LOG("\nDU_APP : EGTP configuraton complete");
1069 duSendEgtpSrvOpenReq();
1074 DU_LOG("\nDU_APP : EGTP configuraton failed");
1081 /*******************************************************************
1083 * @brief Sends server open request to EGTP
1087 * Function : duSendEgtpSrvOpenReq
1090 * Sends server open request to EGTP
1093 * @return ROK - success
1096 * ****************************************************************/
1098 uint8_t duSendEgtpSrvOpenReq()
1102 DU_LOG("\nDU_APP : Sending EGTP server open request");
1104 duFillEgtpPst(&pst, EVTSRVOPENREQ);
1105 packEgtpSrvOpenReq(&pst);
1110 /*******************************************************************
1112 * @brief Handles server open confirmation
1116 * Function : duHdlEgtpSrvOpenComplete
1119 * Handles server open confirmation
1122 * @return ROK - success
1125 *****************************************************************/
1127 uint8_t duHdlEgtpSrvOpenComplete(CmStatus cfm)
1131 if(cfm.status == LCM_PRIM_OK)
1133 DU_LOG("\nDU_APP : EGTP server opened successfully");
1135 duSendEgtpTnlMgmtReq(EGTP_TNL_MGMT_ADD, EGTP_LCL_TEID, EGTP_REM_TEID);
1140 DU_LOG("\nDU_APP : EGTP server opening failed");
1147 /*******************************************************************
1149 * @brief Sends tunnel management request
1153 * Function : duSendEgtpTnlMgmtReq
1156 * Builds and sends tunnel management request to EGTP
1158 * @params[in] Action
1159 * Local tunnel endpoint id
1160 * Remote tunnel endpoint id
1161 * @return ROK - success
1164 * ****************************************************************/
1166 uint8_t duSendEgtpTnlMgmtReq(uint8_t action, uint32_t lclTeid, uint32_t remTeid)
1171 tnlEvt.action = action;
1172 tnlEvt.lclTeid = lclTeid;
1173 tnlEvt.remTeid = remTeid;
1175 DU_LOG("\nDU_APP : Sending EGTP tunnel management request");
1177 duFillEgtpPst(&pst, EVTTNLMGMTREQ);
1178 packEgtpTnlMgmtReq(&pst, tnlEvt);
1183 /*******************************************************************
1185 * @brief Handles Tunnel management confirm
1189 * Function : duHdlEgtpTnlMgmtCfm
1192 * Handles tunnel management confirm received from Egtp
1194 * @params[in] Tunnel Event
1195 * @return ROK - success
1198 * ****************************************************************/
1199 uint8_t duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm)
1203 if(tnlEvtCfm.cfmStatus.status == LCM_PRIM_OK)
1205 DU_LOG("\nDU_APP : Tunnel management confirm OK");
1208 duSendUeCreateReqToRlc();
1210 duSendEgtpTestData();
1215 DU_LOG("\nDU_APP : Tunnel management failed");
1222 uint8_t duSendEgtpDatInd(Buffer *mBuf)
1226 /* Fill EGTP header */
1227 egtpMsg.msgHdr.msgType = EGTPU_MSG_GPDU;
1228 egtpMsg.msgHdr.nPdu.pres = FALSE;
1229 egtpMsg.msgHdr.seqNum.pres = FALSE;
1230 egtpMsg.msgHdr.extHdr.udpPort.pres = FALSE;
1231 egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
1232 egtpMsg.msgHdr.teId = 1;
1235 egtpHdlDatInd(egtpMsg);
1242 /*******************************************************************
1244 * @brief Simulate UL Data for intial test
1248 * Function : duSendEgtpTestData
1251 * Simulate UL data for initial test
1254 * @return ROK - success
1257 * ****************************************************************/
1258 uint8_t duSendEgtpTestData()
1260 char data[30] = "This is EGTP data from DU";
1265 if(ODU_GET_MSG(DU_APP_MEM_REGION, DU_POOL, &mBuf) == ROK)
1267 if(ODU_ADD_POST_MSG_MULT((Data *)data, datSize, mBuf) != ROK)
1269 DU_LOG("\nDU_APP : ODU_ADD_POST_MSG_MULT failed");
1276 DU_LOG("\nDU_APP : Failed to allocate memory");
1280 /* filling IPv4 header */
1285 ODU_FIND_MSG_LEN(mBuf, &mLen);
1287 memset((uint8_t *)&ipv4Hdr, 0, sizeof(CmIpv4Hdr));
1288 ipv4Hdr.length = CM_IPV4_HDRLEN + mLen;
1289 ipv4Hdr.hdrVer = 0x45;
1291 ipv4Hdr.srcAddr = CM_INET_NTOH_U32(duCfgParam.egtpParams.localIp.ipV4Addr);
1292 ipv4Hdr.destAddr = CM_INET_NTOH_U32(duCfgParam.egtpParams.destIp.ipV4Addr);
1294 /* Packing IPv4 header into buffer */
1295 uint8_t ret, cnt, idx;
1296 Data revPkArray[CM_IPV4_HDRLEN];
1297 Data pkArray[CM_IPV4_HDRLEN];
1299 /* initialize locals */
1301 memset(revPkArray, 0, CM_IPV4_HDRLEN);
1302 memset(pkArray, 0, CM_IPV4_HDRLEN);
1304 /* Pack Header Version */
1305 pkArray[cnt++] = ipv4Hdr.hdrVer;
1308 pkArray[cnt++] = ipv4Hdr.tos;
1310 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.length);
1311 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.length);
1314 pkArray[cnt++] = (Data) GetHiByte(ipv4Hdr.id);
1315 pkArray[cnt++] = (Data) GetLoByte(ipv4Hdr.id);
1318 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.off);
1319 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.off);
1322 pkArray[cnt++] = ipv4Hdr.ttl;
1325 pkArray[cnt++] = ipv4Hdr.proto;
1328 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.chkSum);
1329 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.chkSum);
1331 /* Pack Source Address */
1332 pkArray[cnt++] = (Data)GetHiByte(GetHiWord(ipv4Hdr.srcAddr));
1333 pkArray[cnt++] = (Data)GetLoByte(GetHiWord(ipv4Hdr.srcAddr));
1334 pkArray[cnt++] = (Data)GetHiByte(GetLoWord(ipv4Hdr.srcAddr));
1335 pkArray[cnt++] = (Data)GetLoByte(GetLoWord(ipv4Hdr.srcAddr));
1337 /* Pack Destination Address */
1338 pkArray[cnt++] = (Data)GetHiByte(GetHiWord(ipv4Hdr.destAddr));
1339 pkArray[cnt++] = (Data)GetLoByte(GetHiWord(ipv4Hdr.destAddr));
1340 pkArray[cnt++] = (Data)GetHiByte(GetLoWord(ipv4Hdr.destAddr));
1341 pkArray[cnt++] = (Data)GetLoByte(GetLoWord(ipv4Hdr.destAddr));
1343 for (idx = 0; idx < CM_IPV4_HDRLEN; idx++)
1344 revPkArray[idx] = pkArray[CM_IPV4_HDRLEN - idx -1];
1346 /* this function automatically reverses revPkArray */
1347 ret = ODU_ADD_PRE_MSG_MULT(revPkArray, (MsgLen)cnt, mBuf);
1349 duSendEgtpDatInd(mBuf);
1353 #endif /* EGTP_TEST */
1356 /**************************************************************************
1357 * @brief Function to send configs to SCH
1361 * Function : duSendSchCfg
1364 * Sends general config to Scheduler via MAC layer
1367 * @return ROK - success
1370 ***************************************************************************/
1371 uint8_t duSendSchCfg()
1374 RgSchInstCfg *cfg = NULLP;
1377 DU_SET_ZERO(&pst, sizeof(Pst));
1378 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
1380 cfg = &(rgMngmt.t.cfg.s.schInstCfg);
1382 /* Filling of Instance Id */
1383 cfg->instId = DEFAULT_CELLS + 1;
1384 /* Filling of Gen config */
1385 cfg->genCfg.mem.region = MAC_MEM_REGION;
1386 cfg->genCfg.mem.pool = MAC_POOL;
1387 cfg->genCfg.tmrRes = 10;
1390 cfg->genCfg.forceCntrlSrbBoOnPCel = FALSE;
1391 cfg->genCfg.isSCellActDeactAlgoEnable = TRUE;
1393 cfg->genCfg.startCellId = 1;
1394 cfg->genCfg.lmPst.dstProcId = DU_PROC;
1395 cfg->genCfg.lmPst.srcProcId = DU_PROC;
1396 cfg->genCfg.lmPst.dstEnt = ENTDUAPP;
1397 cfg->genCfg.lmPst.dstInst = DU_INST;
1398 cfg->genCfg.lmPst.srcEnt = ENTMAC;
1399 cfg->genCfg.lmPst.srcInst = DEFAULT_CELLS + 1;
1400 cfg->genCfg.lmPst.prior = PRIOR0;
1401 cfg->genCfg.lmPst.route = RTESPEC;
1402 cfg->genCfg.lmPst.region = MAC_MEM_REGION;
1403 cfg->genCfg.lmPst.pool = MAC_POOL;
1404 cfg->genCfg.lmPst.selector = ODU_SELECTOR_LC;
1407 rgMngmt.hdr.msgType = TCFG;
1408 rgMngmt.hdr.entId.ent = ENTMAC;
1409 rgMngmt.hdr.entId.inst = DU_INST;
1410 rgMngmt.hdr.elmId.elmnt = STSCHINST;
1411 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
1412 rgMngmt.hdr.response.mem.pool = MAC_POOL;
1415 pst.selector = ODU_SELECTOR_LC;
1416 pst.srcEnt = ENTDUAPP;
1417 pst.dstEnt = ENTMAC;
1418 pst.dstProcId = DU_PROC;
1419 pst.srcProcId = DU_PROC;
1420 pst.srcInst = DU_INST;
1422 pst.region = duCb.init.region;
1423 pst.event = (Event) EVTMACSCHGENCFGREQ;
1425 DU_LOG("\nDU_APP : MAC Sch Cfg sent");
1427 /* Send the request to MAC */
1428 cmPkLrgSchCfgReq(&pst, &rgMngmt);
1434 /**************************************************************************
1435 * @brief Function to configure SCTP params and
1436 * responsible for F1 and E2 interfaces
1440 * Function : duLayerConfigComplete
1443 * Configures SCTP Params and responsible for handling
1444 * F1 and E2 interface.
1447 * @return ROK - success
1450 ***************************************************************************/
1451 uint8_t duLayerConfigComplete()
1455 DU_LOG("\nDU_APP : Configuring all Layer is complete");
1457 if((ret = duSctpCfgReq(duCfgParam.sctpParams)) != ROK)
1459 DU_LOG("\nDU_APP : Failed configuring Sctp Params");
1462 if((ret = duSctpAssocReq(F1_INTERFACE)) != ROK)
1464 DU_LOG("\nDU_APP : Failed to send AssocReq F1");
1467 if((ret = duSctpAssocReq(E2_INTERFACE)) != ROK)
1469 DU_LOG("\nDU_APP : Failed to send AssocReq E2");
1476 /**************************************************************************
1477 * @brief Function to handle SCH Config Confirm from MAC
1481 * Function : duHdlSchCfgComplete
1484 * Handles Scheduler Gen Config Confirm from MAC
1486 * @param[in] Pst *pst, Post structure of the primitive.
1487 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
1488 * @return ROK - success
1491 ***************************************************************************/
1492 uint8_t duHdlSchCfgComplete(Pst *pst, RgMngmt *cfm)
1494 if (cfm->cfm.status == LCM_PRIM_OK)
1496 switch (cfm->hdr.elmId.elmnt)
1500 DU_LOG("\nDU_APP : Received SCH CFG CFM at DU APP");
1507 duLayerConfigComplete();
1508 duBuildEgtpCfgReq();
1512 /*******************************************************************
1514 * @brief Sends Slot indication to EGTP
1518 * Function : duSendEgtpSlotInd
1521 * Sends Slot indication to EGTP
1524 * @return ROK - success
1527 * ****************************************************************/
1528 uint8_t duSendEgtpSlotInd()
1532 duFillEgtpPst(&pst, EVTSLOTIND);
1533 packEgtpSlotInd(&pst);
1539 /**************************************************************************
1540 * @brief Function to fill and send MacCellconfig
1544 * Function : duBuildAndSendMacCellCfg
1547 * Initiates MAC Configs towards MAC
1550 * @return ROK - success
1553 ***************************************************************************/
1554 uint8_t duBuildAndSendMacCellCfg()
1557 DU_SET_ZERO(&pst, sizeof(Pst));
1558 MacCellCfg *duMacCellCfg = NULLP;
1560 DU_ALLOC_SHRABL_BUF(duMacCellCfg, sizeof(MacCellCfg));
1561 if(duMacCellCfg == NULLP)
1566 /* store the address in the duCb so that we can free on confirm msg */
1567 duCb.duMacCellCfg = duMacCellCfg;
1569 /* copy the mac config structure from duCfgParams */
1570 memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
1573 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_CONFIG_REQ);
1575 /* Send MAC cell config to MAC */
1576 return (*packMacCellCfgOpts[pst.selector])(&pst, duMacCellCfg);
1579 /**************************************************************************
1580 * @brief Function to Handle MAC cell config confirm
1584 * Function : duHandleMacCellCfgCfm
1587 * Initiates general Configs towards MAC
1590 * @return ROK - success
1593 ***************************************************************************/
1594 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
1596 uint8_t actvCellIdx = 0;
1599 if(macCellCfgCfm->rsp == ROK)
1601 for(actvCellIdx = 0 ; actvCellIdx <duCb.numActvCells ; actvCellIdx++)
1603 if(macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId)
1605 duCb.duMacCellCfg = NULLP;
1606 /* Build and send GNB-DU config update */
1607 ret = BuildAndSendDUConfigUpdate();
1609 /* TODO: Trigger cell start req once cell up slot ind is received*/
1610 /* Build and Send Cell Start Req to MAC */
1611 ret = duBuildAndSendMacCellStartReq();
1618 DU_LOG("\nMac cell cfg failed");
1624 /*******************************************************************
1626 * @brief Handles slot indication from MAC
1630 * Function : duHandleSlotInd
1633 * Handles slot indication from MAC
1635 * @params[in] Post structure pointer
1637 * @return ROK - success
1640 * ****************************************************************/
1641 uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo)
1644 DU_LOG("\nDU APP : Slot Indication received");
1646 if(slotInfo->cellId <=0 || slotInfo->cellId > MAX_NUM_CELL)
1648 DU_LOG("\nDU APP : Invalid Cell Id %d", slotInfo->cellId);
1650 if(!duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd)
1652 duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd = true;
1653 if((duCb.actvCellLst[slotInfo->cellId-1] != NULL) && \
1654 (duCb.actvCellLst[slotInfo->cellId-1]->cellStatus == \
1655 ACTIVATION_IN_PROGRESS))
1657 DU_LOG("\nDU APP : 5G-NR Cell %d is UP", slotInfo->cellId);
1658 duCb.actvCellLst[slotInfo->cellId-1]->cellStatus = ACTIVATED;
1663 /* TODO : Slot Indication to be moved out of EGTP_TEST when
1664 * data path is established */
1666 duSendEgtpSlotInd();
1669 if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
1670 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, slotInfo, sizeof(SlotIndInfo));
1675 /*******************************************************************
1677 * @brief Builds and sends cell start request to MAC
1681 * Function : duBuildAndSendMacCellStartReq
1684 * Builds and sends cell start request to MAC
1687 * @return ROK - success
1690 * ****************************************************************/
1691 uint8_t duBuildAndSendMacCellStartReq()
1694 MacCellStartInfo *cellStartInfo = NULL;
1696 DU_LOG("\nDU APP : Building and Sending cell start request to MAC");
1698 /* Send Cell Start Request to MAC */
1699 DU_ALLOC_SHRABL_BUF(cellStartInfo, sizeof(MacCellStartInfo));
1702 DU_LOG("\nDU APP : Memory alloc failed while building cell start request");
1706 for(uint8_t id = 0; id < MAX_NUM_CELL; id++)
1708 if(duCb.actvCellLst[id])
1710 duCb.actvCellLst[id]->firstSlotIndRcvd = FALSE;
1711 cellStartInfo->cellId = duCb.actvCellLst[id]->cellInfo.nrEcgi.cellId;
1714 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START_REQ);
1716 return (*packMacCellStartReqOpts[pst.selector])(&pst, cellStartInfo);
1722 /*******************************************************************
1724 * @brief Builds and sends cell stop request to MAC
1728 * Function : duBuildAndSendMacCellStopReq
1731 * Builds and sends cell stop request to MAC
1734 * @return ROK - success
1737 * ****************************************************************/
1738 uint8_t duBuildAndSendMacCellStopReq()
1741 MacCellStopInfo *cellStopInfo = NULL;
1743 DU_LOG("\nDU APP : Building and Sending cell stop request to MAC");
1745 /* Send Cell Stop Request to MAC */
1746 DU_ALLOC_SHRABL_BUF(cellStopInfo, sizeof(MacCellStopInfo));
1749 DU_LOG("\nDU APP : Memory alloc failed while building cell stop request");
1752 cellStopInfo->cellId = duCb.actvCellLst[0]->cellId;
1755 FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_STOP_REQ);
1757 return (*packMacCellStopReqOpts[pst.selector])(&pst, cellStopInfo);
1760 /*******************************************************************
1762 * @brief Handles stop indication from MAC
1766 * Function : duHandleStopInd
1769 * Handles stop indication from MAC
1771 * @params[in] Post structure pointer
1772 * @return ROK - success
1775 * ****************************************************************/
1776 uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellStopId)
1778 if(cellStopId->cellId <=0 || cellStopId->cellId > MAX_NUM_CELL)
1780 DU_LOG("\nDU APP : Invalid Cell Id %d", cellStopId->cellId);
1782 if(duCb.actvCellLst[cellStopId->cellId-1] != NULL)
1784 if(duCb.actvCellLst[cellStopId->cellId-1]->firstSlotIndRcvd)
1786 duCb.actvCellLst[cellStopId->cellId-1]->firstSlotIndRcvd = false;
1787 if((duCb.actvCellLst[cellStopId->cellId-1]->cellStatus == \
1790 DU_LOG("\nDU APP : 5G-NR Cell %d is DOWN", cellStopId->cellId);
1791 duCb.actvCellLst[cellStopId->cellId-1]->cellStatus = DELETION_IN_PROGRESS;
1795 if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
1796 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellStopId, sizeof(MacCellStopInfo));
1801 /*******************************************************************
1803 * @brief Handles slot indication from MAC
1807 * Function : duHandleUlCcchInd
1810 * Handles UL CCCH indication from MAC
1812 * @params[in] Post structure pointer
1813 * UL CCCH Ind pointer
1814 * @return ROK - success
1817 * ****************************************************************/
1818 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
1821 DU_LOG("\nDU APP : UL CCCH Indication received");
1823 return (duProcUlCcchInd(ulCcchIndInfo));
1826 /*******************************************************************
1828 * @brief Process UL RRC Message from RLC
1832 * Function : DuProcRlcUlRrcMsgTrans
1834 * Functionality: Process UL RRC Message from RLC
1836 * @params[in] Post structure
1837 * UL RRC Message Info
1838 * @return ROK - success
1841 * ****************************************************************/
1842 uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
1846 ueCb = duCb.actvCellLst[ulRrcMsgInfo->cellId -1]->ueCb[ulRrcMsgInfo->ueIdx -1];
1847 BuildAndSendULRRCMessageTransfer(ueCb, ulRrcMsgInfo->lcId, ulRrcMsgInfo->msgLen, \
1848 ulRrcMsgInfo->rrcMsg);
1850 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo->rrcMsg, ulRrcMsgInfo->msgLen);
1851 DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo, sizeof(RlcUlRrcMsgInfo));
1855 /**********************************************************************
1857 **********************************************************************/