#include "en/tc_priv.h"
#include "post_meter.h"
#include "en/tc/post_act.h"
#define MLX5_PACKET_COLOR_BITS …
#define MLX5_PACKET_COLOR_MASK …
struct mlx5e_post_meter_rate_table { … };
struct mlx5e_post_meter_mtu_table { … };
struct mlx5e_post_meter_mtu_tables { … };
struct mlx5e_post_meter_priv { … };
struct mlx5_flow_table *
mlx5e_post_meter_get_ft(struct mlx5e_post_meter_priv *post_meter)
{ … }
struct mlx5_flow_table *
mlx5e_post_meter_get_mtu_true_ft(struct mlx5e_post_meter_priv *post_meter)
{ … }
struct mlx5_flow_table *
mlx5e_post_meter_get_mtu_false_ft(struct mlx5e_post_meter_priv *post_meter)
{ … }
static struct mlx5_flow_table *
mlx5e_post_meter_table_create(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type)
{ … }
static int
mlx5e_post_meter_rate_fg_create(struct mlx5e_priv *priv,
struct mlx5e_post_meter_priv *post_meter)
{ … }
static struct mlx5_flow_handle *
mlx5e_post_meter_add_rule(struct mlx5e_priv *priv,
struct mlx5e_post_meter_priv *post_meter,
struct mlx5_flow_spec *spec,
struct mlx5_flow_attr *attr,
struct mlx5_fc *act_counter,
struct mlx5_fc *drop_counter)
{ … }
static int
mlx5e_post_meter_rate_rules_create(struct mlx5e_priv *priv,
struct mlx5e_post_meter_priv *post_meter,
struct mlx5e_post_act *post_act,
struct mlx5_fc *act_counter,
struct mlx5_fc *drop_counter,
struct mlx5_flow_attr *green_attr,
struct mlx5_flow_attr *red_attr)
{ … }
static void
mlx5e_post_meter_rate_rules_destroy(struct mlx5_eswitch *esw,
struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_rate_fg_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_rate_table_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_mtu_rules_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_mtu_fg_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_mtu_table_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
static int
mlx5e_post_meter_rate_create(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type,
struct mlx5e_post_act *post_act,
struct mlx5_fc *act_counter,
struct mlx5_fc *drop_counter,
struct mlx5e_post_meter_priv *post_meter,
struct mlx5_flow_attr *green_attr,
struct mlx5_flow_attr *red_attr)
{ … }
static int
mlx5e_post_meter_create_mtu_table(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type,
struct mlx5e_post_meter_mtu_table *table)
{ … }
static int
mlx5e_post_meter_mtu_create(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type,
struct mlx5e_post_act *post_act,
struct mlx5_fc *act_counter,
struct mlx5_fc *drop_counter,
struct mlx5e_post_meter_priv *post_meter,
struct mlx5_flow_attr *green_attr,
struct mlx5_flow_attr *red_attr)
{ … }
struct mlx5e_post_meter_priv *
mlx5e_post_meter_init(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type,
struct mlx5e_post_act *post_act,
enum mlx5e_post_meter_type type,
struct mlx5_fc *act_counter,
struct mlx5_fc *drop_counter,
struct mlx5_flow_attr *branch_true,
struct mlx5_flow_attr *branch_false)
{ … }
static void
mlx5e_post_meter_rate_destroy(struct mlx5_eswitch *esw, struct mlx5e_post_meter_priv *post_meter)
{ … }
static void
mlx5e_post_meter_mtu_destroy(struct mlx5e_post_meter_priv *post_meter)
{ … }
void
mlx5e_post_meter_cleanup(struct mlx5_eswitch *esw, struct mlx5e_post_meter_priv *post_meter)
{ … }