5 #ifndef __INCLUDE_RTE_MTR_DRIVER_H__ 6 #define __INCLUDE_RTE_MTR_DRIVER_H__ 21 #include "ethdev_driver.h" 28 typedef int (*rte_mtr_capabilities_get_t)(
struct rte_eth_dev *dev,
33 typedef int (*rte_mtr_meter_profile_add_t)(
struct rte_eth_dev *dev,
34 uint32_t meter_profile_id,
39 typedef int (*rte_mtr_meter_profile_delete_t)(
struct rte_eth_dev *dev,
40 uint32_t meter_profile_id,
44 typedef int (*rte_mtr_meter_policy_validate_t)(
struct rte_eth_dev *dev,
49 typedef int (*rte_mtr_meter_policy_add_t)(
struct rte_eth_dev *dev,
55 typedef int (*rte_mtr_meter_policy_delete_t)(
struct rte_eth_dev *dev,
60 typedef int (*rte_mtr_create_t)(
struct rte_eth_dev *dev,
67 typedef int (*rte_mtr_destroy_t)(
struct rte_eth_dev *dev,
72 typedef int (*rte_mtr_meter_enable_t)(
struct rte_eth_dev *dev,
77 typedef int (*rte_mtr_meter_disable_t)(
struct rte_eth_dev *dev,
82 typedef int (*rte_mtr_meter_profile_update_t)(
struct rte_eth_dev *dev,
84 uint32_t meter_profile_id,
88 typedef int (*rte_mtr_meter_policy_update_t)(
struct rte_eth_dev *dev,
90 uint32_t meter_policy_id,
94 typedef int (*rte_mtr_meter_dscp_table_update_t)(
struct rte_eth_dev *dev,
100 typedef int (*rte_mtr_stats_update_t)(
struct rte_eth_dev *dev,
106 typedef int (*rte_mtr_stats_read_t)(
struct rte_eth_dev *dev,
109 uint64_t *stats_mask,
116 rte_mtr_capabilities_get_t capabilities_get;
119 rte_mtr_meter_profile_add_t meter_profile_add;
122 rte_mtr_meter_profile_delete_t meter_profile_delete;
125 rte_mtr_create_t create;
128 rte_mtr_destroy_t destroy;
131 rte_mtr_meter_enable_t meter_enable;
134 rte_mtr_meter_disable_t meter_disable;
137 rte_mtr_meter_profile_update_t meter_profile_update;
140 rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
143 rte_mtr_stats_update_t stats_update;
146 rte_mtr_stats_read_t stats_read;
149 rte_mtr_meter_policy_validate_t meter_policy_validate;
152 rte_mtr_meter_policy_add_t meter_policy_add;
155 rte_mtr_meter_policy_delete_t meter_policy_delete;
158 rte_mtr_meter_policy_update_t meter_policy_update;
210 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)