5 #ifndef __INCLUDE_RTE_TM_DRIVER_H__ 6 #define __INCLUDE_RTE_TM_DRIVER_H__ 21 #include "ethdev_driver.h" 29 typedef int (*rte_tm_node_type_get_t)(
struct rte_eth_dev *dev,
35 typedef int (*rte_tm_capabilities_get_t)(
struct rte_eth_dev *dev,
40 typedef int (*rte_tm_level_capabilities_get_t)(
struct rte_eth_dev *dev,
46 typedef int (*rte_tm_node_capabilities_get_t)(
struct rte_eth_dev *dev,
52 typedef int (*rte_tm_wred_profile_add_t)(
struct rte_eth_dev *dev,
53 uint32_t wred_profile_id,
58 typedef int (*rte_tm_wred_profile_delete_t)(
struct rte_eth_dev *dev,
59 uint32_t wred_profile_id,
63 typedef int (*rte_tm_shared_wred_context_add_update_t)(
64 struct rte_eth_dev *dev,
65 uint32_t shared_wred_context_id,
66 uint32_t wred_profile_id,
70 typedef int (*rte_tm_shared_wred_context_delete_t)(
71 struct rte_eth_dev *dev,
72 uint32_t shared_wred_context_id,
76 typedef int (*rte_tm_shaper_profile_add_t)(
struct rte_eth_dev *dev,
77 uint32_t shaper_profile_id,
82 typedef int (*rte_tm_shaper_profile_delete_t)(
struct rte_eth_dev *dev,
83 uint32_t shaper_profile_id,
87 typedef int (*rte_tm_shared_shaper_add_update_t)(
struct rte_eth_dev *dev,
88 uint32_t shared_shaper_id,
89 uint32_t shaper_profile_id,
93 typedef int (*rte_tm_shared_shaper_delete_t)(
struct rte_eth_dev *dev,
94 uint32_t shared_shaper_id,
98 typedef int (*rte_tm_node_add_t)(
struct rte_eth_dev *dev,
100 uint32_t parent_node_id,
108 typedef int (*rte_tm_node_delete_t)(
struct rte_eth_dev *dev,
113 typedef int (*rte_tm_node_suspend_t)(
struct rte_eth_dev *dev,
118 typedef int (*rte_tm_node_resume_t)(
struct rte_eth_dev *dev,
123 typedef int (*rte_tm_node_query_t)(
const struct rte_eth_dev *dev,
125 uint32_t *parent_node_id,
133 typedef int (*rte_tm_hierarchy_commit_t)(
struct rte_eth_dev *dev,
138 typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
140 uint32_t parent_node_id,
146 typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
148 uint32_t shaper_profile_id,
152 typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
154 uint32_t shared_shaper_id,
159 typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
165 typedef int (*rte_tm_node_wfq_weight_mode_update_t)(
166 struct rte_eth_dev *dev,
168 int *wfq_weight_mode,
169 uint32_t n_sp_priorities,
173 typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
179 typedef int (*rte_tm_node_wred_context_update_t)(
180 struct rte_eth_dev *dev,
182 uint32_t wred_profile_id,
186 typedef int (*rte_tm_node_shared_wred_context_update_t)(
187 struct rte_eth_dev *dev,
189 uint32_t shared_wred_context_id,
194 typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
197 uint64_t *stats_mask,
202 typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
209 typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
216 typedef int (*rte_tm_mark_ip_dscp_t)(
struct rte_eth_dev *dev,
224 rte_tm_node_type_get_t node_type_get;
227 rte_tm_capabilities_get_t capabilities_get;
229 rte_tm_level_capabilities_get_t level_capabilities_get;
231 rte_tm_node_capabilities_get_t node_capabilities_get;
234 rte_tm_wred_profile_add_t wred_profile_add;
236 rte_tm_wred_profile_delete_t wred_profile_delete;
238 rte_tm_shared_wred_context_add_update_t
239 shared_wred_context_add_update;
241 rte_tm_shared_wred_context_delete_t
242 shared_wred_context_delete;
245 rte_tm_shaper_profile_add_t shaper_profile_add;
247 rte_tm_shaper_profile_delete_t shaper_profile_delete;
249 rte_tm_shared_shaper_add_update_t shared_shaper_add_update;
251 rte_tm_shared_shaper_delete_t shared_shaper_delete;
254 rte_tm_node_add_t node_add;
256 rte_tm_node_delete_t node_delete;
258 rte_tm_node_suspend_t node_suspend;
260 rte_tm_node_resume_t node_resume;
262 rte_tm_node_query_t node_query;
264 rte_tm_hierarchy_commit_t hierarchy_commit;
267 rte_tm_node_parent_update_t node_parent_update;
269 rte_tm_node_shaper_update_t node_shaper_update;
271 rte_tm_node_shared_shaper_update_t node_shared_shaper_update;
273 rte_tm_node_stats_update_t node_stats_update;
275 rte_tm_node_wfq_weight_mode_update_t node_wfq_weight_mode_update;
277 rte_tm_node_cman_update_t node_cman_update;
279 rte_tm_node_wred_context_update_t node_wred_context_update;
281 rte_tm_node_shared_wred_context_update_t
282 node_shared_wred_context_update;
284 rte_tm_node_stats_read_t node_stats_read;
287 rte_tm_mark_vlan_dei_t mark_vlan_dei;
289 rte_tm_mark_ip_ecn_t mark_ip_ecn;
291 rte_tm_mark_ip_dscp_t mark_ip_dscp;
343 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)