#include <linux/kernel.h>
#include <linux/parman.h>
#include "reg.h"
#include "spectrum.h"
#include "core_acl_flex_actions.h"
#include "spectrum_mr.h"
struct mlxsw_sp1_mr_tcam_region { … };
struct mlxsw_sp1_mr_tcam { … };
struct mlxsw_sp1_mr_tcam_route { … };
static int mlxsw_sp1_mr_tcam_route_replace(struct mlxsw_sp *mlxsw_sp,
struct parman_item *parman_item,
struct mlxsw_sp_mr_route_key *key,
struct mlxsw_afa_block *afa_block)
{ … }
static int mlxsw_sp1_mr_tcam_route_remove(struct mlxsw_sp *mlxsw_sp,
struct parman_item *parman_item,
struct mlxsw_sp_mr_route_key *key)
{ … }
static struct mlxsw_sp1_mr_tcam_region *
mlxsw_sp1_mr_tcam_protocol_region(struct mlxsw_sp1_mr_tcam *mr_tcam,
enum mlxsw_sp_l3proto proto)
{ … }
static int
mlxsw_sp1_mr_tcam_route_parman_item_add(struct mlxsw_sp1_mr_tcam *mr_tcam,
struct mlxsw_sp1_mr_tcam_route *route,
struct mlxsw_sp_mr_route_key *key,
enum mlxsw_sp_mr_route_prio prio)
{ … }
static void
mlxsw_sp1_mr_tcam_route_parman_item_remove(struct mlxsw_sp1_mr_tcam *mr_tcam,
struct mlxsw_sp1_mr_tcam_route *route,
struct mlxsw_sp_mr_route_key *key)
{ … }
static int
mlxsw_sp1_mr_tcam_route_create(struct mlxsw_sp *mlxsw_sp, void *priv,
void *route_priv,
struct mlxsw_sp_mr_route_key *key,
struct mlxsw_afa_block *afa_block,
enum mlxsw_sp_mr_route_prio prio)
{ … }
static void
mlxsw_sp1_mr_tcam_route_destroy(struct mlxsw_sp *mlxsw_sp, void *priv,
void *route_priv,
struct mlxsw_sp_mr_route_key *key)
{ … }
static int
mlxsw_sp1_mr_tcam_route_update(struct mlxsw_sp *mlxsw_sp,
void *route_priv,
struct mlxsw_sp_mr_route_key *key,
struct mlxsw_afa_block *afa_block)
{ … }
#define MLXSW_SP1_MR_TCAM_REGION_BASE_COUNT …
#define MLXSW_SP1_MR_TCAM_REGION_RESIZE_STEP …
static int
mlxsw_sp1_mr_tcam_region_alloc(struct mlxsw_sp1_mr_tcam_region *mr_tcam_region)
{ … }
static void
mlxsw_sp1_mr_tcam_region_free(struct mlxsw_sp1_mr_tcam_region *mr_tcam_region)
{ … }
static int mlxsw_sp1_mr_tcam_region_parman_resize(void *priv,
unsigned long new_count)
{ … }
static void mlxsw_sp1_mr_tcam_region_parman_move(void *priv,
unsigned long from_index,
unsigned long to_index,
unsigned long count)
{ … }
static const struct parman_ops mlxsw_sp1_mr_tcam_region_parman_ops = …;
static int
mlxsw_sp1_mr_tcam_region_init(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp1_mr_tcam_region *mr_tcam_region,
enum mlxsw_reg_rtar_key_type rtar_key_type)
{ … }
static void
mlxsw_sp1_mr_tcam_region_fini(struct mlxsw_sp1_mr_tcam_region *mr_tcam_region)
{ … }
static int mlxsw_sp1_mr_tcam_init(struct mlxsw_sp *mlxsw_sp, void *priv)
{ … }
static void mlxsw_sp1_mr_tcam_fini(void *priv)
{ … }
const struct mlxsw_sp_mr_tcam_ops mlxsw_sp1_mr_tcam_ops = …;