34 #ifndef __INCLUDE_RTE_MTR_DRIVER_H__
35 #define __INCLUDE_RTE_MTR_DRIVER_H__
56 typedef int (*rte_mtr_capabilities_get_t)(
struct rte_eth_dev *dev,
61 typedef int (*rte_mtr_meter_profile_add_t)(
struct rte_eth_dev *dev,
62 uint32_t meter_profile_id,
67 typedef int (*rte_mtr_meter_profile_delete_t)(
struct rte_eth_dev *dev,
68 uint32_t meter_profile_id,
72 typedef int (*rte_mtr_create_t)(
struct rte_eth_dev *dev,
79 typedef int (*rte_mtr_destroy_t)(
struct rte_eth_dev *dev,
84 typedef int (*rte_mtr_meter_enable_t)(
struct rte_eth_dev *dev,
89 typedef int (*rte_mtr_meter_disable_t)(
struct rte_eth_dev *dev,
94 typedef int (*rte_mtr_meter_profile_update_t)(
struct rte_eth_dev *dev,
96 uint32_t meter_profile_id,
100 typedef int (*rte_mtr_meter_dscp_table_update_t)(
struct rte_eth_dev *dev,
106 typedef int (*rte_mtr_policer_actions_update_t)(
struct rte_eth_dev *dev,
108 uint32_t action_mask,
113 typedef int (*rte_mtr_stats_update_t)(
struct rte_eth_dev *dev,
119 typedef int (*rte_mtr_stats_read_t)(
struct rte_eth_dev *dev,
122 uint64_t *stats_mask,
129 rte_mtr_capabilities_get_t capabilities_get;
132 rte_mtr_meter_profile_add_t meter_profile_add;
135 rte_mtr_meter_profile_delete_t meter_profile_delete;
138 rte_mtr_create_t create;
141 rte_mtr_destroy_t destroy;
144 rte_mtr_meter_enable_t meter_enable;
147 rte_mtr_meter_disable_t meter_disable;
150 rte_mtr_meter_profile_update_t meter_profile_update;
153 rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
156 rte_mtr_policer_actions_update_t policer_actions_update;
159 rte_mtr_stats_update_t stats_update;
162 rte_mtr_stats_read_t stats_read;
214 const struct rte_mtr_ops *
static int rte_mtr_error_set(struct rte_mtr_error *error, int code, enum rte_mtr_error_type type, const void *cause, const char *message)
enum rte_mtr_error_type type
const struct rte_mtr_ops * rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error)