aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/abi-default/packet_io_types.h
blob: ff77c80ad735697f46e48983bcf12ba92d245565 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Copyright (c) 2015-2018, Linaro Limited
 * Copyright (c) 2020-2022, Nokia
 * All rights reserved.
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 */

/**
 * @file
 *
 * ODP Packet IO
 */

#ifndef ODP_ABI_PACKET_IO_TYPES_H_
#define ODP_ABI_PACKET_IO_TYPES_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <odp/api/std_types.h>

/** @internal Dummy type for strong typing */
typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_pktio_t;

/** @internal Dummy type for strong typing */
typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_lso_profile_t;

/** @addtogroup odp_packet_io
 *  Operations on a packet.
 *  @{
 */

typedef _odp_abi_pktio_t *odp_pktio_t;
typedef _odp_abi_lso_profile_t *odp_lso_profile_t;

/** @internal */
typedef struct odp_pktin_queue_t {
	odp_pktio_t pktio; /**< @internal pktio handle */
	int index;         /**< @internal pktio queue index */
} odp_pktin_queue_t;

/** @internal */
typedef struct odp_pktout_queue_t {
	odp_pktio_t pktio; /**< @internal pktio handle */
	int index;         /**< @internal pktio queue index */
} odp_pktout_queue_t;

#define ODP_PKTIO_INVALID ((odp_pktio_t)0)
#define ODP_LSO_PROFILE_INVALID ((odp_lso_profile_t)0)

#define ODP_PKTIO_MACADDR_MAXSIZE 16

#define ODP_PKTIN_NO_WAIT 0

#define ODP_PKTOUT_MAX_QUEUES 64

#define ODP_PKTIO_STATS_EXTRA_NAME_LEN 64

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif