blob: 46df29d3d26cfddc136fc86dc3b0f88cfc021fc4 [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
Wolfgang Denkcb3761e2013-07-28 22:12:47 +020019 * SPDX-License-Identifier: BSD-3-Clause
Wolfgang Denkba94a1b2006-05-30 15:56:48 +020020 * @par
21 * -- End of Copyright Notice --
22 */
23
24#ifndef IX_OSAL_BACKWARD_BUFFER_MGT_H
25#define IX_OSAL_BACKWARD_BUFFER_MGT_H
26
27typedef IX_OSAL_MBUF IX_MBUF;
28
29typedef IX_OSAL_MBUF_POOL IX_MBUF_POOL;
30
31
32#define IX_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr) \
33 IX_OSAL_MBUF_NEXT_BUFFER_IN_PKT_PTR(m_blk_ptr)
34
35
36#define IX_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr) \
37 IX_OSAL_MBUF_NEXT_PKT_IN_CHAIN_PTR(m_blk_ptr)
38
39
40#define IX_MBUF_MDATA(m_blk_ptr) \
41 IX_OSAL_MBUF_MDATA(m_blk_ptr)
42
43
44#define IX_MBUF_MLEN(m_blk_ptr) \
45 IX_OSAL_MBUF_MLEN(m_blk_ptr)
46
47
48#define IX_MBUF_TYPE(m_blk_ptr) \
49 IX_OSAL_MBUF_MTYPE(m_blk_ptr)
50
51/* Same as IX_MBUF_TYPE */
52#define IX_MBUF_MTYPE(m_blk_ptr) \
53 IX_OSAL_MBUF_MTYPE(m_blk_ptr)
54
Wolfgang Denk53677ef2008-05-20 16:00:29 +020055#define IX_MBUF_FLAGS(m_blk_ptr) \
Wolfgang Denkba94a1b2006-05-30 15:56:48 +020056 IX_OSAL_MBUF_FLAGS(m_blk_ptr)
57
58
59#define IX_MBUF_NET_POOL(m_blk_ptr) \
60 IX_OSAL_MBUF_NET_POOL(m_blk_ptr)
61
62
63#define IX_MBUF_PKT_LEN(m_blk_ptr) \
64 IX_OSAL_MBUF_PKT_LEN(m_blk_ptr)
65
66
67#define IX_MBUF_PRIV(m_blk_ptr) \
68 IX_OSAL_MBUF_PRIV(m_blk_ptr)
69
70
71#define IX_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr) \
72 IX_OSAL_MBUF_ALLOCATED_BUFF_LEN(m_blk_ptr)
73
74
75#define IX_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr) \
76 IX_OSAL_MBUF_ALLOCATED_BUFF_DATA(m_blk_ptr)
77
78
79#define IX_MBUF_POOL_SIZE_ALIGN(size) \
80 IX_OSAL_MBUF_POOL_SIZE_ALIGN(size)
81
82
83#define IX_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count) \
84 IX_OSAL_MBUF_POOL_MBUF_AREA_SIZE_ALIGNED(count)
85
86
87#define IX_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size) \
88 IX_OSAL_MBUF_POOL_DATA_AREA_SIZE_ALIGNED(count, size)
89
90
91#define IX_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize) \
92 IX_OSAL_MBUF_POOL_MBUF_AREA_ALLOC(count, memAreaSize)
93
94
95#define IX_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize) \
96 IX_OSAL_MBUF_POOL_DATA_AREA_ALLOC(count, size, memAreaSize)
97
98IX_STATUS
99ixOsalOsIxp400BackwardPoolInit (IX_OSAL_MBUF_POOL ** poolPtrPtr,
100 UINT32 count, UINT32 size, const char *name);
101
102
103/* This one needs extra steps*/
104#define IX_MBUF_POOL_INIT(poolPtr, count, size, name) \
105 ixOsalOsIxp400BackwardPoolInit( poolPtr, count, size, name)
106
107
108#define IX_MBUF_POOL_INIT_NO_ALLOC(poolPtrPtr, bufPtr, dataPtr, count, size, name) \
109 (*poolPtrPtr = IX_OSAL_MBUF_NO_ALLOC_POOL_INIT(bufPtr, dataPtr, count, size, name))
110
111
112IX_STATUS
113ixOsalOsIxp400BackwardMbufPoolGet (IX_OSAL_MBUF_POOL * poolPtr,
114 IX_OSAL_MBUF ** newBufPtrPtr);
115
116#define IX_MBUF_POOL_GET(poolPtr, bufPtrPtr) \
117 ixOsalOsIxp400BackwardMbufPoolGet(poolPtr, bufPtrPtr)
118
119
120#define IX_MBUF_POOL_PUT(bufPtr) \
121 IX_OSAL_MBUF_POOL_PUT(bufPtr)
122
123
124#define IX_MBUF_POOL_PUT_CHAIN(bufPtr) \
125 IX_OSAL_MBUF_POOL_PUT_CHAIN(bufPtr)
126
127
128#define IX_MBUF_POOL_SHOW(poolPtr) \
129 IX_OSAL_MBUF_POOL_SHOW(poolPtr)
130
131
132#define IX_MBUF_POOL_MDATA_RESET(bufPtr) \
133 IX_OSAL_MBUF_POOL_MDATA_RESET(bufPtr)
134
135#endif /* IX_OSAL_BACKWARD_BUFFER_MGT_H */