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_hierarchy_commit_t)(
struct rte_eth_dev *dev,
128typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
130 uint32_t parent_node_id,
136typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
138 uint32_t shaper_profile_id,
142typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
144 uint32_t shared_shaper_id,
149typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
155typedef int (*rte_tm_node_wfq_weight_mode_update_t)(
156 struct rte_eth_dev *dev,
158 int *wfq_weight_mode,
159 uint32_t n_sp_priorities,
163typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
169typedef int (*rte_tm_node_wred_context_update_t)(
170 struct rte_eth_dev *dev,
172 uint32_t wred_profile_id,
176typedef int (*rte_tm_node_shared_wred_context_update_t)(
177 struct rte_eth_dev *dev,
179 uint32_t shared_wred_context_id,
184typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
187 uint64_t *stats_mask,
192typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
199typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
206typedef int (*rte_tm_mark_ip_dscp_t)(
struct rte_eth_dev *dev,
214 rte_tm_node_type_get_t node_type_get;
217 rte_tm_capabilities_get_t capabilities_get;
219 rte_tm_level_capabilities_get_t level_capabilities_get;
221 rte_tm_node_capabilities_get_t node_capabilities_get;
224 rte_tm_wred_profile_add_t wred_profile_add;
226 rte_tm_wred_profile_delete_t wred_profile_delete;
228 rte_tm_shared_wred_context_add_update_t
229 shared_wred_context_add_update;
231 rte_tm_shared_wred_context_delete_t
232 shared_wred_context_delete;
235 rte_tm_shaper_profile_add_t shaper_profile_add;
237 rte_tm_shaper_profile_delete_t shaper_profile_delete;
239 rte_tm_shared_shaper_add_update_t shared_shaper_add_update;
241 rte_tm_shared_shaper_delete_t shared_shaper_delete;
244 rte_tm_node_add_t node_add;
246 rte_tm_node_delete_t node_delete;
248 rte_tm_node_suspend_t node_suspend;
250 rte_tm_node_resume_t node_resume;
252 rte_tm_hierarchy_commit_t hierarchy_commit;
255 rte_tm_node_parent_update_t node_parent_update;
257 rte_tm_node_shaper_update_t node_shaper_update;
259 rte_tm_node_shared_shaper_update_t node_shared_shaper_update;
261 rte_tm_node_stats_update_t node_stats_update;
263 rte_tm_node_wfq_weight_mode_update_t node_wfq_weight_mode_update;
265 rte_tm_node_cman_update_t node_cman_update;
267 rte_tm_node_wred_context_update_t node_wred_context_update;
269 rte_tm_node_shared_wred_context_update_t
270 node_shared_wred_context_update;
272 rte_tm_node_stats_read_t node_stats_read;
275 rte_tm_mark_vlan_dei_t mark_vlan_dei;
277 rte_tm_mark_ip_ecn_t mark_ip_ecn;
279 rte_tm_mark_ip_dscp_t mark_ip_dscp;
331const 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