7#ifndef __INCLUDE_RTE_TM_H__
8#define __INCLUDE_RTE_TM_H__
23#include <rte_compat.h>
42#define RTE_TM_ETH_FRAMING_OVERHEAD 20
54#define RTE_TM_ETH_FRAMING_OVERHEAD_FCS 24
63#define RTE_TM_WRED_PROFILE_ID_NONE UINT32_MAX
72#define RTE_TM_SHAPER_PROFILE_ID_NONE UINT32_MAX
79#define RTE_TM_NODE_ID_NULL UINT32_MAX
86#define RTE_TM_NODE_LEVEL_ID_ANY UINT32_MAX
1173 RTE_TM_ERROR_TYPE_CAPABILITIES,
1174 RTE_TM_ERROR_TYPE_LEVEL_ID,
1175 RTE_TM_ERROR_TYPE_WRED_PROFILE,
1176 RTE_TM_ERROR_TYPE_WRED_PROFILE_GREEN,
1177 RTE_TM_ERROR_TYPE_WRED_PROFILE_YELLOW,
1178 RTE_TM_ERROR_TYPE_WRED_PROFILE_RED,
1179 RTE_TM_ERROR_TYPE_WRED_PROFILE_ID,
1180 RTE_TM_ERROR_TYPE_SHARED_WRED_CONTEXT_ID,
1181 RTE_TM_ERROR_TYPE_SHAPER_PROFILE,
1182 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_COMMITTED_RATE,
1183 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_COMMITTED_SIZE,
1184 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_RATE,
1185 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_SIZE,
1186 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PKT_ADJUST_LEN,
1187 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE,
1188 RTE_TM_ERROR_TYPE_SHAPER_PROFILE_ID,
1189 RTE_TM_ERROR_TYPE_SHARED_SHAPER_ID,
1190 RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID,
1191 RTE_TM_ERROR_TYPE_NODE_PRIORITY,
1192 RTE_TM_ERROR_TYPE_NODE_WEIGHT,
1193 RTE_TM_ERROR_TYPE_NODE_PARAMS,
1194 RTE_TM_ERROR_TYPE_NODE_PARAMS_SHAPER_PROFILE_ID,
1195 RTE_TM_ERROR_TYPE_NODE_PARAMS_SHARED_SHAPER_ID,
1196 RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SHARED_SHAPERS,
1197 RTE_TM_ERROR_TYPE_NODE_PARAMS_WFQ_WEIGHT_MODE,
1198 RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SP_PRIORITIES,
1199 RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN,
1200 RTE_TM_ERROR_TYPE_NODE_PARAMS_WRED_PROFILE_ID,
1201 RTE_TM_ERROR_TYPE_NODE_PARAMS_SHARED_WRED_CONTEXT_ID,
1202 RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SHARED_WRED_CONTEXTS,
1203 RTE_TM_ERROR_TYPE_NODE_PARAMS_STATS,
1204 RTE_TM_ERROR_TYPE_NODE_ID,
1243 uint32_t *n_leaf_nodes,
1350 uint32_t wred_profile_id,
1373 uint32_t wred_profile_id,
1404 uint32_t shared_wred_context_id,
1405 uint32_t wred_profile_id,
1428 uint32_t shared_wred_context_id,
1452 uint32_t shaper_profile_id,
1475 uint32_t shaper_profile_id,
1504 uint32_t shared_shaper_id,
1505 uint32_t shaper_profile_id,
1527 uint32_t shared_shaper_id,
1596 uint32_t parent_node_id,
1645 uint32_t *parent_node_id,
1806 uint32_t parent_node_id,
1835 uint32_t shaper_profile_id,
1862 uint32_t shared_shaper_id,
1889 uint64_t stats_mask,
1917 int *wfq_weight_mode,
1918 uint32_t n_sp_priorities,
1964 uint32_t wred_profile_id,
1989 uint32_t shared_wred_context_id,
2022 uint64_t *stats_mask,
int rte_tm_wred_profile_delete(uint16_t port_id, uint32_t wred_profile_id, struct rte_tm_error *error)
@ RTE_TM_ERROR_TYPE_UNSPECIFIED
int rte_tm_node_suspend(uint16_t port_id, uint32_t node_id, struct rte_tm_error *error)
int rte_tm_node_capabilities_get(uint16_t port_id, uint32_t node_id, struct rte_tm_node_capabilities *cap, struct rte_tm_error *error)
int rte_tm_node_resume(uint16_t port_id, uint32_t node_id, struct rte_tm_error *error)
int rte_tm_level_capabilities_get(uint16_t port_id, uint32_t level_id, struct rte_tm_level_capabilities *cap, struct rte_tm_error *error)
int rte_tm_shared_wred_context_delete(uint16_t port_id, uint32_t shared_wred_context_id, struct rte_tm_error *error)
int rte_tm_node_wred_context_update(uint16_t port_id, uint32_t node_id, uint32_t wred_profile_id, struct rte_tm_error *error)
int rte_tm_node_delete(uint16_t port_id, uint32_t node_id, struct rte_tm_error *error)
int rte_tm_node_shared_wred_context_update(uint16_t port_id, uint32_t node_id, uint32_t shared_wred_context_id, int add, struct rte_tm_error *error)
int rte_tm_shared_shaper_add_update(uint16_t port_id, uint32_t shared_shaper_id, uint32_t shaper_profile_id, struct rte_tm_error *error)
int rte_tm_mark_ip_dscp(uint16_t port_id, int mark_green, int mark_yellow, int mark_red, struct rte_tm_error *error)
int rte_tm_mark_vlan_dei(uint16_t port_id, int mark_green, int mark_yellow, int mark_red, struct rte_tm_error *error)
int rte_tm_wred_profile_add(uint16_t port_id, uint32_t wred_profile_id, const struct rte_tm_wred_params *profile, struct rte_tm_error *error)
int rte_tm_shaper_profile_add(uint16_t port_id, uint32_t shaper_profile_id, const struct rte_tm_shaper_params *profile, struct rte_tm_error *error)
int rte_tm_shared_shaper_delete(uint16_t port_id, uint32_t shared_shaper_id, struct rte_tm_error *error)
int rte_tm_node_shared_shaper_update(uint16_t port_id, uint32_t node_id, uint32_t shared_shaper_id, int add, struct rte_tm_error *error)
int rte_tm_mark_ip_ecn(uint16_t port_id, int mark_green, int mark_yellow, int mark_red, struct rte_tm_error *error)
int rte_tm_node_add(uint16_t port_id, uint32_t node_id, uint32_t parent_node_id, uint32_t priority, uint32_t weight, uint32_t level_id, const struct rte_tm_node_params *params, struct rte_tm_error *error)
int rte_tm_capabilities_get(uint16_t port_id, struct rte_tm_capabilities *cap, struct rte_tm_error *error)
@ RTE_TM_STATS_N_PKTS_YELLOW_DROPPED
@ RTE_TM_STATS_N_BYTES_GREEN_DROPPED
@ RTE_TM_STATS_N_BYTES_RED_DROPPED
@ RTE_TM_STATS_N_PKTS_RED_DROPPED
@ RTE_TM_STATS_N_PKTS_QUEUED
@ RTE_TM_STATS_N_BYTES_QUEUED
@ RTE_TM_STATS_N_BYTES_YELLOW_DROPPED
@ RTE_TM_STATS_N_PKTS_GREEN_DROPPED
int rte_tm_node_cman_update(uint16_t port_id, uint32_t node_id, enum rte_tm_cman_mode cman, struct rte_tm_error *error)
int rte_tm_shaper_profile_delete(uint16_t port_id, uint32_t shaper_profile_id, struct rte_tm_error *error)
int rte_tm_node_wfq_weight_mode_update(uint16_t port_id, uint32_t node_id, int *wfq_weight_mode, uint32_t n_sp_priorities, struct rte_tm_error *error)
int rte_tm_node_shaper_update(uint16_t port_id, uint32_t node_id, uint32_t shaper_profile_id, struct rte_tm_error *error)
int rte_tm_node_type_get(uint16_t port_id, uint32_t node_id, int *is_leaf, struct rte_tm_error *error)
int rte_tm_get_number_of_leaf_nodes(uint16_t port_id, uint32_t *n_leaf_nodes, struct rte_tm_error *error)
int rte_tm_node_stats_read(uint16_t port_id, uint32_t node_id, struct rte_tm_node_stats *stats, uint64_t *stats_mask, int clear, struct rte_tm_error *error)
int rte_tm_shared_wred_context_add_update(uint16_t port_id, uint32_t shared_wred_context_id, uint32_t wred_profile_id, struct rte_tm_error *error)
int rte_tm_hierarchy_commit(uint16_t port_id, int clear_on_fail, struct rte_tm_error *error)
int rte_tm_node_parent_update(uint16_t port_id, uint32_t node_id, uint32_t parent_node_id, uint32_t priority, uint32_t weight, struct rte_tm_error *error)
int rte_tm_node_stats_update(uint16_t port_id, uint32_t node_id, uint64_t stats_mask, struct rte_tm_error *error)
rte_tm_dynamic_update_type
@ RTE_TM_UPDATE_NODE_PARENT_CHANGE_LEVEL
@ RTE_TM_UPDATE_NODE_ADD_DELETE
@ RTE_TM_UPDATE_NODE_PARENT_KEEP_LEVEL
@ RTE_TM_UPDATE_NODE_WFQ_WEIGHT_MODE
@ RTE_TM_UPDATE_NODE_SUSPEND_RESUME
@ RTE_TM_UPDATE_NODE_STATS
@ RTE_TM_UPDATE_NODE_CMAN
@ RTE_TM_UPDATE_NODE_N_SP_PRIORITIES
__rte_experimental int rte_tm_node_query(uint16_t port_id, uint32_t node_id, uint32_t *parent_node_id, uint32_t *priority, uint32_t *weight, uint32_t *level_id, struct rte_tm_node_params *params, struct rte_tm_error *error)
int cman_head_drop_supported
int mark_ip_ecn_sctp_supported[RTE_COLORS]
int shaper_shared_packet_mode_supported
int mark_vlan_dei_supported[RTE_COLORS]
uint32_t sched_wfq_n_groups_max
int non_leaf_nodes_identical
int shaper_pkt_length_adjust_min
uint32_t sched_n_children_max
int mark_ip_dscp_supported[RTE_COLORS]
int sched_wfq_byte_mode_supported
uint32_t shaper_private_n_max
uint32_t sched_wfq_n_children_per_group_max
uint32_t shaper_shared_dual_rate_n_max
uint32_t sched_wfq_weight_max
uint32_t cman_wred_context_n_max
uint64_t shaper_private_rate_max
int shaper_private_packet_mode_supported
uint32_t shaper_shared_n_nodes_per_shaper_max
uint32_t sched_sp_n_priorities_max
uint32_t cman_wred_context_private_n_max
uint32_t cman_wred_context_shared_n_max
uint64_t shaper_private_rate_min
uint32_t shaper_shared_n_max
uint32_t cman_wred_context_shared_n_nodes_per_context_max
uint32_t cman_wred_context_shared_n_contexts_per_node_max
int shaper_private_byte_mode_supported
uint32_t shaper_shared_n_shapers_per_node_max
int mark_ip_ecn_tcp_supported[RTE_COLORS]
int shaper_pkt_length_adjust_max
uint64_t shaper_shared_rate_min
int shaper_shared_byte_mode_supported
int sched_wfq_packet_mode_supported
int cman_wred_packet_mode_supported
int shaper_private_dual_rate_n_max
uint64_t dynamic_update_mask
int cman_wred_byte_mode_supported
uint64_t shaper_shared_rate_max
enum rte_tm_error_type type
int cman_head_drop_supported
int shaper_shared_packet_mode_supported
uint32_t sched_wfq_n_groups_max
int non_leaf_nodes_identical
uint32_t sched_n_children_max
int sched_wfq_byte_mode_supported
struct rte_tm_level_capabilities::@213::@216 leaf
uint32_t sched_wfq_n_children_per_group_max
struct rte_tm_level_capabilities::@213::@215 nonleaf
uint32_t sched_wfq_weight_max
int shaper_private_dual_rate_supported
uint32_t n_nodes_nonleaf_max
uint64_t shaper_private_rate_max
int shaper_private_packet_mode_supported
uint32_t sched_sp_n_priorities_max
int shaper_private_supported
uint32_t cman_wred_context_shared_n_max
uint64_t shaper_private_rate_min
uint32_t shaper_shared_n_max
int cman_wred_context_private_supported
uint32_t n_nodes_leaf_max
int shaper_private_byte_mode_supported
int shaper_shared_byte_mode_supported
int sched_wfq_packet_mode_supported
int cman_wred_packet_mode_supported
int cman_wred_byte_mode_supported
int cman_head_drop_supported
int shaper_shared_packet_mode_supported
uint32_t sched_wfq_n_groups_max
uint32_t sched_n_children_max
struct rte_tm_node_capabilities::@217::@220 leaf
int sched_wfq_byte_mode_supported
uint32_t sched_wfq_n_children_per_group_max
uint32_t sched_wfq_weight_max
int shaper_private_dual_rate_supported
uint64_t shaper_private_rate_max
int shaper_private_packet_mode_supported
uint32_t sched_sp_n_priorities_max
int shaper_private_supported
uint32_t cman_wred_context_shared_n_max
uint64_t shaper_private_rate_min
uint32_t shaper_shared_n_max
int cman_wred_context_private_supported
struct rte_tm_node_capabilities::@217::@219 nonleaf
int shaper_private_byte_mode_supported
int shaper_shared_byte_mode_supported
int sched_wfq_packet_mode_supported
int cman_wred_packet_mode_supported
int cman_wred_byte_mode_supported
uint32_t n_shared_wred_contexts
struct rte_tm_node_params::@221::@224 leaf
struct rte_tm_node_params::@221::@224::@225 wred
uint32_t shaper_profile_id
uint32_t * shared_wred_context_id
uint32_t * shared_shaper_id
struct rte_tm_node_params::@221::@223 nonleaf
uint32_t n_shared_shapers
enum rte_tm_cman_mode cman
uint64_t n_pkts_dropped[RTE_COLORS]
uint64_t n_bytes_dropped[RTE_COLORS]
struct rte_tm_node_stats::@212 leaf
struct rte_tm_token_bucket committed
struct rte_tm_token_bucket peak
int32_t pkt_length_adjust
struct rte_tm_red_params red_params[RTE_COLORS]