source: SVN/cambria/redboot/packages/devs/eth/intel/npe/common/current/include/osal/modules/bufferMgt/IxOsalBufferMgtDefault.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 3.0 KB
Line 
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 * -- Intel Copyright Notice --
13 *
14 * @par
15 * Copyright 2002-2005 Intel Corporation All Rights Reserved.
16 *
17 * @par
18 * The source code contained or described herein and all documents
19 * related to the source code ("Material") are owned by Intel Corporation
20 * or its suppliers or licensors.  Title to the Material remains with
21 * Intel Corporation or its suppliers and licensors.
22 *
23 * @par
24 * The Material is protected by worldwide copyright and trade secret laws
25 * and treaty provisions. No part of the Material may be used, copied,
26 * reproduced, modified, published, uploaded, posted, transmitted,
27 * distributed, or disclosed in any way except in accordance with the
28 * applicable license agreement .
29 *
30 * @par
31 * No license under any patent, copyright, trade secret or other
32 * intellectual property right is granted to or conferred upon you by
33 * disclosure or delivery of the Materials, either expressly, by
34 * implication, inducement, estoppel, except in accordance with the
35 * applicable license agreement.
36 *
37 * @par
38 * Unless otherwise agreed by Intel in writing, you may not remove or
39 * alter this notice or any other notice embedded in Materials by Intel
40 * or Intel's suppliers or licensors in any way.
41 *
42 * @par
43 * For further details, please see the file README.TXT distributed with
44 * this software.
45 *
46 * @par
47 * -- End Intel Copyright Notice --
48 */
49
50#ifndef IX_OSAL_BUFFER_MGT_DEFAULT_H
51#define IX_OSAL_BUFFER_MGT_DEFAULT_H
52
53/**
54 * @enum IxMbufPoolAllocationType
55 * @brief Used to indicate how the pool memory was allocated
56 */
57
58typedef enum
59{
60    IX_OSAL_MBUF_POOL_TYPE_SYS_ALLOC = 0, /**< mbuf pool allocated by the system */
61    IX_OSAL_MBUF_POOL_TYPE_USER_ALLOC    /**< mbuf pool allocated by the user */
62} IxOsalMbufPoolAllocationType;
63
64
65/**
66 * @brief Implementation of buffer pool structure for use with non-VxWorks OS
67 */
68
69typedef struct
70{
71    IX_OSAL_MBUF *nextFreeBuf;  /**< Pointer to the next free mbuf              */
72    void *mbufMemPtr;      /**< Pointer to the mbuf memory area            */
73    void *dataMemPtr;      /**< Pointer to the data memory area            */
74    int bufDataSize;       /**< The size of the data portion of each mbuf  */
75    int totalBufsInPool;   /**< Total number of mbufs in the pool          */
76    int freeBufsInPool;    /**< Number of free mbufs currently in the pool */
77    int mbufMemSize;       /**< The size of the pool mbuf memory area      */
78    int dataMemSize;       /**< The size of the pool data memory area      */
79    char name[IX_OSAL_MBUF_POOL_NAME_LEN + 1];   /**< Descriptive name for pool */
80    IxOsalMbufPoolAllocationType poolAllocType;
81    unsigned int poolIdx;  /**< Pool Index */ 
82} IxOsalMbufPool;
83
84typedef IxOsalMbufPool IX_OSAL_MBUF_POOL;
85
86
87PUBLIC IX_STATUS ixOsalBuffPoolUninit (IX_OSAL_MBUF_POOL * pool);
88
89
90#endif /* IX_OSAL_BUFFER_MGT_DEFAULT_H */
Note: See TracBrowser for help on using the repository browser.