aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp/api/plat/pool_inline_types.h
blob: 9deec89a1558061cbaf6a9383ba89f6821ae118e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Copyright (c) 2015-2018, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

/**
 * @file
 *
 * ODP packet descriptor
 */

#ifndef ODP_POOL_INLINE_TYPES_H_
#define ODP_POOL_INLINE_TYPES_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @internal Pool field accessor */
#define _odp_pool_get(pool, cast, field) \
	(*(cast *)(uintptr_t)((uint8_t *)pool + _odp_pool_inline.field))

/** @internal Pool header field offsets for inline functions */
typedef struct _odp_pool_inline_offset_t {
	/** @internal field offset */
	uint16_t index;
	/** @internal field offset */
	uint16_t seg_len;
	/** @internal field offset */
	uint16_t uarea_size;
	/** @internal field offset */
	uint16_t ext_head_offset;
	/** @internal field offset */
	uint16_t ext_pkt_buf_size;

} _odp_pool_inline_offset_t;

#ifdef __cplusplus
}
#endif

#endif