5 #ifndef __INCLUDE_RTE_MTR_DRIVER_H__ 6 #define __INCLUDE_RTE_MTR_DRIVER_H__ 21 #include "ethdev_driver.h" 29 typedef int (*rte_mtr_capabilities_get_t)(
struct rte_eth_dev *dev,
34 typedef int (*rte_mtr_meter_profile_add_t)(
struct rte_eth_dev *dev,
35 uint32_t meter_profile_id,
40 typedef int (*rte_mtr_meter_profile_delete_t)(
struct rte_eth_dev *dev,
41 uint32_t meter_profile_id,
45 typedef int (*rte_mtr_meter_policy_validate_t)(
struct rte_eth_dev *dev,
50 typedef int (*rte_mtr_meter_policy_add_t)(
struct rte_eth_dev *dev,
56 typedef int (*rte_mtr_meter_policy_delete_t)(
struct rte_eth_dev *dev,
61 typedef int (*rte_mtr_create_t)(
struct rte_eth_dev *dev,
68 typedef int (*rte_mtr_destroy_t)(
struct rte_eth_dev *dev,
73 typedef int (*rte_mtr_meter_enable_t)(
struct rte_eth_dev *dev,
78 typedef int (*rte_mtr_meter_disable_t)(
struct rte_eth_dev *dev,
83 typedef int (*rte_mtr_meter_profile_update_t)(
struct rte_eth_dev *dev,
85 uint32_t meter_profile_id,
89 typedef int (*rte_mtr_meter_policy_update_t)(
struct rte_eth_dev *dev,
91 uint32_t meter_policy_id,
95 typedef int (*rte_mtr_meter_dscp_table_update_t)(
struct rte_eth_dev *dev,
101 typedef int (*rte_mtr_meter_vlan_table_update_t)(
struct rte_eth_dev *dev,
107 typedef int (*rte_mtr_meter_color_in_proto_set_t)(
struct rte_eth_dev *dev,
114 typedef int (*rte_mtr_meter_color_in_proto_get_t)(
struct rte_eth_dev *dev,
116 uint64_t *proto_mask,
120 typedef int (*rte_mtr_meter_color_in_proto_prio_get_t)(
struct rte_eth_dev *dev,
127 typedef int (*rte_mtr_stats_update_t)(
struct rte_eth_dev *dev,
133 typedef int (*rte_mtr_stats_read_t)(
struct rte_eth_dev *dev,
136 uint64_t *stats_mask,
142 rte_mtr_capabilities_get_t capabilities_get;
145 rte_mtr_meter_profile_add_t meter_profile_add;
148 rte_mtr_meter_profile_delete_t meter_profile_delete;
151 rte_mtr_create_t create;
154 rte_mtr_destroy_t destroy;
157 rte_mtr_meter_enable_t meter_enable;
160 rte_mtr_meter_disable_t meter_disable;
163 rte_mtr_meter_profile_update_t meter_profile_update;
166 rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
169 rte_mtr_meter_vlan_table_update_t meter_vlan_table_update;
172 rte_mtr_meter_color_in_proto_set_t in_proto_set;
175 rte_mtr_meter_color_in_proto_get_t in_proto_get;
178 rte_mtr_meter_color_in_proto_prio_get_t in_proto_prio_get;
181 rte_mtr_stats_update_t stats_update;
184 rte_mtr_stats_read_t stats_read;
187 rte_mtr_meter_policy_validate_t meter_policy_validate;
190 rte_mtr_meter_policy_add_t meter_policy_add;
193 rte_mtr_meter_policy_delete_t meter_policy_delete;
196 rte_mtr_meter_policy_update_t meter_policy_update;
248 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
rte_mtr_color_in_protocol
const struct rte_mtr_ops * rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error)