5#ifndef __INCLUDE_RTE_TM_DRIVER_H__
6#define __INCLUDE_RTE_TM_DRIVER_H__
21#include "ethdev_driver.h"
29typedef int (*rte_tm_node_type_get_t)(
struct rte_eth_dev *dev,
35typedef int (*rte_tm_capabilities_get_t)(
struct rte_eth_dev *dev,
40typedef int (*rte_tm_level_capabilities_get_t)(
struct rte_eth_dev *dev,
46typedef int (*rte_tm_node_capabilities_get_t)(
struct rte_eth_dev *dev,
52typedef int (*rte_tm_wred_profile_add_t)(
struct rte_eth_dev *dev,
53 uint32_t wred_profile_id,
58typedef int (*rte_tm_wred_profile_delete_t)(
struct rte_eth_dev *dev,
59 uint32_t wred_profile_id,
63typedef 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,
70typedef int (*rte_tm_shared_wred_context_delete_t)(
71 struct rte_eth_dev *dev,
72 uint32_t shared_wred_context_id,
76typedef int (*rte_tm_shaper_profile_add_t)(
struct rte_eth_dev *dev,
77 uint32_t shaper_profile_id,
82typedef int (*rte_tm_shaper_profile_delete_t)(
struct rte_eth_dev *dev,
83 uint32_t shaper_profile_id,
87typedef 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,
93typedef int (*rte_tm_shared_shaper_delete_t)(
struct rte_eth_dev *dev,
94 uint32_t shared_shaper_id,
98typedef int (*rte_tm_node_add_t)(
struct rte_eth_dev *dev,
100 uint32_t parent_node_id,
108typedef int (*rte_tm_node_delete_t)(
struct rte_eth_dev *dev,
113typedef int (*rte_tm_node_suspend_t)(
struct rte_eth_dev *dev,
118typedef int (*rte_tm_node_resume_t)(
struct rte_eth_dev *dev,
123typedef int (*rte_tm_node_query_t)(
const struct rte_eth_dev *dev,
125 uint32_t *parent_node_id,
133typedef int (*rte_tm_hierarchy_commit_t)(
struct rte_eth_dev *dev,
138typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
140 uint32_t parent_node_id,
146typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
148 uint32_t shaper_profile_id,
152typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
154 uint32_t shared_shaper_id,
159typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
165typedef 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,
173typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
179typedef int (*rte_tm_node_wred_context_update_t)(
180 struct rte_eth_dev *dev,
182 uint32_t wred_profile_id,
186typedef int (*rte_tm_node_shared_wred_context_update_t)(
187 struct rte_eth_dev *dev,
189 uint32_t shared_wred_context_id,
194typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
197 uint64_t *stats_mask,
202typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
209typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
216typedef 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;
343const struct rte_tm_ops *
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)
enum rte_tm_error_type type