API Reference Manual  1.45.0
spec/threshold.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2017-2018 Linaro Limited
3  */
4 
11 #ifndef ODP_API_SPEC_THRESHOLD_H_
12 #define ODP_API_SPEC_THRESHOLD_H_
13 
14 #include <odp/visibility_begin.h>
15 #include <odp/api/std_types.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
26 typedef union odp_threshold_types_t {
28  struct {
30  uint8_t percent:1;
31 
33  uint8_t packet:1;
34 
36  uint8_t bytes:1;
37  };
38 
40  uint8_t all_bits;
42 
48 typedef enum odp_threshold_type_t {
51 
54 
58 
64 typedef struct odp_threshold_t {
67 
69  union {
71  struct {
74 
78 
80  struct {
82  uint64_t max;
83 
85  uint64_t min;
86  } packet;
87 
89  struct {
91  uint64_t max;
92 
94  uint64_t min;
95  } byte;
96  };
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #include <odp/visibility_end.h>
104 #endif
Standard C language types and definitions for ODP.
uint32_t odp_percent_t
Percentage type Use odp_percent_t for specifying fields that are percentages.
struct odp_threshold_t odp_threshold_t
ODP Threshold.
union odp_threshold_types_t odp_threshold_types_t
Supported threshold types.
odp_threshold_type_t
ODP Threshold types.
@ ODP_THRESHOLD_BYTE
Total size of all transient packets in bytes.
@ ODP_THRESHOLD_PERCENT
Percentage of the total size of pool or queue.
@ ODP_THRESHOLD_PACKET
Total number of all transient packets.
ODP Threshold.
odp_threshold_type_t type
Type of threshold.
odp_percent_t max
Max percentage value.
struct odp_threshold_t::@148::@151 packet
Packet count.
struct odp_threshold_t::@148::@150 percent
Percentage.
struct odp_threshold_t::@148::@152 byte
Sum of all data bytes of all packets.
uint64_t max
Max packet count.
odp_percent_t min
Min percentage value.
uint64_t min
Min packet count.
Supported threshold types.
uint8_t bytes
Total size of all transient packets in bytes.
uint8_t all_bits
All bits of the bit field structure.
uint8_t percent
Percentage of the total size of pool or queue.
uint8_t packet
Total number of all transient packets.