#include <linux/etherdevice.h>
#include <linux/idr.h>
#include <linux/mlx5/driver.h>
#include <linux/mlx5/mlx5_ifc.h>
#include <linux/mlx5/vport.h>
#include <linux/mlx5/fs.h>
#include "mlx5_core.h"
#include "eswitch.h"
#include "en.h"
#include "en_tc.h"
#include "fs_core.h"
#include "esw/indir_table.h"
#include "lib/fs_chains.h"
#include "en/mod_hdr.h"
#define MLX5_ESW_INDIR_TABLE_SIZE …
#define MLX5_ESW_INDIR_TABLE_RECIRC_IDX …
#define MLX5_ESW_INDIR_TABLE_FWD_IDX …
struct mlx5_esw_indir_table_rule { … };
struct mlx5_esw_indir_table_entry { … };
struct mlx5_esw_indir_table { … };
struct mlx5_esw_indir_table *
mlx5_esw_indir_table_init(void)
{ … }
void
mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir)
{ … }
bool
mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw,
struct mlx5_flow_attr *attr,
u16 vport_num,
struct mlx5_core_dev *dest_mdev)
{ … }
u16
mlx5_esw_indir_table_decap_vport(struct mlx5_flow_attr *attr)
{ … }
static int mlx5_esw_indir_table_rule_get(struct mlx5_eswitch *esw,
struct mlx5_flow_attr *attr,
struct mlx5_esw_indir_table_entry *e)
{ … }
static void mlx5_esw_indir_table_rule_put(struct mlx5_eswitch *esw,
struct mlx5_esw_indir_table_entry *e)
{ … }
static int mlx5_create_indir_recirc_group(struct mlx5_esw_indir_table_entry *e)
{ … }
static int mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw,
struct mlx5_esw_indir_table_entry *e)
{ … }
static struct mlx5_esw_indir_table_entry *
mlx5_esw_indir_table_entry_create(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr,
u16 vport, bool decap)
{ … }
static struct mlx5_esw_indir_table_entry *
mlx5_esw_indir_table_entry_lookup(struct mlx5_eswitch *esw, u16 vport)
{ … }
struct mlx5_flow_table *mlx5_esw_indir_table_get(struct mlx5_eswitch *esw,
struct mlx5_flow_attr *attr,
u16 vport, bool decap)
{ … }
void mlx5_esw_indir_table_put(struct mlx5_eswitch *esw,
u16 vport, bool decap)
{ … }