X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_utils.h;h=fea6322f55f3333eca7400dc77f2de065b1812cd;hb=e54c2aae19e97065def9e5ab2d1488477b1ea209;hp=447774e131a1b6d4b6800588997a9109d218a7d3;hpb=284fc2e85cb5008061a7f8c6d07947a1c6209432;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_utils.h b/src/5gnrmac/mac_utils.h index 447774e13..fea6322f5 100644 --- a/src/5gnrmac/mac_utils.h +++ b/src/5gnrmac/mac_utils.h @@ -19,14 +19,15 @@ /* Contains common utility definitions to be used at MAC */ #define MAX_SHORT_BSR_TABLE_ENTRIES 32 +#define MAX_LONG_BSR_TABLE_ENTRIES 256 #define MAC_MEM_REGION 4 #define MAC_POOL 1 #ifdef ODU_MEMORY_DEBUG_LOG #define MAC_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 MAC_MEM_LOG(_macro, _file, _line, _func, _size, _dataPtr) {} @@ -41,7 +42,7 @@ if(_ret == ROK) \ { \ memset(_datPtr, 0, _size); \ - MAC_MEM_LOG("MAC_ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\ + MAC_MEM_LOG("MAC,ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\ } \ else \ { \ @@ -54,7 +55,7 @@ { \ if(_datPtr) \ { \ - MAC_MEM_LOG("MAC_FREE", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\ + MAC_MEM_LOG("MAC,FREE", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\ SPutSBuf(MAC_MEM_REGION, MAC_POOL, \ (Data *)_datPtr, _size); \ _datPtr = NULLP; \ @@ -68,7 +69,7 @@ if(SGetStaticBuffer(MAC_MEM_REGION, MAC_POOL, \ (Data **)&_buf, (Size) _size, 0) == ROK) \ { \ - MAC_MEM_LOG("MAC_ALLOC_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + MAC_MEM_LOG("MAC,ALLOC_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ memset((_buf), 0, _size); \ } \ else \ @@ -82,7 +83,7 @@ { \ if (_buf != NULLP) \ { \ - MAC_MEM_LOG("MAC_FREE_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ + MAC_MEM_LOG("MAC,FREE_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\ (Void) SPutStaticBuffer(_region, _pool, \ (Data *) _buf, (Size) _size, 0); \ _buf = NULLP; \ @@ -144,8 +145,9 @@ } /* Function declaration */ -uint16_t getNewCrnti(uint8_t *crntiMap); -uint32_t shortBsrBytesTable[MAX_SHORT_BSR_TABLE_ENTRIES]; +extern uint32_t shortBsrBytesTable[MAX_SHORT_BSR_TABLE_ENTRIES]; +extern uint32_t longBsrBytesTable[MAX_LONG_BSR_TABLE_ENTRIES]; + /********************************************************************** End of file **********************************************************************/