linux/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c

// SPDX-License-Identifier: GPL-2.0+

#include "lan966x_main.h"
#include "lan966x_vcap_ag_api.h"
#include "vcap_api.h"
#include "vcap_api_client.h"
#include "vcap_api_debugfs.h"

#define STREAMSIZE

#define LAN966X_IS1_LOOKUPS
#define LAN966X_IS2_LOOKUPS
#define LAN966X_ES0_LOOKUPS

#define LAN966X_STAT_ESDX_GRN_BYTES
#define LAN966X_STAT_ESDX_GRN_PKTS
#define LAN966X_STAT_ESDX_YEL_BYTES
#define LAN966X_STAT_ESDX_YEL_PKTS

static struct lan966x_vcap_inst {} lan966x_vcap_inst_cfg[] =;

struct lan966x_vcap_cmd_cb {};

static u32 lan966x_vcap_read_update_ctrl(const struct lan966x_vcap_cmd_cb *cb)
{}

static void lan966x_vcap_wait_update(struct lan966x *lan966x, int instance)
{}

static void __lan966x_vcap_range_init(struct lan966x *lan966x,
				      struct vcap_admin *admin,
				      u32 addr,
				      u32 count)
{}

static int lan966x_vcap_is1_cid_to_lookup(int cid)
{}

static int lan966x_vcap_is2_cid_to_lookup(int cid)
{}

/* Return the list of keysets for the vcap port configuration */
static int
lan966x_vcap_is1_get_port_keysets(struct net_device *ndev, int lookup,
				  struct vcap_keyset_list *keysetlist,
				  u16 l3_proto)
{}

static int
lan966x_vcap_is2_get_port_keysets(struct net_device *dev, int lookup,
				  struct vcap_keyset_list *keysetlist,
				  u16 l3_proto)
{}

static enum vcap_keyfield_set
lan966x_vcap_validate_keyset(struct net_device *dev,
			     struct vcap_admin *admin,
			     struct vcap_rule *rule,
			     struct vcap_keyset_list *kslist,
			     u16 l3_proto)
{}

static bool lan966x_vcap_is2_is_first_chain(struct vcap_rule *rule)
{}

static void lan966x_vcap_is1_add_default_fields(struct lan966x_port *port,
						struct vcap_admin *admin,
						struct vcap_rule *rule)
{}

static void lan966x_vcap_is2_add_default_fields(struct lan966x_port *port,
						struct vcap_admin *admin,
						struct vcap_rule *rule)
{}

static void lan966x_vcap_es0_add_default_fields(struct lan966x_port *port,
						struct vcap_admin *admin,
						struct vcap_rule *rule)
{}

static void lan966x_vcap_add_default_fields(struct net_device *dev,
					    struct vcap_admin *admin,
					    struct vcap_rule *rule)
{}

static void lan966x_vcap_cache_erase(struct vcap_admin *admin)
{}

/* The ESDX counter is only used/incremented if the frame has been classified
 * with an ISDX > 0 (e.g by a rule in IS0).  This is not mentioned in the
 * datasheet.
 */
static void lan966x_es0_read_esdx_counter(struct lan966x *lan966x,
					  struct vcap_admin *admin, u32 id)
{}

static void lan966x_es0_write_esdx_counter(struct lan966x *lan966x,
					   struct vcap_admin *admin, u32 id)
{}

static void lan966x_vcap_cache_write(struct net_device *dev,
				     struct vcap_admin *admin,
				     enum vcap_selection sel,
				     u32 start,
				     u32 count)
{}

static void lan966x_vcap_cache_read(struct net_device *dev,
				    struct vcap_admin *admin,
				    enum vcap_selection sel,
				    u32 start,
				    u32 count)
{}

static void lan966x_vcap_range_init(struct net_device *dev,
				    struct vcap_admin *admin,
				    u32 addr,
				    u32 count)
{}

static void lan966x_vcap_update(struct net_device *dev,
				struct vcap_admin *admin,
				enum vcap_command cmd,
				enum vcap_selection sel,
				u32 addr)
{}

static void lan966x_vcap_move(struct net_device *dev,
			      struct vcap_admin *admin,
			      u32 addr, int offset, int count)
{}

static const struct vcap_operations lan966x_vcap_ops =;

static void lan966x_vcap_admin_free(struct vcap_admin *admin)
{}

static struct vcap_admin *
lan966x_vcap_admin_alloc(struct lan966x *lan966x, struct vcap_control *ctrl,
			 const struct lan966x_vcap_inst *cfg)
{}

static void lan966x_vcap_block_init(struct lan966x *lan966x,
				    struct vcap_admin *admin,
				    struct lan966x_vcap_inst *cfg)
{}

static void lan966x_vcap_port_key_deselection(struct lan966x *lan966x,
					      struct vcap_admin *admin)
{}

int lan966x_vcap_init(struct lan966x *lan966x)
{}

void lan966x_vcap_deinit(struct lan966x *lan966x)
{}