X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Frlc_utils.h;h=caf2c7e9414ca1d4d5b9da0bf28895c85f40aff6;hb=904a5d446b480d71da1bf81f892bab86ab365ce6;hp=092dcd628ad1a2bdf308a558d3d937df14838ce7;hpb=e698840bb6fcecc68be5b1d1fd17436bd1d5e83f;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/rlc_utils.h b/src/5gnrrlc/rlc_utils.h index 092dcd628..caf2c7e94 100755 --- a/src/5gnrrlc/rlc_utils.h +++ b/src/5gnrrlc/rlc_utils.h @@ -39,6 +39,7 @@ extern "C" { #endif /* __cplusplus */ #include "du_log.h" +#include "du_app_rlc_inf.h" #define EKWxxx 1 @@ -106,8 +107,8 @@ extern "C" { #ifdef ODU_MEMORY_DEBUG_LOG #define RLC_MEM_LOG(_macro, _file, _line, _func, _size, _datPtr)\ {\ - printf("\n%s=== %s +%d, %s, %d, %p\n", \ - _macro, _file, _line, _func, _size, _datPtr); \ + printf("\n%s,=== %s +%d, %s, %lu, %p \n", \ + _macro, _file, _line, _func, (uint64_t)_size, _datPtr); \ } #else #define RLC_MEM_LOG(_macro, _file, _line, _func, _size, _dataPtr) {} @@ -118,7 +119,7 @@ extern "C" { if (SGetSBuf(_cb->init.region, _cb->init.pool, (Data **)&_buf, \ (Size) _size) == ROK) \ { \ - RLC_MEM_LOG("RLC_ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ memset((_buf), 0, _size); \ } \ else \ @@ -131,7 +132,7 @@ extern "C" { { \ if (_buf != NULLP) \ { \ - RLC_MEM_LOG("RLC_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutSBuf(_cb->init.region, _cb->init.pool, \ (Data *) _buf, (Size) _size); \ _buf = NULLP; \ @@ -142,7 +143,7 @@ extern "C" { { \ if (_buf != NULLP) \ { \ - RLC_MEM_LOG("RLC_FREE_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,FREE_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutStaticBuffer(_region, _pool, \ (Data *) _buf, (Size) _size, 0); \ _buf = NULLP; \ @@ -152,7 +153,7 @@ extern "C" { #define RLC_FREE_SHRABL_BUF_WC(_region, _pool,_buf, _size) \ { \ if (_buf != NULLP){\ - RLC_MEM_LOG("RLC_FREE_SHRABL_BUF_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,FREE_SHRABL_BUF_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutStaticBuffer(_region, _pool, \ (Data *) _buf, (Size) _size, 0); \ _buf = NULLP; \ @@ -164,7 +165,7 @@ extern "C" { if(SGetStaticBuffer(_region, _pool, (Data **)&_buf, \ (Size) _size, 0)==ROK) \ {\ - RLC_MEM_LOG("RLC_ALLOC_SHRABL_BUF_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,ALLOC_SHRABL_BUF_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ }\ else\ {\ @@ -177,7 +178,7 @@ extern "C" { if (SGetStaticBuffer(_region, _pool, (Data **)&_buf, \ (Size) _size, 0) == ROK) \ { \ - RLC_MEM_LOG("RLC_ALLOC_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,ALLOC_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ memset((_buf), 0, _size); \ } \ else \ @@ -190,7 +191,7 @@ extern "C" { {\ if(SGetSBuf(_cb->init.region, _cb->init.pool, (Data **)&_buf, (Size) _size) == ROK)\ {\ - RLC_MEM_LOG("RLC_ALLOC_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,ALLOC_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ }\ } @@ -198,7 +199,7 @@ extern "C" { { \ if(_sdu->mBuf) \ { \ - RLC_MEM_LOG("RLC_REMOVE_SDU", __FILE__, __LINE__, __FUNCTION__, _sdu->sduSz, _sdu->mBuf);\ + RLC_MEM_LOG("RLC,REMOVE_SDU", __FILE__, __LINE__, __FUNCTION__, _sdu->sduSz, _sdu->mBuf);\ ODU_PUT_MSG_BUF(_sdu->mBuf); \ } \ cmLListDelFrm(_sduQ,&_sdu->lstEnt); \ @@ -210,7 +211,7 @@ extern "C" { { \ if (_buf != NULLP) \ { \ - RLC_MEM_LOG("RLC_PST_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,PST_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutSBuf(_region, _pool, \ (Data *) _buf, (Size) _size); \ _buf = NULLP; \ @@ -260,7 +261,7 @@ extern "C" { { \ if (_buf != NULLP) \ { \ - RLC_MEM_LOG("RLC_SHRABL_STATIC_BUF_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,SHRABL_STATIC_BUF_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutStaticBuffer(_region, _pool, \ (Data *) _buf, (Size) _size, 0); \ _buf = NULLP; \ @@ -271,7 +272,7 @@ extern "C" { { \ SGetStaticBuffer(_region, _pool, (Data **)&_buf, \ (Size) _size, 0); \ - RLC_MEM_LOG("RLC_SHRABL_STATIC_BUF_ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + RLC_MEM_LOG("RLC,SHRABL_STATIC_BUF_ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ } #endif @@ -1115,7 +1116,6 @@ do \ #define RLC_DL_INST 1 #define PDCP_SN 1 -#define RLC_REASSEMBLY_TMR_BASE 5 /* Used to calculate timer value from enum values */ /* Fill Pst structure for sending msg from RLC to DUAPP */ #define FILL_PST_RLC_TO_DUAPP(_pst, _srcInst, _event) \ @@ -1708,13 +1708,6 @@ typedef struct rlcUlCb #endif /* LTE_L2_MEAS */ }RlcUlCb; -typedef enum -{ - SEARCH, - CREATE, - DELETE -}RlcSnssaiActionType; - typedef struct rlcThptPerUe { uint16_t ueId; @@ -1725,13 +1718,15 @@ typedef struct rlcTptPerSnssai { Snssai *snssai; uint64_t dataVol; + double tpt; }RlcTptPerSnssai; typedef struct rlcSnssaiTputInfo { CmTimer snssaiThptTmr; /* Throughput Timer */ - CmLListCp *tputPerSnssaiList; + CmLListCp *dlTputPerSnssaiList; + CmLListCp *ulTputPerSnssaiList; }RlcSnssaiTputInfo; typedef struct rlcUeTputInfo @@ -1786,6 +1781,7 @@ typedef struct rlcCb RlcCb *rlcCb[MAX_RLC_INSTANCES]; /*!< RLC global control block */ +CmLListCp *arrTputPerSnssai[DIR_BOTH]; /*Stores the address of Througput LL*/ /**************************************************************************** * Declarations ***************************************************************************/ @@ -1807,9 +1803,12 @@ uint8_t rlcUeDeleteTmrExpiry(PTR cb); void rlcSnssaiThptTmrExpiry(PTR cb); RlcTptPerSnssai* rlcHandleSnssaiTputlist(RlcCb *gCb, Snssai *snssai,\ - RlcSnssaiActionType action); -void rlcCalculateTputPerSnssai(CmLListCp *snssaiList); -void rlcDelTputSnssaiList(RlcCb *gCb); + ActionTypeLL action, Direction dir); +uint8_t rlcCalculateTputPerSnssai(CmLListCp *snssaiList, Direction dir); +uint8_t rlcDelTputSnssaiList(RlcCb *gCb, Direction dir); +uint8_t BuildSliceReportToDu(uint8_t snssaiCnt); +bool rlcFindSliceEntry(SliceIdentifier snssaiVal, uint8_t *snssaiIdx,\ + SlicePmList *sliceStats); #ifdef LTE_L2_MEAS Void rlcLmmSendAlarm ARGS (( RlcCb *gCb,