#include <linux/mlx5/driver.h>
#include <linux/mlx5/mlx5_ifc.h>
#include <linux/mlx5/fs.h>
#include "lib/fs_chains.h"
#include "fs_ft_pool.h"
#include "en/mapping.h"
#include "fs_core.h"
#include "en_tc.h"
#define chains_lock(chains) …
#define chains_ht(chains) …
#define prios_ht(chains) …
#define chains_default_ft(chains) …
#define chains_end_ft(chains) …
#define FT_TBL_SZ …
struct mlx5_fs_chains { … };
struct fs_chain { … };
struct prio_key { … };
struct prio { … };
static const struct rhashtable_params chain_params = …;
static const struct rhashtable_params prio_params = …;
bool mlx5_chains_prios_supported(struct mlx5_fs_chains *chains)
{ … }
bool mlx5_chains_ignore_flow_level_supported(struct mlx5_fs_chains *chains)
{ … }
bool mlx5_chains_backwards_supported(struct mlx5_fs_chains *chains)
{ … }
u32 mlx5_chains_get_chain_range(struct mlx5_fs_chains *chains)
{ … }
u32 mlx5_chains_get_nf_ft_chain(struct mlx5_fs_chains *chains)
{ … }
u32 mlx5_chains_get_prio_range(struct mlx5_fs_chains *chains)
{ … }
static unsigned int mlx5_chains_get_level_range(struct mlx5_fs_chains *chains)
{ … }
void
mlx5_chains_set_end_ft(struct mlx5_fs_chains *chains,
struct mlx5_flow_table *ft)
{ … }
static struct mlx5_flow_table *
mlx5_chains_create_table(struct mlx5_fs_chains *chains,
u32 chain, u32 prio, u32 level)
{ … }
static int
create_chain_restore(struct fs_chain *chain)
{ … }
static void destroy_chain_restore(struct fs_chain *chain)
{ … }
static struct fs_chain *
mlx5_chains_create_chain(struct mlx5_fs_chains *chains, u32 chain)
{ … }
static void
mlx5_chains_destroy_chain(struct fs_chain *chain)
{ … }
static struct fs_chain *
mlx5_chains_get_chain(struct mlx5_fs_chains *chains, u32 chain)
{ … }
static struct mlx5_flow_handle *
mlx5_chains_add_miss_rule(struct fs_chain *chain,
struct mlx5_flow_table *ft,
struct mlx5_flow_table *next_ft)
{ … }
static int
mlx5_chains_update_prio_prevs(struct prio *prio,
struct mlx5_flow_table *next_ft)
{ … }
static void
mlx5_chains_put_chain(struct fs_chain *chain)
{ … }
static struct prio *
mlx5_chains_create_prio(struct mlx5_fs_chains *chains,
u32 chain, u32 prio, u32 level)
{ … }
static void
mlx5_chains_destroy_prio(struct mlx5_fs_chains *chains,
struct prio *prio)
{ … }
struct mlx5_flow_table *
mlx5_chains_get_table(struct mlx5_fs_chains *chains, u32 chain, u32 prio,
u32 level)
{ … }
void
mlx5_chains_put_table(struct mlx5_fs_chains *chains, u32 chain, u32 prio,
u32 level)
{ … }
struct mlx5_flow_table *
mlx5_chains_get_tc_end_ft(struct mlx5_fs_chains *chains)
{ … }
struct mlx5_flow_table *
mlx5_chains_create_global_table(struct mlx5_fs_chains *chains)
{ … }
void
mlx5_chains_destroy_global_table(struct mlx5_fs_chains *chains,
struct mlx5_flow_table *ft)
{ … }
static struct mlx5_fs_chains *
mlx5_chains_init(struct mlx5_core_dev *dev, struct mlx5_chains_attr *attr)
{ … }
static void
mlx5_chains_cleanup(struct mlx5_fs_chains *chains)
{ … }
struct mlx5_fs_chains *
mlx5_chains_create(struct mlx5_core_dev *dev, struct mlx5_chains_attr *attr)
{ … }
void
mlx5_chains_destroy(struct mlx5_fs_chains *chains)
{ … }
int
mlx5_chains_get_chain_mapping(struct mlx5_fs_chains *chains, u32 chain,
u32 *chain_mapping)
{ … }
int
mlx5_chains_put_chain_mapping(struct mlx5_fs_chains *chains, u32 chain_mapping)
{ … }
void
mlx5_chains_print_info(struct mlx5_fs_chains *chains)
{ … }