linux/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c

// SPDX-License-Identifier: GPL-2.0
/* Marvell RVU Ethernet driver
 *
 * Copyright (C) 2020 Marvell.
 *
 */

#include <net/ipv6.h>
#include <linux/sort.h>

#include "otx2_common.h"

#define OTX2_DEFAULT_ACTION

struct otx2_flow {};

enum dmac_req {};

static void otx2_clear_ntuple_flow_info(struct otx2_nic *pfvf, struct otx2_flow_config *flow_cfg)
{}

static int otx2_free_ntuple_mcam_entries(struct otx2_nic *pfvf)
{}

static int mcam_entry_cmp(const void *a, const void *b)
{}

int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count)
{}
EXPORT_SYMBOL();

int otx2_mcam_entry_init(struct otx2_nic *pfvf)
{}
EXPORT_SYMBOL();

/* TODO : revisit on size */
#define OTX2_DMAC_FLTR_BITMAP_SZ

int otx2vf_mcam_flow_init(struct otx2_nic *pfvf)
{}
EXPORT_SYMBOL();

int otx2_mcam_flow_init(struct otx2_nic *pf)
{}

void otx2_mcam_flow_del(struct otx2_nic *pf)
{}
EXPORT_SYMBOL();

/*  On success adds mcam entry
 *  On failure enable promisous mode
 */
static int otx2_do_add_macfilter(struct otx2_nic *pf, const u8 *mac)
{}

int otx2_add_macfilter(struct net_device *netdev, const u8 *mac)
{}

static bool otx2_get_mcamentry_for_mac(struct otx2_nic *pf, const u8 *mac,
				       int *mcam_entry)
{}

int otx2_del_macfilter(struct net_device *netdev, const u8 *mac)
{}

static struct otx2_flow *otx2_find_flow(struct otx2_nic *pfvf, u32 location)
{}

static void otx2_add_flow_to_list(struct otx2_nic *pfvf, struct otx2_flow *flow)
{}

int otx2_get_maxflows(struct otx2_flow_config *flow_cfg)
{}
EXPORT_SYMBOL();

int otx2_get_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc,
		  u32 location)
{}

int otx2_get_all_flows(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc,
		       u32 *rule_locs)
{}

static int otx2_prepare_ipv4_flow(struct ethtool_rx_flow_spec *fsp,
				  struct npc_install_flow_req *req,
				  u32 flow_type)
{}

static int otx2_prepare_ipv6_flow(struct ethtool_rx_flow_spec *fsp,
				  struct npc_install_flow_req *req,
				  u32 flow_type)
{}

static int otx2_prepare_flow_request(struct ethtool_rx_flow_spec *fsp,
			      struct npc_install_flow_req *req)
{}

static int otx2_is_flow_rule_dmacfilter(struct otx2_nic *pfvf,
					struct ethtool_rx_flow_spec *fsp)
{}

static int otx2_add_flow_msg(struct otx2_nic *pfvf, struct otx2_flow *flow)
{}

static int otx2_add_flow_with_pfmac(struct otx2_nic *pfvf,
				    struct otx2_flow *flow)
{}

int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)
{}

static int otx2_remove_flow_msg(struct otx2_nic *pfvf, u16 entry, bool all)
{}

static void otx2_update_rem_pfmac(struct otx2_nic *pfvf, int req)
{}

int otx2_remove_flow(struct otx2_nic *pfvf, u32 location)
{}

void otx2_rss_ctx_flow_del(struct otx2_nic *pfvf, int ctx_id)
{}

int otx2_destroy_ntuple_flows(struct otx2_nic *pfvf)
{}

int otx2_destroy_mcam_flows(struct otx2_nic *pfvf)
{}

int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf)
{}

static int otx2_delete_rxvlan_offload_flow(struct otx2_nic *pfvf)
{}

int otx2_enable_rxvlan(struct otx2_nic *pf, bool enable)
{}

void otx2_dmacflt_reinstall_flows(struct otx2_nic *pf)
{}

void otx2_dmacflt_update_pfmac_flow(struct otx2_nic *pfvf)
{}