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_hierarchy_commit_t)(
struct rte_eth_dev *dev,
128 typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
130 uint32_t parent_node_id,
136 typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
138 uint32_t shaper_profile_id,
142 typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
144 uint32_t shared_shaper_id,
149 typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
155 typedef 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,
163 typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
169 typedef int (*rte_tm_node_wred_context_update_t)(
170 struct rte_eth_dev *dev,
172 uint32_t wred_profile_id,
176 typedef int (*rte_tm_node_shared_wred_context_update_t)(
177 struct rte_eth_dev *dev,
179 uint32_t shared_wred_context_id,
184 typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
187 uint64_t *stats_mask,
192 typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
199 typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
206 typedef 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;
331 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)