X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fkwu.c;h=6cb2f7887865821f60fc29a0885036f40241cb68;hb=105199ef642ffe9736ea24a01d4546578fa25e60;hp=7bbe952112593d5882e79e2fdaab90f40a534f79;hpb=3235ecfc7414aa0b72d0ad50db63ae8b5626045b;p=o-du%2Fl2.git diff --git a/src/cm/kwu.c b/src/cm/kwu.c index 7bbe95211..6cb2f7887 100755 --- a/src/cm/kwu.c +++ b/src/cm/kwu.c @@ -30,18 +30,7 @@ *********************************************************************21*/ /* header include files (.h) */ -#include "envopt.h" /* environment options */ -#include "envdep.h" /* environment dependent */ -#include "envind.h" /* environment independent */ - -#include "gen.h" /* general */ -#include "ssi.h" /* system services */ -#include "cm5.h" /* common timer defines */ -#include "cm_tkns.h" /* common tokens defines */ -#include "cm_mblk.h" /* common memory allocation library defines */ -#include "cm_llist.h" /* common link list defines */ -#include "cm_hash.h" /* common hash list defines */ -#include "cm_lte.h" /* common LTE defines */ +#include "common_def.h" #ifdef TENB_SPLIT_ARCH #include "ss_queue.h" #include "ss_task.h" @@ -50,16 +39,6 @@ #include "kwu.h" /* KWU defines */ /* extern (.x) include files */ -#include "gen.x" /* general */ -#include "ssi.x" /* system services */ - -#include "cm5.x" /* common timer library */ -#include "cm_tkns.x" /* common tokens */ -#include "cm_mblk.x" /* common memory allocation */ -#include "cm_llist.x" /* common link list */ -#include "cm_hash.x" /* common hash list */ -#include "cm_lte.x" /* common LTE includes */ -#include "cm_lib.x" /* common memory allocation library */ #ifdef TENB_SPLIT_ARCH #include "ss_queue.x" #include "ss_task.x" @@ -244,14 +223,12 @@ Buffer *mBuf; PUBLIC S16 cmPkKwuDatReq ( Pst * pst, -SpId spId, KwuDatReqInfo* datReq, Buffer * mBuf ) #else -PUBLIC S16 cmPkKwuDatReq(pst, spId, datReq, mBuf) +PUBLIC S16 cmPkKwuDatReq(pst, datReq, mBuf) Pst * pst; -SpId spId; KwuDatReqInfo* datReq; Buffer * mBuf; #endif @@ -268,9 +245,9 @@ Buffer * mBuf; #ifndef SS_RBUF switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { - if(pst->srcEnt == ENTPJ) + if(pst->srcEnt == ENTDUAPP) { /* When the Selector is LWLC, we need to allocate memory, copy * the contents and pass the pointer of the allocated memory. The @@ -298,7 +275,7 @@ Buffer * mBuf; } } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuDatReqInfo( (datReq), mBuf); @@ -334,7 +311,6 @@ Buffer * mBuf; RETVALUE(RFAILED); } - CMCHKPKLOG(SPkS16, spId, mBuf, EKWU011, pst); #ifdef L2_L3_SPLIT if(datReq->rlcId.rbType == CM_LTE_SRB) { @@ -378,7 +354,7 @@ Buffer * mBuf; switch(pst->selector) { #ifdef LCKWU - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { ret1 = cmPkKwuDatReqInfo( (datReq), mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) @@ -393,7 +369,7 @@ Buffer * mBuf; #endif /* ERRCLASS & ERRCLS_ADD_RES */ } break; - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKPK(cmPkPtr,(PTR)datReq, mBuf); } @@ -404,7 +380,7 @@ Buffer * mBuf; CMCHKPKLOG(SPkS16, spId, mBuf, EKWU011, pst); pst->event = (Event) KWU_EVT_DAT_REQ; ret1 = SPstTsk(pst,mBuf); - if(pst->selector == KWU_SEL_LC) + if(pst->selector == ODU_SELECTOR_LC) { if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq, sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY) != ROK) @@ -446,14 +422,12 @@ Buffer *mBuf; PUBLIC S16 cmPkKwuDatInd ( Pst * pst, -SuId suId, KwuDatIndInfo* datInd, Buffer * mBuf ) #else -PUBLIC S16 cmPkKwuDatInd(pst, suId, datInd, mBuf) +PUBLIC S16 cmPkKwuDatInd(pst, datInd, mBuf) Pst * pst; -SuId suId; KwuDatIndInfo* datInd; Buffer * mBuf; #endif @@ -480,7 +454,7 @@ Buffer * mBuf; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { /* When the Selector is LWLC, we need to allocate memory, copy * the contents and pass the pointer of the allocated memory. The @@ -504,7 +478,7 @@ Buffer * mBuf; CMCHKPK(cmPkPtr,(PTR)datIndInfo, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuDatIndInfo( (datInd), mBuf); @@ -531,7 +505,6 @@ Buffer * mBuf; RETVALUE(RFAILED); } - CMCHKPKLOG(SPkS16, suId, mBuf, EKWU013, pst); pst->event = (Event) KWU_EVT_DAT_IND; RETVALUE(SPstTsk(pst,mBuf)); @@ -592,12 +565,12 @@ KwuDatCfmInfo* datCfm; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKPK(cmPkPtr,(PTR)datCfm, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuDatCfmInfo( (datCfm), mBuf); @@ -666,7 +639,7 @@ KwuDiscSduInfo* discSdu; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { /* When the Selector is LWLC, we need to allocate memory, copy * the contents and pass the pointer of the allocated memory. The @@ -690,7 +663,7 @@ KwuDiscSduInfo* discSdu; CMCHKPK(cmPkPtr,(PTR)discSduInfo, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuDiscSduInfo( (discSdu), mBuf); @@ -813,12 +786,12 @@ KwuStaIndInfo* staInd; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuStaIndInfo( (staInd), mBuf); @@ -890,7 +863,7 @@ CmLteRlcId rlcId; switch(pst->selector) { #ifdef LCKWU - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkLteRlcId( &rlcId, mBuf); @@ -946,12 +919,12 @@ KwuDiscSduInfo *discCfmSdu; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKPK(cmPkPtr,(PTR)discCfmSdu, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if (ERRCLASS & ERRCLS_ADD_RES) ret1 = cmPkKwuDiscSduInfo((discCfmSdu), mBuf); @@ -1021,7 +994,7 @@ KwuFlowCntrlIndInfo *flowCntrlIndInfo; #ifdef LCKWU switch(pst->selector) { - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { cmPkKwuFlowCntrlIndInfo((flowCntrlIndInfo), mBuf); @@ -1036,7 +1009,7 @@ KwuFlowCntrlIndInfo *flowCntrlIndInfo; } break; - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKPK(cmPkPtr,(PTR) flowCntrlIndInfo, mBuf); } @@ -1265,23 +1238,19 @@ Buffer *mBuf; S16 ret1 = ROK; #endif S16 retVal; - SpId spId = 0; KwuDatReqInfo *datReq = NULLP; KwuDatReqInfo datReqTmp; TRC3(cmUnpkKwuDatReq) - - CMCHKUNPK(SUnpkS16, &(spId), mBuf); - switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { /* Allocate the memory statically as there is no free * in RLC */ @@ -1312,10 +1281,10 @@ Buffer *mBuf; RETVALUE(RFAILED); } - retVal = (*func)(pst, spId, datReq, mBuf); + retVal = (*func)(pst, datReq, mBuf); /* If LWLC is configured, we need to * free the memory here. */ - if(pst->selector == KWU_SEL_LWLC) + if(pst->selector == ODU_SELECTOR_LWLC) { retVal = SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq, sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY); @@ -1363,22 +1332,19 @@ Buffer *mBuf; #endif { S16 ret1 = ROK, retVal; - SuId suId = 0; KwuDatIndInfo *datInd = NULLP; KwuDatIndInfo datIndTmp; TRC3(cmUnpkKwuDatInd) - CMCHKUNPK(SUnpkS16, &(suId), mBuf); - switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { /*SGetStaticBuffer used as RRC has an equivalent free but PDCP * doesn't free any memory */ @@ -1423,10 +1389,10 @@ Buffer *mBuf; (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n"); RETVALUE(RFAILED); } - retVal = (*func)(pst, suId, datInd, mBuf); + retVal = (*func)(pst, datInd, mBuf); /* If LWLC is configured and the destination entity is PDCP, we need to * free the memory here. */ - if((pst->selector == KWU_SEL_LWLC) && (pst->dstEnt == ENTPJ)) + if((pst->selector == ODU_SELECTOR_LWLC) && (pst->dstEnt == ENTPJ)) { retVal = SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(KwuDatIndInfo),SS_SHARABLE_MEMORY); @@ -1488,12 +1454,12 @@ Buffer *mBuf; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &datCfm, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datCfm,\ sizeof(KwuDatCfmInfo),SS_SHARABLE_MEMORY)) != ROK) @@ -1561,12 +1527,12 @@ Buffer *mBuf; CMCHKUNPK(SUnpkS16, &(spId), mBuf); switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &discSdu, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&discSdu,\ sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY)) != ROK) @@ -1661,12 +1627,12 @@ Buffer *mBuf; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *)&staInd, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&staInd,\ sizeof(KwuStaIndInfo),SS_SHARABLE_MEMORY)) != ROK) @@ -1740,7 +1706,7 @@ Buffer *mBuf; switch(pst->selector) { #ifdef LCKWU - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { #if(ERRCLASS & ERRCLS_DEBUG) ret1 = cmUnpkLteRlcId( &rlcId, mBuf); @@ -1789,12 +1755,12 @@ Buffer *mBuf; switch(pst->selector) { - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &discSdu, mBuf); } break; - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&discSdu,\ sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY)) != ROK) @@ -1859,7 +1825,7 @@ Buffer *mBuf; switch(pst->selector) { #ifdef LCKWU - case KWU_SEL_LC: + case ODU_SELECTOR_LC: { if(SGetStaticBuffer(pst->region, pst->pool, @@ -1874,7 +1840,7 @@ Buffer *mBuf; } break; - case KWU_SEL_LWLC: + case ODU_SELECTOR_LWLC: { CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInfo, mBuf); }