linux/drivers/net/dsa/mv88e6xxx/devlink.c

// SPDX-License-Identifier: GPL-2.0-or-later
#include <net/dsa.h>

#include "chip.h"
#include "devlink.h"
#include "global1.h"
#include "global2.h"
#include "port.h"

static int mv88e6xxx_atu_get_hash(struct mv88e6xxx_chip *chip, u8 *hash)
{}

static int mv88e6xxx_atu_set_hash(struct mv88e6xxx_chip *chip, u8 hash)
{}

enum mv88e6xxx_devlink_param_id {};

int mv88e6xxx_devlink_param_get(struct dsa_switch *ds, u32 id,
				struct devlink_param_gset_ctx *ctx)
{}

int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,
				struct devlink_param_gset_ctx *ctx)
{}

static const struct devlink_param mv88e6xxx_devlink_params[] =;

int mv88e6xxx_setup_devlink_params(struct dsa_switch *ds)
{}

void mv88e6xxx_teardown_devlink_params(struct dsa_switch *ds)
{}

enum mv88e6xxx_devlink_resource_id {};

static u64 mv88e6xxx_devlink_atu_bin_get(struct mv88e6xxx_chip *chip,
					 u16 bin)
{}

static u64 mv88e6xxx_devlink_atu_bin_0_get(void *priv)
{}

static u64 mv88e6xxx_devlink_atu_bin_1_get(void *priv)
{}

static u64 mv88e6xxx_devlink_atu_bin_2_get(void *priv)
{}

static u64 mv88e6xxx_devlink_atu_bin_3_get(void *priv)
{}

static u64 mv88e6xxx_devlink_atu_get(void *priv)
{}

int mv88e6xxx_setup_devlink_resources(struct dsa_switch *ds)
{}

static int mv88e6xxx_region_global_snapshot(struct devlink *dl,
					    const struct devlink_region_ops *ops,
					    struct netlink_ext_ack *extack,
					    u8 **data)
{}

/* The ATU entry varies between mv88e6xxx chipset generations. Define
 * a generic format which covers all the current and hopefully future
 * mv88e6xxx generations
 */

struct mv88e6xxx_devlink_atu_entry {};

static int mv88e6xxx_region_atu_snapshot_fid(struct mv88e6xxx_chip *chip,
					     int fid,
					     struct mv88e6xxx_devlink_atu_entry *table,
					     int *count)
{}

static int mv88e6xxx_region_atu_snapshot(struct devlink *dl,
					 const struct devlink_region_ops *ops,
					 struct netlink_ext_ack *extack,
					 u8 **data)
{}

/**
 * struct mv88e6xxx_devlink_vtu_entry - Devlink VTU entry
 * @fid:   Global1/2:   FID and VLAN policy.
 * @sid:   Global1/3:   SID, unknown filters and learning.
 * @op:    Global1/5:   FID (old chipsets).
 * @vid:   Global1/6:   VID, valid, and page.
 * @data:  Global1/7-9: Membership data and priority override.
 * @resvd: Reserved. Also happens to align the size to 16B.
 *
 * The VTU entry format varies between chipset generations, the
 * descriptions above represent the superset of all possible
 * information, not all fields are valid on all devices. Since this is
 * a low-level debug interface, copy all data verbatim and defer
 * parsing to the consumer.
 */
struct mv88e6xxx_devlink_vtu_entry {};

static int mv88e6xxx_region_vtu_snapshot(struct devlink *dl,
					 const struct devlink_region_ops *ops,
					 struct netlink_ext_ack *extack,
					 u8 **data)
{}

/**
 * struct mv88e6xxx_devlink_stu_entry - Devlink STU entry
 * @sid:   Global1/3:   SID, unknown filters and learning.
 * @vid:   Global1/6:   Valid bit.
 * @data:  Global1/7-9: Membership data and priority override.
 * @resvd: Reserved. In case we forgot something.
 *
 * The STU entry format varies between chipset generations. Peridot
 * and Amethyst packs the STU data into Global1/7-8. Older silicon
 * spreads the information across all three VTU data registers -
 * inheriting the layout of even older hardware that had no STU at
 * all. Since this is a low-level debug interface, copy all data
 * verbatim and defer parsing to the consumer.
 */
struct mv88e6xxx_devlink_stu_entry {};

static int mv88e6xxx_region_stu_snapshot(struct devlink *dl,
					 const struct devlink_region_ops *ops,
					 struct netlink_ext_ack *extack,
					 u8 **data)
{}

static int mv88e6xxx_region_pvt_snapshot(struct devlink *dl,
					 const struct devlink_region_ops *ops,
					 struct netlink_ext_ack *extack,
					 u8 **data)
{}

static int mv88e6xxx_region_port_snapshot(struct devlink_port *devlink_port,
					  const struct devlink_port_region_ops *ops,
					  struct netlink_ext_ack *extack,
					  u8 **data)
{}

static struct mv88e6xxx_region_priv mv88e6xxx_region_global1_priv =;

static struct devlink_region_ops mv88e6xxx_region_global1_ops =;

static struct mv88e6xxx_region_priv mv88e6xxx_region_global2_priv =;

static struct devlink_region_ops mv88e6xxx_region_global2_ops =;

static struct devlink_region_ops mv88e6xxx_region_atu_ops =;

static struct devlink_region_ops mv88e6xxx_region_vtu_ops =;

static struct devlink_region_ops mv88e6xxx_region_stu_ops =;

static struct devlink_region_ops mv88e6xxx_region_pvt_ops =;

static const struct devlink_port_region_ops mv88e6xxx_region_port_ops =;

struct mv88e6xxx_region {};

static struct mv88e6xxx_region mv88e6xxx_regions[] =;

void mv88e6xxx_teardown_devlink_regions_global(struct dsa_switch *ds)
{}

void mv88e6xxx_teardown_devlink_regions_port(struct dsa_switch *ds, int port)
{}

int mv88e6xxx_setup_devlink_regions_port(struct dsa_switch *ds, int port)
{}

int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds)
{}

int mv88e6xxx_devlink_info_get(struct dsa_switch *ds,
			       struct devlink_info_req *req,
			       struct netlink_ext_ack *extack)
{}