linux/drivers/net/ethernet/microchip/sparx5/sparx5_mirror.c

// SPDX-License-Identifier: GPL-2.0+
/* Microchip Sparx5 Switch driver
 *
 * Copyright (c) 2024 Microchip Technology Inc. and its subsidiaries.
 */

#include "sparx5_main.h"
#include "sparx5_main_regs.h"
#include "sparx5_tc.h"

#define SPX5_MIRROR_PROBE_MAX
#define SPX5_MIRROR_DISABLED
#define SPX5_MIRROR_EGRESS
#define SPX5_MIRROR_INGRESS
#define SPX5_MIRROR_MONITOR_PORT_DEFAULT
#define SPX5_QFWD_MP_OFFSET

/* Convert from bool ingress/egress to mirror direction */
static u32 sparx5_mirror_to_dir(bool ingress)
{}

/* Get ports belonging to this mirror */
static u64 sparx5_mirror_port_get(struct sparx5 *sparx5, u32 idx)
{}

/* Add port to mirror (only front ports) */
static void sparx5_mirror_port_add(struct sparx5 *sparx5, u32 idx, u32 portno)
{}

/* Delete port from mirror (only front ports) */
static void sparx5_mirror_port_del(struct sparx5 *sparx5, u32 idx, u32 portno)
{}

/* Check if mirror contains port */
static bool sparx5_mirror_contains(struct sparx5 *sparx5, u32 idx, u32 portno)
{}

/* Check if mirror is empty */
static bool sparx5_mirror_is_empty(struct sparx5 *sparx5, u32 idx)
{}

/* Get direction of mirror */
static u32 sparx5_mirror_dir_get(struct sparx5 *sparx5, u32 idx)
{}

/* Set direction of mirror */
static void sparx5_mirror_dir_set(struct sparx5 *sparx5, u32 idx, u32 dir)
{}

/* Set the monitor port for this mirror */
static void sparx5_mirror_monitor_set(struct sparx5 *sparx5, u32 idx,
				      u32 portno)
{}

/* Get the monitor port of this mirror */
static u32 sparx5_mirror_monitor_get(struct sparx5 *sparx5, u32 idx)
{}

/* Check if port is the monitor port of this mirror */
static bool sparx5_mirror_has_monitor(struct sparx5 *sparx5, u32 idx,
				      u32 portno)
{}

/* Get a suitable mirror for this port */
static int sparx5_mirror_get(struct sparx5_port *sport,
			     struct sparx5_port *mport, u32 dir, u32 *idx)
{}

int sparx5_mirror_add(struct sparx5_mall_entry *entry)
{}

void sparx5_mirror_del(struct sparx5_mall_entry *entry)
{}

void sparx5_mirror_stats(struct sparx5_mall_entry *entry,
			 struct flow_stats *fstats)
{}