#include <linux/bitfield.h>
#include "rvu_struct.h"
#include "rvu_reg.h"
#include "rvu.h"
#include "npc.h"
#include "rvu_npc_fs.h"
#include "rvu_npc_hash.h"
static const char * const npc_flow_names[] = …;
bool npc_is_feature_supported(struct rvu *rvu, u64 features, u8 intf)
{ … }
const char *npc_get_field_name(u8 hdr)
{ … }
static void npc_set_kw_masks(struct npc_mcam *mcam, u8 type,
u8 nr_bits, int start_kwi, int offset, u8 intf)
{ … }
static bool npc_is_field_present(struct rvu *rvu, enum key_fields type, u8 intf)
{ … }
static bool npc_is_same(struct npc_key_field *input,
struct npc_key_field *field)
{ … }
static void npc_set_layer_mdata(struct npc_mcam *mcam, enum key_fields type,
u64 cfg, u8 lid, u8 lt, u8 intf)
{ … }
static bool npc_check_overlap_fields(struct npc_key_field *input1,
struct npc_key_field *input2)
{ … }
static bool npc_check_overlap(struct rvu *rvu, int blkaddr,
enum key_fields type, u8 start_lid, u8 intf)
{ … }
static bool npc_check_field(struct rvu *rvu, int blkaddr, enum key_fields type,
u8 intf)
{ … }
static void npc_scan_exact_result(struct npc_mcam *mcam, u8 bit_number,
u8 key_nibble, u8 intf)
{ … }
static void npc_scan_parse_result(struct npc_mcam *mcam, u8 bit_number,
u8 key_nibble, u8 intf)
{ … }
static void npc_handle_multi_layer_fields(struct rvu *rvu, int blkaddr, u8 intf)
{ … }
static void npc_scan_ldata(struct rvu *rvu, int blkaddr, u8 lid,
u8 lt, u64 cfg, u8 intf)
{ … }
static void npc_set_features(struct rvu *rvu, int blkaddr, u8 intf)
{ … }
static int npc_scan_kex(struct rvu *rvu, int blkaddr, u8 intf)
{ … }
static int npc_scan_verify_kex(struct rvu *rvu, int blkaddr)
{ … }
int npc_flow_steering_init(struct rvu *rvu, int blkaddr)
{ … }
static int npc_check_unsupported_flows(struct rvu *rvu, u64 features, u8 intf)
{ … }
void npc_update_entry(struct rvu *rvu, enum key_fields type,
struct mcam_entry *entry, u64 val_lo,
u64 val_hi, u64 mask_lo, u64 mask_hi, u8 intf)
{ … }
static void npc_update_ipv6_flow(struct rvu *rvu, struct mcam_entry *entry,
u64 features, struct flow_msg *pkt,
struct flow_msg *mask,
struct rvu_npc_mcam_rule *output, u8 intf)
{ … }
static void npc_update_vlan_features(struct rvu *rvu, struct mcam_entry *entry,
u64 features, u8 intf)
{ … }
static void npc_update_flow(struct rvu *rvu, struct mcam_entry *entry,
u64 features, struct flow_msg *pkt,
struct flow_msg *mask,
struct rvu_npc_mcam_rule *output, u8 intf,
int blkaddr)
{ … }
static struct rvu_npc_mcam_rule *rvu_mcam_find_rule(struct npc_mcam *mcam, u16 entry)
{ … }
static void rvu_mcam_add_rule(struct npc_mcam *mcam,
struct rvu_npc_mcam_rule *rule)
{ … }
static void rvu_mcam_remove_counter_from_rule(struct rvu *rvu, u16 pcifunc,
struct rvu_npc_mcam_rule *rule)
{ … }
static void rvu_mcam_add_counter_to_rule(struct rvu *rvu, u16 pcifunc,
struct rvu_npc_mcam_rule *rule,
struct npc_install_flow_rsp *rsp)
{ … }
static int npc_mcast_update_action_index(struct rvu *rvu, struct npc_install_flow_req *req,
u64 op, void *action)
{ … }
static int npc_update_rx_entry(struct rvu *rvu, struct rvu_pfvf *pfvf,
struct mcam_entry *entry,
struct npc_install_flow_req *req,
u16 target, bool pf_set_vfs_mac)
{ … }
static int npc_update_tx_entry(struct rvu *rvu, struct rvu_pfvf *pfvf,
struct mcam_entry *entry,
struct npc_install_flow_req *req, u16 target)
{ … }
static int npc_install_flow(struct rvu *rvu, int blkaddr, u16 target,
int nixlf, struct rvu_pfvf *pfvf,
struct npc_install_flow_req *req,
struct npc_install_flow_rsp *rsp, bool enable,
bool pf_set_vfs_mac)
{ … }
int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,
struct npc_install_flow_req *req,
struct npc_install_flow_rsp *rsp)
{ … }
static int npc_delete_flow(struct rvu *rvu, struct rvu_npc_mcam_rule *rule,
u16 pcifunc)
{ … }
int rvu_mbox_handler_npc_delete_flow(struct rvu *rvu,
struct npc_delete_flow_req *req,
struct npc_delete_flow_rsp *rsp)
{ … }
static int npc_update_dmac_value(struct rvu *rvu, int npcblkaddr,
struct rvu_npc_mcam_rule *rule,
struct rvu_pfvf *pfvf)
{ … }
void npc_mcam_enable_flows(struct rvu *rvu, u16 target)
{ … }
void npc_mcam_disable_flows(struct rvu *rvu, u16 target)
{ … }
int npc_install_mcam_drop_rule(struct rvu *rvu, int mcam_idx, u16 *counter_idx,
u64 chan_val, u64 chan_mask, u64 exact_val, u64 exact_mask,
u64 bcast_mcast_val, u64 bcast_mcast_mask)
{ … }
int rvu_mbox_handler_npc_get_field_status(struct rvu *rvu,
struct npc_get_field_status_req *req,
struct npc_get_field_status_rsp *rsp)
{ … }