blob: 4cf80d31eb7a33d5bc057581e8f476e903a5c1a3 [file] [log] [blame]
Wolfgang Denkba94a1b2006-05-30 15:56:48 +02001/**
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.0
11 *
12 * -- Copyright Notice --
13 *
14 * @par
15 * Copyright 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 * @par
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 * SUCH DAMAGE.
43 *
44 * @par
45 * -- End of Copyright Notice --
46 */
47
48#ifndef IX_OSAL_BACKWARD_BUFFER_MGT_H
49#define IX_OSAL_BACKWARD_BUFFER_MGT_H
50
51typedef IX_OSAL_MBUF IX_MBUF;
52
53typedef IX_OSAL_MBUF_POOL IX_MBUF_POOL;
54
55
56#define IX_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr) \
57 IX_OSAL_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr)
58
59
60#define IX_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr) \
61 IX_OSAL_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr)
62
63
64#define IX_MBUF_MDATA(m_blk_ptr) \
65 IX_OSAL_MBUF_MDATA(m_blk_ptr)
66
67
68#define IX_MBUF_MLEN(m_blk_ptr) \
69 IX_OSAL_MBUF_MLEN(m_blk_ptr)
70
71
72#define IX_MBUF_TYPE(m_blk_ptr) \
73 IX_OSAL_MBUF_MTYPE(m_blk_ptr)
74
75/* Same as IX_MBUF_TYPE */
76#define IX_MBUF_MTYPE(m_blk_ptr) \
77 IX_OSAL_MBUF_MTYPE(m_blk_ptr)
78
Wolfgang Denk53677ef2008-05-20 16:00:29 +020079#define IX_MBUF_FLAGS(m_blk_ptr) \
Wolfgang Denkba94a1b2006-05-30 15:56:48 +020080 IX_OSAL_MBUF_FLAGS(m_blk_ptr)
81
82
83#define IX_MBUF_NET_POOL(m_blk_ptr) \
84 IX_OSAL_MBUF_NET_POOL(m_blk_ptr)
85
86
87#define IX_MBUF_PKT_LEN(m_blk_ptr) \
88 IX_OSAL_MBUF_PKT_LEN(m_blk_ptr)
89
90
91#define IX_MBUF_PRIV(m_blk_ptr) \
92 IX_OSAL_MBUF_PRIV(m_blk_ptr)
93
94
95#define IX_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr) \
96 IX_OSAL_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr)
97
98
99#define IX_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr) \
100 IX_OSAL_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr)
101
102
103#define IX_MBUF_POOL_SIZE_ALIGN(size) \
104 IX_OSAL_MBUF_POOL_SIZE_ALIGN(size)
105
106
107#define IX_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count) \
108 IX_OSAL_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count)
109
110
111#define IX_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size) \
112 IX_OSAL_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size)
113
114
115#define IX_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize) \
116 IX_OSAL_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize)
117
118
119#define IX_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize) \
120 IX_OSAL_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize)
121
122IX_STATUS
123ixOsalOsIxp400BackwardPoolInit (IX_OSAL_MBUF_POOL ** poolPtrPtr,
124 UINT32 count, UINT32 size, const char *name);
125
126
127/* This one needs extra steps*/
128#define IX_MBUF_POOL_INIT(poolPtr, count, size, name) \
129 ixOsalOsIxp400BackwardPoolInit( poolPtr, count, size, name)
130
131
132#define IX_MBUF_POOL_INIT_NO_ALLOC(poolPtrPtr, bufPtr, dataPtr, count, size, name) \
133 (*poolPtrPtr = IX_OSAL_MBUF_NO_ALLOC_POOL_INIT(bufPtr, dataPtr, count, size, name))
134
135
136IX_STATUS
137ixOsalOsIxp400BackwardMbufPoolGet (IX_OSAL_MBUF_POOL * poolPtr,
138 IX_OSAL_MBUF ** newBufPtrPtr);
139
140#define IX_MBUF_POOL_GET(poolPtr, bufPtrPtr) \
141 ixOsalOsIxp400BackwardMbufPoolGet(poolPtr, bufPtrPtr)
142
143
144#define IX_MBUF_POOL_PUT(bufPtr) \
145 IX_OSAL_MBUF_POOL_PUT(bufPtr)
146
147
148#define IX_MBUF_POOL_PUT_CHAIN(bufPtr) \
149 IX_OSAL_MBUF_POOL_PUT_CHAIN(bufPtr)
150
151
152#define IX_MBUF_POOL_SHOW(poolPtr) \
153 IX_OSAL_MBUF_POOL_SHOW(poolPtr)
154
155
156#define IX_MBUF_POOL_MDATA_RESET(bufPtr) \
157 IX_OSAL_MBUF_POOL_MDATA_RESET(bufPtr)
158
159#endif /* IX_OSAL_BACKWARD_BUFFER_MGT_H */