API Reference Manual  1.45.0
api/spec/traffic_mngr.h File Reference
#include <odp/visibility_begin.h>
#include <odp/api/packet_io_types.h>
#include <odp/api/std_types.h>
#include <odp/visibility_end.h>
Include dependency graph for api/spec/traffic_mngr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  odp_tm_queue_stats_t
 TM queue specific statistics counters. More...
 
struct  odp_tm_queue_stats_capability_t
 TM queue level statistics capabilities. More...
 
struct  odp_tm_level_capabilities_t
 Per Level Capabilities. More...
 
struct  odp_tm_capabilities_t
 TM Capabilities Record. More...
 
struct  odp_tm_level_requirements_t
 Per Level Requirements. More...
 
struct  odp_tm_requirements_t
 TM Requirements Record. More...
 
struct  odp_tm_egress_t
 The odp_tm_egress_t type is used to describe that type of "egress spigot" associated with this TM system. More...
 
struct  odp_tm_shaper_params_t
 TM shaper parameters. More...
 
struct  odp_tm_sched_params_t
 TM scheduler parameters. More...
 
struct  odp_tm_threshold_params_t
 TM threshold parameters. More...
 
struct  odp_tm_wred_params_t
 TM WRED parameters. More...
 
struct  odp_tm_node_params_t
 TM node parameters. More...
 
struct  odp_tm_queue_params_t
 TM queue parameters. More...
 
struct  odp_tm_node_info_t
 The odp_tm_node_info_t record type is used to return various bits of information about a given tm_node via the odp_tm_node_info() function. More...
 
struct  odp_tm_node_fanin_info_t
 The odp_tm_node_fanin_info_t record type is used to return various bits of information about a given "link"/"connection"/"fanin" between a tm_queue and a tm_node OR between a tm_node and a tm_node, It is also used as the state needed to implement an iterator that walks the complete fanin list of a given tm_node. More...
 
struct  odp_tm_queue_info_t
 The odp_tm_queue_info_t record type is used to return various bits of information about a given tm_queue via the odp_tm_queue_info() function. More...
 
struct  odp_tm_query_info_t
 The odp_tm_query_info_t record type is used to return the various counts as requested by functions like odp_tm_queue_query() and odp_tm_total_query(). More...
 

Macros

#define ODP_TM_QUERY_PKT_CNT   0x01
 The following bit mask constants are used to refine the queue query functions defined below. More...
 
#define ODP_TM_QUERY_BYTE_CNT   0x02
 The total_byte_cnt value.
 
#define ODP_TM_QUERY_THRESHOLDS   0x04
 The threshold values.
 

Typedefs

typedef struct odp_tm_queue_stats_t odp_tm_queue_stats_t
 TM queue specific statistics counters.
 
typedef struct odp_tm_queue_stats_capability_t odp_tm_queue_stats_capability_t
 TM queue level statistics capabilities.
 
typedef 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 respect to assigning priority to a packet and propagating it across TM system. More...
 
typedef 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. More...
 

Enumerations

enum  odp_tm_pkt_prio_mode { ODP_TM_PKT_PRIO_MODE_PRESERVE , ODP_TM_PKT_PRIO_MODE_OVERWRITE , ODP_TM_PKT_PRIO_MODE_MAX }
 The tm_pkt_prio_mode_t enumeration type is used to indicate different modes a tm system supports with respect to assigning priority to a packet and propagating it across TM system. More...
 
enum  odp_tm_egress_kind_t { ODP_TM_EGRESS_PKT_IO , ODP_TM_EGRESS_FN }
 The tm_egress_kind_e enumeration type is used to indicate the kind of egress object ("spigot") associated with this TM system. More...
 
enum  odp_tm_shaper_mode_t { ODP_TM_SHAPER_RATE_SHAPE , ODP_TM_SHAPER_RATE_LIMIT }
 Mode selection between rate shaping and rate limiting. More...
 
enum  odp_tm_sched_mode_t { ODP_TM_BYTE_BASED_WEIGHTS , ODP_TM_FRAME_BASED_WEIGHTS }
 The odp_tm_sched_mode_t type is used to control whether a tm_node scheduler takes into account packet lengths (by setting the sched_mode to ODP_TM_BYTE_BASED_WEIGHTS) or instead treat packets with different lengths the same (by setting the sched_mode to ODP_TM_FRAME_BASED_WEIGHTS). More...
 

Functions

void odp_tm_requirements_init (odp_tm_requirements_t *requirements)
 Initialize Requirements record fields to their default values. More...
 
void odp_tm_egress_init (odp_tm_egress_t *egress)
 Initialize Egress record. More...
 
int odp_tm_egress_capabilities (odp_tm_capabilities_t *capabilities, const odp_tm_egress_t *egress)
 Query TM Capabilities specific to an egress. More...
 
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. More...
 
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. More...
 
int odp_tm_capability (odp_tm_t tm, odp_tm_capabilities_t *capabilities)
 Query Specific TM Capabilities. More...
 
int odp_tm_start (odp_tm_t tm)
 Start a TM system. More...
 
int odp_tm_stop (odp_tm_t tm)
 Stop a TM system. More...
 
int odp_tm_destroy (odp_tm_t tm)
 Destroy a TM system. More...
 
int odp_tm_vlan_marking (odp_tm_t tm, odp_packet_color_t color, odp_bool_t drop_eligible_enabled)
 Vlan Marking. More...
 
int odp_tm_ecn_marking (odp_tm_t tm, odp_packet_color_t color, odp_bool_t ecn_ce_enabled)
 Explicit Congestion Notification Marking. More...
 
int odp_tm_drop_prec_marking (odp_tm_t tm, odp_packet_color_t color, odp_bool_t drop_prec_enabled)
 Drop Precedence Marking. More...
 
void odp_tm_shaper_params_init (odp_tm_shaper_params_t *params)
 Initialize TM shaper parameters. More...
 
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 number (including zero) of tm_queues or tm_nodes. More...
 
int odp_tm_shaper_destroy (odp_tm_shaper_t shaper_profile)
 Destroy shaper profile object. More...
 
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 profile object, and copies them into the supplied record. More...
 
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 profile object. More...
 
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. More...
 
void odp_tm_sched_params_init (odp_tm_sched_params_t *params)
 Initialize TM scheduler parameters. More...
 
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 number (including zero) of tm_nodes. More...
 
int odp_tm_sched_destroy (odp_tm_sched_t sched_profile)
 Destroy scheduler profile object. More...
 
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 profile object, and copies them into the supplied record. More...
 
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 profile object. More...
 
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 name. More...
 
void odp_tm_threshold_params_init (odp_tm_threshold_params_t *params)
 Initialize TM threshold parameters. More...
 
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 attached to any number (including zero) of tm_queues or tm_nodes. More...
 
int odp_tm_threshold_destroy (odp_tm_threshold_t threshold_profile)
 Destroy a queue threshold profile object. More...
 
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 thresholds profile object, and copies them into the supplied record. More...
 
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 queue thresholds profile object. More...
 
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 specified name. More...
 
void odp_tm_wred_params_init (odp_tm_wred_params_t *params)
 Initialize TM WRED parameters. More...
 
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, which can subsequently be attached to any number (including zero) of tm_queues or tm_nodes. More...
 
int odp_tm_wred_destroy (odp_tm_wred_t wred_profile)
 Destroy WRED profile object. More...
 
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 object, and copies them into the supplied record. More...
 
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 profile object. More...
 
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. More...
 
void odp_tm_node_params_init (odp_tm_node_params_t *params)
 Initialize TM node parameters. More...
 
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 priorities array parameter. More...
 
int odp_tm_node_destroy (odp_tm_node_t tm_node)
 Destroy a tm_node object. More...
 
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 associated with this tm_node. More...
 
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 associated with a tm_node. More...
 
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 profile associated with this tm_node. More...
 
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 associated with this tm_node or tm_node/pkt_color combination. More...
 
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. More...
 
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_node. More...
 
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 tm_node. More...
 
void odp_tm_queue_params_init (odp_tm_queue_params_t *params)
 Initialize TM queue parameters. More...
 
odp_tm_queue_t odp_tm_queue_create (odp_tm_t tm, const odp_tm_queue_params_t *params)
 TM queue create. More...
 
int odp_tm_queue_destroy (odp_tm_queue_t tm_queue)
 Destroy an tm_queue object. More...
 
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_queue. More...
 
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 given tm_queue. More...
 
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 associated with this tm_queue. More...
 
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 associated with a tm_node. More...
 
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 profile associated with this tm_queue. More...
 
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 with this tm_queue or tm_queue/pkt_color combination. More...
 
int odp_tm_node_connect (odp_tm_node_t src_tm_node, odp_tm_node_t dst_tm_node)
 Connects two tm_nodes. More...
 
int odp_tm_node_disconnect (odp_tm_node_t src_tm_node)
 Disconnect a tm_node to tm_node linkage. More...
 
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 egress/root node. More...
 
int odp_tm_queue_disconnect (odp_tm_queue_t tm_queue)
 Disconnect a tm_queue from a tm_system. More...
 
int odp_tm_enq (odp_tm_queue_t tm_queue, odp_packet_t pkt)
 Send packet to TM system. More...
 
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. More...
 
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. More...
 
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 the current tm_queue packet queue count (may be an approximation). More...
 
int odp_tm_node_info (odp_tm_node_t tm_node, odp_tm_node_info_t *info)
 Get tm_node Info. More...
 
int odp_tm_node_fanin_info (odp_tm_node_t tm_node, odp_tm_node_fanin_info_t *info)
 Get tm_node Fanin Info. More...
 
int odp_tm_queue_info (odp_tm_queue_t tm_queue, odp_tm_queue_info_t *info)
 Get tm_queue Info. More...
 
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. More...
 
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 with the given priority. More...
 
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 single TM system. More...
 
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/or a maximum byte count with a strict priority level - for the benefit of the odp_tm_priority_query() function. More...
 
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 a maximum byte count with a TM system - for the benefit of the odp_tm_total_query() function. More...
 
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 has "work" to do (i.e. More...
 
void odp_tm_stats_print (odp_tm_t tm)
 The odp_tm_stats_print function is used to write implementation-defined information about the specified TM system to the ODP log. More...
 
int odp_tm_queue_stats (odp_tm_queue_t tm_queue, odp_tm_queue_stats_t *stats)
 Get statistics for a TM queue. More...
 
uint64_t odp_tm_to_u64 (odp_tm_t tm)
 Get printable value for an odp_tm_t. More...
 
uint64_t odp_tm_queue_to_u64 (odp_tm_queue_t hdl)
 Get printable value for an odp_tm_queue_t. More...
 
uint64_t odp_tm_node_to_u64 (odp_tm_node_t hdl)
 Get printable value for an odp_tm_node_t. More...
 
uint64_t odp_tm_shaper_to_u64 (odp_tm_shaper_t hdl)
 Get printable value for an odp_tm_shaper_t. More...
 
uint64_t odp_tm_sched_to_u64 (odp_tm_sched_t hdl)
 Get printable value for an odp_tm_sched_t. More...
 
uint64_t odp_tm_threshold_to_u64 (odp_tm_threshold_t hdl)
 Get printable value for an odp_tm_threshold_t. More...
 
uint64_t odp_tm_wred_to_u64 (odp_tm_wred_t hdl)
 Get printable value for an odp_tm_wred_t. More...