API Reference Manual  1.45.0
api/abi-default/packet_types.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2017-2018 Linaro Limited
3  * Copyright (c) 2021 Nokia
4  */
5 
6 #ifndef ODP_ABI_PACKET_TYPES_H_
7 #define ODP_ABI_PACKET_TYPES_H_
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include <stdint.h>
14 
16 typedef struct { char dummy; } _odp_abi_packet_t;
17 
19 typedef struct { char dummy; } _odp_abi_packet_seg_t;
20 
22 typedef struct { char dummy; } _odp_abi_packet_buf_t;
23 
25 typedef struct { char dummy; } _odp_abi_packet_vector_t;
26 
28 typedef struct { char dummy; } _odp_abi_packet_tx_compl_t;
29 
39 
40 #define ODP_PACKET_INVALID ((odp_packet_t)0)
41 #define ODP_PACKET_SEG_INVALID ((odp_packet_seg_t)0)
42 #define ODP_PACKET_BUF_INVALID ((odp_packet_buf_t)0)
43 #define ODP_PACKET_OFFSET_INVALID 0xffff
44 #define ODP_PACKET_VECTOR_INVALID ((odp_packet_vector_t)0)
45 #define ODP_PACKET_TX_COMPL_INVALID ((odp_packet_tx_compl_t)0)
46 
48 typedef enum {
52  ODP_PACKET_ALL_COLORS = 3,
54 
56 typedef enum {
61 
65  union {
67  uint64_t all;
68 
70  struct {
72  uint64_t has_error : 1;
74  uint64_t has_l2_error : 1;
76  uint64_t has_l3_error : 1;
78  uint64_t has_l4_error : 1;
80  uint64_t has_l2 : 1;
82  uint64_t has_l3 : 1;
84  uint64_t has_l4 : 1;
86  uint64_t has_eth : 1;
88  uint64_t has_eth_bcast : 1;
90  uint64_t has_eth_mcast : 1;
92  uint64_t has_jumbo : 1;
94  uint64_t has_vlan : 1;
96  uint64_t has_vlan_qinq : 1;
98  uint64_t has_arp : 1;
100  uint64_t has_ipv4 : 1;
102  uint64_t has_ipv6 : 1;
104  uint64_t has_ip_bcast : 1;
106  uint64_t has_ip_mcast : 1;
108  uint64_t has_ipfrag : 1;
110  uint64_t has_ipopt : 1;
112  uint64_t has_ipsec : 1;
114  uint64_t has_udp : 1;
116  uint64_t has_tcp : 1;
118  uint64_t has_sctp : 1;
120  uint64_t has_icmp : 1;
121  };
122  };
123 
125 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif
_odp_abi_packet_vector_t * odp_packet_vector_t
ODP packet vector.
struct odp_packet_parse_result_flag_t odp_packet_parse_result_flag_t
Parse result flags.
_odp_abi_packet_buf_t * odp_packet_buf_t
ODP packet buffer.
_odp_abi_packet_seg_t * odp_packet_seg_t
ODP packet segment.
odp_packet_chksum_status_t
Packet Checksum Status.
odp_packet_color_t
Packet Color.
_odp_abi_packet_tx_compl_t * odp_packet_tx_compl_t
ODP Packet Tx completion.
_odp_abi_packet_t * odp_packet_t
ODP packet.
@ ODP_PACKET_CHKSUM_BAD
Checksum was checked and it was not correct.
@ ODP_PACKET_CHKSUM_OK
Checksum was checked and it was correct.
@ ODP_PACKET_CHKSUM_UNKNOWN
Checksum was not checked.
@ ODP_PACKET_YELLOW
Packet is yellow.
@ ODP_PACKET_RED
Packet is red.
@ ODP_PACKET_GREEN
Packet is green.
uint64_t has_udp
See odp_packet_has_udp()
uint64_t has_arp
See odp_packet_has_arp()
uint64_t has_ip_mcast
See odp_packet_has_ip_mcast()
uint64_t has_ipv6
See odp_packet_has_ipv6()
uint64_t has_sctp
See odp_packet_has_sctp()
uint64_t has_tcp
See odp_packet_has_tcp()
uint64_t all
All flags as a 64 bit word.
uint64_t has_error
See odp_packet_has_error()
uint64_t has_eth
See odp_packet_has_eth()
uint64_t has_jumbo
See odp_packet_has_jumbo()
uint64_t has_l2_error
See odp_packet_has_l2_error()
uint64_t has_l2
See odp_packet_has_l2()
uint64_t has_ipsec
See odp_packet_has_ipsec()
uint64_t has_eth_bcast
See odp_packet_has_eth_bcast()
uint64_t has_ipfrag
See odp_packet_has_ipfrag()
uint64_t has_ipopt
See odp_packet_has_ipopt()
uint64_t has_eth_mcast
See odp_packet_has_eth_mcast()
uint64_t has_icmp
See odp_packet_has_icmp()
uint64_t has_vlan
See odp_packet_has_vlan()
uint64_t has_l3_error
See odp_packet_has_l3_error()
uint64_t has_l3
See odp_packet_has_l3()
uint64_t has_ip_bcast
See odp_packet_has_ip_bcast()
uint64_t has_ipv4
See odp_packet_has_ipv4()
uint64_t has_l4
See odp_packet_has_l4()
uint64_t has_l4_error
See odp_packet_has_l4_error()
uint64_t has_vlan_qinq
See odp_packet_has_vlan_qinq()