blob: f054c37b39b574d14d21bc703c22324710028016 (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/* Copyright (c) 2015, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP packet descriptor
*/
#ifndef ODP_PACKET_TYPES_H_
#define ODP_PACKET_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <odp/api/plat/static_inline.h>
#if ODP_ABI_COMPAT == 1
#include <odp/api/abi/packet.h>
#else
#include <odp/api/std_types.h>
#include <odp/api/plat/strong_types.h>
/** @ingroup odp_packet
* @{
*/
typedef ODP_HANDLE_T(odp_packet_t);
#define ODP_PACKET_INVALID _odp_cast_scalar(odp_packet_t, NULL)
#define ODP_PACKET_OFFSET_INVALID (0x0fffffff)
typedef ODP_HANDLE_T(odp_packet_seg_t);
#define ODP_PACKET_SEG_INVALID _odp_cast_scalar(odp_packet_seg_t, NULL)
typedef enum {
ODP_PACKET_GREEN = 0,
ODP_PACKET_YELLOW = 1,
ODP_PACKET_RED = 2,
ODP_PACKET_ALL_COLORS = 3,
} odp_packet_color_t;
#define ODP_NUM_PACKET_COLORS 3
/**
* @}
*/
#endif
/** @internal Packet header field offsets for inline functions */
typedef struct _odp_packet_inline_offset_t {
/** @internal field offset */
size_t mb;
/** @internal field offset */
size_t pool;
/** @internal field offset */
size_t input;
/** @internal field offset */
size_t user_ptr;
/** @internal field offset */
size_t timestamp;
/** @internal field offset */
unsigned int buf_addr;
/** @internal field offset */
unsigned int data;
/** @internal field offset */
unsigned int pkt_len;
/** @internal field offset */
unsigned int seg_len;
/** @internal field offset */
unsigned int nb_segs;
/** @internal field offset */
unsigned int udata_len;
/** @internal field offset */
unsigned int udata;
/** @internal field offset */
unsigned int rss;
/** @internal field offset */
unsigned int ol_flags;
/** @internal field offset */
uint64_t rss_flag;
} _odp_packet_inline_offset_t;
#ifdef __cplusplus
}
#endif
#endif
|