X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcommon%2Fcnxk%2Froc_npc_priv.h;h=5b884e3fd4a2a6fbe4bd8603132698be227887b6;hb=3bf87839559186ec229937b109ccfceab7a98806;hp=4e2418ccdb629f79d0e0f20b0ad4045ec551b9bd;hpb=2199f5cdbe5200dd6ebecbc9bb47aae80ffc9f00;p=dpdk.git diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h index 4e2418ccdb..5b884e3fd4 100644 --- a/drivers/common/cnxk/roc_npc_priv.h +++ b/drivers/common/cnxk/roc_npc_priv.h @@ -5,10 +5,11 @@ #ifndef _ROC_NPC_PRIV_H_ #define _ROC_NPC_PRIV_H_ -#define NPC_IH_LENGTH 8 -#define NPC_TPID_LENGTH 2 -#define NPC_HIGIG2_LENGTH 16 -#define NPC_COUNTER_NONE (-1) +#define NPC_IH_LENGTH 8 +#define NPC_TPID_LENGTH 2 +#define NPC_HIGIG2_LENGTH 16 +#define NPC_MAX_RAW_ITEM_LEN 16 +#define NPC_COUNTER_NONE (-1) #define NPC_RSS_GRPS 8 @@ -47,7 +48,7 @@ #define NPC_RVUPF_MAX_9XXX 0x10 /* HRM: RVU_PRIV_CONST */ #define NPC_RVUPF_MAX_10XX 0x20 /* HRM: RVU_PRIV_CONST */ #define NPC_NIXLF_MAX 0x80 /* HRM: NIX_AF_CONST2 */ -#define NPC_MCAME_PER_PF 2 /* DRV: RSVD_MCAM_ENTRIES_PER_PF */ +#define NPC_MCAME_PER_PF 3 /* DRV: RSVD_MCAM_ENTRIES_PER_PF */ #define NPC_MCAME_PER_LF 1 /* DRV: RSVD_MCAM_ENTRIES_PER_NIXLF */ #define NPC_MCAME_RESVD_9XXX \ (NPC_NIXLF_MAX * NPC_MCAME_PER_LF + \ @@ -350,6 +351,7 @@ struct npc { uint16_t flow_max_priority; /* Max priority for flow */ uint16_t switch_header_type; /* Suppprted switch header type */ uint32_t mark_actions; /* Number of mark actions */ + uint32_t vtag_actions; /* vtag insert/strip actions */ uint16_t pf_func; /* pf_func of device */ npc_dxcfg_t prx_dxcfg; /* intf, lid, lt, extract */ npc_fxcfg_t prx_fxcfg; /* Flag extract */ @@ -378,4 +380,58 @@ roc_npc_to_npc_priv(struct roc_npc *npc) { return (struct npc *)npc->reserved; } + +int npc_mcam_free_counter(struct npc *npc, uint16_t ctr_id); +int npc_mcam_read_counter(struct npc *npc, uint32_t ctr_id, uint64_t *count); +int npc_mcam_clear_counter(struct npc *npc, uint32_t ctr_id); +int npc_mcam_free_entry(struct npc *npc, uint32_t entry); +int npc_mcam_free_all_entries(struct npc *npc); +int npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, + struct npc_parse_state *pst); +int npc_mcam_alloc_entry(struct npc *npc, struct roc_npc_flow *mcam, + struct roc_npc_flow *ref_mcam, int prio, + int *resp_count); +int npc_mcam_alloc_entries(struct npc *npc, int ref_mcam, int *alloc_entry, + int req_count, int prio, int *resp_count); + +int npc_mcam_ena_dis_entry(struct npc *npc, struct roc_npc_flow *mcam, + bool enable); +int npc_mcam_write_entry(struct npc *npc, struct roc_npc_flow *mcam); +int npc_update_parse_state(struct npc_parse_state *pst, + struct npc_parse_item_info *info, int lid, int lt, + uint8_t flags); +void npc_get_hw_supp_mask(struct npc_parse_state *pst, + struct npc_parse_item_info *info, int lid, int lt); +int npc_parse_item_basic(const struct roc_npc_item_info *item, + struct npc_parse_item_info *info); +int npc_parse_meta_items(struct npc_parse_state *pst); +int npc_parse_higig2_hdr(struct npc_parse_state *pst); +int npc_parse_cpt_hdr(struct npc_parse_state *pst); +int npc_parse_la(struct npc_parse_state *pst); +int npc_parse_lb(struct npc_parse_state *pst); +int npc_parse_lc(struct npc_parse_state *pst); +int npc_parse_ld(struct npc_parse_state *pst); +int npc_parse_le(struct npc_parse_state *pst); +int npc_parse_lf(struct npc_parse_state *pst); +int npc_parse_lg(struct npc_parse_state *pst); +int npc_parse_lh(struct npc_parse_state *pst); +int npc_mcam_fetch_kex_cfg(struct npc *npc); +int npc_check_preallocated_entry_cache(struct mbox *mbox, + struct roc_npc_flow *flow, + struct npc *npc); +int npc_flow_free_all_resources(struct npc *npc); +const struct roc_npc_item_info * +npc_parse_skip_void_and_any_items(const struct roc_npc_item_info *pattern); +int npc_program_mcam(struct npc *npc, struct npc_parse_state *pst, + bool mcam_alloc); +uint64_t npc_get_kex_capability(struct npc *npc); +int npc_rss_free_grp_get(struct npc *npc, uint32_t *grp); +int npc_rss_action_configure(struct roc_npc *roc_npc, + const struct roc_npc_action_rss *rss, + uint8_t *alg_idx, uint32_t *rss_grp, + uint32_t mcam_id); +int npc_rss_action_program(struct roc_npc *roc_npc, + const struct roc_npc_action actions[], + struct roc_npc_flow *flow); +int npc_rss_group_free(struct npc *npc, struct roc_npc_flow *flow); #endif /* _ROC_NPC_PRIV_H_ */