2 * @file IxOsalBufferMgtDefault.h
4 * @brief Default buffer pool management and buffer management
10 * IXP400 SW Release version 2.0
12 * -- Copyright Notice --
15 * Copyright 2001-2005, Intel Corporation.
16 * All rights reserved.
19 * SPDX-License-Identifier: BSD-3-Clause
21 * -- End of Copyright Notice --
24 #ifndef IX_OSAL_BUFFER_MGT_DEFAULT_H
25 #define IX_OSAL_BUFFER_MGT_DEFAULT_H
28 * @enum IxMbufPoolAllocationType
29 * @brief Used to indicate how the pool memory was allocated
34 IX_OSAL_MBUF_POOL_TYPE_SYS_ALLOC = 0, /**< mbuf pool allocated by the system */
35 IX_OSAL_MBUF_POOL_TYPE_USER_ALLOC /**< mbuf pool allocated by the user */
36 } IxOsalMbufPoolAllocationType;
40 * @brief Implementation of buffer pool structure for use with non-VxWorks OS
45 IX_OSAL_MBUF *nextFreeBuf; /**< Pointer to the next free mbuf */
46 void *mbufMemPtr; /**< Pointer to the mbuf memory area */
47 void *dataMemPtr; /**< Pointer to the data memory area */
48 int bufDataSize; /**< The size of the data portion of each mbuf */
49 int totalBufsInPool; /**< Total number of mbufs in the pool */
50 int freeBufsInPool; /**< Number of free mbufs currently in the pool */
51 int mbufMemSize; /**< The size of the pool mbuf memory area */
52 int dataMemSize; /**< The size of the pool data memory area */
53 char name[IX_OSAL_MBUF_POOL_NAME_LEN + 1]; /**< Descriptive name for pool */
54 IxOsalMbufPoolAllocationType poolAllocType;
55 unsigned int poolIdx; /**< Pool Index */
58 typedef IxOsalMbufPool IX_OSAL_MBUF_POOL;
61 PUBLIC IX_STATUS ixOsalBuffPoolUninit (IX_OSAL_MBUF_POOL * pool);
64 #endif /* IX_OSAL_BUFFER_MGT_DEFAULT_H */