API Reference Manual 1.51.0
Loading...
Searching...
No Matches
api/spec/packet_types.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2013-2018 Linaro Limited
3 * Copyright (c) 2021-2026 Nokia
4 */
5
12#ifndef ODP_API_SPEC_PACKET_TYPES_H_
13#define ODP_API_SPEC_PACKET_TYPES_H_
14#include <odp/visibility_begin.h>
15
17#include <odp/api/queue_types.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
87#define ODP_NUM_PACKET_COLORS 3
88
92typedef uint8_t odp_proto_l2_type_t;
93
95#define ODP_PROTO_L2_TYPE_NONE 0
96
98#define ODP_PROTO_L2_TYPE_ETH 1
99
103typedef uint16_t odp_proto_l3_type_t;
104
106#define ODP_PROTO_L3_TYPE_NONE 0xFFFF
107
108/* Types from IEEE EtherType assignments list */
109
111#define ODP_PROTO_L3_TYPE_ARP 0x0806
112
114#define ODP_PROTO_L3_TYPE_RARP 0x8035
115
117#define ODP_PROTO_L3_TYPE_MPLS 0x8847
118
120#define ODP_PROTO_L3_TYPE_IPV4 0x0800
121
123#define ODP_PROTO_L3_TYPE_IPV6 0x86DD
124
128typedef uint8_t odp_proto_l4_type_t;
129
131 #define ODP_PROTO_L4_TYPE_NONE 255
132
133/* Types from IANA assigned Internet protocol numbers list */
134
136 #define ODP_PROTO_L4_TYPE_ICMPV4 1
137
139#define ODP_PROTO_L4_TYPE_IGMP 2
140
142#define ODP_PROTO_L4_TYPE_IPV4 4
143
145 #define ODP_PROTO_L4_TYPE_TCP 6
146
148#define ODP_PROTO_L4_TYPE_UDP 17
149
151#define ODP_PROTO_L4_TYPE_IPV6 41
152
154#define ODP_PROTO_L4_TYPE_GRE 47
155
157#define ODP_PROTO_L4_TYPE_ESP 50
158
160#define ODP_PROTO_L4_TYPE_AH 51
161
163#define ODP_PROTO_L4_TYPE_ICMPV6 58
164
166#define ODP_PROTO_L4_TYPE_NO_NEXT 59
167
169#define ODP_PROTO_L4_TYPE_IPCOMP 108
170
172#define ODP_PROTO_L4_TYPE_SCTP 132
173
175#define ODP_PROTO_L4_TYPE_ROHC 142
176
229
250
256 uint8_t static_ref :1;
257
259 uint8_t referencing_pkt :1;
260
262 uint8_t referenced_pkt :1;
263
265
269typedef struct odp_packet_data_range {
271 uint32_t offset;
272
274 uint32_t length;
275
277
297
305
316
320typedef union odp_proto_chksums_t {
322 struct {
324 uint32_t ipv4 : 1;
325
327 uint32_t udp : 1;
328
330 uint32_t tcp : 1;
331
333 uint32_t sctp : 1;
334
336
341 uint32_t all_chksum;
342
344
365
371 union {
373 uint64_t all;
374
376 struct {
378 uint64_t has_error : 1;
380 uint64_t has_l2_error : 1;
382 uint64_t has_l3_error : 1;
384 uint64_t has_l4_error : 1;
386 uint64_t has_l2 : 1;
388 uint64_t has_l3 : 1;
390 uint64_t has_l4 : 1;
392 uint64_t has_eth : 1;
394 uint64_t has_eth_bcast : 1;
396 uint64_t has_eth_mcast : 1;
398 uint64_t has_jumbo : 1;
400 uint64_t has_vlan : 1;
402 uint64_t has_vlan_qinq : 1;
404 uint64_t has_arp : 1;
406 uint64_t has_ipv4 : 1;
408 uint64_t has_ipv6 : 1;
410 uint64_t has_ip_bcast : 1;
412 uint64_t has_ip_mcast : 1;
414 uint64_t has_ipfrag : 1;
416 uint64_t has_ipopt : 1;
418 uint64_t has_ipsec : 1;
420 uint64_t has_udp : 1;
422 uint64_t has_tcp : 1;
424 uint64_t has_sctp : 1;
426 uint64_t has_icmp : 1;
427 };
428 };
430
461
498
521
560
572
589
594#ifdef __cplusplus
595}
596#endif
597
598#include <odp/visibility_end.h>
599#endif
ODP proto stats types.
ODP queue.
odp_packet_free_ctrl_t
Packet free control option.
odp_proto_t
Protocol.
struct odp_packet_data_range odp_packet_data_range_t
Packet API data range specifier.
uint16_t odp_proto_l3_type_t
Layer 3 protocol type.
odp_proto_layer_t
Protocol layer.
odp_packet_tx_compl_mode_t
Packet transmit completion mode.
odp_packet_reass_status_t
Reassembly status of a packet.
odp_packet_chksum_status_t
Checksum check status in packet.
uint8_t odp_proto_l4_type_t
Layer 4 protocol type.
uint8_t odp_proto_l2_type_t
Layer 2 protocol type.
@ ODP_PACKET_FREE_CTRL_DONT_FREE
Don't free packet after processing it.
@ ODP_PACKET_FREE_CTRL_DISABLED
Packet free control disabled.
@ ODP_PROTO_NONE
No protocol defined.
@ ODP_PROTO_IPV6
IP version 6.
@ ODP_PROTO_ETH
Ethernet (including VLAN)
@ ODP_PROTO_IPV4
IP version 4.
@ ODP_PROTO_LAYER_L3
Layer L3 protocols (IPv4, IPv6, ICMP, IPSEC, etc)
@ ODP_PROTO_LAYER_ALL
All layers.
@ ODP_PROTO_LAYER_L4
Layer L4 protocols (UDP, TCP, SCTP)
@ ODP_PROTO_LAYER_NONE
No layers.
@ ODP_PROTO_LAYER_L2
Layer L2 protocols (Ethernet, VLAN, etc)
@ ODP_PACKET_TX_COMPL_POLL
Enable packet transmit completion check through polling.
@ ODP_PACKET_TX_COMPL_DISABLED
Disable packet transmit completion.
@ ODP_PACKET_TX_COMPL_EVENT
Enable packet transmit completion event.
@ ODP_PACKET_REASS_INCOMPLETE
Reassembly was attempted but is incomplete.
@ ODP_PACKET_REASS_COMPLETE
Reassembly was successfully done.
@ ODP_PACKET_REASS_NONE
Reassembly was not attempted.
Packet API data range specifier.
uint32_t offset
Offset from beginning of packet.
uint32_t length
Length of data to operate on.
odp_lso_profile_t lso_profile
LSO profile handle.
uint32_t payload_offset
LSO payload offset.
uint32_t max_payload_len
Maximum payload length in an LSO segment.
Packet parse parameters.
odp_proto_chksums_t chksums
Flags to control payload data checksums checks up to the selected parse layer.
odp_proto_layer_t last_layer
Continue parsing until this layer.
odp_proto_t proto
Protocol header at parse starting point.
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()
odp_proto_l3_type_t l3_type
See odp_packet_l3_type()
odp_packet_chksum_status_t l3_chksum_status
See odp_packet_l3_chksum_status()
odp_packet_chksum_status_t l4_chksum_status
See odp_packet_l4_chksum_status()
uint32_t packet_len
See odp_packet_len()
odp_packet_parse_result_flag_t flag
Parse result flags.
odp_proto_l4_type_t l4_type
See odp_packet_l4_type()
uint32_t l3_offset
See odp_packet_l3_offset()
odp_proto_l2_type_t l2_type
See odp_packet_l2_type()
uint32_t l4_offset
See odp_packet_l4_offset()
uint32_t l2_offset
See odp_packet_l2_offset()
Packet proto stats options.
int32_t oct_count1_adj
Octet counter 1 adjust.
int32_t oct_count0_adj
Octet counter 0 adjust.
odp_proto_stats_t stat
Packet proto stats object handle.
Information about a completed reassembly.
uint16_t num_frags
Number of fragments reassembled.
Result from odp_packet_reass_partial_state()
uint16_t num_frags
Number of fragments returned.
uint64_t elapsed_time
Time, in ns, since the reception of the first received fragment.
Set of packet types that involve packet references.
uint8_t static_ref
Static reference.
uint8_t referenced_pkt
A packet referenced by another packet (excluding static references)
uint8_t referencing_pkt
Referencing packet, created using odp_packet_ref()
Packet transmit completion request options.
odp_packet_tx_compl_mode_t mode
Packet transmit completion mode.
odp_queue_t queue
Destination queue.
uint32_t compl_id
Completion identifier.
Flags to control packet data checksum checking.
uint32_t sctp
SCTP checksum.
uint32_t ipv4
IPv4 header checksum.
uint32_t all_chksum
All checksum bits.
struct odp_proto_chksums_t::@124 chksum
Individual checksum bits.
uint32_t tcp
TCP checksum.
uint32_t udp
UDP checksum.