X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_tmm_ul.c;h=20e11f561ae38f19a40dad90b6542a99799926d9;hb=069f38324ca51afc183962404383802ae8a5553c;hp=6777cdf933196728f4411aa332ac376fba7e2eb9;hpb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_tmm_ul.c b/src/5gnrrlc/kw_tmm_ul.c index 6777cdf93..20e11f561 100755 --- a/src/5gnrrlc/kw_tmm_ul.c +++ b/src/5gnrrlc/kw_tmm_ul.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file @@ -26,16 +26,13 @@ reassembly.This file contains following functions --rlcTmmQSdu - --rlcTmmSndToLi - --rlcTmmRcvFrmLi + --rlcTmmSendToMac + --rlcTmmRcvFrmMac --kwTmmReEstablish File: kw_tmm_ul.c **********************************************************************/ -static const char* RLOG_MODULE_NAME="TMM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=201; /** @file kw_tmm_ul.c @brief RLC Transparent Mode module @@ -67,31 +64,25 @@ static int RLOG_FILE_ID=201; #if defined(PRE_DEF_UE_CTX) || defined(PRE_DEF_UE_CTX_HO) #ifdef EG_GEN_LOAD_5GTF -extern U32 loadStart; +uint32_t loadStart; #endif -EXTERN S16 PjUiPjuDatInd(Pst* pst,SuId suId,CmLtePdcpId * pdcpId,Buffer *mBuf); -#ifdef ANSI +S16 PjUiPjuDatInd(Pst* pst,SuId suId,CmLtePdcpId * pdcpId,Buffer *mBuf); Void AddUeContext ( CmLteRnti crnti, -U8 rrcMsgType +uint8_t rrcMsgType ) -#else -Void AddUeContext(crnti,rrcMsgType) -CmLteRnti crnti, -U8 rrcMsgType -#endif { KwuDatIndInfo *datIndInfo; /* Data Indication Information */ - U8 rrcConReq[6] ={ 0x50, 0x30, 0x30, 0x30, 0x30, 0x34 }; - U8 rrcConSetupComplete[34] ={ 0x20, 0x00, 0x3e, 0x0e, 0x82, 0x02, 0x10, 0x12, 0x20, 0x02, 0x20, 0x64, 0xa8, 0x2c, 0x48, 0x05, 0x00, 0x80, 0x00, 0x08, 0x04, 0x03, 0xa0, 0x02, 0xa0, 0x10, 0x12, 0x20, 0x02, 0x20, 0x64, 0xa8, 0x2c, 0x48}; + uint8_t rrcConReq[6] ={ 0x50, 0x30, 0x30, 0x30, 0x30, 0x34 }; + uint8_t rrcConSetupComplete[34] ={ 0x20, 0x00, 0x3e, 0x0e, 0x82, 0x02, 0x10, 0x12, 0x20, 0x02, 0x20, 0x64, 0xa8, 0x2c, 0x48, 0x05, 0x00, 0x80, 0x00, 0x08, 0x04, 0x03, 0xa0, 0x02, 0xa0, 0x10, 0x12, 0x20, 0x02, 0x20, 0x64, 0xa8, 0x2c, 0x48}; #ifndef CA_PAL_5GTF - U8 rrcUeCapabilityInfo[12] ={0x38, 0x01, 0x00, 0x80, 0x1b, 0xff, 0x0c, 0x00, 0x20, 0x00, 0x80, 0x00}; + uint8_t rrcUeCapabilityInfo[12] ={0x38, 0x01, 0x00, 0x80, 0x1b, 0xff, 0x0c, 0x00, 0x20, 0x00, 0x80, 0x00}; #else - /* U8 rrcUeCapabilityInfo[44] ={0x38,0x01,0x02,0x84,0x9b,0xff,0x0c,0x00,0x20,0x00,0x80,0x1f,0xfe,0xf4,0x4f,0xe0,0x40,0x03,0x80,0x11,0x04,0x0c,0x20,0x88,0x20,0x7f,0xff,0xff,0xff,0xf3,0xff,0x81,0xff,0xff,0xff,0xff,0x7f,0xf0,0x3f,0xff,0xff,0xff,0xe0,0x00}; + /* uint8_t rrcUeCapabilityInfo[44] ={0x38,0x01,0x02,0x84,0x9b,0xff,0x0c,0x00,0x20,0x00,0x80,0x1f,0xfe,0xf4,0x4f,0xe0,0x40,0x03,0x80,0x11,0x04,0x0c,0x20,0x88,0x20,0x7f,0xff,0xff,0xff,0xf3,0xff,0x81,0xff,0xff,0xff,0xff,0x7f,0xf0,0x3f,0xff,0xff,0xff,0xe0,0x00}; */ -U8 rrcUeCapabilityInfo[] = +uint8_t rrcUeCapabilityInfo[] = { 0x38,0x01,0x03,0x34,0x9b,0xff,0x0c,0x00,0x20,0x00,0x80,0x1f,0xfe,0xf4,0x4f,0xe0 ,0x40,0x09,0x80,0x11,0x04,0x0c,0x20,0x88,0x20,0x63,0x04,0x41,0x03,0x20,0x22,0x08 @@ -100,8 +91,8 @@ U8 rrcUeCapabilityInfo[] = }; #endif - U8 rrcSecurityModeComplete[2] ={0x28, 0x80}; - U8 rrcReconfigComplete[2] ={0x10, 0x80}; + uint8_t rrcSecurityModeComplete[2] ={0x28, 0x80}; + uint8_t rrcReconfigComplete[2] ={0x10, 0x80}; Buffer *pdu; @@ -109,7 +100,6 @@ U8 rrcUeCapabilityInfo[] = #ifdef PJ Pst ulPst2 ={100,100,217,0,216,0,PRIOR0,0,68,0,1,0,0}; #endif - TRC2(rlcTmmRcvFrmLi) if(1 == rrcMsgType) { @@ -127,9 +117,8 @@ U8 rrcUeCapabilityInfo[] = SAddPstMsgMult(rrcConReq,6,pdu); - RLOG1(L_INFO,"Profiling Framework Sending RRC Connection Req to RRC for UE :%d\n",crnti); - printf("Profiling Framework Sending RRC Connection Req to RRC for UE :%d\n",crnti); - RlcUiKwuDatInd(&ulPst1, datIndInfo, pdu); + DU_LOG("\nINFO --> RLC_UL : Profiling Framework Sending RRC Connection Req to RRC for UE :%d\n",crnti); + rlcSendUlDataToDu(&ulPst1, datIndInfo, pdu); } else if(2 == rrcMsgType) { @@ -144,8 +133,7 @@ U8 rrcUeCapabilityInfo[] = SAddPstMsgMult(rrcConSetupComplete,34,pdu); - RLOG1(L_INFO,"Profiling Framework: Sending RRC Connection Setup Complete to RRC for UE :%d\n",crnti); - printf("Profiling Framework: Sending RRC Connection Setup Complete to RRC for UE :%d\n",crnti); + DU_LOG("\nINFO --> RLC_UL : Profiling Framework: Sending RRC Connection Setup Complete to RRC for UE :%d\n",crnti); #ifdef PJ PjUiPjuDatInd(&ulPst2, 1, &pdcpId, pdu); #endif @@ -167,8 +155,7 @@ U8 rrcUeCapabilityInfo[] = #else SAddPstMsgMult(rrcUeCapabilityInfo,sizeof(rrcUeCapabilityInfo),pdu); #endif - RLOG1(L_INFO,"Profiling Framework: Sending RRC UE Capability Info to RRC for UE :%d\n",crnti); - printf("Profiling Framework: Sending RRC UE Capability Info to RRC for UE :%d\n",crnti); + DU_LOG("\nINFO --> RLC_UL : Profiling Framework: Sending RRC UE Capability Info to RRC for UE :%d\n",crnti); #ifdef PJ PjUiPjuDatInd(&ulPst2, 1, &pdcpId, pdu); #endif @@ -188,8 +175,7 @@ U8 rrcUeCapabilityInfo[] = SAddPstMsgMult(rrcSecurityModeComplete,2,pdu); - RLOG1(L_INFO,"Profiling Framework: Sending RRC Security Mode Complete to RRC for UE :%d\n",crnti); - printf("Profiling Framework: Sending RRC Security Mode Complete to RRC for UE :%d\n",crnti); + DU_LOG("\nINFO --> RLC_UL : Profiling Framework: Sending RRC Security Mode Complete to RRC for UE :%d\n",crnti); #ifdef PJ PjUiPjuDatInd(&ulPst2, 1, &pdcpId, pdu); #endif @@ -208,8 +194,7 @@ U8 rrcUeCapabilityInfo[] = SAddPstMsgMult(rrcReconfigComplete,2,pdu); - RLOG1(L_INFO,"Profiling Framework: Sending RRC Reconfig Complete to RRC for UE :%d\n",crnti); - printf("Profiling Framework: Sending RRC Reconfig Complete to RRC for UE :%d\n",crnti); + DU_LOG("\nINFO --> RLC_UL : Profiling Framework: Sending RRC Reconfig Complete to RRC for UE :%d\n",crnti); #ifdef PJ PjUiPjuDatInd(&ulPst2, 1, &pdcpId, pdu); #ifdef EG_GEN_LOAD_5GTF @@ -217,7 +202,7 @@ U8 rrcUeCapabilityInfo[] = #endif #endif } - RETVOID; + return; } #endif /** @addtogroup tmmode */ @@ -245,53 +230,19 @@ U8 rrcUeCapabilityInfo[] = * -# RFAILED */ #ifdef CCPU_OPT -#ifdef ANSI -Void rlcTmmRcvFrmLi -( -RlcCb *gCb, -RlcUlRbCb *rbCb, -CmLteRnti tCrnti, -Buffer *pdu -) -#else -Void rlcTmmRcvFrmLi(gCb,rbCb, tCrnti, pdu) -RlcCb *gCb; -RlcUlRbCb *rbCb; -CmLteRnti tCrnti; -Buffer *pdu; -#endif -#else -#ifdef ANSI -Void rlcTmmRcvFrmLi -( -RlcCb *gCb, -RlcUlRbCb *rbCb, -Buffer *pdu -) +void rlcTmmRcvFrmMac(RlcCb *gCb, RlcUlRbCb *rbCb, CmLteRnti tCrnti, Buffer *pdu) #else -Void rlcTmmRcvFrmLi(gCb,rbCb, pdu) -RlcCb *gCb; -RlcUlRbCb *rbCb; -Buffer *pdu; +void rlcTmmRcvFrmMac(RlcCb *gCb, RlcUlRbCb *rbCb, Buffer *pdu) #endif -#endif { RlcUlRrcMsgInfo *ulRrcMsgInfo; uint16_t msgLen; uint16_t copyLen; /* Number of bytes copied */ Pst pst; - TRC2(rlcTmmRcvFrmLi) - gCb->genSts.pdusRecv++; - SFndLenMsg(pdu, (MsgLen *)&msgLen); + ODU_GET_MSG_LEN(pdu, (MsgLen *)&msgLen); gCb->genSts.bytesRecv += msgLen; - /* If trace flag is enabled send the trace indication */ - if(gCb->init.trc == TRUE) - { - /* Populate the trace params */ - rlcLmmSendTrc(gCb, EVENT_UL_RRC_MSG_TRANS_TO_DU, pdu); - } /* Filling UL RRC Message Info */ RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_UL, RLC_POOL, @@ -305,25 +256,25 @@ Buffer *pdu; ulRrcMsgInfo->rrcMsg, msgLen); if (ulRrcMsgInfo->rrcMsg) { - SCpyMsgFix(pdu, 0, msgLen, ulRrcMsgInfo->rrcMsg, (MsgLen *)©Len); + ODU_COPY_MSG_TO_FIX_BUF(pdu, 0, msgLen, ulRrcMsgInfo->rrcMsg, (MsgLen *)©Len); ulRrcMsgInfo->msgLen = msgLen; /* Sending UL RRC Message transfeer to DU APP */ memset(&pst, 0, sizeof(Pst)); - FILL_PST_RLC_TO_DUAPP(pst, SFndProcId(), RLC_UL_INST, EVENT_UL_RRC_MSG_TRANS_TO_DU); + FILL_PST_RLC_TO_DUAPP(pst, RLC_UL_INST, EVENT_UL_RRC_MSG_TRANS_TO_DU); rlcSendUlRrcMsgToDu(&pst, ulRrcMsgInfo); } else { - DU_LOG("\nRLC : Memory allocation failed"); + DU_LOG("\nERROR --> RLC_UL : rlcTmmRcvFrmMac: Memory allocation failed for UL RRC Msg"); } } else { - DU_LOG("\nRLC : Memory allocation failed"); + DU_LOG("\nERROR --> RLC_UL : rlcTmmRcvFrmMac: Memory allocation failed for ulRrcMsgInfo"); } - RETVOID; + return; } /** @@ -339,22 +290,14 @@ Buffer *pdu; * -# ROK * **/ -#ifdef ANSI Void rlcTmmUlReEstablish ( RlcCb *gCb, RlcUlRbCb *rbCb ) -#else -Void rlcTmmUlReEstablish(rbCb) -RlcCb *gCb; -RlcUlRbCb *rbCb; -#endif { - TRC2(rlcUlTmmReEstablish) - - RLOG_ARG0(L_DEBUG,DBG_RBID,rbCb->rlcId.rbId,"do nothing for TMM for ReEstablish"); - RETVOID; + DU_LOG("\nINFO --> RLC_UL : do nothing for TMM for ReEstablish"); + return; } #ifdef _cplusplus