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_create_t)(
struct rte_eth_dev *dev,
51 typedef int (*rte_mtr_destroy_t)(
struct rte_eth_dev *dev,
56 typedef int (*rte_mtr_meter_enable_t)(
struct rte_eth_dev *dev,
61 typedef int (*rte_mtr_meter_disable_t)(
struct rte_eth_dev *dev,
66 typedef int (*rte_mtr_meter_profile_update_t)(
struct rte_eth_dev *dev,
68 uint32_t meter_profile_id,
72 typedef int (*rte_mtr_meter_dscp_table_update_t)(
struct rte_eth_dev *dev,
78 typedef int (*rte_mtr_policer_actions_update_t)(
struct rte_eth_dev *dev,
85 typedef int (*rte_mtr_stats_update_t)(
struct rte_eth_dev *dev,
91 typedef int (*rte_mtr_stats_read_t)(
struct rte_eth_dev *dev,
101 rte_mtr_capabilities_get_t capabilities_get;
104 rte_mtr_meter_profile_add_t meter_profile_add;
107 rte_mtr_meter_profile_delete_t meter_profile_delete;
110 rte_mtr_create_t create;
113 rte_mtr_destroy_t destroy;
116 rte_mtr_meter_enable_t meter_enable;
119 rte_mtr_meter_disable_t meter_disable;
122 rte_mtr_meter_profile_update_t meter_profile_update;
125 rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
128 rte_mtr_policer_actions_update_t policer_actions_update;
131 rte_mtr_stats_update_t stats_update;
134 rte_mtr_stats_read_t stats_read;
186 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)