X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ul_ex_ms.c;h=05d850f3e7a0b2fa15652e48b117df3d56eed197;hb=7ebfb1f80967fe83bf169c2915cedf2c9fb5cbf7;hp=108c30addcdedc1aa23e957005967d693cb42a10;hpb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ul_ex_ms.c b/src/5gnrrlc/kw_ul_ex_ms.c index 108c30add..05d850f3e 100755 --- a/src/5gnrrlc/kw_ul_ex_ms.c +++ b/src/5gnrrlc/kw_ul_ex_ms.c @@ -18,19 +18,16 @@ /********************************************************************20** - Name: LTE-RLC Layer - System Services Interface Functions + Name: NR RLC Layer - System Services Interface Functions Type: C file Desc: C source code for the interface to System Services - of LTE-RLC + of NR RLC File: kw_ul_ex_ms.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="RLC_UL"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=206; /** @file kw_ul_ex_ms.c @brief RLC System Services Interface @@ -58,6 +55,7 @@ static int RLOG_FILE_ID=206; #include "kw_ul.x" #include "kw_udx.x" +#include "rlc_mac_inf.h" #include "du_app_rlc_inf.h" #ifdef TENB_STATS @@ -80,15 +78,8 @@ S16 rlcUlInitExt ARGS (( Void )); * */ -#ifdef ANSI -S16 rlcUlInitExt -( -) -#else S16 rlcUlInitExt() -#endif { - TRC2(rlcUlInitExt); return ROK; } /* kwInitExt */ @@ -105,16 +96,16 @@ S16 rlcUlInitExt() * Activates Initialization * * @b Description: - * This function is invoked by system services to initialize the LTE-RLC + * This function is invoked by system services to initialize the NR RLC * layer. This is an entry point used by LTE_RLC layer to initialize its * global variables, before becoming operational. * * Allowable values for parameters are specified in ssi.h. * - * @param[in] ent - Specify the entity id of the LTE-RLC task. - * @param[in] inst - Specify the entity id of the LTE-RLC task. + * @param[in] ent - Specify the entity id of the NR RLC task. + * @param[in] inst - Specify the entity id of the NR RLC task. * @param[in] region - Specifies the memory region from which - * LTE-RLC should allocate structures and buffers. + * NR RLC should allocate structures and buffers. * @param[in] reason - Specifies the reason for calling this * initialization function. * @@ -122,7 +113,6 @@ S16 rlcUlInitExt() * -# ROK * */ -#ifdef ANSI S16 rlcUlActvInit ( Ent ent, /* entity */ @@ -130,16 +120,8 @@ Inst inst, /* instance */ Region region, /* region */ Reason reason /* reason */ ) -#else -S16 rlcUlActvInit(ent, inst, region, reason) -Ent ent; /* entity */ -Inst inst; /* instance */ -Region region; /* region */ -Reason reason; /* reason */ -#endif { RlcCb *tRlcCb; - TRC3(rlcUlActvInit) if (inst >= MAX_RLC_INSTANCES) { @@ -171,7 +153,7 @@ Reason reason; /* reason */ tRlcCb->init.acnt = TRUE; /* enable accounting */ tRlcCb->init.usta = TRUE; /* enable unsolicited status */ tRlcCb->init.trc = FALSE; /* enable trace */ - tRlcCb->init.procId = SFndProcId(); + tRlcCb->init.procId = ODU_GET_PROCID(); rlcCb[inst] = tRlcCb; @@ -194,7 +176,7 @@ Reason reason; /* reason */ * Activation Task * * @b Description: - * Processes events received for MLTE-RLC layer via System Services from + * Processes events received for NR RLC layer via System Services from * other layers. * * @param[in] pst - Pst Structure @@ -204,21 +186,14 @@ Reason reason; /* reason */ * -# ROK * */ -#ifdef ANSI S16 rlcUlActvTsk ( Pst *pst, /* pst structure */ Buffer *mBuf /* message buffer */ ) -#else -S16 rlcUlActvTsk(pst, mBuf) -Pst *pst; /* pst structure */ -Buffer *mBuf; /* message buffer */ -#endif { S16 ret = ROK; - TRC3(kwActvTsk); switch(pst->srcEnt) { @@ -239,9 +214,14 @@ Buffer *mBuf; /* message buffer */ break; } - case EVENT_RLC_UL_UE_CREATE_REQ: /* UE Create Request */ + case EVENT_RLC_UE_CREATE_REQ: /* UE Create Request */ + { + ret = unpackRlcUeCreateReq(RlcProcUeCreateReq, pst, mBuf); + break; + } + case EVENT_RLC_UE_RECONFIG_REQ: /* UE Reconfig Request */ { - ret = unpackRlcUlUeCreateReq(RlcUlProcUeCreateReq, pst, mBuf); + ret = unpackRlcUeReconfigReq(RlcProcUeReconfigReq, pst, mBuf); break; } @@ -278,10 +258,10 @@ Buffer *mBuf; /* message buffer */ #endif #endif /* LCLKW */ default: - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_FATAL,"Received Invalid Event[%d] from SM", + DU_LOG("\nERROR --> RLC_UL : Received Invalid Event[%d] from SM", pst->event); } ret = RFAILED; @@ -323,10 +303,10 @@ Buffer *mBuf; /* message buffer */ #endif /* LCCKW */ default: - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from RLC UL", + DU_LOG("\nERROR --> RLC_UL : Received Invalid Event[%d] from RLC UL", pst->event); } ret = RFAILED; @@ -375,10 +355,10 @@ Buffer *mBuf; /* message buffer */ } #endif /* LCKWU */ default: - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from RRC", + DU_LOG("\nERROR --> RLC_UL : Received Invalid Event[%d] from RRC", pst->event); } ret = RFAILED; @@ -406,10 +386,10 @@ Buffer *mBuf; /* message buffer */ } default: - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from PDCP", + DU_LOG("\nERROR --> RLC_UL : Received Invalid Event[%d] from PDCP", pst->event); } ret = RFAILED; @@ -430,19 +410,19 @@ Buffer *mBuf; /* message buffer */ break; } - case EVTRLCULDAT: /* Dedicated Channel Data request */ + case EVENT_UL_DATA_TO_RLC: /* UL Data request */ { - ret = unpackRcvdUlData(RlcProcUlData, pst, mBuf); + ret = unpackRlcUlData(RlcProcUlData, pst, mBuf); break; } #endif /* LCRGU */ default: - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from MAC", + DU_LOG("\nERROR --> RLC_UL : Received Invalid Event[%d] from MAC", pst->event); } ret = RFAILED; @@ -458,7 +438,7 @@ Buffer *mBuf; /* message buffer */ case KWU_EVT_TTI_IND: { rlcUlBatchProc(); - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); break; } } @@ -478,14 +458,14 @@ Buffer *mBuf; /* message buffer */ tRlcCb = RLC_GET_RLCCB(pst->dstInst); TSL2SendStatsToApp(&(tRlcCb->genCfg.lmPst), 0); - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); break; } default: { - printf("\n ERROR Invalid Event[%d] from CL to PDCPUL\n", + DU_LOG("\nERROR --> RLC_UL : Invalid Event[%d] from CL to PDCPUL\n", pst->event); - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); break; } } @@ -497,9 +477,9 @@ Buffer *mBuf; /* message buffer */ { if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR, "Received Invalid Source Entity[%d]",pst->event); + DU_LOG("\nERROR --> RLC_UL : Received Invalid Source Entity[%d]",pst->event); } - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); ret = RFAILED; break; }