34 #ifndef __INCLUDE_RTE_TM_DRIVER_H__
35 #define __INCLUDE_RTE_TM_DRIVER_H__
57 typedef int (*rte_tm_node_type_get_t)(
struct rte_eth_dev *dev,
63 typedef int (*rte_tm_capabilities_get_t)(
struct rte_eth_dev *dev,
68 typedef int (*rte_tm_level_capabilities_get_t)(
struct rte_eth_dev *dev,
74 typedef int (*rte_tm_node_capabilities_get_t)(
struct rte_eth_dev *dev,
80 typedef int (*rte_tm_wred_profile_add_t)(
struct rte_eth_dev *dev,
81 uint32_t wred_profile_id,
86 typedef int (*rte_tm_wred_profile_delete_t)(
struct rte_eth_dev *dev,
87 uint32_t wred_profile_id,
91 typedef int (*rte_tm_shared_wred_context_add_update_t)(
92 struct rte_eth_dev *dev,
93 uint32_t shared_wred_context_id,
94 uint32_t wred_profile_id,
98 typedef int (*rte_tm_shared_wred_context_delete_t)(
99 struct rte_eth_dev *dev,
100 uint32_t shared_wred_context_id,
104 typedef int (*rte_tm_shaper_profile_add_t)(
struct rte_eth_dev *dev,
105 uint32_t shaper_profile_id,
110 typedef int (*rte_tm_shaper_profile_delete_t)(
struct rte_eth_dev *dev,
111 uint32_t shaper_profile_id,
115 typedef int (*rte_tm_shared_shaper_add_update_t)(
struct rte_eth_dev *dev,
116 uint32_t shared_shaper_id,
117 uint32_t shaper_profile_id,
121 typedef int (*rte_tm_shared_shaper_delete_t)(
struct rte_eth_dev *dev,
122 uint32_t shared_shaper_id,
126 typedef int (*rte_tm_node_add_t)(
struct rte_eth_dev *dev,
128 uint32_t parent_node_id,
136 typedef int (*rte_tm_node_delete_t)(
struct rte_eth_dev *dev,
141 typedef int (*rte_tm_node_suspend_t)(
struct rte_eth_dev *dev,
146 typedef int (*rte_tm_node_resume_t)(
struct rte_eth_dev *dev,
151 typedef int (*rte_tm_hierarchy_commit_t)(
struct rte_eth_dev *dev,
156 typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
158 uint32_t parent_node_id,
164 typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
166 uint32_t shaper_profile_id,
170 typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
172 uint32_t shared_shaper_id,
177 typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
183 typedef int (*rte_tm_node_wfq_weight_mode_update_t)(
184 struct rte_eth_dev *dev,
186 int *wfq_weight_mode,
187 uint32_t n_sp_priorities,
191 typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
197 typedef int (*rte_tm_node_wred_context_update_t)(
198 struct rte_eth_dev *dev,
200 uint32_t wred_profile_id,
204 typedef int (*rte_tm_node_shared_wred_context_update_t)(
205 struct rte_eth_dev *dev,
207 uint32_t shared_wred_context_id,
212 typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
215 uint64_t *stats_mask,
220 typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
227 typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
234 typedef int (*rte_tm_mark_ip_dscp_t)(
struct rte_eth_dev *dev,
242 rte_tm_node_type_get_t node_type_get;
245 rte_tm_capabilities_get_t capabilities_get;
247 rte_tm_level_capabilities_get_t level_capabilities_get;
249 rte_tm_node_capabilities_get_t node_capabilities_get;
252 rte_tm_wred_profile_add_t wred_profile_add;
254 rte_tm_wred_profile_delete_t wred_profile_delete;
256 rte_tm_shared_wred_context_add_update_t
257 shared_wred_context_add_update;
259 rte_tm_shared_wred_context_delete_t
260 shared_wred_context_delete;
263 rte_tm_shaper_profile_add_t shaper_profile_add;
265 rte_tm_shaper_profile_delete_t shaper_profile_delete;
267 rte_tm_shared_shaper_add_update_t shared_shaper_add_update;
269 rte_tm_shared_shaper_delete_t shared_shaper_delete;
272 rte_tm_node_add_t node_add;
274 rte_tm_node_delete_t node_delete;
276 rte_tm_node_suspend_t node_suspend;
278 rte_tm_node_resume_t node_resume;
280 rte_tm_hierarchy_commit_t hierarchy_commit;
283 rte_tm_node_parent_update_t node_parent_update;
285 rte_tm_node_shaper_update_t node_shaper_update;
287 rte_tm_node_shared_shaper_update_t node_shared_shaper_update;
289 rte_tm_node_stats_update_t node_stats_update;
291 rte_tm_node_wfq_weight_mode_update_t node_wfq_weight_mode_update;
293 rte_tm_node_cman_update_t node_cman_update;
295 rte_tm_node_wred_context_update_t node_wred_context_update;
297 rte_tm_node_shared_wred_context_update_t
298 node_shared_wred_context_update;
300 rte_tm_node_stats_read_t node_stats_read;
303 rte_tm_mark_vlan_dei_t mark_vlan_dei;
305 rte_tm_mark_ip_ecn_t mark_ip_ecn;
307 rte_tm_mark_ip_dscp_t mark_ip_dscp;
359 const struct rte_tm_ops *
enum rte_tm_error_type type
const struct rte_tm_ops * rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error)
static int rte_tm_error_set(struct rte_tm_error *error, int code, enum rte_tm_error_type type, const void *cause, const char *message)