From 5eb7213379dd0ffe146453e85d18871f07e58ce3 Mon Sep 17 00:00:00 2001 From: sphoorthi Date: Wed, 25 Nov 2020 16:39:44 +0530 Subject: [PATCH] [JIRA ID:ODUHIGH-255]- Fix for DL RRC Msg in Ue context setup Req Change-Id: I03f06df06fe05e77cb5d78d6a1799980d282f54b Signed-off-by: sphoorthi --- src/5gnrrlc/kw_utl_dl.c | 36 +++++++++++++++- src/5gnrrlc/rlc_msg_hdl.c | 5 ++- src/5gnrrlc/rlc_upr_inf_api.c | 31 ++++++++++++++ src/5gnrrlc/rlc_upr_inf_api.h | 1 + src/cm/du_app_rlc_inf.c | 73 +++++++++++++++++++++++++++++++++ src/cm/du_app_rlc_inf.h | 24 +++++++++++ src/cm/rlc_mac_inf.h | 12 +++--- src/cu_stub/cu_f1ap_msg_hdl.c | 28 ++++++++----- src/cu_stub/cu_f1ap_msg_hdl.h | 4 +- src/du_app/du_f1ap_msg_hdl.c | 2 + src/du_app/du_mgr_ex_ms.c | 5 +++ src/du_app/du_ue_mgr.c | 95 ++++++++++++++++++++++++++++++++++++++----- src/phy_stub/l1_bdy1.c | 2 +- 13 files changed, 285 insertions(+), 33 deletions(-) diff --git a/src/5gnrrlc/kw_utl_dl.c b/src/5gnrrlc/kw_utl_dl.c index ccce2d429..2d1938cb8 100755 --- a/src/5gnrrlc/kw_utl_dl.c +++ b/src/5gnrrlc/kw_utl_dl.c @@ -73,7 +73,9 @@ static int RLOG_FILE_ID=209; #include "rlc_utils.h" #include "rlc_mac_inf.h" +#include "du_app_rlc_inf.h" #include "rlc_lwr_inf_api.h" +#include "rlc_upr_inf_api.h" #include "ss_rbuf.h" #include "ss_rbuf.x" @@ -230,14 +232,15 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo) RguDatReqTb datPerTb; /* DL data info per TB */ RguLchDatReq datPerLch; /* DL data info per Lch */ RlcData *dlData; /* DL data to be sent to MAC */ + RlcDlRrcMsgRsp *dlRrcMsgRsp;/* DL Data Msg Rsp sent to DU */ Pst pst; /* Post structure */ uint16_t pduLen; /* PDU length */ uint16_t copyLen; /* Number of bytes copied */ dlData = NULLP; + dlRrcMsgRsp = NULLP; RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, dlData, sizeof(RlcData)); -#if (ERRCLASS & ERRCLS_ADD_RES) if ( dlData == NULLP ) { DU_LOG("\nRLC: rlcSendDedLcDlData: Memory allocation failed for dl data"); @@ -245,7 +248,6 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo) datReqInfo, sizeof(RguDDatReqInfo)); return RFAILED; } -#endif /* ERRCLASS & ERRCLS_ADD_RES */ for(ueIdx = 0; ueIdx < datReqInfo->nmbOfUeGrantPerTti; ueIdx++) { @@ -304,6 +306,25 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo) }/* For Data per Lch */ }/* For Data per Tb */ + RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, + dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp)); + if( dlRrcMsgRsp == NULLP ) + { + DU_LOG("\nRLC: rlcSendDedLcDlData: Memory allocation failed for dlRrcMsgRsp"); + for(pduIdx = 0; pduIdx < dlData->numPdu; pduIdx++) + { + RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\ + dlData->pduInfo[pduIdx].pduLen); + } + RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData)); + RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, + datReqInfo, sizeof(RguDDatReqInfo)); + return RFAILED; + } + + dlRrcMsgRsp->cellId = dlData->cellId; + dlRrcMsgRsp->crnti = dlData->rnti; + /* Sending DL Data per UE to MAC */ memset(&pst, 0, sizeof(Pst)); FILL_PST_RLC_TO_MAC(pst, RLC_DL_INST, EVENT_DL_DATA_TO_MAC); @@ -315,6 +336,17 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo) dlData->pduInfo[pduIdx].pduLen); } RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData)); + /* Update DL RRC MSG Rsp State */ + dlRrcMsgRsp->state = TRANSMISSION_FAILED; + } + else + dlRrcMsgRsp->state = TRANSMISSION_COMPLETE; + + /* Send Dl RRC Msg Rsp to DU APP */ + FILL_PST_RLC_TO_DUAPP(pst, RLC_DL_INST, EVENT_DL_RRC_MSG_RSP_TO_DU); + if(rlcSendDlRrcMsgRspToDu(&pst, dlRrcMsgRsp) != ROK) + { + RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp)); } } /* For Data per UE */ diff --git a/src/5gnrrlc/rlc_msg_hdl.c b/src/5gnrrlc/rlc_msg_hdl.c index e7085d0bd..1c41b15a0 100644 --- a/src/5gnrrlc/rlc_msg_hdl.c +++ b/src/5gnrrlc/rlc_msg_hdl.c @@ -360,7 +360,10 @@ uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo) } oduCpyFixBufToMsg(dlRrcMsgInfo->rrcMsg, mBuf, dlRrcMsgInfo->msgLen); - rlcProcDlData(pst, datReqInfo, mBuf); + if(rlcProcDlData(pst, datReqInfo, mBuf) != ROK) + { + return RFAILED; + } /* RRC Delivery report is only send when RRC Delivery status report is true in DL RRC Message */ if(dlRrcMsgInfo->deliveryStaRpt) diff --git a/src/5gnrrlc/rlc_upr_inf_api.c b/src/5gnrrlc/rlc_upr_inf_api.c index 52dd08380..ff4305862 100644 --- a/src/5gnrrlc/rlc_upr_inf_api.c +++ b/src/5gnrrlc/rlc_upr_inf_api.c @@ -32,6 +32,15 @@ RlcRrcDeliveryReportToDuFunc rlcSendRrcDeliveryReportToDuOpts[]= DuProcRlcRrcDeliveryReport, /* 1 - Tightly coupled */ packRrcDeliveryReportToDu /* 2 - Light weight loosely coupled */ }; + +/* Function pointer array for DL RRC Msg Rsp Transfer */ +RlcDlRrcMsgRspToDuFunc rlcSendDlRrcMsgRspToDuOpts[] = +{ + packRlcDlRrcMsgRspToDu, /* 0 - Loosely coupled */ + DuProcRlcDlRrcMsgRsp, /* 1 - Tightly coupled */ + packRlcDlRrcMsgRspToDu /* 2 - Light weight loosely coupled */ +}; + /******************************************************************* * * @brief Sends UL RRC Message Info to DU APP @@ -73,6 +82,28 @@ uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery) { return (*rlcSendRrcDeliveryReportToDuOpts[pst->selector])(pst, rrcDelivery); } + +/******************************************************************* + * + * @brief Sends DL RRC Message Status to DU APP + * + * @details + * + * Function : rlcSendDlRrcMsgRspToDu + * + * Functionality: Sends DL RRC Message Status to DU APP + * + * @params[in] Pst structure + * DL RRC Msg Info + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg) +{ + return (*rlcSendDlRrcMsgRspToDuOpts[pst->selector])(pst, dlRrcMsg); +} + /********************************************************************** End of file **********************************************************************/ diff --git a/src/5gnrrlc/rlc_upr_inf_api.h b/src/5gnrrlc/rlc_upr_inf_api.h index 71bd23a9a..0a930d05b 100644 --- a/src/5gnrrlc/rlc_upr_inf_api.h +++ b/src/5gnrrlc/rlc_upr_inf_api.h @@ -18,6 +18,7 @@ uint8_t rlcSendUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo); uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery); +uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp); /********************************************************************** End of file **********************************************************************/ diff --git a/src/cm/du_app_rlc_inf.c b/src/cm/du_app_rlc_inf.c index 19391a8dd..520c9dea3 100644 --- a/src/cm/du_app_rlc_inf.c +++ b/src/cm/du_app_rlc_inf.c @@ -482,6 +482,79 @@ uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf) return RFAILED; } +/******************************************************************* + * + * @brief Pack and send DL RRC message Response from RLC to DU APP + * + * @details + * + * Function : packRlcDlRrcMsgRspToDu + * + * Functionality: + * Pack and send DL RRC message Response from RLC to DU APP + * + * @params[in] Post structure + * DL RRC Msg Response + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp) +{ + Buffer *mBuf = NULLP; + + if(pst->selector == ODU_SELECTOR_LWLC) + { + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) + { + DU_LOG("\nRLC : Memory allocation failed at packRlcDlRrcMsgRspToDu"); + return RFAILED; + } + /* pack the address of the structure */ + CMCHKPK(oduPackPointer,(PTR)dlRrcMsgRsp, mBuf); + return ODU_POST_TASK(pst,mBuf); + } + else + { + DU_LOG("\nRLC: Only LWLC supported for packRlcDlRrcMsgRspToDu"); + } + return RFAILED; +} + +/******************************************************************* + * + * @brief Unpack DL RRC Msg Response received at DU APP from RLC + * + * @details + * + * Function : unpackRlcDlRrcMsgRspToDu + * + * Functionality: + * Unpack DL RRC Msg Response received at DU APP from RLC + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf) +{ + if(pst->selector == ODU_SELECTOR_LWLC) + { + RlcDlRrcMsgRsp *dlRrcMsgRsp; + /* unpack the address of the structure */ + CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgRsp, mBuf); + ODU_PUT_MSG_BUF(mBuf); + return (*func)(pst, dlRrcMsgRsp); + } + else + { + /* Nothing to do for other selectors */ + DU_LOG("\nRLC: Only LWLC supported for DL RRC Message transfer "); + ODU_PUT_MSG_BUF(mBuf); + } + return RFAILED; +} /********************************************************************** End of file ***********************************************************************/ diff --git a/src/cm/du_app_rlc_inf.h b/src/cm/du_app_rlc_inf.h index 761e163f3..d9ffa0d0c 100644 --- a/src/cm/du_app_rlc_inf.h +++ b/src/cm/du_app_rlc_inf.h @@ -28,6 +28,7 @@ #define EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU 214 #define EVENT_RLC_UE_RECONFIG_REQ 215 #define EVENT_RLC_UE_RECONFIG_RSP 216 +#define EVENT_DL_RRC_MSG_RSP_TO_DU 217 #define RB_ID_SRB 0 #define RB_ID_DRB 1 @@ -48,6 +49,12 @@ #define LCH_DTCH 4 /*!< DTCH Logical Channel */ #define LCH_DCCH 5 /*!< DCCH Logical Channel */ +typedef enum +{ + TRANSMISSION_IN_PROGRESS, + TRANSMISSION_COMPLETE, + TRANSMISSION_FAILED +}DlMsgState; typedef enum { @@ -520,6 +527,14 @@ typedef struct dlRrcMsgInfo uint8_t *rrcMsg; /* RRC Message (DL-DCCH Message) */ }RlcDlRrcMsgInfo; +/* DL RRC Message Rsp From RLC to DU APP */ +typedef struct dlRrcMsgRsp +{ + uint16_t cellId; /* Cell Id */ + uint16_t crnti; /* UE index */ + DlMsgState state; /* Dl RRC Msg State */ +}RlcDlRrcMsgRsp; + /* RRC delivery message from RLC to DU APP */ typedef struct rrcDeliveryStatus { @@ -565,6 +580,11 @@ typedef uint8_t (*DuRlcUeReconfigReq) ARGS(( Pst *pst, RlcUeCfg *ueCfg )); +/* DL RRC Message from RLC to DU APP */ +typedef uint8_t (*RlcDlRrcMsgRspToDuFunc) ARGS(( + Pst *pst, + RlcDlRrcMsgRsp *dlRrcMsgRsp)); + /* Pack/Unpack function declarations */ uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg); uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf); @@ -578,6 +598,9 @@ uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func,Pst *pst, Buffer *mBuf); uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg); uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf); +uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp); +uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf); + /* Event Handler function declarations */ uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg); @@ -586,6 +609,7 @@ uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo); uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo); uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport); uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg); +uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg); #endif /* RLC_INF_H */ diff --git a/src/cm/rlc_mac_inf.h b/src/cm/rlc_mac_inf.h index 1a61b7dc3..5c4605571 100644 --- a/src/cm/rlc_mac_inf.h +++ b/src/cm/rlc_mac_inf.h @@ -68,14 +68,14 @@ typedef struct rlcPduInfo uint8_t *pduBuf; /*!< RLC PDU buffer */ }RlcPduInfo; -typedef struct rlcMacData +typedef struct rlcData { // add slot info - uint16_t cellId; /*!< CELL ID */ - uint16_t rnti; /*!< Temporary CRNTI */ - SlotIndInfo slotInfo; /*!< Timing info */ - uint8_t numPdu; /*!< Number of RLC PDUs */ - RlcPduInfo pduInfo[MAX_NUM_PDU]; + uint16_t cellId; /*!< CELL ID */ + uint16_t rnti; /*!< Temporary CRNTI */ + SlotIndInfo slotInfo; /*!< Timing info */ + uint8_t numPdu; /*!< Number of RLC PDUs */ + RlcPduInfo pduInfo[MAX_NUM_PDU]; }RlcData; /* Function pointers */ diff --git a/src/cu_stub/cu_f1ap_msg_hdl.c b/src/cu_stub/cu_f1ap_msg_hdl.c index 2b651a024..e8b029051 100644 --- a/src/cu_stub/cu_f1ap_msg_hdl.c +++ b/src/cu_stub/cu_f1ap_msg_hdl.c @@ -1745,6 +1745,9 @@ uint8_t setDlRRCMsgType() case UE_CONTEXT_SETUP_REQ: rrcMsgType = UE_CONTEXT_SETUP_REQ; break; + case SECURITY_MODE_COMPLETE: + rrcMsgType = SECURITY_MODE_COMPLETE; + break; case RRC_RECONFIG: rrcMsgType = RRC_RECONFIG; break; @@ -6051,15 +6054,26 @@ uint8_t procUlRrcMsg(F1AP_PDU_t *f1apMsg) rrcMsgType = setDlRRCMsgType(); if(rrcMsgType == REGISTRATION_ACCEPT) { - DU_LOG("\nSending DL RRC MSG for RRC Registration Complete"); + DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Registration Accept"); ret = BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType); } if(rrcMsgType == UE_CONTEXT_SETUP_REQ) { - DU_LOG("\nSending Ue Context Setup Req"); + DU_LOG("\nF1AP: Sending Ue Context Setup Req"); ret = BuildAndSendUeContextSetupReq(cuUeF1apId, duUeF1apId,\ rrcContLen, rrcContainer); } + if(rrcMsgType == SECURITY_MODE_COMPLETE) + { + /* To trigger the DL RRC Msg for RRC Reconfig */ + f1apMsgDb.dlRrcMsgCount++; + rrcMsgType = setDlRRCMsgType(); + if(rrcMsgType == RRC_RECONFIG) + { + DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Reconfig"); + BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType); + } + } } return ret; } @@ -6352,16 +6366,8 @@ void F1APMsgHdlr(Buffer *mBuf) } case SuccessfulOutcome__value_PR_UEContextSetupResponse: { - uint8_t rrcMsgType; - DU_LOG("\nF1AP : UE ContextSetupResponse received"); - f1apMsgDb.dlRrcMsgCount++; - rrcMsgType = setDlRRCMsgType(); - if(rrcMsgType == RRC_RECONFIG) - { - DU_LOG("\nImplementing DL RRC MSG for RRC Reconfig Complete"); - BuildAndSendDLRRCMessageTransfer(SRB1, rrcMsgType); - } + f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */ break; } default: diff --git a/src/cu_stub/cu_f1ap_msg_hdl.h b/src/cu_stub/cu_f1ap_msg_hdl.h index c2df12153..0e0e13a38 100644 --- a/src/cu_stub/cu_f1ap_msg_hdl.h +++ b/src/cu_stub/cu_f1ap_msg_hdl.h @@ -60,7 +60,9 @@ #define RRC_SETUP 1 #define REGISTRATION_ACCEPT 2 #define UE_CONTEXT_SETUP_REQ 3 -#define RRC_RECONFIG 4 +#define UE_CONTEXT_SETUP_RSP 4 +#define SECURITY_MODE_COMPLETE 5 +#define RRC_RECONFIG 6 typedef struct f1apDb { uint8_t dlRrcMsgCount; diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index 95bf53ae7..fe3430825 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -5575,6 +5575,7 @@ void freeF1UeDb(F1UeContextSetupDb *f1UeDb) } freeDuUeCfg(&f1UeDb->duUeCfg); memset(f1UeDb, 0, sizeof(F1UeContextSetupDb)); + DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb)); } /******************************************************************* @@ -7672,6 +7673,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId) choice.DUtoCURRCInformation.cellGroupConfig, cellGrpCfg); /* Free UeContext Db created during Ue context Req */ freeF1UeDb(ueCb->f1UeDb); + ueCb->f1UeDb = NULLP; } } else diff --git a/src/du_app/du_mgr_ex_ms.c b/src/du_app/du_mgr_ex_ms.c index c834d2b08..402812255 100644 --- a/src/du_app/du_mgr_ex_ms.c +++ b/src/du_app/du_mgr_ex_ms.c @@ -188,6 +188,11 @@ uint8_t duActvTsk(Pst *pst, Buffer *mBuf) ret = unpackRrcDeliveryReportToDu(DuProcRlcRrcDeliveryReport, pst, mBuf); break; } + case EVENT_DL_RRC_MSG_RSP_TO_DU: + { + ret = unpackRlcDlRrcMsgRspToDu(DuProcRlcDlRrcMsgRsp, pst, mBuf); + break; + } default: { DU_LOG("\nDU_APP : Invalid event %d received at duActvTsk from ENTRLC", \ diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index 4d17af2ab..1f088039b 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -1988,6 +1988,8 @@ uint8_t DuProcRlcUeCfgRsp(Pst *pst, RlcUeCfgRsp *cfgRsp) return ret; } + + /******************************************************************* * * @brief Builds and Send Ue Reconfig Req to RLC @@ -2074,6 +2076,82 @@ uint8_t duBuildAndSendUeReCfgReqToMac(uint8_t cellId, uint8_t crnti, DuUeCfg *ue return ret; } +/******************************************************************* + * + * @brief Build and Send Ue context setup request + * + * @details + * + + * Function : duBuildAndSendUeContextSetupReq + * + * Functionality: + * Build and Send Ue context setup request + * + * @params[in] cellId, crnti, DuUeCfg pointer + * @return ROK - success + * RFAILED - failure + * + *****************************************************************/ + +uint8_t duBuildAndSendUeContextSetupReq(uint16_t cellId, uint16_t crnti, DuUeCfg *duUeCfg) +{ + uint8_t ret = ROK; + + DU_LOG("\nDU_APP: Processing Ue Context Setup Request for cellId [%d]", cellId); + /* Filling RLC Ue Reconfig */ + ret = duBuildAndSendUeReCfgReqToRlc(cellId, crnti, duUeCfg); + if(ret == RFAILED) + DU_LOG("\nDU_APP: Failed to build ctxt setup req for RLC at duBuildAndSendUeContextSetupReq()"); + + /* Filling MAC Ue Reconfig */ + ret = duBuildAndSendUeReCfgReqToMac(cellId, crnti, duUeCfg); + if(ret == RFAILED) + DU_LOG("\nDU_APP: Failed at build ctxt setup req for MAC at duBuildAndSendUeContextSetupReq()"); + + return ret; +} + +/******************************************************************* + * + * @brief Processes DL Rsp received from RLC DL + * + * @details + * + + * Function : DuProcRlcDlRrcMsgRsp + * + * Functionality: + * Processes UE Rsp received from RLC DL + * + * @params[in] Post structure + * Pointer to RlcCfgCfm + * @return ROK - success + * RFAILED - failure + * + *****************************************************************/ +uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg) +{ + uint8_t ret = ROK, ueIdx = 0; + DuUeCb *ueCb = NULLP; + + if(dlRrcMsg->state == TRANSMISSION_COMPLETE) + { + GET_UE_IDX(dlRrcMsg->crnti, ueIdx); + ueCb = &duCb.actvCellLst[dlRrcMsg->cellId -1]->ueCb[ueIdx -1]; + if(ueCb->f1UeDb) + { + ret = duBuildAndSendUeContextSetupReq(dlRrcMsg->cellId, dlRrcMsg->crnti, &ueCb->f1UeDb->duUeCfg); + if(ret == RFAILED) + DU_LOG("\nDUAPP: Failed to process UE Context Setup Request in DuProcRlcDlRrcMsgRsp()"); + } + } + else + DU_LOG("\nDUAPP: Failed to transmit DL RRC Msg"); + + DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlRrcMsg, sizeof(RlcDlRrcMsgRsp)); + return ret; +} /******************************************************************* * * @brief Process UE context setup request from CU @@ -2114,18 +2192,13 @@ uint8_t duProcUeContextSetupRequest(DuUeCb *ueCb) } } } - if(ret == ROK) + else { - DU_LOG("\nDU_APP: Processing Ue Context Setup Request for cellId [%d]", cellId); - /* Filling RLC Ue Reconfig */ - ret = duBuildAndSendUeReCfgReqToRlc(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg); - if(ret == RFAILED) - DU_LOG("\nDU_APP: Failed to build ctxt setup req for RLC at duBuildAndSendUeReCfgReqToRlc()"); - - /* Filling MAC Ue Reconfig */ - ret = duBuildAndSendUeReCfgReqToMac(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg); - if(ret == RFAILED) - DU_LOG("\nDU_APP: Failed at build ctxt setup req for MAC at duBuildAndSendUeReCfgReqToMac()"); + ret = duBuildAndSendUeContextSetupReq(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg); + if(ret == RFAILED) + { + DU_LOG("\nDU APP : Failed to build ue context setup Req in duProcUeContextSetupRequest()"); + } } } else diff --git a/src/phy_stub/l1_bdy1.c b/src/phy_stub/l1_bdy1.c index 7ccee2192..21533df78 100644 --- a/src/phy_stub/l1_bdy1.c +++ b/src/phy_stub/l1_bdy1.c @@ -509,7 +509,7 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_ } case MSG_TYPE_RRC_RECONFIG_COMPLETE: { - DU_LOG("\nPHY_STUB: Forming RRC RECONFIGURATION PDU"); + DU_LOG("\nPHY_STUB: Forming RRC RECONFIGURATION COMPLETE PDU"); uint8_t pduLen = 14; /* For rrc reconfig complete where RRC Container is dummy MAC subheader format is R/F/LCId/L (2/3 bytes) -- 2.16.6