source: SVN/cambria/redboot/packages/devs/eth/intel/npe/common/current/include/IxOsalBackwardBufferMgt.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: 4.6 KB
Line 
1/**
2 * This file is intended to provide backward
3 * compatibility for main osService/OSSL
4 * APIs.
5 *
6 * It shall be phased out gradually and users
7 * are strongly recommended to use IX_OSAL API.
8 *
9 * @par
10 * IXP400 SW Release version 2.3
11 *
12 * -- Copyright Notice --
13 *
14 * @par
15 * Copyright (c) 2001-2005, Intel Corporation.
16 * All rights reserved.
17 *
18 * @par
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 *    notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 *    notice, this list of conditions and the following disclaimer in the
26 *    documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Intel Corporation nor the names of its contributors
28 *    may be used to endorse or promote products derived from this software
29 *    without specific prior written permission.
30 *
31 *
32 * @par
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
34 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 *
46 * @par
47 * -- End of Copyright Notice --
48 */
49
50#ifndef IX_OSAL_BACKWARD_BUFFER_MGT_H
51#define IX_OSAL_BACKWARD_BUFFER_MGT_H
52
53typedef IX_OSAL_MBUF IX_MBUF;
54
55typedef IX_OSAL_MBUF_POOL IX_MBUF_POOL;
56
57
58#define IX_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr)  \
59                IX_OSAL_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr)
60
61
62#define IX_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr)  \
63                IX_OSAL_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr)
64
65
66#define IX_MBUF_MDATA(m_blk_ptr)  \
67                IX_OSAL_MBUF_MDATA(m_blk_ptr)
68
69
70#define IX_MBUF_MLEN(m_blk_ptr) \
71                IX_OSAL_MBUF_MLEN(m_blk_ptr)
72
73
74#define IX_MBUF_TYPE(m_blk_ptr) \
75                IX_OSAL_MBUF_MTYPE(m_blk_ptr)
76
77/* Same as IX_MBUF_TYPE */
78#define IX_MBUF_MTYPE(m_blk_ptr) \
79                IX_OSAL_MBUF_MTYPE(m_blk_ptr)
80
81#define IX_MBUF_FLAGS(m_blk_ptr)        \
82                IX_OSAL_MBUF_FLAGS(m_blk_ptr)
83
84
85#define IX_MBUF_NET_POOL(m_blk_ptr)     \
86                IX_OSAL_MBUF_NET_POOL(m_blk_ptr)
87
88
89#define IX_MBUF_PKT_LEN(m_blk_ptr)      \
90                IX_OSAL_MBUF_PKT_LEN(m_blk_ptr)
91
92
93#define IX_MBUF_PRIV(m_blk_ptr)         \
94                IX_OSAL_MBUF_PRIV(m_blk_ptr)
95
96
97#define IX_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr)  \
98                IX_OSAL_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr)
99
100
101#define IX_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr)  \
102                IX_OSAL_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr)
103
104
105#define IX_MBUF_POOL_SIZE_ALIGN(size)   \
106                IX_OSAL_MBUF_POOL_SIZE_ALIGN(size)
107
108
109#define IX_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count)      \
110                IX_OSAL_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count)
111
112
113#define IX_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size) \
114                IX_OSAL_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size)
115
116
117#define IX_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize) \
118                IX_OSAL_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize)
119
120
121#define IX_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize) \
122                IX_OSAL_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize)
123
124IX_STATUS
125ixOsalOsIxp400BackwardPoolInit (IX_OSAL_MBUF_POOL ** poolPtrPtr,
126                                UINT32 count, UINT32 size, const char *name);
127
128
129/* This one needs extra steps*/
130#define IX_MBUF_POOL_INIT(poolPtr, count, size, name) \
131                ixOsalOsIxp400BackwardPoolInit( poolPtr, count,  size, name)
132
133
134#define IX_MBUF_POOL_INIT_NO_ALLOC(poolPtrPtr, bufPtr, dataPtr, count, size, name) \
135                (*poolPtrPtr = IX_OSAL_MBUF_NO_ALLOC_POOL_INIT(bufPtr, dataPtr, count, size, name))
136
137
138IX_STATUS
139ixOsalOsIxp400BackwardMbufPoolGet (IX_OSAL_MBUF_POOL * poolPtr,
140                                   IX_OSAL_MBUF ** newBufPtrPtr);
141
142#define IX_MBUF_POOL_GET(poolPtr, bufPtrPtr) \
143                ixOsalOsIxp400BackwardMbufPoolGet(poolPtr, bufPtrPtr)
144
145
146#define IX_MBUF_POOL_PUT(bufPtr) \
147                IX_OSAL_MBUF_POOL_PUT(bufPtr)
148
149
150#define IX_MBUF_POOL_PUT_CHAIN(bufPtr) \
151                IX_OSAL_MBUF_POOL_PUT_CHAIN(bufPtr)
152
153
154#define IX_MBUF_POOL_SHOW(poolPtr) \
155                IX_OSAL_MBUF_POOL_SHOW(poolPtr)
156
157
158#define IX_MBUF_POOL_MDATA_RESET(bufPtr) \
159                IX_OSAL_MBUF_POOL_MDATA_RESET(bufPtr)
160
161#endif /* IX_OSAL_BACKWARD_BUFFER_MGT_H */
Note: See TracBrowser for help on using the repository browser.