5#ifndef __INCLUDE_RTE_MTR_DRIVER_H__
6#define __INCLUDE_RTE_MTR_DRIVER_H__
21#include "ethdev_driver.h"
29typedef int (*rte_mtr_capabilities_get_t)(
struct rte_eth_dev *dev,
34typedef int (*rte_mtr_meter_profile_add_t)(
struct rte_eth_dev *dev,
35 uint32_t meter_profile_id,
40typedef int (*rte_mtr_meter_profile_delete_t)(
struct rte_eth_dev *dev,
41 uint32_t meter_profile_id,
45typedef struct rte_flow_meter_profile *
46(*rte_mtr_meter_profile_get_t)(
struct rte_eth_dev *dev,
47 uint32_t meter_profile_id,
51typedef int (*rte_mtr_meter_policy_validate_t)(
struct rte_eth_dev *dev,
56typedef int (*rte_mtr_meter_policy_add_t)(
struct rte_eth_dev *dev,
62typedef int (*rte_mtr_meter_policy_delete_t)(
struct rte_eth_dev *dev,
67typedef struct rte_flow_meter_policy *
68(*rte_mtr_meter_policy_get_t)(
struct rte_eth_dev *dev,
74typedef int (*rte_mtr_create_t)(
struct rte_eth_dev *dev,
81typedef int (*rte_mtr_destroy_t)(
struct rte_eth_dev *dev,
86typedef int (*rte_mtr_meter_enable_t)(
struct rte_eth_dev *dev,
91typedef int (*rte_mtr_meter_disable_t)(
struct rte_eth_dev *dev,
96typedef int (*rte_mtr_meter_profile_update_t)(
struct rte_eth_dev *dev,
98 uint32_t meter_profile_id,
102typedef int (*rte_mtr_meter_policy_update_t)(
struct rte_eth_dev *dev,
104 uint32_t meter_policy_id,
108typedef int (*rte_mtr_meter_dscp_table_update_t)(
struct rte_eth_dev *dev,
114typedef int (*rte_mtr_meter_vlan_table_update_t)(
struct rte_eth_dev *dev,
120typedef int (*rte_mtr_meter_color_in_proto_set_t)(
struct rte_eth_dev *dev,
127typedef int (*rte_mtr_meter_color_in_proto_get_t)(
struct rte_eth_dev *dev,
129 uint64_t *proto_mask,
133typedef int (*rte_mtr_meter_color_in_proto_prio_get_t)(
struct rte_eth_dev *dev,
140typedef int (*rte_mtr_stats_update_t)(
struct rte_eth_dev *dev,
146typedef int (*rte_mtr_stats_read_t)(
struct rte_eth_dev *dev,
149 uint64_t *stats_mask,
155 rte_mtr_capabilities_get_t capabilities_get;
158 rte_mtr_meter_profile_add_t meter_profile_add;
161 rte_mtr_meter_profile_delete_t meter_profile_delete;
164 rte_mtr_create_t create;
167 rte_mtr_destroy_t destroy;
170 rte_mtr_meter_enable_t meter_enable;
173 rte_mtr_meter_disable_t meter_disable;
176 rte_mtr_meter_profile_update_t meter_profile_update;
179 rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
182 rte_mtr_meter_vlan_table_update_t meter_vlan_table_update;
185 rte_mtr_meter_color_in_proto_set_t in_proto_set;
188 rte_mtr_meter_color_in_proto_get_t in_proto_get;
191 rte_mtr_meter_color_in_proto_prio_get_t in_proto_prio_get;
194 rte_mtr_stats_update_t stats_update;
197 rte_mtr_stats_read_t stats_read;
200 rte_mtr_meter_policy_validate_t meter_policy_validate;
203 rte_mtr_meter_policy_add_t meter_policy_add;
206 rte_mtr_meter_policy_delete_t meter_policy_delete;
209 rte_mtr_meter_policy_update_t meter_policy_update;
212 rte_mtr_meter_profile_get_t meter_profile_get;
215 rte_mtr_meter_policy_get_t meter_policy_get;
267const struct rte_mtr_ops *
rte_mtr_color_in_protocol
const struct rte_mtr_ops * rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error)
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