aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp/api/plat/packet_io_inlines.h
blob: 5c7a815b563d09e29929e93e492e80bdb9bc6826 (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
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright (c) 2018 Linaro Limited
 * Copyright (c) 2022 Nokia
 */

#ifndef ODP_PLAT_PACKET_IO_INLINES_H_
#define ODP_PLAT_PACKET_IO_INLINES_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <odp/api/abi/packet_io_types.h>

#include <stdint.h>

/** @cond _ODP_HIDE_FROM_DOXYGEN_ */

#ifndef _ODP_NO_INLINE
	/* Inline functions by default */
	#define _ODP_INLINE static inline
	#define odp_pktio_index __odp_pktio_index
#else
	#undef _ODP_INLINE
	#define _ODP_INLINE
#endif

_ODP_INLINE int odp_pktio_index(odp_pktio_t pktio)
{
	return (int)(uintptr_t)pktio - 1;
}

/** @endcond */

#ifdef __cplusplus
}
#endif

#endif