linux/drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c

// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */

#include <linux/refcount.h>
#include <linux/idr.h>

#include "spectrum.h"
#include "reg.h"

struct mlxsw_sp_pgt {};

struct mlxsw_sp_pgt_entry {};

struct mlxsw_sp_pgt_entry_port {};

int mlxsw_sp_pgt_mid_alloc(struct mlxsw_sp *mlxsw_sp, u16 *p_mid)
{}

void mlxsw_sp_pgt_mid_free(struct mlxsw_sp *mlxsw_sp, u16 mid_base)
{}

int mlxsw_sp_pgt_mid_alloc_range(struct mlxsw_sp *mlxsw_sp, u16 *p_mid_base,
				 u16 count)
{}

void
mlxsw_sp_pgt_mid_free_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base, u16 count)
{}

static struct mlxsw_sp_pgt_entry_port *
mlxsw_sp_pgt_entry_port_lookup(struct mlxsw_sp_pgt_entry *pgt_entry,
			       u16 local_port)
{}

static struct mlxsw_sp_pgt_entry *
mlxsw_sp_pgt_entry_create(struct mlxsw_sp_pgt *pgt, u16 mid, u16 smpe)
{}

static void mlxsw_sp_pgt_entry_destroy(struct mlxsw_sp_pgt *pgt,
				       struct mlxsw_sp_pgt_entry *pgt_entry)
{}

static struct mlxsw_sp_pgt_entry *
mlxsw_sp_pgt_entry_get(struct mlxsw_sp_pgt *pgt, u16 mid, u16 smpe)
{}

static void mlxsw_sp_pgt_entry_put(struct mlxsw_sp_pgt *pgt, u16 mid)
{}

static void mlxsw_sp_pgt_smid2_port_set(char *smid2_pl, u16 local_port,
					bool member)
{}

static int
mlxsw_sp_pgt_entry_port_write(struct mlxsw_sp *mlxsw_sp,
			      const struct mlxsw_sp_pgt_entry *pgt_entry,
			      u16 local_port, bool member)
{}

static struct mlxsw_sp_pgt_entry_port *
mlxsw_sp_pgt_entry_port_create(struct mlxsw_sp *mlxsw_sp,
			       struct mlxsw_sp_pgt_entry *pgt_entry,
			       u16 local_port)
{}

static void
mlxsw_sp_pgt_entry_port_destroy(struct mlxsw_sp *mlxsw_sp,
				struct mlxsw_sp_pgt_entry *pgt_entry,
				struct mlxsw_sp_pgt_entry_port *pgt_entry_port)

{}

static int mlxsw_sp_pgt_entry_port_add(struct mlxsw_sp *mlxsw_sp, u16 mid,
				       u16 smpe, u16 local_port)
{}

static void mlxsw_sp_pgt_entry_port_del(struct mlxsw_sp *mlxsw_sp,
					u16 mid, u16 smpe, u16 local_port)
{}

int mlxsw_sp_pgt_entry_port_set(struct mlxsw_sp *mlxsw_sp, u16 mid,
				u16 smpe, u16 local_port, bool member)
{}

int mlxsw_sp_pgt_init(struct mlxsw_sp *mlxsw_sp)
{}

void mlxsw_sp_pgt_fini(struct mlxsw_sp *mlxsw_sp)
{}