API Reference Manual  1.45.0
api/spec/std_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 ARM Limited
4  * Copyright (c) 2021 Nokia
5  */
6 
14 #ifndef ODP_API_SPEC_STD_TYPES_H_
15 #define ODP_API_SPEC_STD_TYPES_H_
16 #include <odp/visibility_begin.h>
17 /* uint64_t, uint32_t, etc */
18 #include <stdint.h>
19 #include <odp/api/align.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
42 typedef uint32_t odp_percent_t;
43 
45 typedef uint16_t odp_una_u16_t ODP_ALIGNED(1);
46 
48 typedef uint32_t odp_una_u32_t ODP_ALIGNED(1);
49 
51 typedef uint64_t odp_una_u64_t ODP_ALIGNED(1);
52 
61 typedef struct ODP_ALIGNED(16) odp_u128_s {
63  union {
65  uint64_t u64[2];
67  uint32_t u32[4];
69  uint16_t u16[8];
71  uint8_t u8[16];
72  };
74 
83 typedef struct odp_fract_u64_t {
85  uint64_t integer;
86 
88  uint64_t numer;
89 
92  uint64_t denom;
93 
95 
103 typedef enum odp_support_t {
116 
118 
120 typedef union odp_feature_t {
122  uint32_t all_feat;
123 
125  struct {
127  uint32_t cls:1;
128 
130  uint32_t compress:1;
131 
133  uint32_t crypto:1;
134 
136  uint32_t dma:1;
137 
139  uint32_t ipsec:1;
140 
142  uint32_t ml:1;
143 
145  uint32_t schedule:1;
146 
148  uint32_t stash:1;
149 
151  uint32_t time:1;
152 
154  uint32_t timer:1;
155 
157  uint32_t tm:1;
158  } feat;
159 
161 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #include <odp/visibility_end.h>
171 #endif
ODP alignments.
#define ODP_ALIGNED(x)
Defines type/struct/variable alignment in bytes.
union odp_feature_t odp_feature_t
Definition of ODP features.
uint64_t odp_una_u64_t
Unaligned uint64_t type.
odp_support_t
ODP support.
uint32_t odp_percent_t
Percentage type Use odp_percent_t for specifying fields that are percentages.
struct odp_u128_s odp_u128_t
128-bit unsigned integer structure
uint16_t odp_una_u16_t
Unaligned uint16_t type.
struct odp_fract_u64_t odp_fract_u64_t
Unsigned 64 bit fractional number.
uint32_t odp_una_u32_t
Unaligned uint32_t type.
@ ODP_SUPPORT_PREFERRED
Feature is supported and preferred.
@ ODP_SUPPORT_YES
Feature is supported.
@ ODP_SUPPORT_NO
Feature is not supported.
Unsigned 64 bit fractional number.
uint64_t integer
Integer part.
uint64_t denom
Denominator of the fraction part.
uint64_t numer
Numerator of the fraction part.
128-bit unsigned integer structure
Definition of ODP features.
struct odp_feature_t::@145 feat
Individual feature bits.
uint32_t tm
Traffic Manager APIs, e.g., odp_tm_xxx()
uint32_t stash
Stash APIs, e.g., odp_stash_xxx()
uint32_t crypto
Crypto APIs, e.g., odp_crypto_xxx()
uint32_t ipsec
IPsec APIs, e.g., odp_ipsec_xxx()
uint32_t all_feat
All features.
uint32_t dma
DMA APIs, e.g., odp_dma_xxx()
uint32_t timer
Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx()
uint32_t cls
Classifier APIs, e.g., odp_cls_xxx(), odp_cos_xxx()
uint32_t ml
Machine Learning APIs, e.g., odp_ml_xxx()
uint32_t time
Time APIs, e.g., odp_time_xxx()
uint32_t schedule
Scheduler APIs, e.g., odp_schedule_xxx()
uint32_t compress
Compression APIs, e.g., odp_comp_xxx()