5 #ifndef __INCLUDE_RTE_TM_DRIVER_H__
6 #define __INCLUDE_RTE_TM_DRIVER_H__
28 typedef int (*rte_tm_node_type_get_t)(
struct rte_eth_dev *dev,
34 typedef int (*rte_tm_capabilities_get_t)(
struct rte_eth_dev *dev,
39 typedef int (*rte_tm_level_capabilities_get_t)(
struct rte_eth_dev *dev,
45 typedef int (*rte_tm_node_capabilities_get_t)(
struct rte_eth_dev *dev,
51 typedef int (*rte_tm_wred_profile_add_t)(
struct rte_eth_dev *dev,
52 uint32_t wred_profile_id,
57 typedef int (*rte_tm_wred_profile_delete_t)(
struct rte_eth_dev *dev,
58 uint32_t wred_profile_id,
62 typedef int (*rte_tm_shared_wred_context_add_update_t)(
63 struct rte_eth_dev *dev,
64 uint32_t shared_wred_context_id,
65 uint32_t wred_profile_id,
69 typedef int (*rte_tm_shared_wred_context_delete_t)(
70 struct rte_eth_dev *dev,
71 uint32_t shared_wred_context_id,
75 typedef int (*rte_tm_shaper_profile_add_t)(
struct rte_eth_dev *dev,
76 uint32_t shaper_profile_id,
81 typedef int (*rte_tm_shaper_profile_delete_t)(
struct rte_eth_dev *dev,
82 uint32_t shaper_profile_id,
86 typedef int (*rte_tm_shared_shaper_add_update_t)(
struct rte_eth_dev *dev,
87 uint32_t shared_shaper_id,
88 uint32_t shaper_profile_id,
92 typedef int (*rte_tm_shared_shaper_delete_t)(
struct rte_eth_dev *dev,
93 uint32_t shared_shaper_id,
97 typedef int (*rte_tm_node_add_t)(
struct rte_eth_dev *dev,
99 uint32_t parent_node_id,
107 typedef int (*rte_tm_node_delete_t)(
struct rte_eth_dev *dev,
112 typedef int (*rte_tm_node_suspend_t)(
struct rte_eth_dev *dev,
117 typedef int (*rte_tm_node_resume_t)(
struct rte_eth_dev *dev,
122 typedef int (*rte_tm_hierarchy_commit_t)(
struct rte_eth_dev *dev,
127 typedef int (*rte_tm_node_parent_update_t)(
struct rte_eth_dev *dev,
129 uint32_t parent_node_id,
135 typedef int (*rte_tm_node_shaper_update_t)(
struct rte_eth_dev *dev,
137 uint32_t shaper_profile_id,
141 typedef int (*rte_tm_node_shared_shaper_update_t)(
struct rte_eth_dev *dev,
143 uint32_t shared_shaper_id,
148 typedef int (*rte_tm_node_stats_update_t)(
struct rte_eth_dev *dev,
154 typedef int (*rte_tm_node_wfq_weight_mode_update_t)(
155 struct rte_eth_dev *dev,
157 int *wfq_weight_mode,
158 uint32_t n_sp_priorities,
162 typedef int (*rte_tm_node_cman_update_t)(
struct rte_eth_dev *dev,
168 typedef int (*rte_tm_node_wred_context_update_t)(
169 struct rte_eth_dev *dev,
171 uint32_t wred_profile_id,
175 typedef int (*rte_tm_node_shared_wred_context_update_t)(
176 struct rte_eth_dev *dev,
178 uint32_t shared_wred_context_id,
183 typedef int (*rte_tm_node_stats_read_t)(
struct rte_eth_dev *dev,
186 uint64_t *stats_mask,
191 typedef int (*rte_tm_mark_vlan_dei_t)(
struct rte_eth_dev *dev,
198 typedef int (*rte_tm_mark_ip_ecn_t)(
struct rte_eth_dev *dev,
205 typedef int (*rte_tm_mark_ip_dscp_t)(
struct rte_eth_dev *dev,
213 rte_tm_node_type_get_t node_type_get;
216 rte_tm_capabilities_get_t capabilities_get;
218 rte_tm_level_capabilities_get_t level_capabilities_get;
220 rte_tm_node_capabilities_get_t node_capabilities_get;
223 rte_tm_wred_profile_add_t wred_profile_add;
225 rte_tm_wred_profile_delete_t wred_profile_delete;
227 rte_tm_shared_wred_context_add_update_t
228 shared_wred_context_add_update;
230 rte_tm_shared_wred_context_delete_t
231 shared_wred_context_delete;
234 rte_tm_shaper_profile_add_t shaper_profile_add;
236 rte_tm_shaper_profile_delete_t shaper_profile_delete;
238 rte_tm_shared_shaper_add_update_t shared_shaper_add_update;
240 rte_tm_shared_shaper_delete_t shared_shaper_delete;
243 rte_tm_node_add_t node_add;
245 rte_tm_node_delete_t node_delete;
247 rte_tm_node_suspend_t node_suspend;
249 rte_tm_node_resume_t node_resume;
251 rte_tm_hierarchy_commit_t hierarchy_commit;
254 rte_tm_node_parent_update_t node_parent_update;
256 rte_tm_node_shaper_update_t node_shaper_update;
258 rte_tm_node_shared_shaper_update_t node_shared_shaper_update;
260 rte_tm_node_stats_update_t node_stats_update;
262 rte_tm_node_wfq_weight_mode_update_t node_wfq_weight_mode_update;
264 rte_tm_node_cman_update_t node_cman_update;
266 rte_tm_node_wred_context_update_t node_wred_context_update;
268 rte_tm_node_shared_wred_context_update_t
269 node_shared_wred_context_update;
271 rte_tm_node_stats_read_t node_stats_read;
274 rte_tm_mark_vlan_dei_t mark_vlan_dei;
276 rte_tm_mark_ip_ecn_t mark_ip_ecn;
278 rte_tm_mark_ip_dscp_t mark_ip_dscp;
330 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)