]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/npe/include/IxOsalBufferMgtDefault.h
doc: SPI: Add qspi test details on AM43xx
[karo-tx-uboot.git] / drivers / net / npe / include / IxOsalBufferMgtDefault.h
1 /**
2  * @file IxOsalBufferMgtDefault.h
3  *
4  * @brief Default buffer pool management and buffer management
5  *        definitions.
6  *
7  * Design Notes:
8  *
9  * @par
10  * IXP400 SW Release version 2.0
11  * 
12  * -- Copyright Notice --
13  * 
14  * @par
15  * Copyright 2001-2005, Intel Corporation.
16  * All rights reserved.
17  * 
18  * @par
19  * SPDX-License-Identifier:     BSD-3-Clause
20  * @par
21  * -- End of Copyright Notice --
22  */
23
24 #ifndef IX_OSAL_BUFFER_MGT_DEFAULT_H
25 #define IX_OSAL_BUFFER_MGT_DEFAULT_H
26
27 /**
28  * @enum IxMbufPoolAllocationType
29  * @brief Used to indicate how the pool memory was allocated
30  */
31
32 typedef enum
33 {
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;
37
38
39 /**
40  * @brief Implementation of buffer pool structure for use with non-VxWorks OS
41  */
42
43 typedef struct
44 {
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 */ 
56 } IxOsalMbufPool;
57
58 typedef IxOsalMbufPool IX_OSAL_MBUF_POOL;
59
60
61 PUBLIC IX_STATUS ixOsalBuffPoolUninit (IX_OSAL_MBUF_POOL * pool);
62
63
64 #endif /* IX_OSAL_BUFFER_MGT_DEFAULT_H */