X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fmac_stub.c;h=873886d4d70bae8f8c4ebc7366167306f0b68544;hb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;hp=df05b9901061b5e03b1674cb6d7ca9ce27770a2c;hpb=e550b2091fb29289d12a5722b189acbede7862f0;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/mac_stub.c b/src/5gnrrlc/mac_stub.c index df05b9901..873886d4d 100644 --- a/src/5gnrrlc/mac_stub.c +++ b/src/5gnrrlc/mac_stub.c @@ -17,22 +17,22 @@ *******************************************************************************/ #ifdef EGTP_TEST - +#include "common_def.h" #include "mac_stub.h" uint8_t rlcDatSn = 0; uint64_t ulDatNum = 0; -PUBLIC S16 macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta) +uint8_t macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta) { Pst rspPst; - RlcMacSchedRep *schRep; + RlcMacSchedRepInfo *schRep; DU_LOG("\nMAC : Received BO status from RLC"); // SGetSBuf(pst->region, pst->pool, (Data **)&rspPst, sizeof(Pst)); - rspPst.selector = RGU_SEL_TC; + rspPst.selector = ODU_SELECTOR_TC; rspPst.srcEnt = pst->dstEnt; rspPst.dstEnt = pst->srcEnt; rspPst.dstInst = pst->srcInst; @@ -42,7 +42,7 @@ PUBLIC S16 macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta) rspPst.pool = pst->pool; /* Filling Scheduling Report */ - KW_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRep)); + RLC_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRepInfo)); schRep->cellId = boSta->cellId; schRep->rnti = boSta->rnti; @@ -59,7 +59,7 @@ PUBLIC S16 macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta) } -PUBLIC S16 macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData) +uint8_t macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData) { U32 availmem; @@ -69,14 +69,14 @@ PUBLIC S16 macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData) DU_LOG("\nMAC_STUB : Received DL data from RLC to be sent to PHY"); - SPutMsg(dlData->pduInfo[0].pduBuf); + ODU_PUT_MSG(dlData->pduInfo[0].pduBuf); dlData->pduInfo[0].pduBuf = NULL; #if 0 - KW_FREE_SHRABL_BUF(pst->region, pst->pool, + RLC_FREE_SHRABL_BUF(pst->region, pst->pool, dlData, sizeof(RlcMacData)); { - KW_ALLOC_SHRABL_BUF(pst->region, pst->pool, + RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcMacData)); SRegInfoShow(2, &availmem); @@ -84,12 +84,12 @@ PUBLIC S16 macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData) #endif ulData = dlData; - SGetMsg(pst->region, pst->pool, &mBuf); + ODU_GET_MSG(pst->region, pst->pool, &mBuf); macStubBuildUlData(mBuf); ulData->pduInfo[0].pduBuf = mBuf; /* Fill response post */ - rspPst.selector = RGU_SEL_TC; + rspPst.selector = ODU_SELECTOR_TC; rspPst.srcEnt = pst->dstEnt; rspPst.dstEnt = pst->srcEnt; rspPst.dstInst = pst->srcInst; @@ -100,7 +100,7 @@ PUBLIC S16 macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData) ulDatNum++; DU_LOG("\nMAC_STUB : UL data number %d", ulDatNum); - RlcMacProcUlData(&rspPst, 1, ulData); + RlcProcUlData(&rspPst, 1, ulData); return ROK; } @@ -110,7 +110,7 @@ void macStubBuildUlData(Buffer *mBuf) int datSize = 30; U32 availmem; - SAddPstMsgMult((Data *)data, datSize, mBuf); + ODU_ADD_POST_MSG_MULT((Data *)data, datSize, mBuf); /* filling IPv4 header */ CmIpv4Hdr ipv4Hdr; @@ -183,9 +183,9 @@ void macStubBuildUlData(Buffer *mBuf) revPkArray[idx] = pkArray[CM_IPV4_HDRLEN - idx -1]; /* this function automatically reverses revPkArray */ - ret = SAddPreMsgMult(revPkArray, (MsgLen)cnt, mBuf); + ret = ODU_ADD_PRE_MSG_MULT(revPkArray, (MsgLen)cnt, mBuf); - SAddPreMsgMult((Data *)&rlcDatSn, sizeof(uint8_t), mBuf); + ODU_ADD_PRE_MSG_MULT((Data *)&rlcDatSn, sizeof(uint8_t), mBuf); #if 0 SRegInfoShow(0, &availmem); SRegInfoShow(1, &availmem);