X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fmt%2Fss_msg.c;h=a453e3409de462015b2a36bf303ccf1731075361;hb=ba78fa13b01e0729fe0a6a7a18cbf1d52cdcda1c;hp=b7bd4ebeef3cd4d92b83346d32aaa0c977d451b8;hpb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;p=o-du%2Fl2.git diff --git a/src/mt/ss_msg.c b/src/mt/ss_msg.c index b7bd4ebee..a453e3409 100644 --- a/src/mt/ss_msg.c +++ b/src/mt/ss_msg.c @@ -91,8 +91,8 @@ #endif /* SS_SEUM_CAVIUM */ #include #ifdef XEON_SPECIFIC_CHANGES -U32 startMemLeak=0; -extern pthread_mutex_t memLock; +uint32_t startMemLeak=0; +pthread_mutex_t memLock; #endif #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF)) @@ -104,23 +104,23 @@ extern pthread_mutex_t memLock; #include "mt_plat_t33.x" #endif /* forward declarations */ -PUBLIC S16 ssGetDBufOfSize ARGS((Region region, Size size, Buffer **dBuf)); -PUBLIC S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf); +S16 ssGetDBufOfSize ARGS((Region region, Size size, Buffer **dBuf)); +S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf); #ifdef SSI_STATIC_MEM_LEAK_DETECTION -EXTERN PUBLIC U32 GetNextFreeIdx ARGS((StaticMemAllocInfo * memAllocInfo)); -EXTERN PUBLIC void LogForStaticMemLeak ARGS((StaticMemAllocInfo* memAllocInfo, char* - file, U32 line, U32 size, void* ptr, U32 idx)); -EXTERN PUBLIC void FreeIdx ARGS((U8* ptr, U32 idx, StaticMemAllocInfo* - memAllocInfo,U32 size, char* file, U32 line)); +uint32_t GetNextFreeIdx ARGS((StaticMemAllocInfo * memAllocInfo)); +void LogForStaticMemLeak ARGS((StaticMemAllocInfo* memAllocInfo, char* + file, uint32_t line, uint32_t size, void* ptr, uint32_t idx)); +void FreeIdx ARGS((uint8_t* ptr, uint32_t idx, StaticMemAllocInfo* + memAllocInfo,uint32_t size, char* file, uint32_t line)); #endif #ifdef SS_USE_ZBC_MEMORY #ifdef T2K_MEM_LEAK_DBG -PRIVATE S16 SPutZbcDBufNew ARGS((Region region, Buffer *buf,char*,U32)); +static S16 SPutZbcDBufNew ARGS((Region region, Buffer *buf,char*,uint32_t)); #else -PRIVATE S16 SPutZbcDBuf ARGS((Region region, Buffer *buf)); -PUBLIC S16 SAttachPtrToBuf ARGS(( Region region, Pool pool, Data *ptr, +static S16 SPutZbcDBuf ARGS((Region region, Buffer *buf)); +S16 SAttachPtrToBuf ARGS(( Region region, Pool pool, Data *ptr, MsgLen totalLen, Buffer** mBuf)); #endif #endif @@ -129,35 +129,35 @@ PUBLIC S16 SAttachPtrToBuf ARGS(( Region region, Pool pool, Data *ptr, #ifdef SS_M_PROTO_REGION #ifdef T2K_MEM_LEAK_DBG #define DupMsg(region,buffer) DupMsgNew(region,buffer,file,line) -PRIVATE Buffer *DupMsgNew ARGS((Region region, Buffer *buffer,char*,U32)); +static Buffer *DupMsgNew ARGS((Region region, Buffer *buffer,char*,uint32_t)); #else #ifdef INTEL_WLS #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAttachPtrToMBuf1 ARGS(( Region region, Pool pool, Data *ptr, MsgLen totalLen, - MsgLen ptrLen, Buffer** mBuf, char* file, U32 line)); +S16 SAttachPtrToMBuf1 ARGS(( Region region, Pool pool, Data *ptr, MsgLen totalLen, + MsgLen ptrLen, Buffer** mBuf, char* file, uint32_t line)); #else -PUBLIC S16 SAttachPtrToMBuf ARGS(( Region region, Pool pool, Data *ptr, MsgLen totalLen, +S16 SAttachPtrToMBuf ARGS(( Region region, Pool pool, Data *ptr, MsgLen totalLen, MsgLen ptrLen, Buffer** mBuf)); #endif #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAttachWlsPtrToMBuf1 ARGS(( Region region, Pool pool, Data *ptr, +S16 SAttachWlsPtrToMBuf1 ARGS(( Region region, Pool pool, Data *ptr, Data *readPtr, MsgLen totalLen, - MsgLen ptrLen, Buffer** mBuf, char* file, U32 line)); + MsgLen ptrLen, Buffer** mBuf, char* file, uint32_t line)); -PUBLIC S16 SAttachWlsPtrToMBuf ARGS(( Region region, Pool pool, Data *ptr, +S16 SAttachWlsPtrToMBuf ARGS(( Region region, Pool pool, Data *ptr, Data *readPtr, MsgLen totalLen, MsgLen ptrLen, Buffer** mBuf)); #endif #ifdef TENB_DPDK_BUF -PUBLIC S16 SDetachDpdkPtrFrmMBuf ARGS((Buffer *mBuf, Data **ptr)); -PUBLIC S16 SDetachDpdkPtrFrmDBuf ARGS((Buffer *mBuf, Data **ptr)); -PUBLIC S16 SPutSBufDpdk ARGS(( Data *ptr)); +S16 SDetachDpdkPtrFrmMBuf ARGS((Buffer *mBuf, Data **ptr)); +S16 SDetachDpdkPtrFrmDBuf ARGS((Buffer *mBuf, Data **ptr)); +S16 SPutSBufDpdk ARGS(( Data *ptr)); #endif /* TENB_DPDK_BUF */ #endif /* INTEL_WLS */ -PRIVATE Buffer *DupMsg ARGS((Region region, Buffer *buffer)); +static Buffer *DupMsg ARGS((Region region, Buffer *buffer)); #endif #endif /* SS_M_PROTO_REGION */ @@ -213,10 +213,10 @@ PRIVATE Buffer *DupMsg ARGS((Region region, Buffer *buffer)); } -EXTERN pthread_t tmpRegTidMap[20]; +pthread_t tmpRegTidMap[20]; #define CM_MEM_GET_REGION(_region) \ { \ - U8 _regCnt; \ + uint8_t _regCnt; \ _region = 0xFF; \ \ for(_regCnt = 0; _regCnt < 12; _regCnt++) \ @@ -230,7 +230,7 @@ EXTERN pthread_t tmpRegTidMap[20]; } #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF) || defined(L2_OPTMZ)) -extern S32 clusterMode; +S32 clusterMode; #endif /* * @@ -251,24 +251,24 @@ extern S32 clusterMode; * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 ssGetDBufOfSizeNew +S16 ssGetDBufOfSizeNew ( Region region, Size size, Buffer **dBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 ssGetDBufOfSize +S16 ssGetDBufOfSize ( Region region, Size size, Buffer **dBuf ) #else -PUBLIC S16 ssGetDBufOfSize(region, size, dBuf) +S16 ssGetDBufOfSize(region, size, dBuf) Region region; Size size; Buffer **dBuf; @@ -279,8 +279,6 @@ Buffer **dBuf; Data *data; SsDblk *dptr; - TRC1(ssGetDBufOfSize) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ if (!dBuf) @@ -307,7 +305,7 @@ Buffer **dBuf; /* ss006.301 : optmized this function */ mdsize = MDBSIZE + size; #ifdef SS_HISTOGRAM_SUPPORT - if (SAlloc(region, &mdsize, 0, (Data **) dBuf, __LINE__, (U8*) __FILE__, ENTNC) != ROK) + if (SAlloc(region, &mdsize, 0, (Data **) dBuf, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK) #else if (SAlloc(region, &mdsize, 0, (Data **) dBuf) != ROK) #endif /* SS_HISTOGRAM_SUPPORT */ @@ -351,42 +349,42 @@ Buffer **dBuf; /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT #ifdef ANSI -PUBLIC S16 SGetMsgNew +S16 SGetMsgNew ( Region region, /* region id */ Pool pool, /* pool id */ Buffer **mBuf, /* pointer to message buffer */ -U32 line, -U8 *fileName +uint32_t line, +uint8_t *fileName ) #else -PUBLIC S16 SGetMsgNew(region, pool, mBuf, line, fileName) +S16 SGetMsgNew(region, pool, mBuf, line, fileName) Region region; /* region id */ Pool pool; /* pool id */ Buffer **mBuf; /* pointer to message buffer */ -U32 line; -U8 *fileName; +uint32_t line; +uint8_t *fileName; #endif #else /* SS_HISTOGRAM_SUPPORT */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SGetMsgNew +S16 SGetMsgNew ( Region region, /* region id */ Pool pool, /* pool id */ Buffer **mBuf, /* pointer to message buffer */ char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SGetMsg +S16 SGetMsg ( Region region, /* region id */ Pool pool, /* pool id */ Buffer **mBuf /* pointer to message buffer */ ) #else -PUBLIC S16 SGetMsg(region, pool, mBuf) +S16 SGetMsg(region, pool, mBuf) Region region; /* region id */ Pool pool; /* pool id */ Buffer **mBuf; /* pointer to message buffer */ @@ -411,8 +409,6 @@ Buffer **mBuf; /* pointer to message buffer */ #endif - TRC1(SGetMsgNew) - #ifdef XEON_SPECIFIC_CHANGES region = 0; pool = 0; @@ -582,34 +578,34 @@ S16 SSetMBufPool(Buffer *mBuf, Pool pool) /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT #ifdef ANSI -PUBLIC S16 SPutMsgNew +S16 SPutMsgNew ( Buffer *mBuf, -U32 line, -U8 *fileName +uint32_t line, +uint8_t *fileName ) #else -PUBLIC S16 SPutMsgNew(mBuf, line, fileName) +S16 SPutMsgNew(mBuf, line, fileName) Buffer *mBuf; -U32 line; -U8 *fileName; +uint32_t line; +uint8_t *fileName; #endif #else /* SS_HISTOGRAM_SUPPORT */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SPutMsgNew +S16 SPutMsgNew ( Buffer *mBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SPutMsg +S16 SPutMsg ( Buffer *mBuf ) #else -PUBLIC S16 SPutMsg(mBuf) +S16 SPutMsg(mBuf) Buffer *mBuf; #endif #endif @@ -618,7 +614,7 @@ Buffer *mBuf; Buffer *tmp; SsMsgInfo *minfo; #ifdef SS_MEM_WL_DEBUG - U8 tmpThrReg; + uint8_t tmpThrReg; #endif /* ss001.301: additions */ @@ -626,8 +622,6 @@ Buffer *mBuf; Ent entId = 0; #endif /* SS_HISTOGRAM_SUPPORT */ - TRC1(SPutMsgNew) - #ifdef L2_OPTMZ //#ifdef RADIO_CLUSTER if(clusterMode == RADIO_CLUSTER_MODE) @@ -644,8 +638,8 @@ Buffer *mBuf; #endif #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF)) { - extern pthread_t gMacTId,gRlcTId; - extern S32 clusterMode; + pthread_t gMacTId,gRlcTId; + S32 clusterMode; if(clusterMode == RADIO_CLUSTER_MODE) { @@ -758,40 +752,38 @@ Buffer *mBuf; */ /* ss001.301: additions */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SPutStaticBufferNew +S16 SPutStaticBufferNew ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ -U8 memType, /* memory type used if shareable or not */ +uint8_t memType, /* memory type used if shareable or not */ char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SPutStaticBuffer +S16 SPutStaticBuffer ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ -U8 memType /* memory type used if shareable or not */ +uint8_t memType /* memory type used if shareable or not */ ) #else -PUBLIC S16 SPutStaticBuffer(region, pool, ptr, size) +S16 SPutStaticBuffer(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data *ptr; /* pointer to buffer */ Size size; /* size */ -U8 memType; /* memory type used if shareable or not */ +uint8_t memType; /* memory type used if shareable or not */ #endif #endif { S16 ret = RFAILED; - TRC1(SPutStaticBuffer); - #if (ERRCLASS & ERRCLS_INT_PAR) /* validate region ID */ if (region >= SS_MAX_REGS) @@ -822,7 +814,7 @@ U8 memType; /* memory type used if shareable or not */ #endif #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF)) { - extern pthread_t gMacTId,gRlcTId; + pthread_t gMacTId,gRlcTId; if(clusterMode == RADIO_CLUSTER_MODE) { @@ -913,40 +905,38 @@ U8 memType; /* memory type used if shareable or not */ * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SGetStaticBufferNew +S16 SGetStaticBufferNew ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ -U8 memType, /* memory type used if shareable or not */ +uint8_t memType, /* memory type used if shareable or not */ char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SGetStaticBuffer +S16 SGetStaticBuffer ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ -U8 memType /* memory type used if shareable or not */ +uint8_t memType /* memory type used if shareable or not */ ) #else -PUBLIC S16 SGetStaticBuffer(region, pool, ptr, size) +S16 SGetStaticBuffer(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data **ptr; /* pointer to buffer */ Size size; /* size requested */ -U8 memType; /* memory type used if shareable or not */ +uint8_t memType; /* memory type used if shareable or not */ #endif #endif { S16 ret = RFAILED; - U32 flags; - - TRC1(SGetStaticBuffer); + uint32_t flags; #if (ERRCLASS & ERRCLS_INT_PAR) /* validate region ID */ @@ -1027,24 +1017,24 @@ U8 memType; /* memory type used if shareable or not */ } #endif /* SS_LOCKLESS_MEMORY */ -#ifdef INTEL_WLS +#ifdef INTEL_WLS_MEM #ifndef SS_LOCKLESS_MEMORY #ifdef ANSI -PUBLIC S16 SGetStaticBuffer +S16 SGetStaticBuffer ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ -U8 memType /* memory type used if shareable or not */ +uint8_t memType /* memory type used if shareable or not */ ) #else -PUBLIC S16 SGetStaticBuffer(region, pool, ptr, size) +S16 SGetStaticBuffer(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data **ptr; /* pointer to buffer */ Size size; /* size requested */ -U8 memType; /* memory type used if shareable or not */ +uint8_t memType; /* memory type used if shareable or not */ #endif { S16 ret; @@ -1056,21 +1046,21 @@ U8 memType; /* memory type used if shareable or not */ #ifdef ANSI -PUBLIC S16 SPutStaticBuffer +S16 SPutStaticBuffer ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ -U8 memType /* memory type used if shareable or not */ +uint8_t memType /* memory type used if shareable or not */ ) #else -PUBLIC S16 SPutStaticBuffer(region, pool, ptr, size) +S16 SPutStaticBuffer(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data *ptr; /* pointer to buffer */ Size size; /* size */ -U8 memType; /* memory type used if shareable or not */ +uint8_t memType; /* memory type used if shareable or not */ #endif { @@ -1083,17 +1073,17 @@ U8 memType; /* memory type used if shareable or not */ } #endif #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SGetSBufWls1 +S16 SGetSBufWls1 ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ char* file, -U32 line +uint32_t line ) #else -PUBLIC S16 SGetSBufWls +S16 SGetSBufWls ( Region region, /* region ID */ Pool pool, /* pool ID */ @@ -1104,7 +1094,7 @@ Size size /* size requested */ { S16 ret; #ifndef SS_LOCKLESS_MEMORY - U32 flags = 0; + uint32_t flags = 0; #endif #ifdef SS_LOCKLESS_MEMORY @@ -1125,17 +1115,17 @@ Size size /* size requested */ } #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SPutSBufWls1 +S16 SPutSBufWls1 ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ char* file, -U32 line +uint32_t line ) #else -PUBLIC S16 SPutSBufWls +S16 SPutSBufWls ( Region region, /* region ID */ Pool pool, /* pool ID */ @@ -1184,48 +1174,48 @@ Size size /* size */ /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT #ifdef ANSI -PUBLIC S16 SGetSBufNew +S16 SGetSBufNew ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ -U32 line, -U8 *fileName +uint32_t line, +uint8_t *fileName ) #else -PUBLIC S16 SGetSBufNew(region, pool, ptr, size, line, fileName) +S16 SGetSBufNew(region, pool, ptr, size, line, fileName) Region region; /* region ID */ Pool pool; /* pool ID */ Data **ptr; /* pointer to buffer */ Size size; /* size requested */ -U32 line; -U8 *fileName; +uint32_t line; +uint8_t *fileName; #endif #else /* SS_HISTOGRAM_SUPPORT */ #if (defined(SSI_STATIC_MEM_LEAK_DETECTION) || defined(T2K_MEM_LEAK_DBG)) #ifdef ANSI -PUBLIC S16 SGetSBuf1 +S16 SGetSBuf1 ( Region region, /* region ID */ Pool pool, /* pool ID */ Data **ptr, /* pointer to buffer */ Size size, /* size requested */ char* file, -U32 line +uint32_t line ) #else -PUBLIC S16 SGetSBuf1(region, pool, ptr, size, file, line) +S16 SGetSBuf1(region, pool, ptr, size, file, line) Region region; /* region ID */ Pool pool; /* pool ID */ Data **ptr; /* pointer to buffer */ Size size; /* size requested */ char* file; -U32 line; +uint32_t line; #endif #else #ifdef ANSI -PUBLIC S16 SGetSBuf +S16 SGetSBuf ( Region region, /* region ID */ Pool pool, /* pool ID */ @@ -1233,7 +1223,7 @@ Data **ptr, /* pointer to buffer */ Size size /* size requested */ ) #else -PUBLIC S16 SGetSBuf(region, pool, ptr, size) +S16 SGetSBuf(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data **ptr; /* pointer to buffer */ @@ -1243,7 +1233,7 @@ Size size; /* size requested */ #endif /* SS_HISTOGRAM_SUPPORT */ { S16 ret; - U32 flags; + uint32_t flags; #ifdef SSI_STATIC_MEM_LEAK_DETECTION Size tmpSize; #endif @@ -1253,7 +1243,6 @@ Size size; /* size requested */ Bool hstReg = FALSE; #endif /* SS_HISTOGRAM_SUPPORT */ - TRC1(SGetSBufNew); region = SS_GET_THREAD_MEM_REGION(); #ifdef INTEL_WLS @@ -1383,14 +1372,14 @@ Size size; /* size requested */ #ifdef XEON_SPECIFIC_CHANGES pthread_mutex_lock(&(memLock)); #endif - U32 idx = GetNextFreeIdx(&SMemLeakInfo[region]); - U8* allocatedPtr = *ptr; + uint32_t idx = GetNextFreeIdx(&SMemLeakInfo[region]); + uint8_t* allocatedPtr = *ptr; void* actualPtr = allocatedPtr + 4; *ptr = actualPtr; /* store the index in the memory allocated itself */ - /**((U32*)*((U32*)allocatedPtr)) = idx;*/ - *((U32*)allocatedPtr) = idx; - /*printf("region = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((U32*)allocatedPtr));*/ + /**((uint32_t*)*((uint32_t*)allocatedPtr)) = idx;*/ + *((uint32_t*)allocatedPtr) = idx; + /*printf("region = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((uint32_t*)allocatedPtr));*/ LogForStaticMemLeak(&SMemLeakInfo[region], file, @@ -1461,48 +1450,48 @@ Size size; /* size requested */ /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT #ifdef ANSI -PUBLIC S16 SPutSBufNew +S16 SPutSBufNew ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ -U32 line, -U8 *fileName +uint32_t line, +uint8_t *fileName ) #else -PUBLIC S16 SPutSBufNew(region, pool, ptr, size, line, fileName) +S16 SPutSBufNew(region, pool, ptr, size, line, fileName) Region region; /* region ID */ Pool pool; /* pool ID */ Data *ptr; /* pointer to buffer */ Size size; /* size */ -U32 line; -U8 *fileName; +uint32_t line; +uint8_t *fileName; #endif #else /* SS_HISTOGRAM_SUPPORT */ #if (defined(SSI_STATIC_MEM_LEAK_DETECTION) || defined(T2K_MEM_LEAK_DBG)) #ifdef ANSI -PUBLIC S16 SPutSBuf1 +S16 SPutSBuf1 ( Region region, /* region ID */ Pool pool, /* pool ID */ Data *ptr, /* pointer to buffer */ Size size, /* size */ char* file, -U32 line +uint32_t line ) #else -PUBLIC S16 SPutSBuf1(region, pool, ptr, size, file, line) +S16 SPutSBuf1(region, pool, ptr, size, file, line) Region region; /* region ID */ Pool pool; /* pool ID */ Data *ptr; /* pointer to buffer */ Size size; /* size */ char* file; -U32 line; +uint32_t line; #endif #else #ifdef ANSI -PUBLIC S16 SPutSBuf +S16 SPutSBuf ( Region region, /* region ID */ Pool pool, /* pool ID */ @@ -1510,7 +1499,7 @@ Data *ptr, /* pointer to buffer */ Size size /* size */ ) #else -PUBLIC S16 SPutSBuf(region, pool, ptr, size) +S16 SPutSBuf(region, pool, ptr, size) Region region; /* region ID */ Pool pool; /* pool ID */ Data *ptr; /* pointer to buffer */ @@ -1526,9 +1515,6 @@ Size size; /* size */ Bool hstReg = FALSE; #endif /* SS_HISTOGRAM_SUPPORT */ - TRC1(SPutSBufNew); - - region = SS_GET_THREAD_MEM_REGION(); #if (!defined(SS_LOCKLESS_MEMORY) && defined(INTEL_WLS)) region = 1; @@ -1609,7 +1595,7 @@ Size size; /* size */ #ifdef XEON_SPECIFIC_CHANGES pthread_mutex_lock(&(memLock)); #endif - U32 idx = *((U32*)((U8 *)ptr - 4)); + uint32_t idx = *((uint32_t*)((uint8_t *)ptr - 4)); FreeIdx(ptr,idx,&SMemLeakInfo[region],size,file,line); #ifdef XEON_SPECIFIC_CHANGES pthread_mutex_unlock(&(memLock)); @@ -1693,20 +1679,18 @@ Size size; /* size */ */ #ifdef ANSI -PUBLIC S16 SInitMsg +S16 SInitMsg ( Buffer *mBuf ) #else -PUBLIC S16 SInitMsg(mBuf) +S16 SInitMsg(mBuf) Buffer *mBuf; #endif { SsMsgInfo *minfo; Buffer *tmp; - U8 tmpRegId; - - TRC1(SInitMsg) + uint8_t tmpRegId; #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ @@ -1742,7 +1726,7 @@ Buffer *mBuf; #if 1 #ifdef T2K_MEM_LEAK_DBG char * file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif (Void) SPutDBuf(tmpRegId, minfo->pool, tmp); @@ -1784,14 +1768,14 @@ Buffer *mBuf; * */ #ifdef ANSI -PUBLIC S16 SAddPreMsgMultInOrder +S16 SAddPreMsgMultInOrder ( Data *src, MsgLen cnt, Buffer *mBuf ) #else -PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf) +S16 SAddPreMsgMultInOrder(src, cnt, mBuf) Data *src; MsgLen cnt; Buffer *mBuf; @@ -1807,7 +1791,6 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf) MsgLen offset; Data *rptr; Data *revSrc; - TRC1(SAddPreMsgMultInOrder) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ @@ -1889,7 +1872,7 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf) prevblk = prevblk->b_cont; #ifdef T2K_MEM_LEAK_DBG char * file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif (Void) SPutDBuf(minfo->region, minfo->pool, curblk); @@ -1973,13 +1956,13 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf) #ifdef ANSI -PUBLIC S16 SAddPreMsg +S16 SAddPreMsg ( Data data, Buffer *mBuf ) #else -PUBLIC S16 SAddPreMsg (data, mBuf) +S16 SAddPreMsg (data, mBuf) Data data; Buffer *mBuf; #endif @@ -1988,8 +1971,6 @@ Buffer *mBuf; Buffer *tmp; Buffer *newb; - TRC1(SAddPreMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ if (!mBuf) @@ -2077,13 +2058,13 @@ Buffer *mBuf; #ifdef ANSI -PUBLIC S16 SAddPstMsg +S16 SAddPstMsg ( Data data, Buffer *mBuf ) #else -PUBLIC S16 SAddPstMsg (data, mBuf) +S16 SAddPstMsg (data, mBuf) Data data; Buffer *mBuf; #endif @@ -2091,8 +2072,6 @@ Buffer *mBuf; SsMsgInfo *minfo; Buffer *tmp; Buffer *newb; - - TRC1(SAddPstMsg) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ @@ -2169,25 +2148,25 @@ Buffer *mBuf; */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAddPreMsgMult1 +S16 SAddPreMsgMult1 ( Data *src, MsgLen cnt, Buffer *mBuf, char *file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAddPreMsgMult +S16 SAddPreMsgMult ( Data *src, MsgLen cnt, Buffer *mBuf ) #else -PUBLIC S16 SAddPreMsgMult(src, cnt, mBuf) +S16 SAddPreMsgMult(src, cnt, mBuf) Data *src; MsgLen cnt; Buffer *mBuf; @@ -2204,8 +2183,6 @@ Buffer *mBuf; MsgLen offset; Data *rptr; - TRC1(SAddPreMsgMult) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ if (mBuf == NULLP) @@ -2348,24 +2325,24 @@ Buffer *mBuf; */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAddPstMsgMult1 +S16 SAddPstMsgMult1 ( Data *src, MsgLen cnt, Buffer *mBuf, char *file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAddPstMsgMult +S16 SAddPstMsgMult ( Data *src, MsgLen cnt, Buffer *mBuf ) #else -PUBLIC S16 SAddPstMsgMult(src, cnt, mBuf) +S16 SAddPstMsgMult(src, cnt, mBuf) Data *src; MsgLen cnt; Buffer *mBuf; @@ -2382,8 +2359,6 @@ Buffer *mBuf; MsgLen numBytes; Data *wptr; - TRC1(SAddPstMsgMult) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ if (mBuf == NULLP) @@ -2535,13 +2510,13 @@ Buffer *mBuf; #ifdef ANSI -PUBLIC S16 SRemPreMsg +S16 SRemPreMsg ( Data *dataPtr, Buffer *mBuf ) #else -PUBLIC S16 SRemPreMsg(dataPtr, mBuf) +S16 SRemPreMsg(dataPtr, mBuf) Data *dataPtr; Buffer *mBuf; #endif @@ -2550,11 +2525,9 @@ Buffer *mBuf; Buffer *tmp; #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SRemPreMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!dataPtr) @@ -2622,13 +2595,13 @@ Buffer *mBuf; #ifdef ANSI -PUBLIC S16 SRemPstMsg +S16 SRemPstMsg ( Data *dataPtr, /* pointer to data */ Buffer *mBuf ) #else -PUBLIC S16 SRemPstMsg(dataPtr, mBuf) +S16 SRemPstMsg(dataPtr, mBuf) Data *dataPtr; /* pointer to data */ Buffer *mBuf; /* message buffer */ #endif @@ -2638,11 +2611,9 @@ Buffer *mBuf; /* message buffer */ Buffer *last; #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SRemPstMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (dataPtr == NULLP) @@ -2724,14 +2695,14 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SRemPreMsgMult +S16 SRemPreMsgMult ( Data *dst, /* destination */ MsgLen cnt, /* count */ Buffer *mBuf ) #else -PUBLIC S16 SRemPreMsgMult(dst, cnt, mBuf) +S16 SRemPreMsgMult(dst, cnt, mBuf) Data *dst; /* destination */ MsgLen cnt; /* count */ Buffer *mBuf; /* message buffer */ @@ -2742,10 +2713,9 @@ Buffer *mBuf; /* message buffer */ MsgLen numBytes; #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SRemPreMsgMult) /* ss023.103 - Modification of SRemPreMsgMult for bug fix */ @@ -2847,14 +2817,14 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SRemPstMsgMult +S16 SRemPstMsgMult ( Data *dst, /* destination */ MsgLen cnt, /* count */ Buffer *mBuf ) #else -PUBLIC S16 SRemPstMsgMult(dst, cnt, mBuf) +S16 SRemPstMsgMult(dst, cnt, mBuf) Data *dst; /* destination */ MsgLen cnt; /* count */ Buffer *mBuf; /* message buffer */ @@ -2868,10 +2838,9 @@ Buffer *mBuf; /* message buffer */ Data *cptr; #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SRemPstMsgMult) #if (ERRCLASS & ERRCLS_INT_PAR) /* check count */ @@ -2982,14 +2951,14 @@ Buffer *mBuf; /* message buffer */ #ifdef ANSI -PUBLIC S16 SExamMsg +S16 SExamMsg ( Data *dataPtr, /* pointer to data */ Buffer *mBuf, /* message buffer */ MsgLen idx ) #else -PUBLIC S16 SExamMsg(dataPtr, mBuf, idx) +S16 SExamMsg(dataPtr, mBuf, idx) Data *dataPtr; /* pointer to data */ Buffer *mBuf; /* message buffer */ MsgLen idx; /* index */ @@ -2998,8 +2967,6 @@ MsgLen idx; /* index */ SsMsgInfo *minfo; Buffer *tmp; - TRC1(SExamMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!dataPtr) @@ -3077,7 +3044,7 @@ MsgLen idx; /* index */ #ifdef ANSI -PUBLIC S16 SGetDataFrmMsg +S16 SGetDataFrmMsg ( Buffer *mBuf, /* message buffer */ Data *dataPtr, /* pointer to data */ @@ -3085,7 +3052,7 @@ MsgLen idx, MsgLen dataLen ) #else -PUBLIC S16 SGetDataFrmMsg(mBuf, dataPtr, idx, dataLen) +S16 SGetDataFrmMsg(mBuf, dataPtr, idx, dataLen) Buffer *mBuf; /* message buffer */ Data *dataPtr; /* pointer to data */ MsgLen idx; /* index */ @@ -3097,8 +3064,6 @@ MsgLen dataLen; MsgLen offSetLen; Data *tmpDataPtr = dataPtr; - TRC1(SGetDataFrmMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!dataPtr) @@ -3185,21 +3150,19 @@ MsgLen dataLen; #ifdef ANSI -PUBLIC S16 SFndLenMsg +S16 SFndLenMsg ( REG1 Buffer *mBuf, /* message buffer */ MsgLen *lngPtr ) #else -PUBLIC S16 SFndLenMsg(mBuf, lngPtr) +S16 SFndLenMsg(mBuf, lngPtr) REG1 Buffer *mBuf; /* message buffer */ MsgLen *lngPtr; /* pointer to length */ #endif { SsMsgInfo *minfo; - TRC1(SFndLenMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ if (mBuf == NULLP) @@ -3270,24 +3233,24 @@ MsgLen *lngPtr; /* pointer to length */ * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SSegMsgNew +S16 SSegMsgNew ( Buffer *mBuf1, /* message 1 */ MsgLen idx, /* index */ Buffer **mBuf2, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SSegMsg +S16 SSegMsg ( Buffer *mBuf1, /* message 1 */ MsgLen idx, /* index */ Buffer **mBuf2 ) #else -PUBLIC S16 SSegMsg(mBuf1, idx, mBuf2) +S16 SSegMsg(mBuf1, idx, mBuf2) Buffer *mBuf1; /* message 1 */ MsgLen idx; /* index */ Buffer **mBuf2; /* message 2 */ @@ -3300,7 +3263,6 @@ Buffer **mBuf2; /* message 2 */ Buffer *prev; Buffer *next; - TRC1(SSegMsg) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer 1 */ @@ -3478,7 +3440,7 @@ Buffer **mBuf2; /* message 2 */ */ #ifdef ANSI -PUBLIC S16 SCpyFixMsg +S16 SCpyFixMsg ( Data *srcBuf, /* source buffer */ Buffer *dstMbuf, /* destination message buffer */ @@ -3487,7 +3449,7 @@ MsgLen cnt, /* count */ MsgLen *cCnt ) #else -PUBLIC S16 SCpyFixMsg(srcBuf, dstMbuf, dstIdx, cnt, cCnt) +S16 SCpyFixMsg(srcBuf, dstMbuf, dstIdx, cnt, cCnt) Data *srcBuf; /* source buffer */ Buffer *dstMbuf; /* destination message buffer */ MsgLen dstIdx; /* destination index */ @@ -3499,8 +3461,6 @@ MsgLen *cCnt; /* copied count */ SsMsgInfo *minfo; Buffer *right; - TRC1(SCpyFixMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check source message buffer */ if (srcBuf == NULLP) @@ -3633,7 +3593,7 @@ MsgLen *cCnt; /* copied count */ */ #ifdef ANSI -PUBLIC S16 SCpyMsgFix +S16 SCpyMsgFix ( Buffer *srcMbuf, /* source message buffer */ MsgLen srcIdx, /* source index */ @@ -3642,7 +3602,7 @@ Data *dstBuf, /* destination buffer */ MsgLen *cCnt ) #else -PUBLIC S16 SCpyMsgFix(srcMbuf, srcIdx, cnt, dstBuf, cCnt) +S16 SCpyMsgFix(srcMbuf, srcIdx, cnt, dstBuf, cCnt) Buffer *srcMbuf; /* source message buffer */ MsgLen srcIdx; /* source index */ MsgLen cnt; /* count */ @@ -3655,8 +3615,6 @@ MsgLen *cCnt; /* copied count */ SsMsgInfo *minfo; MsgLen numBytes; - TRC1(SCpyMsgFix) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check source message buffer */ if (srcMbuf == NULLP) @@ -3762,18 +3720,18 @@ MsgLen *cCnt; /* copied count */ */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SCpyMsgMsgNew +S16 SCpyMsgMsgNew ( Buffer *srcBuf, Region dstRegion, Pool dstPool, Buffer **dstBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SCpyMsgMsg +S16 SCpyMsgMsg ( Buffer *srcBuf, Region dstRegion, @@ -3781,7 +3739,7 @@ Pool dstPool, Buffer **dstBuf ) #else -PUBLIC S16 SCpyMsgMsg(srcBuf, dstRegion, dstPool, dstBuf) +S16 SCpyMsgMsg(srcBuf, dstRegion, dstPool, dstBuf) Buffer *srcBuf; Region dstRegion; Pool dstPool; @@ -3803,8 +3761,6 @@ Buffer **dstBuf; #endif #endif - TRC1(SCpyMsgMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!srcBuf) { @@ -3965,18 +3921,18 @@ Buffer **dstBuf; * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAddMsgRefNew +S16 SAddMsgRefNew ( Buffer *srcBuf, Region dstRegion, Pool dstPool, Buffer **dstBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAddMsgRef +S16 SAddMsgRef ( Buffer *srcBuf, Region dstRegion, @@ -3984,7 +3940,7 @@ Pool dstPool, Buffer **dstBuf ) #else -PUBLIC S16 SAddMsgRef(srcBuf, dstRegion, dstPool, dstBuf) +S16 SAddMsgRef(srcBuf, dstRegion, dstPool, dstBuf) Buffer *srcBuf; Region dstRegion; Pool dstPool; @@ -4002,7 +3958,6 @@ Buffer **dstBuf; Data *cptr; MsgLen numBytes; - TRC1(SAddMsgRef) #if (ERRCLASS & ERRCLS_INT_PAR) if (!srcBuf) @@ -4130,22 +4085,22 @@ Buffer **dstBuf; * */ #ifdef T2K_MEM_LEAK_DBG -PRIVATE Buffer *DupMsgNew +static Buffer *DupMsgNew ( Region region, /* region id */ Buffer *mp, /* message block */ char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PRIVATE Buffer *DupMsg +static Buffer *DupMsg ( Region region, /* region id */ Buffer *mp /* message block */ ) #else -PRIVATE Buffer *DupMsg(region, mp) +static Buffer *DupMsg(region, mp) Region region; /* region id */ Buffer *mp; /* message block */ #endif @@ -4155,8 +4110,6 @@ Buffer *mp; /* message block */ S16 r; /* return value */ Size m; /* temporary */ - TRC1(DupMsg); - #if (ERRCLASS & ERRCLS_INT_PAR) if (mp == NULLP) @@ -4183,7 +4136,7 @@ Buffer *mp; /* message block */ #endif /* SS_MULTICORE_SUPPORT */ /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT - r = SAlloc(region, &m, 0, (Data **)&bp, __LINE__, (U8*) __FILE__, ENTNC); + r = SAlloc(region, &m, 0, (Data **)&bp, __LINE__, (uint8_t*) __FILE__, ENTNC); #else r = SAlloc(region, &m, 0, (Data **)&bp); #endif /* SS_HISTOGRAM_SUPPORT */ @@ -4198,11 +4151,11 @@ Buffer *mp; /* message block */ /* generic set-up-message function */ #if 1 #ifndef SS_DBUF_REFLOCK_DISABLE - SS_STRM_INITB(bp, (SsDblk *)(((U8 *)bp) + sizeof(SsMblk)), NULLP, 0, NULLP); + SS_STRM_INITB(bp, (SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)), NULLP, 0, NULLP); #endif #else data = (Data *) (bp) + MDBSIZE; - SS_STRM_INITB(bp,(SsDblk *)(((U8 *)bp) + sizeof(SsMblk)), data, numBytes, NULLP); + SS_STRM_INITB(bp,(SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)), data, numBytes, NULLP); #endif /* SS_MULTICORE_SUPPORT */ @@ -4262,24 +4215,24 @@ Buffer *mp; /* message block */ */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SGetDBufNew +S16 SGetDBufNew ( Region region, /* region id */ Pool pool, /* pool id */ Buffer **bufPtr, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SGetDBuf +S16 SGetDBuf ( Region region, /* region id */ Pool pool, /* pool id */ Buffer **bufPtr ) #else -PUBLIC S16 SGetDBuf(region, pool, bufPtr) +S16 SGetDBuf(region, pool, bufPtr) Region region; /* region id */ Pool pool; /* pool id */ Buffer **bufPtr; /* pointer to buffer */ @@ -4306,8 +4259,6 @@ Buffer **bufPtr; /* pointer to buffer */ #endif #endif - TRC1(SGetDBuf) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ if (!bufPtr) @@ -4402,7 +4353,7 @@ Buffer **bufPtr; /* pointer to buffer */ /* ss006.301 : optimized this function */ /* ss001.301: additions */ #ifdef SS_HISTOGRAM_SUPPORT - if (SAlloc(region, &mdsize, 0, (Data **) bufPtr, __LINE__, (U8*) __FILE__, ENTNC) != ROK) + if (SAlloc(region, &mdsize, 0, (Data **) bufPtr, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK) #else if (SAlloc(region, &mdsize, 0, (Data **) bufPtr) != ROK) #endif /* SS_HISTOGRAM_SUPPORT */ @@ -4447,24 +4398,24 @@ Buffer **bufPtr; /* pointer to buffer */ */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SPutDBufNew +S16 SPutDBufNew ( Region region, Pool pool, Buffer *buf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SPutDBuf +S16 SPutDBuf ( Region region, Pool pool, Buffer *buf ) #else -PUBLIC S16 SPutDBuf(region, pool, buf) +S16 SPutDBuf(region, pool, buf) Region region; Pool pool; Buffer *buf; @@ -4478,7 +4429,6 @@ Buffer *buf; Data *dpdkBuf; #endif - TRC2(SPutDBuf); /* ss021.103 - Addition of ret initialization */ ret = ROK; @@ -4542,7 +4492,7 @@ Buffer *buf; /* if the data block is not shared, free the buffer, checks not reqd */ #ifdef SS_HISTOGRAM_SUPPORT ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base - , __LINE__, (U8*) __FILE__, ENTNC); + , __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base); #endif /* SS_HISTOGRAM_SUPPORT */ @@ -4562,13 +4512,13 @@ Buffer *buf; if (buf != (SsMblk *) (((Data*) dptr) - MBSIZE)) { - SsDblk* dupdptr = (SsDblk *)((U8 *)buf + MBSIZE); + SsDblk* dupdptr = (SsDblk *)((uint8_t *)buf + MBSIZE); dupdptr->db_ref--; if(dupdptr->db_ref == 0) { #ifdef SS_HISTOGRAM_SUPPORT - ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, ENTNC); + ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE); @@ -4589,7 +4539,7 @@ Buffer *buf; /* free buffer to region */ #ifdef SS_HISTOGRAM_SUPPORT ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base - , __LINE__, (U8*) __FILE__, ENTNC); + , __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base); #endif /* SS_HISTOGRAM_SUPPORT */ @@ -4603,7 +4553,7 @@ Buffer *buf; /* If MultiCore Support enabled, Dblk never be shared */ #ifdef SS_HISTOGRAM_SUPPORT ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base - , __LINE__, (U8*) __FILE__, ENTNC); + , __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base); #endif /* SS_HISTOGRAM_SUPPORT */ @@ -4643,14 +4593,14 @@ Buffer *buf; #ifdef ANSI -PUBLIC S16 SCatMsg +S16 SCatMsg ( Buffer *mBuf1, /* message 1 */ Buffer *mBuf2, /* message 2 */ Order order ) #else -PUBLIC S16 SCatMsg(mBuf1, mBuf2, order) +S16 SCatMsg(mBuf1, mBuf2, order) Buffer *mBuf1; /* message 1 */ Buffer *mBuf2; /* message 2 */ Order order; /* order */ @@ -4661,8 +4611,6 @@ Order order; /* order */ Buffer *tmp; Buffer *newb; - TRC1(SCatMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer 1 */ if (mBuf1 == NULLP) @@ -4804,14 +4752,14 @@ Order order; /* order */ #ifdef ANSI -PUBLIC S16 SRepMsg +S16 SRepMsg ( Data data, /* data */ Buffer *mBuf, /* message buffer */ MsgLen idx ) #else -PUBLIC S16 SRepMsg(data, mBuf, idx) +S16 SRepMsg(data, mBuf, idx) Data data; /* data */ Buffer *mBuf; /* message buffer */ MsgLen idx; /* index */ @@ -4823,11 +4771,10 @@ MsgLen idx; /* index */ Buffer *prev; MsgLen numBytes; - TRC1(SRepMsg) #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif #if ( ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ @@ -4906,14 +4853,14 @@ MsgLen idx; /* index */ #ifdef ANSI -PUBLIC S16 SUpdMsg +S16 SUpdMsg ( Buffer *mBuf, /* message buffer */ Buffer *dBuf, /* data buffer */ MsgLen dLen ) #else -PUBLIC S16 SUpdMsg(mBuf, dBuf, dLen) +S16 SUpdMsg(mBuf, dBuf, dLen) Buffer *mBuf; /* message buffer */ Buffer *dBuf; /* data buffer */ MsgLen dLen; /* data length */ @@ -4921,8 +4868,6 @@ MsgLen dLen; /* data length */ { SsMsgInfo *minfo; - TRC1(SUpdMsg) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!mBuf) { @@ -4999,21 +4944,19 @@ MsgLen dLen; /* data length */ #ifdef ANSI -PUBLIC S16 SAddDBufPst +S16 SAddDBufPst ( Buffer *mBuf, /* message buffer */ Buffer *dBuf ) #else -PUBLIC S16 SAddDBufPst(mBuf, dBuf) +S16 SAddDBufPst(mBuf, dBuf) Buffer *mBuf; /* message buffer */ Buffer *dBuf; /* data buffer */ #endif { SsMsgInfo *minfo; - TRC1(SAddDBufPst) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer queue */ if (!mBuf || !dBuf) @@ -5072,13 +5015,13 @@ Buffer *dBuf; /* data buffer */ #ifdef ANSI -PUBLIC S16 SAddDBufPre +S16 SAddDBufPre ( Buffer *mBuf, /* message buffer */ Buffer *dBuf ) #else -PUBLIC S16 SAddDBufPre(mBuf, dBuf) +S16 SAddDBufPre(mBuf, dBuf) Buffer *mBuf; /* message buffer */ Buffer *dBuf; /* data buffer */ #endif @@ -5086,8 +5029,6 @@ Buffer *dBuf; /* data buffer */ SsMsgInfo *minfo; Buffer *tmp; - TRC1(SAddDBufPre) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer queue */ if (!mBuf || !dBuf) @@ -5148,21 +5089,19 @@ Buffer *dBuf; /* data buffer */ #ifdef ANSI -PUBLIC S16 SRemDBufPre +S16 SRemDBufPre ( Buffer *mBuf, /* message buffer */ Buffer **dBufPtr ) #else -PUBLIC S16 SRemDBufPre(mBuf, dBufPtr) +S16 SRemDBufPre(mBuf, dBufPtr) Buffer *mBuf; /* message buffer */ Buffer **dBufPtr; /* pointer to data buffer */ #endif { SsMsgInfo *minfo; - TRC1(SRemDBufPre) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ if (dBufPtr == NULLP) @@ -5225,13 +5164,13 @@ Buffer **dBufPtr; /* pointer to data buffer */ #ifdef ANSI -PUBLIC S16 SRemDBufPst +S16 SRemDBufPst ( Buffer *mBuf, /* message buffer */ Buffer **dBufPtr ) #else -PUBLIC S16 SRemDBufPst(mBuf, dBufPtr) +S16 SRemDBufPst(mBuf, dBufPtr) Buffer *mBuf; /* message buffer */ Buffer **dBufPtr; /* pointer to data buffer */ #endif @@ -5239,8 +5178,6 @@ Buffer **dBufPtr; /* pointer to data buffer */ SsMsgInfo *minfo; Buffer *tmp; - TRC1(SRemDBufPst) - #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ if (!dBufPtr) @@ -5299,19 +5236,17 @@ Buffer **dBufPtr; /* pointer to data buffer */ #ifdef ANSI -PUBLIC S16 SInitNxtDBuf +S16 SInitNxtDBuf ( Buffer *mBuf ) #else -PUBLIC S16 SInitNxtDBuf(mBuf) +S16 SInitNxtDBuf(mBuf) Buffer *mBuf; /* message buffer */ #endif { SsMsgInfo *minfo; - TRC1(SInitNxtDBuf) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!mBuf) { @@ -5350,21 +5285,19 @@ Buffer *mBuf; /* message buffer */ #ifdef ANSI -PUBLIC S16 SGetNxtDBuf +S16 SGetNxtDBuf ( Buffer *mBuf, /* message buffer */ Buffer **dBuf ) #else -PUBLIC S16 SGetNxtDBuf(mBuf, dBuf) +S16 SGetNxtDBuf(mBuf, dBuf) Buffer *mBuf; /* message buffer */ Buffer **dBuf; /* data buffer return */ #endif { SsMsgInfo *minfo; - TRC1(SGetNxtDBuf) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!mBuf) { @@ -5411,19 +5344,17 @@ Buffer **dBuf; /* data buffer return */ */ #ifdef ANSI -PUBLIC S16 SChkNxtDBuf +S16 SChkNxtDBuf ( Buffer *mBuf ) #else -PUBLIC S16 SChkNxtDBuf(mBuf) +S16 SChkNxtDBuf(mBuf) Buffer *mBuf; /* message buffer */ #endif { SsMsgInfo *minfo; - TRC1(SChkNxtDBuf) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!mBuf) { @@ -5466,7 +5397,7 @@ Buffer *mBuf; /* message buffer */ #ifdef ANSI -PUBLIC S16 SGetDataRx +S16 SGetDataRx ( Buffer *dBuf, /* data buffer */ MsgLen pad, /* pad */ @@ -5474,14 +5405,13 @@ Data **retDatPtr, /* return data pointer */ MsgLen *retDatLen ) #else -PUBLIC S16 SGetDataRx(dBuf, pad, retDatPtr, retDatLen) +S16 SGetDataRx(dBuf, pad, retDatPtr, retDatLen) Buffer *dBuf; /* data buffer */ MsgLen pad; /* pad */ Data **retDatPtr; /* return data pointer */ MsgLen *retDatLen; /* return data length */ #endif { - TRC1(SGetDataRx) #if (ERRCLASS & ERRCLS_INT_PAR) if (!dBuf) @@ -5550,20 +5480,19 @@ MsgLen *retDatLen; /* return data length */ #ifdef ANSI -PUBLIC S16 SGetDataTx +S16 SGetDataTx ( Buffer *dBuf, /* data buffer */ Data **retDatPtr, /* return data pointer */ MsgLen *retDatLen /* return data length */ ) #else -PUBLIC S16 SGetDataTx(dBuf, retDatPtr, retDatLen) +S16 SGetDataTx(dBuf, retDatPtr, retDatLen) Buffer *dBuf; /* data buffer */ Data **retDatPtr; /* return data pointer */ MsgLen *retDatLen; /* return data length */ #endif { - TRC1(SGetDataTx) #if (ERRCLASS & ERRCLS_INT_PAR) /* ss021.103 - Modification to check parameters */ @@ -5624,14 +5553,14 @@ MsgLen *retDatLen; /* return data length */ * */ #ifdef ANSI -PUBLIC S16 SGetBufRegionPool +S16 SGetBufRegionPool ( Buffer *mBuf, /* message buffer */ Region *region, /* region */ Pool *pool /* pool */ ) #else -PUBLIC S16 SGetBufRegionPool(mBuf, region, pool) +S16 SGetBufRegionPool(mBuf, region, pool) Buffer *mBuf; /* message buffer */ Region *region; /* region */ Pool *pool; /* pool */ @@ -5639,7 +5568,6 @@ Pool *pool; /* pool */ { SsMsgInfo *mInfo; /* message info pointer */ - TRC1(SGetBufRegionPool) #if (ERRCLASS & ERRCLS_INT_PAR) @@ -5702,12 +5630,12 @@ Pool *pool; /* pool */ #ifdef ANSI -PUBLIC S16 SCompressMsg +S16 SCompressMsg ( Buffer *mBuf ) #else -PUBLIC S16 SCompressMsg(mBuf) +S16 SCompressMsg(mBuf) Buffer *mBuf; /* message buffer */ #endif { @@ -5720,9 +5648,8 @@ Buffer *mBuf; /* message buffer */ #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SCompressMsg) #if (ERRCLASS & ERRCLS_INT_PAR) if (!mBuf) @@ -5800,14 +5727,14 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SPrntMsg +S16 SPrntMsg ( Buffer *mBuf, /* message buffer */ S16 src, /* source id */ S16 dst /* destination id */ ) #else -PUBLIC S16 SPrntMsg(mBuf, src, dst) +S16 SPrntMsg(mBuf, src, dst) Buffer *mBuf; /* message buffer */ S16 src; /* source id */ S16 dst; /* destination id */ @@ -5822,8 +5749,8 @@ S16 dst; /* destination id */ MsgLen i; /* counter */ S16 j; /* counter */ S16 k; /* counter */ - U8 data; /* data */ - U8 tdata[16] = {0}; /* temporary data */ + uint8_t data; /* data */ + uint8_t tdata[16] = {0}; /* temporary data */ S8 prntBuf[256]; /* print buffer */ Buffer *tmp; /* buffer ptr */ Data *cptr; @@ -5831,7 +5758,6 @@ S16 dst; /* destination id */ Data reg; - TRC1(SPrntMsg) if (mBuf == NULLP) { @@ -5847,7 +5773,7 @@ S16 dst; /* destination id */ reg = ((SsMsgInfo*)(mBuf->b_rptr))->region; /*ss013.301: Fixed Warnings for 32/64 bit compilation*/ sprintf(prntBuf,"\nmsg: qlen: %04d mlen: %04d %02d-->%02d region: %02d\n", - (U16)qlen,(U16)mlen,src,dst,reg); + (uint16_t)qlen,(uint16_t)mlen,src,dst,reg); SPrint( prntBuf); #ifdef XEON_SPECIFIC_CHANGES printf("%s\n", prntBuf); @@ -5877,7 +5803,7 @@ S16 dst; /* destination id */ { /* print hex */ tdata[j]=data; - sprintf( prntBuf,"%02x ",(U16) data); + sprintf( prntBuf,"%02x ",(uint16_t) data); SPrint( prntBuf); #ifdef XEON_SPECIFIC_CHANGES printf("%s\n", prntBuf); @@ -5958,13 +5884,13 @@ S16 dst; /* destination id */ * */ #ifdef ANSI -PUBLIC S16 SGetPstMsgMult +S16 SGetPstMsgMult ( MsgLen cnt, /* count */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SGetPstMsgMult(cnt, mBuf) +S16 SGetPstMsgMult(cnt, mBuf) MsgLen cnt; /* count */ Buffer *mBuf; /* message buffer */ #endif @@ -5975,7 +5901,6 @@ Buffer *mBuf; /* message buffer */ MsgLen numBytes; MsgLen avail; - TRC1(SGetPstMsgMult) #if ( ERRCLASS & ERRCLS_INT_PAR ) /* check message buffer */ @@ -6063,19 +5988,18 @@ Buffer *mBuf; /* message buffer */ * */ #ifdef ANSI -PUBLIC S16 SChkMsg +S16 SChkMsg ( Buffer *mBuf ) #else -PUBLIC S16 SChkMsg(mBuf) +S16 SChkMsg(mBuf) Buffer *mBuf; #endif { SsMsgInfo *minfo; Buffer *tmp; - TRC1(SChkMsg) #if ( ERRCLASS & ERRCLS_INT_PAR ) /* check message buffer */ @@ -6118,20 +6042,18 @@ Buffer *mBuf; * */ #ifdef ANSI -PUBLIC S16 SAlignDBufEven +S16 SAlignDBufEven ( Buffer *dBuf /* data buffer */ ) #else -PUBLIC S16 SAlignDBufEven(dBuf) +S16 SAlignDBufEven(dBuf) Buffer *dBuf; /* data buffer */ #endif { MsgLen len; Data *src; - TRC1(SAlignDBufEven) - #if (ERRCLASS & ERRCLS_INT_PAR) if (!dBuf) { @@ -6193,23 +6115,21 @@ Buffer *dBuf; /* data buffer */ * */ #ifdef ANSI -PUBLIC S16 SAlignDBuf +S16 SAlignDBuf ( Buffer *dBuf, /* data buffer */ -U32 align /* alignemnt required */ +uint32_t align /* alignemnt required */ ) #else -PUBLIC S16 SAlignDBuf(dBuf, align) +S16 SAlignDBuf(dBuf, align) Buffer *dBuf; /* data buffer */ -U32 align; /* alignemnt required */ +uint32_t align; /* alignemnt required */ #endif { MsgLen len; Data *src; - U32 upShift; /* no. of bytes to be shifted up */ - U32 downShift; /* no. of bytes to be shifted down */ - - TRC1(SAlignDBuf) + uint32_t upShift; /* no. of bytes to be shifted up */ + uint32_t downShift; /* no. of bytes to be shifted down */ #if (ERRCLASS & ERRCLS_INT_PAR) if (!dBuf) @@ -6286,21 +6206,19 @@ U32 align; /* alignemnt required */ * */ #ifdef ANSI -PUBLIC S16 SGetSMem +S16 SGetSMem ( Region region, /* region ID */ Size size, /* size */ Pool *pool /* pointer to pool ID */ ) #else -PUBLIC S16 SGetSMem(region, size, pool) +S16 SGetSMem(region, size, pool) Region region; /* region ID */ Size size; /* size */ Pool *pool; /* pointer to pool ID */ #endif { - TRC1(SGetSMem); - UNUSED(size); @@ -6347,13 +6265,13 @@ Pool *pool; /* pointer to pool ID */ * */ #ifdef ANSI -PUBLIC S16 SPutSMem +S16 SPutSMem ( Region region, /* region ID */ Pool pool /* pool ID */ ) #else -PUBLIC S16 SPutSMem(region, pool) +S16 SPutSMem(region, pool) Region region; /* region ID */ Pool pool; /* pool ID */ #endif @@ -6363,8 +6281,6 @@ Pool pool; /* pool ID */ S16 ret; #endif - TRC1(SPutSMem); - #if (ERRCLASS & ERRCLS_INT_PAR) /* validate region ID */ @@ -6443,14 +6359,14 @@ Pool pool; /* pool ID */ * */ #ifdef ANSI -PUBLIC S16 SChkRes +S16 SChkRes ( Region region, /* region ID */ Pool pool, /* pool ID */ Status *status /* pointer to status */ ) #else -PUBLIC S16 SChkRes(region, pool, status) +S16 SChkRes(region, pool, status) Region region; /* region ID */ Pool pool; /* pool ID */ Status *status; /* pointer to status */ @@ -6460,8 +6376,6 @@ Status *status; /* pointer to status */ SMemCtl mctl; - TRC1(SChkRes); - #if (ERRCLASS & ERRCLS_INT_PAR) /* validate region ID */ @@ -6571,13 +6485,13 @@ Status *status; /* pointer to status */ #ifdef ANSI -PUBLIC S16 SSwapMsg +S16 SSwapMsg ( Buffer *mBuf1, /* message 1 */ Buffer *mBuf2 /* message 2 */ ) #else -PUBLIC S16 SSwapMsg(mBuf1, mBuf2) +S16 SSwapMsg(mBuf1, mBuf2) Buffer *mBuf1; /* message 1 */ Buffer *mBuf2; /* message 2 */ #endif @@ -6589,9 +6503,8 @@ Buffer *mBuf2; /* message 2 */ SsMsgInfo *minfo2; #endif Buffer *tmp; - U8 tmp2; + uint8_t tmp2; - TRC1(SSwapMsg) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer 1 */ @@ -6683,12 +6596,12 @@ Buffer *mBuf2; /* message 2 */ * */ #ifdef ANSI -PUBLIC S16 SConvPtrPhy +S16 SConvPtrPhy ( Buffer **mBuf ) #else -PUBLIC S16 SConvPtrPhy (mBuf) +S16 SConvPtrPhy (mBuf) Buffer **mBuf; #endif { @@ -6699,8 +6612,6 @@ PUBLIC S16 SConvPtrPhy (mBuf) SsDblk *dblkPtr; SsFrtn *frtnPtr; - TRC1(SConvPtrPhy); - /* check mBuf for NULLP */ if ( (mBuf == NULLP) || (*mBuf == NULLP ) ) @@ -6740,9 +6651,9 @@ PUBLIC S16 SConvPtrPhy (mBuf) minfoPtr->next = (Buffer*)cvmx_ptr_to_phys (minfoPtr->next); } - curPtr->b_rptr = (U8*)cvmx_ptr_to_phys (curPtr->b_rptr); + curPtr->b_rptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_rptr); - curPtr->b_wptr = (U8*)cvmx_ptr_to_phys (curPtr->b_wptr); + curPtr->b_wptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_wptr); /* Convert the pointers of Dblock to Physical addr */ dblkPtr = (SsDblk*)curPtr->b_datap; @@ -6765,8 +6676,8 @@ PUBLIC S16 SConvPtrPhy (mBuf) } #endif - dblkPtr->db_base = (U8*)cvmx_ptr_to_phys (dblkPtr->db_base); - dblkPtr->db_lim = (U8*)cvmx_ptr_to_phys (dblkPtr->db_lim); + dblkPtr->db_base = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_base); + dblkPtr->db_lim = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_lim); curPtr->b_datap = (SsDblk*)cvmx_ptr_to_phys (curPtr->b_datap); @@ -6783,8 +6694,8 @@ PUBLIC S16 SConvPtrPhy (mBuf) curPtr->b_cont = (Buffer*)cvmx_ptr_to_phys (curPtr->b_cont); } - curPtr->b_rptr = (U8*)cvmx_ptr_to_phys (curPtr->b_rptr); - curPtr->b_wptr = (U8*)cvmx_ptr_to_phys (curPtr->b_wptr); + curPtr->b_rptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_rptr); + curPtr->b_wptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_wptr); /* Convert the pointers of Dblock to Physical addr */ dblkPtr = (SsDblk*)curPtr->b_datap; @@ -6807,8 +6718,8 @@ PUBLIC S16 SConvPtrPhy (mBuf) } #endif - dblkPtr->db_base = (U8*)cvmx_ptr_to_phys (dblkPtr->db_base); - dblkPtr->db_lim = (U8*)cvmx_ptr_to_phys (dblkPtr->db_lim); + dblkPtr->db_base = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_base); + dblkPtr->db_lim = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_lim); curPtr->b_datap = (SsDblk*)cvmx_ptr_to_phys (curPtr->b_datap); @@ -6841,12 +6752,12 @@ PUBLIC S16 SConvPtrPhy (mBuf) * */ #ifdef ANSI -PUBLIC S16 SConvPhyPtr +S16 SConvPhyPtr ( Buffer **workPtr ) #else -PUBLIC S16 SConvPhyPtr (workPtr) +S16 SConvPhyPtr (workPtr) Buffer **workPtr; #endif { @@ -6857,8 +6768,6 @@ PUBLIC S16 SConvPhyPtr (workPtr) SsDblk *dblkPtr; SsFrtn *frtnPtr; - TRC1(SConvPhyPtr); - /* check workPtr for NULLP */ if ( (workPtr == NULLP) || (*workPtr == NULLP) ) @@ -6867,43 +6776,43 @@ PUBLIC S16 SConvPhyPtr (workPtr) } /* Convert the buffer address to pointer */ - mBuf = (Buffer*)cvmx_phys_to_ptr ((U64)(*workPtr)); + mBuf = (Buffer*)cvmx_phys_to_ptr ((uint64_t)(*workPtr)); curPtr = mBuf; /* first block is mblk */ if (curPtr->b_next) { - curPtr->b_next = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_next); + curPtr->b_next = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_next); } if (curPtr->b_prev) { - curPtr->b_prev = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_prev); + curPtr->b_prev = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_prev); } if(curPtr->b_cont) { - curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_cont); + curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_cont); } - curPtr->b_rptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_rptr); + curPtr->b_rptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_rptr); /* Get the pointer for minfo */ minfoPtr = (SsMsgInfo*)curPtr->b_rptr; if (minfoPtr->endptr) { - minfoPtr->endptr = (Buffer*)cvmx_phys_to_ptr ((U64)minfoPtr->endptr); + minfoPtr->endptr = (Buffer*)cvmx_phys_to_ptr ((uint64_t)minfoPtr->endptr); } if (minfoPtr->next) { - minfoPtr->next = (Buffer*)cvmx_phys_to_ptr ((U64)minfoPtr->next); + minfoPtr->next = (Buffer*)cvmx_phys_to_ptr ((uint64_t)minfoPtr->next); } - curPtr->b_wptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_wptr); + curPtr->b_wptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_wptr); - curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((U64)curPtr->b_datap); + curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_datap); /* Get the Dblock pointers */ dblkPtr = (SsDblk*)curPtr->b_datap; @@ -6912,22 +6821,22 @@ PUBLIC S16 SConvPhyPtr (workPtr) #ifdef SS_DBLK_FREE_RTN if (dblkPtr->db_frtnp) { - dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((U64)dblkPtr->db_frtnp); + dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_frtnp); frtnPtr = dblkPtr->db_frtnp; if (frtnPtr->free_func) { - frtnPtr->free_func = cvmx_phys_to_ptr ((U64)frtnPtr->free_func); + frtnPtr->free_func = cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_func); } if (frtnPtr->free_arg) { - frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((U64)frtnPtr->free_arg); + frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_arg); } } #endif - dblkPtr->db_base = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_base); - dblkPtr->db_lim = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_lim); + dblkPtr->db_base = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_base); + dblkPtr->db_lim = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_lim); curPtr = curPtr->b_cont; @@ -6936,14 +6845,14 @@ PUBLIC S16 SConvPhyPtr (workPtr) { if(curPtr->b_cont) { - curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_cont); + curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_cont); } - curPtr->b_rptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_rptr); + curPtr->b_rptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_rptr); - curPtr->b_wptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_wptr); + curPtr->b_wptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_wptr); - curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((U64)curPtr->b_datap); + curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_datap); /* Get the Dblock pointers */ dblkPtr = (SsDblk*)curPtr->b_datap; @@ -6952,23 +6861,23 @@ PUBLIC S16 SConvPhyPtr (workPtr) #ifdef SS_DBLK_FREE_RTN if (dblkPtr->db_frtnp) { - dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((U64)dblkPtr->db_frtnp); + dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_frtnp); frtnPtr = dblkPtr->db_frtnp; if (frtnPtr->free_func) { - frtnPtr->free_func = cvmx_phys_to_ptr ((U64)frtnPtr->free_func); + frtnPtr->free_func = cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_func); } if (frtnPtr->free_arg) { - frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((U64)frtnPtr->free_arg); + frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_arg); } } #endif - dblkPtr->db_base = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_base); - dblkPtr->db_lim = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_lim); + dblkPtr->db_base = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_base); + dblkPtr->db_lim = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_lim); curPtr = curPtr->b_cont; } @@ -6999,7 +6908,7 @@ PUBLIC S16 SConvPhyPtr (workPtr) * */ #ifdef ANSI -PUBLIC S16 SCpyFpaMsg +S16 SCpyFpaMsg ( Buffer *srcBuf, Region dstRegion, @@ -7007,7 +6916,7 @@ PUBLIC S16 SCpyFpaMsg Buffer **dstBuf ) #else -PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf) +S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf) Buffer *srcBuf; Region dstRegion; Pool dstPool; @@ -7028,8 +6937,6 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf) SsDblk *dblkPtr = NULLP; SsDblk *dptr = NULLP; - TRC1(SCpyFpaMsg); - if ( srcBuf == (Buffer*)NULLP ) { @@ -7154,13 +7061,13 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf) * */ #ifdef ANSI -PUBLIC S16 SCpyMsgFpa +S16 SCpyMsgFpa ( Buffer *srcBuf, Buffer **dstBuf ) #else -PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf) +S16 SCpyMsgFpa (srcBuf, dstBuf) Buffer *srcBuf; Buffer **dstBuf; #endif @@ -7175,11 +7082,9 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf) SsMsgInfo *minfoDst = NULLP; SsDblk *dblkPtr = NULLP; SsDblk *dptr = NULLP; - U32 numBytes; + uint32_t numBytes; Pool pool; - TRC1(SCpyMsgFpa); - if (srcBuf == (Buffer*)NULLP) { @@ -7337,21 +7242,20 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf) * */ #ifdef ANSI -PUBLIC S16 SPutFpaMsg +S16 SPutFpaMsg ( Buffer *fpaBuf ) #else -PUBLIC S16 SPutFpaMsg(fpaBuf) +S16 SPutFpaMsg(fpaBuf) Buffer *fpaBuf; #endif { - U16 size; + uint16_t size; Buffer *curBlk; Buffer *nextBlk; SsDblk *dblkPtr; - TRC1(SPutFpaMsg); if( fpaBuf == NULLP ) { @@ -7424,7 +7328,7 @@ Buffer *fpaBuf; */ #ifdef ANSI -PUBLIC S16 SCpyPartMsg +S16 SCpyPartMsg ( Buffer *srcBuf, MsgLen idx, @@ -7432,7 +7336,7 @@ MsgLen cnt, Buffer *dstBuf ) #else -PUBLIC S16 SCpyPartMsg(srcBuf, idx, cnt, dstBuf) +S16 SCpyPartMsg(srcBuf, idx, cnt, dstBuf) Buffer *srcBuf; MsgLen idx; MsgLen cnt; @@ -7448,7 +7352,6 @@ Buffer *dstBuf; MsgLen dCnt; MsgLen numCpd; - TRC1(SCpyPartMsg) #if (ERRCLASS & ERRCLS_INT_PAR) if (!srcBuf) @@ -7591,7 +7494,7 @@ Buffer *dstBuf; */ #ifdef ANSI -PUBLIC S16 SRepPartMsg +S16 SRepPartMsg ( Buffer *srcBuf, MsgLen idx, @@ -7599,7 +7502,7 @@ MsgLen cnt, Buffer *dstBuf ) #else -PUBLIC S16 SRepPartMsg(srcBuf, idx, cnt, dstBuf) +S16 SRepPartMsg(srcBuf, idx, cnt, dstBuf) Buffer *srcBuf; MsgLen idx; MsgLen cnt; @@ -7615,7 +7518,6 @@ Buffer *dstBuf; MsgLen sIdx; MsgLen cpBytes; - TRC1(SRepPartMsg) #if (ERRCLASS & ERRCLS_INT_PAR) if (!dstBuf) @@ -7734,14 +7636,14 @@ Buffer *dstBuf; #ifdef ANSI -PUBLIC S16 SMovPartMsg +S16 SMovPartMsg ( Buffer *srcBuf, /* message 1 */ MsgLen idx, /* index */ Buffer *dstBuf /* message 2 */ ) #else -PUBLIC S16 SMovPartMsg(srcBuf, idx, dstBuf) +S16 SMovPartMsg(srcBuf, idx, dstBuf) Buffer *srcBuf; /* message 1 */ MsgLen idx; /* index */ Buffer *dstBuf; /* message 2 */ @@ -7756,10 +7658,9 @@ Buffer *dstBuf; /* message 2 */ SsMsgInfo *dMinfo; #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SMovPartMsg) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer 1 */ @@ -7909,14 +7810,14 @@ Buffer *dstBuf; /* message 2 */ */ #ifdef ANSI -PUBLIC S16 SPkMsgMult +S16 SPkMsgMult ( Data *src, MsgLen cnt, Buffer *mBuf ) #else -PUBLIC S16 SPkMsgMult(src, cnt, mBuf) +S16 SPkMsgMult(src, cnt, mBuf) Data *src; MsgLen cnt; Buffer *mBuf; @@ -7928,7 +7829,6 @@ Buffer *mBuf; MsgLen numBytes; /* no. of bytes to be copied */ MsgLen offset; - TRC1(SPkMsgMult) #if (ERRCLASS & ERRCLS_INT_PAR) /* check message buffer */ @@ -7979,7 +7879,7 @@ Buffer *mBuf; /* update the read ptr */ tmp->b_rptr -= numBytes; /* copy data */ - memcpy((U8*)tmp->b_rptr, (src + cnt), numBytes); + memcpy(tmp->b_rptr, (src + cnt), numBytes); minfo->len += numBytes; if (!cnt) { @@ -7996,7 +7896,7 @@ Buffer *mBuf; newblk->b_datap->db_type = SS_M_DATA; newblk->b_rptr = newblk->b_datap->db_lim - cnt; newblk->b_wptr = newblk->b_datap->db_lim; - memcpy((U8*)newblk->b_rptr, src, cnt); + memcpy(newblk->b_rptr, src, cnt); /* attach the newblk chain into mBuf */ newblk->b_cont = tmp; mBuf->b_cont = newblk; @@ -8021,16 +7921,16 @@ Buffer *mBuf; * */ #ifdef ANSI -PUBLIC S16 SGetReadPtr +S16 SGetReadPtr ( Buffer *mBuf, - U8** data, + uint8_t** data, MsgLen *len ) #else -PUBLIC S16 SGetReadPtr (mBuf, data, len) +S16 SGetReadPtr (mBuf, data, len) Buffer *mBuf; -U8** data; +uint8_t** data; MsgLen *len; #endif { @@ -8070,7 +7970,7 @@ MsgLen *len; */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAttachPtrToBufNew +S16 SAttachPtrToBufNew ( Region region, Pool pool, @@ -8078,11 +7978,11 @@ Data *ptr, MsgLen totalLen, Buffer** mBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAttachPtrToBuf +S16 SAttachPtrToBuf ( Region region, Pool pool, @@ -8091,7 +7991,7 @@ MsgLen totalLen, Buffer** mBuf ) #else -PUBLIC S16 SAttachPtrToBuf(region, pool, ptr, totalLen, mBuf) +S16 SAttachPtrToBuf(region, pool, ptr, totalLen, mBuf) Region region; Pool pool; Data *ptr; @@ -8106,7 +8006,6 @@ Buffer** mBuf; Buffer *newblk; /* Void *iccHdlr; */ - TRC1(SAttachPtrToBuf) #if (ERRCLASS & ERRCLS_INT_PAR) if (ptr == NULLP) @@ -8128,7 +8027,7 @@ Buffer** mBuf; mdsize = MDBSIZE; #ifdef SS_HISTOGRAM_SUPPORT - if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK) + if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK) #else if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK) #endif /* SS_HISTOGRAM_SUPPORT */ @@ -8184,22 +8083,22 @@ Buffer** mBuf; */ #ifdef T2K_MEM_LEAK_DBG -PRIVATE S16 SPutZbcDBufNew +static S16 SPutZbcDBufNew ( Region region, Buffer *buf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PRIVATE S16 SPutZbcDBuf +static S16 SPutZbcDBuf ( Region region, Buffer *buf ) #else -PRIVATE S16 SPutZbcDBuf(region, buf) +static S16 SPutZbcDBuf(region, buf) Region region; Buffer *buf; #endif @@ -8209,7 +8108,6 @@ Buffer *buf; MsgLen bufLen; S16 ret = ROK; - TRC2(SPutZbcDBuf); dptr = buf->b_datap; /* Get the length of the buffer */ @@ -8227,14 +8125,14 @@ Buffer *buf; #ifdef SS_HISTOGRAM_SUPPORT ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen, __LINE__, - (U8*) __FILE__, ENTNC); + (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen); #endif /* SS_HISTOGRAM_SUPPORT */ /* if the data block is not shared, free the buffer, checks not reqd */ #ifdef SS_HISTOGRAM_SUPPORT - ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, + ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE); @@ -8257,7 +8155,7 @@ Buffer *buf; if (buf != (SsMblk *) (((Data*) dptr) - MBSIZE)) { #ifdef SS_HISTOGRAM_SUPPORT - ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, ENTNC); + ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE); #endif /* SS_HISTOGRAM_SUPPORT */ @@ -8275,13 +8173,13 @@ Buffer *buf; #endif #ifdef SS_HISTOGRAM_SUPPORT ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen, __LINE__, - (U8*) __FILE__, ENTNC); + (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen); #endif /* SS_HISTOGRAM_SUPPORT */ #ifdef SS_HISTOGRAM_SUPPORT - ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, + ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC); #else ret = SFree(region, (Data *) buf, MDBSIZE); @@ -8318,7 +8216,7 @@ Buffer *buf; * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAttachPtrToMBuf1 +S16 SAttachPtrToMBuf1 ( Region region, Pool pool, @@ -8327,11 +8225,11 @@ MsgLen totalLen, MsgLen ptrLen, Buffer** mBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAttachPtrToMBuf +S16 SAttachPtrToMBuf ( Region region, Pool pool, @@ -8341,7 +8239,7 @@ MsgLen ptrLen, Buffer** mBuf ) #else -PUBLIC S16 SAttachPtrToMBuf(region, pool, ptr, totalLen, ptrLen, mBuf) +S16 SAttachPtrToMBuf(region, pool, ptr, totalLen, ptrLen, mBuf) Region region; Pool pool; Data *ptr; @@ -8357,7 +8255,6 @@ Buffer** mBuf; Buffer *newblk; /* Void *iccHdlr; */ - TRC1(SAttachPtrToMBuf) #if (ERRCLASS & ERRCLS_INT_PAR) if (ptr == NULLP) @@ -8377,7 +8274,7 @@ Buffer** mBuf; mdsize = MDBSIZE; #ifdef SS_HISTOGRAM_SUPPORT - if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK) + if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK) #else if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK) #endif /* SS_HISTOGRAM_SUPPORT */ @@ -8417,7 +8314,7 @@ Buffer** mBuf; return ROK; } #endif /* INTEL_WLS */ -PUBLIC S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf) +S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf) { #ifndef L2_OPTMZ return (SAddMsgRef(srcBuf,dstRegion, dstPool,dstBuf)); @@ -8427,7 +8324,7 @@ PUBLIC S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dst return ROK; } #ifdef L2_OPTMZ -PUBLIC Void SResetMBuf(Buffer *mbuf) +Void SResetMBuf(Buffer *mbuf) { SsMsgInfo *minfo; Buffer *tmp; @@ -8450,7 +8347,7 @@ PUBLIC Void SResetMBuf(Buffer *mbuf) #endif - RETVOID; + return; } #endif @@ -8474,7 +8371,7 @@ PUBLIC Void SResetMBuf(Buffer *mbuf) * */ #ifdef T2K_MEM_LEAK_DBG -PUBLIC S16 SAttachWlsPtrToMBuf1 +S16 SAttachWlsPtrToMBuf1 ( Region region, Pool pool, @@ -8484,11 +8381,11 @@ MsgLen totalLen, MsgLen ptrLen, Buffer** mBuf, char* file, -U32 line +uint32_t line ) #else #ifdef ANSI -PUBLIC S16 SAttachWlsPtrToMBuf +S16 SAttachWlsPtrToMBuf ( Region region, Pool pool, @@ -8499,7 +8396,7 @@ MsgLen ptrLen, Buffer** mBuf ) #else -PUBLIC S16 SAttachWlsPtrToMBuf(region, pool, ptr, readPtr, totalLen, ptrLen, mBuf) +S16 SAttachWlsPtrToMBuf(region, pool, ptr, readPtr, totalLen, ptrLen, mBuf) Region region; Pool pool; Data *ptr; @@ -8516,7 +8413,6 @@ Buffer** mBuf; Buffer *newblk; /* Void *iccHdlr; */ - TRC1(SAttachWlsPtrToMBuf) #if (ERRCLASS & ERRCLS_INT_PAR) if (ptr == NULLP) @@ -8536,7 +8432,7 @@ Buffer** mBuf; mdsize = MDBSIZE; #ifdef SS_HISTOGRAM_SUPPORT - if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK) + if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK) #else if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK) #endif /* SS_HISTOGRAM_SUPPORT */ @@ -8578,9 +8474,9 @@ Buffer** mBuf; #ifdef TENB_DPDK_BUF -extern U32 numeTti; +uint32_t numeTti; -PUBLIC S16 SGetSBufDpdk +S16 SGetSBufDpdk ( Data **ptr, /* pointer to buffer */ Size size /* size requested */ @@ -8593,20 +8489,20 @@ Size size /* size requested */ return (ret); } -PUBLIC S16 SPutSBufDpdk +S16 SPutSBufDpdk ( Data *ptr /* pointer to buffer */ ) { S16 ret; - U32 flags = 0; + uint32_t flags = 0; ntl_free(mtGetNtlHdl(), ptr); return (ret); } -PUBLIC S16 SDetachDpdkPtrFrmDBuf +S16 SDetachDpdkPtrFrmDBuf ( Buffer *mBuf, Data **ptr @@ -8617,8 +8513,8 @@ Data **ptr SsMsgInfo *minfo; //msgBlk = mBuf->b_cont; - //*ptr = msgBlk->b_rptr;; - *ptr = mBuf->b_datap->db_base;; + //*ptr = msgBlk->b_rptr; + *ptr = mBuf->b_datap->db_base; mBuf->b_cont = NULL; @@ -8630,7 +8526,7 @@ Data **ptr } -PUBLIC S16 SDetachDpdkPtrFrmMBuf +S16 SDetachDpdkPtrFrmMBuf ( Buffer *mBuf, Data **ptr @@ -8657,7 +8553,7 @@ PUBLIC S16 SDetachDpdkPtrFrmMBuf return RFAILED; } - *ptr = msgBlk->b_rptr;; + *ptr = msgBlk->b_rptr; mBuf->b_cont = NULL; @@ -8669,7 +8565,7 @@ PUBLIC S16 SDetachDpdkPtrFrmMBuf #ifdef ANSI -PUBLIC S16 SAttachDpdkPtrToMBuf +S16 SAttachDpdkPtrToMBuf ( Region region, Pool pool, @@ -8680,7 +8576,7 @@ MsgLen totalLen, Buffer** mBuf ) #else -PUBLIC S16 SAttachDpdkPtrToMBuf(region, pool, ptr, readPtr, msgLen, totalLen, mBuf) +S16 SAttachDpdkPtrToMBuf(region, pool, ptr, readPtr, msgLen, totalLen, mBuf) Region region; Pool pool; Data *ptr;