API Reference Manual  1.45.0
api/spec/traffic_mngr.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2015-2018 Linaro Limited
3  * Copyright (c) 2021-2022 Nokia
4  * Copyright (c) 2022 Marvell
5  */
6 
7 #ifndef ODP_API_SPEC_TRAFFIC_MNGR_H_
8 #define ODP_API_SPEC_TRAFFIC_MNGR_H_
9 #include <odp/visibility_begin.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
16 #include <odp/api/std_types.h>
17 
183 typedef struct odp_tm_queue_stats_t {
186  uint64_t octets;
187 
189  uint64_t packets;
190 
193  uint64_t discards;
194 
197  uint64_t discard_octets;
198 
200  uint64_t errors;
201 
203 
209  union {
211  struct {
213  uint64_t octets : 1;
214 
216  uint64_t packets : 1;
217 
219  uint64_t discards : 1;
220 
222  uint64_t discard_octets : 1;
223 
225  uint64_t errors : 1;
226 
228 
233  uint64_t all_counters;
234  };
236 
242 typedef struct {
246 
251 
256  uint8_t max_priority;
257 
261  uint32_t min_weight;
262 
266  uint32_t max_weight;
267 
273 
279 
285 
291 
296  uint32_t min_burst;
297 
302  uint32_t max_burst;
303 
308  uint64_t min_rate;
309 
314  uint64_t max_rate;
315 
318 
321 
325 
329 
334 
340 
346 
348  struct {
350  uint8_t byte : 1;
351 
353  uint8_t packet : 1;
354 
356  uint8_t byte_and_packet : 1;
357 
358  } tm_node_threshold;
359 
361 
367 typedef enum odp_tm_pkt_prio_mode {
375 
384 
388 
393 typedef struct {
397  char *name;
398 
401  uint32_t max_tm_queues;
402 
410  uint8_t max_levels;
411 
417 
420 
423 
427 
431 
436 
443 
451 
462 
469  odp_bool_t marking_colors_supported[ODP_NUM_PACKET_COLORS];
470 
474 
484 
493 
502 
511 
520 
523 
525  struct {
527  uint8_t byte : 1;
528 
530  uint8_t packet : 1;
531 
533  uint8_t byte_and_packet : 1;
534 
535  } tm_queue_threshold;
536 
548 
555 
566 
573 typedef struct {
577 
582 
587  uint8_t max_priority;
588 
592  uint32_t min_weight;
593 
597  uint32_t max_weight;
598 
602 
607 
612 
617 
623 
628 
636 typedef struct {
639  uint32_t max_tm_queues;
640 
645  uint8_t num_levels;
646 
650 
654 
659 
663 
669 
675 
681 
688  odp_bool_t marking_colors_needed[ODP_NUM_PACKET_COLORS];
689 
695 
700 
705 typedef void (*odp_tm_egress_fcn_t) (odp_packet_t odp_pkt);
706 
713 typedef enum {
714  ODP_TM_EGRESS_PKT_IO,
715  ODP_TM_EGRESS_FN,
717 
721 typedef struct {
725  union {
728  };
730 
740 
750 
773  const odp_tm_egress_t *egress);
774 
789 odp_tm_t odp_tm_create(const char *name,
790  odp_tm_requirements_t *requirements,
791  odp_tm_egress_t *egress);
792 
821 odp_tm_t odp_tm_find(const char *name,
822  odp_tm_requirements_t *requirements,
823  odp_tm_egress_t *egress);
824 
851 
864 
893 
913 
914 /* Marking APIs
915  * -------------------------------------------------------- */
916 
940  odp_packet_color_t color,
941  odp_bool_t drop_eligible_enabled);
942 
973  odp_packet_color_t color,
974  odp_bool_t ecn_ce_enabled);
975 
1013  odp_packet_color_t color,
1014  odp_bool_t drop_prec_enabled);
1015 
1016 /* Shaper profile types and functions
1017  * -------------------------------------------------------- */
1018 
1020 typedef enum {
1029 
1041 
1043 
1050 typedef struct {
1063 
1068  uint64_t commit_rate;
1069 
1075  uint64_t peak_rate;
1076 
1081  uint32_t commit_burst;
1082 
1089  uint32_t peak_burst;
1090 
1104 
1113 
1120 
1122 
1131 
1147  const odp_tm_shaper_params_t *params);
1148 
1160 
1173  odp_tm_shaper_params_t *params);
1174 
1188  const odp_tm_shaper_params_t *params);
1189 
1199 
1200 /* Scheduler Profiles - types and functions
1201  * -------------------------------------------------------- */
1202 
1210 typedef enum {
1215 
1222 typedef struct {
1227 
1235  uint32_t sched_weights[ODP_TM_MAX_PRIORITIES];
1237 
1246 
1261  const odp_tm_sched_params_t *params);
1262 
1274 
1287  odp_tm_sched_params_t *params);
1288 
1302  const odp_tm_sched_params_t *params);
1303 
1313 
1314 /* Queue Threshold Profiles - types and functions
1315  * -------------------------------------------------------- */
1316 
1323 typedef struct {
1324  uint64_t max_pkts;
1325  uint64_t max_bytes;
1329 
1333 
1342 
1360  *params);
1361 
1373 
1386  odp_tm_threshold_params_t *params);
1387 
1402  const odp_tm_threshold_params_t *params);
1403 
1413 
1414 /* WRED Profiles - types and functions
1415  * -------------------------------------------------------- */
1416 
1423 typedef struct {
1440 
1449 
1454 
1460 
1465 
1474 
1483 
1499  const odp_tm_wred_params_t *params);
1500 
1512 
1525  odp_tm_wred_params_t *params);
1526 
1540  const odp_tm_wred_params_t *params);
1541 
1551 
1558 typedef struct {
1563 
1567  uint32_t max_fanin;
1568 
1573 
1579 
1585 
1591  uint8_t level;
1592 
1607  uint8_t priority;
1609 
1618 
1638  const odp_tm_node_params_t *params);
1639 
1649 
1662  odp_tm_shaper_t shaper_profile);
1663 
1678  odp_tm_node_t tm_fan_in_node,
1679  odp_tm_sched_t sched_profile);
1680 
1690  odp_tm_threshold_t thresholds_profile);
1691 
1708  odp_packet_color_t pkt_color,
1709  odp_tm_wred_t wred_profile);
1710 
1721 
1731 
1741 int odp_tm_node_context_set(odp_tm_node_t tm_node, void *user_context);
1742 
1749 typedef struct {
1754 
1759 
1769 
1775 
1780  uint8_t priority;
1781 
1788 
1797 
1812  const odp_tm_queue_params_t *params);
1813 
1822 
1833 
1843 int odp_tm_queue_context_set(odp_tm_queue_t tm_queue, void *user_context);
1844 
1857  odp_tm_shaper_t shaper_profile);
1858 
1875  odp_tm_queue_t tm_fan_in_queue,
1876  odp_tm_sched_t sched_profile);
1877 
1887  odp_tm_threshold_t thresholds_profile);
1888 
1905  odp_packet_color_t pkt_color,
1906  odp_tm_wred_t wred_profile);
1907 
1908 /* Topology setting functions
1909  * -------------------------------------------------------- */
1910 
1926 int odp_tm_node_connect(odp_tm_node_t src_tm_node, odp_tm_node_t dst_tm_node);
1927 
1941 
1954 
1965 
1966 /* Input API
1967  * -------------------------------------------------------- */
1968 
1986 
2003 int odp_tm_enq_multi(odp_tm_queue_t tm_queue, const odp_packet_t packets[], int num);
2004 
2021 int odp_tm_enq_multi_lso(odp_tm_queue_t tm_queue, const odp_packet_t packets[], int num,
2022  const odp_packet_lso_opt_t *lso_opt);
2023 
2034 
2035 /* Dynamic state query functions
2036  * -------------------------------------------------------- */
2037 
2041 typedef struct {
2045 
2049 
2054 
2056  uint32_t tm_queue_fanin;
2057 
2059  uint32_t tm_node_fanin;
2060 
2066 
2069  uint8_t level;
2071 
2084 
2091 typedef struct {
2095 
2100 
2105 
2110 
2145  odp_tm_node_fanin_info_t *info);
2146 
2150 typedef struct {
2155 
2160 
2166 
2172 
2177 
2190 
2194 #define ODP_TM_QUERY_PKT_CNT 0x01
2195 #define ODP_TM_QUERY_BYTE_CNT 0x02
2196 #define ODP_TM_QUERY_THRESHOLDS 0x04
2202 typedef struct {
2210  uint64_t total_pkt_cnt;
2211 
2218  uint64_t max_pkt_cnt;
2219 
2239  uint64_t total_byte_cnt;
2240 
2247  uint64_t max_byte_cnt;
2248 
2260 
2276  uint32_t query_flags,
2277  odp_tm_query_info_t *info);
2278 
2295  uint8_t priority,
2296  uint32_t query_flags,
2297  odp_tm_query_info_t *info);
2298 
2313  uint32_t query_flags,
2314  odp_tm_query_info_t *info);
2315 
2332  uint8_t priority,
2333  odp_tm_threshold_t thresholds_profile);
2334 
2349  odp_tm_threshold_t thresholds_profile);
2350 
2365 
2373 
2389 
2403 
2416 
2429 
2442 
2455 
2468 
2481 
2486 #ifdef __cplusplus
2487 }
2488 #endif
2489 
2490 #include <odp/visibility_end.h>
2491 #endif
ODP Packet IO.
Standard C language types and definitions for ODP.
#define ODP_NUM_PACKET_COLORS
Maximum number of packet colors which accommodates ODP_PACKET_GREEN, ODP_PACKET_YELLOW and ODP_PACKET...
odp_packet_color_t
Packet Color.
int odp_bool_t
Use odp boolean type to have it well-defined and known size, regardless which compiler is used as thi...
odp_tm_node_t odp_tm_node_lookup(odp_tm_t tm, const char *name)
odp_tm_node_lookup() can be used to find the tm_node object created with the specified name.
int odp_tm_enq_with_cnt(odp_tm_queue_t tm_queue, odp_packet_t pkt)
The odp_tm_enq_with_cnt() function behaves identically to odp_tm_enq(), except that it also returns t...
int odp_tm_destroy(odp_tm_t tm)
Destroy a TM system.
int odp_tm_node_context_set(odp_tm_node_t tm_node, void *user_context)
odp_tm_node_context_set() can be used to set the user_context value that is associated with the given...
int odp_tm_drop_prec_marking(odp_tm_t tm, odp_packet_color_t color, odp_bool_t drop_prec_enabled)
Drop Precedence Marking.
int odp_tm_queue_context_set(odp_tm_queue_t tm_queue, void *user_context)
odp_tm_queue_context_set() can be used to set the user_context value that is associated with the give...
odp_tm_node_t odp_tm_node_create(odp_tm_t tm, const char *name, const odp_tm_node_params_t *params)
Create an tm_node with a specific set of implemented strict priority levels as given by the prioritie...
odp_tm_shaper_t odp_tm_shaper_lookup(const char *name)
odp_tm_shaper_lookup() can be used to find the shaper profile object created with the specified name.
odp_tm_t odp_tm_find(const char *name, odp_tm_requirements_t *requirements, odp_tm_egress_t *egress)
Find a pre-existing TM system.
odp_bool_t odp_tm_is_idle(odp_tm_t tm)
The odp_tm_is_idle function is used to determine if the specified ODP traffic management system still...
uint64_t odp_tm_shaper_to_u64(odp_tm_shaper_t hdl)
Get printable value for an odp_tm_shaper_t.
odp_tm_sched_t odp_tm_sched_create(const char *name, const odp_tm_sched_params_t *params)
odp_tm_sched_create() creates a scheduler profile object, which can subsequently be attached to any n...
int odp_tm_ecn_marking(odp_tm_t tm, odp_packet_color_t color, odp_bool_t ecn_ce_enabled)
Explicit Congestion Notification Marking.
int odp_tm_total_threshold_config(odp_tm_t tm, odp_tm_threshold_t thresholds_profile)
The odp_tm_total_threshold_config() function is only used to associate a maximum packet count and/or ...
odp_tm_threshold_t odp_tm_threshold_create(const char *name, const odp_tm_threshold_params_t *params)
odp_tm_threshold_create() creates a queue threshold profile object, which can subsequently be attache...
void odp_tm_sched_params_init(odp_tm_sched_params_t *params)
Initialize TM scheduler parameters.
int odp_tm_shaper_destroy(odp_tm_shaper_t shaper_profile)
Destroy shaper profile object.
odp_tm_wred_t odp_tm_wred_create(const char *name, const odp_tm_wred_params_t *params)
odp_tm_wred_create() creates a WRED (Weighted Random Early Detection) profile object,...
odp_tm_handle_t odp_tm_t
Each odp_tm_t value represents a specific TM system.
odp_tm_t odp_tm_create(const char *name, odp_tm_requirements_t *requirements, odp_tm_egress_t *egress)
Create/instantiate a TM Packet Scheduling system.
int odp_tm_priority_query(odp_tm_t odp_tm, uint8_t priority, uint32_t query_flags, odp_tm_query_info_t *info)
The odp_tm_priority_query() function can be used to check the queue utilization of all tm_queue's wit...
odp_tm_handle_t odp_tm_wred_t
Each odp_tm_wred_t value is an opaque ODP handle representing a specific WRED profile usable across a...
void odp_tm_egress_init(odp_tm_egress_t *egress)
Initialize Egress record.
struct odp_tm_queue_stats_t odp_tm_queue_stats_t
TM queue specific statistics counters.
int odp_tm_shaper_params_read(odp_tm_shaper_t shaper_profile, odp_tm_shaper_params_t *params)
odp_tm_shaper_params_read() "gets" the current set of values associated with the specified shaper pro...
void odp_tm_node_params_init(odp_tm_node_params_t *params)
Initialize TM node parameters.
odp_tm_handle_t odp_tm_node_t
Each odp_tm_node_t value is an opaque ODP handle representing a specific tm_node within a specific TM...
int odp_tm_wred_destroy(odp_tm_wred_t wred_profile)
Destroy WRED profile object.
int odp_tm_queue_threshold_config(odp_tm_queue_t tm_queue, odp_tm_threshold_t thresholds_profile)
The odp_tm_queue_threshold_config() function is used to dynamically set or change the queue threshold...
int odp_tm_total_query(odp_tm_t odp_tm, uint32_t query_flags, odp_tm_query_info_t *info)
The odp_tm_total_query() function can be used to check the queue utilization of all tm_queue's in a s...
int odp_tm_enq_multi(odp_tm_queue_t tm_queue, const odp_packet_t packets[], int num)
The odp_tm_enq_multi() function is used to add packets to a given TM system.
int odp_tm_node_disconnect(odp_tm_node_t src_tm_node)
Disconnect a tm_node to tm_node linkage.
uint64_t odp_tm_sched_to_u64(odp_tm_sched_t hdl)
Get printable value for an odp_tm_sched_t.
void * odp_tm_node_context(odp_tm_node_t tm_node)
odp_tm_node_context() can be used to get the user_context value that is associated with the given tm_...
void odp_tm_queue_params_init(odp_tm_queue_params_t *params)
Initialize TM queue parameters.
int odp_tm_enq(odp_tm_queue_t tm_queue, odp_packet_t pkt)
Send packet to TM system.
uint64_t odp_tm_node_to_u64(odp_tm_node_t hdl)
Get printable value for an odp_tm_node_t.
int odp_tm_egress_capabilities(odp_tm_capabilities_t *capabilities, const odp_tm_egress_t *egress)
Query TM Capabilities specific to an egress.
int odp_tm_wred_params_read(odp_tm_wred_t wred_profile, odp_tm_wred_params_t *params)
odp_tm_wred_params_read() "gets" the current set of values associated with the specified WRED profile...
int odp_tm_node_wred_config(odp_tm_node_t tm_node, odp_packet_color_t pkt_color, odp_tm_wred_t wred_profile)
The odp_tm_node_wred_config() function is used to dynamically set or change the WRED profile associat...
int odp_tm_queue_connect(odp_tm_queue_t tm_queue, odp_tm_node_t dst_tm_node)
The odp_tm_queue_connect() function connects the indicated tm_queue to a parent tm_node or to the egr...
odp_tm_queue_t odp_tm_queue_create(odp_tm_t tm, const odp_tm_queue_params_t *params)
TM queue create.
int odp_tm_node_sched_config(odp_tm_node_t tm_node, odp_tm_node_t tm_fan_in_node, odp_tm_sched_t sched_profile)
The odp_tm_node_sched_config() function is used to dynamically set or change the scheduler profile as...
enum odp_tm_pkt_prio_mode odp_tm_pkt_prio_mode_t
The tm_pkt_prio_mode_t enumeration type is used to indicate different modes a tm system supports with...
uint64_t odp_tm_wred_to_u64(odp_tm_wred_t hdl)
Get printable value for an odp_tm_wred_t.
odp_tm_handle_t odp_tm_queue_t
Each odp_tm_queue_t value is an opaque ODP handle representing a specific tm_queue within a specific ...
int odp_tm_shaper_params_update(odp_tm_shaper_t shaper_profile, const odp_tm_shaper_params_t *params)
odp_tm_shaper_params_update() "sets" the current set of values associated with the specified shaper p...
int odp_tm_node_info(odp_tm_node_t tm_node, odp_tm_node_info_t *info)
Get tm_node Info.
int odp_tm_sched_params_update(odp_tm_sched_t sched_profile, const odp_tm_sched_params_t *params)
odp_tm_sched_params_update() "sets" the current set of values associated with the specified scheduler...
int odp_tm_thresholds_params_update(odp_tm_threshold_t threshold_profile, const odp_tm_threshold_params_t *params)
odp_tm_thresholds_params_update() "sets" the current set of values associated with the specified queu...
void odp_tm_shaper_params_init(odp_tm_shaper_params_t *params)
Initialize TM shaper parameters.
odp_tm_sched_mode_t
The odp_tm_sched_mode_t type is used to control whether a tm_node scheduler takes into account packet...
odp_tm_handle_t odp_tm_sched_t
Each odp_tm_sched_t value is an opaque ODP handle representing a specific tm_node scheduler profile u...
odp_tm_shaper_t odp_tm_shaper_create(const char *name, const odp_tm_shaper_params_t *params)
odp_tm_shaper_create() creates a shaper profile object, which can subsequently be attached to any num...
int odp_tm_start(odp_tm_t tm)
Start a TM system.
int odp_tm_queue_sched_config(odp_tm_node_t tm_node, odp_tm_queue_t tm_fan_in_queue, odp_tm_sched_t sched_profile)
The odp_tm_queue_sched_config() function is used to dynamically set or change the scheduler profile a...
odp_tm_threshold_t odp_tm_thresholds_lookup(const char *name)
odp_tm_thresholds_lookup() can be used to find the queue thresholds profile object created with the s...
odp_tm_wred_t odp_tm_wred_lookup(const char *name)
odp_tm_wred_lookup() can be used to find the WRED profile object created with the specified name.
int odp_tm_node_connect(odp_tm_node_t src_tm_node, odp_tm_node_t dst_tm_node)
Connects two tm_nodes.
int odp_tm_thresholds_params_read(odp_tm_threshold_t threshold_profile, odp_tm_threshold_params_t *params)
odp_tm_thresholds_params_read() "gets" the current set of values associated with the specified queue ...
odp_tm_shaper_mode_t
Mode selection between rate shaping and rate limiting.
odp_tm_pkt_prio_mode
The tm_pkt_prio_mode_t enumeration type is used to indicate different modes a tm system supports with...
int odp_tm_sched_params_read(odp_tm_sched_t sched_profile, odp_tm_sched_params_t *params)
odp_tm_sched_params_read() "gets" the current set of values associated with the specified scheduler p...
struct odp_tm_queue_stats_capability_t odp_tm_queue_stats_capability_t
TM queue level statistics capabilities.
uint64_t odp_tm_to_u64(odp_tm_t tm)
Get printable value for an odp_tm_t.
void(* odp_tm_egress_fcn_t)(odp_packet_t odp_pkt)
The odp_tm_egress_fcn_t type defines the parameter profile of the egress function callback.
int odp_tm_queue_stats(odp_tm_queue_t tm_queue, odp_tm_queue_stats_t *stats)
Get statistics for a TM queue.
int odp_tm_queue_wred_config(odp_tm_queue_t tm_queue, odp_packet_color_t pkt_color, odp_tm_wred_t wred_profile)
odp_tm_queue_wred_config() function is used to dynamically set or change the WRED profile associated ...
int odp_tm_vlan_marking(odp_tm_t tm, odp_packet_color_t color, odp_bool_t drop_eligible_enabled)
Vlan Marking.
int odp_tm_node_fanin_info(odp_tm_node_t tm_node, odp_tm_node_fanin_info_t *info)
Get tm_node Fanin Info.
odp_tm_egress_kind_t
The tm_egress_kind_e enumeration type is used to indicate the kind of egress object ("spigot") associ...
int odp_tm_enq_multi_lso(odp_tm_queue_t tm_queue, const odp_packet_t packets[], int num, const odp_packet_lso_opt_t *lso_opt)
Send packets with segmentation offload to TM system.
#define ODP_TM_MAX_PRIORITIES
The ODP_TM_MAX_PRIORITIES constant specifies the largest range of priorities that any TM system can s...
odp_tm_sched_t odp_tm_sched_lookup(const char *name)
odp_tm_sched_lookup() can be used to find the scheduler profile object created with the specified nam...
uint16_t odp_tm_percent_t
The odp_tm_percent_t type is used when specifying fields that are percentages.
odp_tm_handle_t odp_tm_threshold_t
Each odp_tm_threshold_t value is an opaque ODP handle representing a specific queue threshold profile...
void * odp_tm_queue_context(odp_tm_queue_t tm_queue)
odp_tm_queue_context() can be used to get the user_context value that is associated with the given tm...
void odp_tm_threshold_params_init(odp_tm_threshold_params_t *params)
Initialize TM threshold parameters.
int odp_tm_queue_destroy(odp_tm_queue_t tm_queue)
Destroy an tm_queue object.
int odp_tm_threshold_destroy(odp_tm_threshold_t threshold_profile)
Destroy a queue threshold profile object.
int odp_tm_queue_shaper_config(odp_tm_queue_t tm_queue, odp_tm_shaper_t shaper_profile)
The odp_tm_queue_shaper_config() function is used to dynamically set or change the shaper profile ass...
int odp_tm_capability(odp_tm_t tm, odp_tm_capabilities_t *capabilities)
Query Specific TM Capabilities.
int odp_tm_queue_disconnect(odp_tm_queue_t tm_queue)
Disconnect a tm_queue from a tm_system.
void odp_tm_stats_print(odp_tm_t tm)
The odp_tm_stats_print function is used to write implementation-defined information about the specifi...
#define ODP_TM_MAX_LEVELS
The ODP_TM MAX_LEVELS constant specifies the largest range of tm_node levels that any TM system can s...
int odp_tm_sched_destroy(odp_tm_sched_t sched_profile)
Destroy scheduler profile object.
uint64_t odp_tm_threshold_to_u64(odp_tm_threshold_t hdl)
Get printable value for an odp_tm_threshold_t.
void odp_tm_wred_params_init(odp_tm_wred_params_t *params)
Initialize TM WRED parameters.
int odp_tm_queue_info(odp_tm_queue_t tm_queue, odp_tm_queue_info_t *info)
Get tm_queue Info.
int odp_tm_node_shaper_config(odp_tm_node_t tm_node, odp_tm_shaper_t shaper_profile)
The odp_tm_node_shaper_config() function is used to dynamically set or change the shaper profile asso...
int odp_tm_stop(odp_tm_t tm)
Stop a TM system.
int odp_tm_node_destroy(odp_tm_node_t tm_node)
Destroy a tm_node object.
int odp_tm_queue_query(odp_tm_queue_t tm_queue, uint32_t query_flags, odp_tm_query_info_t *info)
The odp_tm_queue_query() function can be used to check a single tm_queue's queue utilization.
int odp_tm_node_threshold_config(odp_tm_node_t tm_node, odp_tm_threshold_t thresholds_profile)
The odp_tm_node_threshold_config() function is used to dynamically set or change the queue threshold ...
uint64_t odp_tm_queue_to_u64(odp_tm_queue_t hdl)
Get printable value for an odp_tm_queue_t.
int odp_tm_priority_threshold_config(odp_tm_t odp_tm, uint8_t priority, odp_tm_threshold_t thresholds_profile)
The odp_tm_priority_threshold_config() function is only used to associate a maximum packet count and/...
int odp_tm_wred_params_update(odp_tm_wred_t wred_profile, const odp_tm_wred_params_t *params)
odp_tm_wred_params_update() "sets" the current set of values associated with the specified WRED profi...
void odp_tm_requirements_init(odp_tm_requirements_t *requirements)
Initialize Requirements record fields to their default values.
odp_tm_handle_t odp_tm_shaper_t
Each odp_tm_shaper_t value is an opaque ODP handle representing a specific shaper profile usable acro...
@ ODP_TM_BYTE_BASED_WEIGHTS
Use the packet length in scheduler algorithm.
@ ODP_TM_FRAME_BASED_WEIGHTS
Ignore the packet length.
@ ODP_TM_SHAPER_RATE_SHAPE
Rate shape traffic to the specified burst and rate by delaying packets.
@ ODP_TM_SHAPER_RATE_LIMIT
Rate limit traffic to the specified burst and rate by dropping excess packets.
@ ODP_TM_PKT_PRIO_MODE_OVERWRITE
Indicates Packet priority overwrite mode.
@ ODP_TM_PKT_PRIO_MODE_MAX
Max enum of Packet priority mode.
@ ODP_TM_PKT_PRIO_MODE_PRESERVE
Indicates Packet priority preserve mode.
TM Capabilities Record.
odp_bool_t dynamic_sched_update
dynamic_sched_update indicates support for TM system's dynamic sched profile changes.
odp_bool_t drop_prec_marking_supported
drop_prec_marking_supported indicates that this TM system supports SOME form of IPv4/IPv6 egress mark...
odp_bool_t tm_queue_shaper_packet_mode
tm_queue_shaper_packet_mode indicates that tm_queues support shaper in packet mode
odp_bool_t tm_queue_wred_supported
tm_queue_wred_supported indicates that the tm_queues support some form of Random Early Detection.
odp_bool_t dynamic_wred_update
dynamic_wred_update indicates support for TM system's dynamic wred profile changes.
odp_bool_t tm_queue_rate_limiter_supported
Shaper is supported in rate limit mode.
uint8_t packet
Threshold given as packets.
char * name
The name is an optional name associated with a capabilities record.
odp_bool_t tm_queue_shaper_supported
Shaper is supported in rate shape mode.
odp_bool_t vlan_marking_supported
vlan_marking_supported indicates that this TM system supports SOME form of VLAN egress marking using ...
odp_bool_t egress_fcn_supported
egress_fcn_supported indicates whether the tm system supports egress function.
odp_bool_t tm_queue_dual_slope_supported
tm_queue_dual_slope_supported indicates that the tm_queues support the dual slope WRED capability.
odp_bool_t dynamic_topology_update
dynamic_topology_update indicates support for TM system dynamic topology update.
uint8_t byte_and_packet
Threshold given as bytes and packets simultaneously.
odp_bool_t dynamic_threshold_update
dynamic_threshold_update indicates support for TM system's dynamic threshold profile changes.
uint8_t byte
Threshold given as bytes.
odp_bool_t ecn_marking_supported
ecn_marking_supported indicates that this TM system supports Explicit Congestion Notification egress ...
odp_tm_queue_stats_capability_t queue_stats
TM queue statistics counter capabilities.
uint32_t tm_queue_query_flags
tm_queue_query_flags indicates supported types of TM queue query.
uint8_t max_levels
max_levels specifies that maximum number of levels of hierarchical scheduling allowed by this TM Syst...
uint8_t max_schedulers_per_node
Maximum number of schedulers supported by a TM node at any level.
uint32_t max_tm_queues
max_tm_queues specifies the maximum number of tm_queues that can be in existence for this TM System.
odp_bool_t dynamic_shaper_update
dynamic_shaper_update indicates support for TM system's dynamic shaper profile changes.
The odp_tm_egress_t type is used to describe that type of "egress spigot" associated with this TM sys...
odp_pktio_t pktio
Output to PktIO.
odp_tm_egress_kind_t egress_kind
Union discriminator.
odp_tm_egress_fcn_t egress_fcn
Output to user func.
odp_bool_t tm_node_rate_limiter_supported
Shaper is supported in rate limit mode.
odp_bool_t fair_queuing_supported
fair_queuing_supported indicates that the tm_node schedulers at this level can implement WFQ or FQ sc...
uint32_t max_weight
max_weight only has significance when the weights_supported field below is true, in which case it spe...
uint64_t max_rate
Maximum allowed value for odp_tm_shaper_params_t::commit_rate and odp_tm_shaper_params_t::peak_rate w...
uint64_t min_rate
Minimum allowed value for odp_tm_shaper_params_t::commit_rate and odp_tm_shaper_params_t::peak_rate w...
uint32_t min_weight
min_weight only has significance when the weights_supported field below is true, in which case it spe...
uint64_t max_rate_packets
Maximum allowed value for odp_tm_shaper_params_t::commit_rate and odp_tm_shaper_params_t::peak_rate w...
uint8_t max_priority
max_priority specifies the maximum number of strict priority levels used by any tm_node at this level...
uint8_t byte
Threshold given as bytes.
uint8_t byte_and_packet
Threshold given as bytes and packets simultaneously.
odp_bool_t tm_node_wred_supported
tm_node_wred_supported indicates that the tm_nodes at this level support some form of Random Early De...
odp_bool_t tm_node_shaper_supported
Shaper is supported in rate shape mode.
uint64_t min_rate_packets
Minimum allowed value for odp_tm_shaper_params_t::commit_rate and odp_tm_shaper_params_t::peak_rate w...
uint32_t max_burst
Maximum allowed value for odp_tm_shaper_params_t::commit_burst and odp_tm_shaper_params_t::peak_burst...
odp_bool_t tm_node_dual_slope_supported
tm_node_dual_slope_supported indicates that the tm_nodes at this level support the dual slope WRED ca...
uint32_t min_burst
Minimum allowed value for odp_tm_shaper_params_t::commit_burst and odp_tm_shaper_params_t::peak_burst...
uint32_t max_burst_packets
Maximum allowed value for odp_tm_shaper_params_t::commit_burst and odp_tm_shaper_params_t::peak_burst...
odp_bool_t tm_node_shaper_packet_mode
tm_node_shaper_packet_mode indicates that tm_nodes at this level support shaper in packet mode
odp_bool_t weights_supported
weights_supported indicates that the tm_node schedulers at this level can have their different weight...
uint32_t max_num_tm_nodes
max_num_tm_nodes specifies the maximum number of tm_nodes allowed at this level.
uint32_t max_fanin_per_node
max_fanin_per_level specifies the maximum number of fan_in links to any given scheduler (whether weig...
uint32_t min_burst_packets
Minimum allowed value for odp_tm_shaper_params_t::commit_burst and odp_tm_shaper_params_t::peak_burst...
uint8_t packet
Threshold given as packets.
odp_bool_t tm_node_dual_slope_needed
tm_node_dual_slope_needed indicates that the tm_nodes at this level are expected to use the dual slop...
odp_bool_t tm_node_wred_needed
tm_node_wred_needed indicates that the tm_nodes at this level are expected to participate in some for...
uint32_t max_num_tm_nodes
max_num_tm_nodes specifies the maximum number of tm_nodes required at this level.
uint32_t max_weight
max_weight only has significance when the weights_supported field below is true, in which case it spe...
odp_bool_t weights_needed
weights_needed indicates that the tm_node schedulers at this level are expected have different weight...
uint32_t max_fanin_per_node
max_fanin_per_level specifies the maximum number of fan_in links to any given scheduler (whether weig...
odp_bool_t tm_node_shaper_needed
tm_node_shaper_needed indicates that the tm_nodes at this level are expected to do TM shaping,
uint8_t max_priority
max_priority specifies the maximum number of strict priority levels that will be used by any tm_node ...
uint32_t min_weight
min_weight only has significance when the weights_supported field below is true, in which case it spe...
odp_bool_t fair_queuing_needed
fair_queuing_needed indicates that the tm_node schedulers at this level are expected to implement WFQ...
odp_bool_t tm_node_threshold_needed
tm_node_threshold_needed indicates that the tm_nodes at this level may use threshold profile support
The odp_tm_node_fanin_info_t record type is used to return various bits of information about a given ...
odp_tm_sched_t sched_profile
The sched profile currently associated with this fanin link.
odp_bool_t is_last
The is_last flag is set when the tm_queue/tm_node above is currently the last element in the fanin li...
odp_tm_node_t tm_node
The tm_node indicates the "producer" of this fanin.
odp_tm_queue_t tm_queue
The tm_queue indicates the "producer" of this fanin.
The odp_tm_node_info_t record type is used to return various bits of information about a given tm_nod...
odp_tm_shaper_t shaper_profile
The shaper profile currently associated with this tm_node.
odp_tm_node_t next_tm_node
The next_tm_node is the "next" node in the tree - i.e.
odp_tm_threshold_t threshold_profile
The threshold profile currently associated with this tm_node.
uint32_t tm_node_fanin
Current tm_node fanin.
uint8_t level
The level of this tm_node.
uint32_t tm_queue_fanin
Current tm_queue fanin.
odp_tm_shaper_t shaper_profile
The shaper profile to be associated with this tm_node.
uint32_t max_fanin
The max_fanin sets the maximum number of src tm_queues and producer tm_nodes that can be simultaneous...
uint8_t priority
New strict priority level assigned to packets going through this node when packet priority mode is OD...
odp_tm_threshold_t threshold_profile
The threshold profile to be used in setting the max queue fullness for WRED and/or tail drop.
uint8_t level
The level (or tm_node stage) sets the level for this tm_node It must be in range 0....
void * user_context
The user_context field is an generic pointer that the user can associate with a tm_node and then get ...
The odp_tm_query_info_t record type is used to return the various counts as requested by functions li...
odp_bool_t max_byte_cnt_valid
TRUE if max_byte_cnt is valid.
odp_bool_t approx_byte_cnt
The approx_byte_cnt is TRUE if the total_byte_cnt field is valid AND if the buffer counting method is...
uint64_t total_pkt_cnt
The total_pkt_cnt field is the total number of packets currently stored/associated with the requested...
uint64_t max_pkt_cnt
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it,...
odp_bool_t total_byte_cnt_valid
TRUE if total_byte_cnt is valid.
uint64_t total_byte_cnt
The total_byte_cnt can either be the actual number of bytes used or an approximation of the number of...
odp_bool_t max_pkt_cnt_valid
TRUE if max_pkt_cnt is valid.
odp_bool_t total_pkt_cnt_valid
The following boolean values indicate which of the counts above are valid.
uint64_t max_byte_cnt
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it,...
The odp_tm_queue_info_t record type is used to return various bits of information about a given tm_qu...
odp_tm_threshold_t threshold_profile
The threshold profile currently associated with this tm_queue.
odp_tm_node_t next_tm_node
The next_tm_node is the "next" node in the tree - i.e.
odp_tm_shaper_t shaper_profile
The shaper profile currently associated with this tm_queue.
odp_packet_t active_pkt
The active_pkt is the current packet "at the head of the queue" that is being processed by this tm_qu...
odp_bool_t ordered_enqueue
Maintain original packet order of the source queue when enqueuing packets to this queue while holding...
odp_tm_threshold_t threshold_profile
The threshold profile to be used in setting the max queue fullness for WRED and/or tail drop.
void * user_context
The user_context field is an generic pointer that the user can associate with a tm_queue and then get...
uint8_t priority
The strict priority level assigned to packets in this tm_queue - in other words all packets associate...
odp_tm_shaper_t shaper_profile
The shaper profile to be associated with this tm_queue.
TM queue level statistics capabilities.
uint64_t errors
See odp_tm_queue_stats_t::errors.
uint64_t octets
See odp_tm_queue_stats_t::octets.
uint64_t discard_octets
See odp_tm_queue_stats_t::discard_octets.
uint64_t all_counters
All bits of the bit field structure.
uint64_t packets
See odp_tm_queue_stats_t::packets.
struct odp_tm_queue_stats_capability_t::@155::@157 counter
Statistics counters in a bit field structure.
uint64_t discards
See odp_tm_queue_stats_t::discards.
TM queue specific statistics counters.
uint64_t discards
Number of packets discarded due to other reasons (e.g.
uint64_t octets
Number of octets in successfully transmitted packets.
uint64_t packets
Number of successfully transmitted packets.
uint64_t errors
Number of packets with transmission errors.
uint64_t discard_octets
Number of octets in packets discarded due to other reasons (e.g.
TM Requirements Record.
odp_bool_t tm_queue_threshold_needed
tm_queue_threshold_needed indicates that the tm_queues are expected to use threshold profile support
uint32_t max_tm_queues
max_tm_queues specifies the maximum number of tm_queues that will be used for this TM System.
odp_bool_t tm_queue_wred_needed
tm_queue_wred_needed indicates that the tm_queues are expected to participate in some form of Random ...
odp_tm_pkt_prio_mode_t pkt_prio_mode
Packet priority mode.
uint8_t num_levels
num_levels specifies that number of levels of hierarchical scheduling that will be used.
odp_bool_t drop_prec_marking_needed
drop_prec_marking_needed indicates that the ODP application expects to use some form of IPv4 TOS or I...
odp_bool_t vlan_marking_needed
vlan_marking_needed indicates that the ODP application expects to use some form of VLAN egress markin...
odp_bool_t tm_queue_dual_slope_needed
tm_queue_dual_slope_needed indicates that the tm_queues are expected to use the dual slope WRED capab...
odp_bool_t ecn_marking_needed
ecn_marking_needed indicates that the ODP application expects to use some form of IPv4 TOS or IPv6 TC...
odp_bool_t tm_queue_shaper_needed
tm_queue_shaper_needed indicates that the tm_queues are expected to do TM shaping.
TM scheduler parameters.
odp_bool_t packet_mode
If packet_mode is TRUE it indicates that shaper should work in packet mode ignoring lengths of packet...
uint32_t commit_burst
The commit burst tolerance for this shaper profile.
odp_bool_t dual_rate
If dual_rate is TRUE it indicates the desire for the implementation to use dual rate shaping for pack...
int8_t shaper_len_adjust
The shaper_len_adjust is a value between -128 and 127 which is directly added to the frame_len of a p...
uint64_t commit_rate
The committed information rate for this shaper profile.
uint32_t peak_burst
The peak burst tolerance for this shaper profile.
uint64_t peak_rate
The peak information rate for this shaper profile.
odp_tm_shaper_mode_t mode
Shaper mode.
TM threshold parameters.
uint64_t max_bytes
max byte cnt for this threshold profile
odp_bool_t enable_max_bytes
TRUE if max_bytes is valid.
odp_bool_t enable_max_pkts
TRUE if max_pkts is valid.
uint64_t max_pkts
max pkt cnt for this threshold profile
odp_tm_percent_t med_drop_prob
The med_drop_prob is only used when dual-slope WRED is being used, in which case med_drop_prob MUST b...
odp_bool_t use_byte_fullness
When use_byte_fullness is true then WRED will use queue memory usage as the fullness criterion,...
odp_tm_percent_t med_threshold
The meaning of med_threshold depends upon whether single-slope or dual-slope WRED is being used or no...
odp_bool_t enable_wred
When enable_wred is false, all tm_queues and tm_nodes that are attached to this profile will not take...
odp_tm_percent_t max_drop_prob
The max_drop_prob equals the drop probability when the queue fullness almost equals 100%.
odp_tm_percent_t min_threshold
When min_threshold is set to zero then single-slope WRED is enabled, as described in the description ...