Skip to content

Commit

Permalink
common/cnxk: add NPC helper API
Browse files Browse the repository at this point in the history
Adding NPC helper APIs to manage MCAM like pre allocating the mcam,
configuring the rules, shifting mcam rules and preparing the data for
mcam based on KEX.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
  • Loading branch information
Kiran Kumar K authored and jerinjacobk committed Apr 9, 2021
1 parent 2199f5c commit 665b6a7
Show file tree
Hide file tree
Showing 3 changed files with 643 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/common/cnxk/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ sources = files('roc_dev.c',
'roc_npa.c',
'roc_npa_debug.c',
'roc_npa_irq.c',
'roc_npc_utils.c',
'roc_platform.c',
'roc_utils.c')
includes += include_directories('../../bus/pci')
11 changes: 11 additions & 0 deletions drivers/common/cnxk/roc_npc_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,15 @@ roc_npc_to_npc_priv(struct roc_npc *npc)
{
return (struct npc *)npc->reserved;
}

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_check_preallocated_entry_cache(struct mbox *mbox,
struct roc_npc_flow *flow,
struct npc *npc);
#endif /* _ROC_NPC_PRIV_H_ */

0 comments on commit 665b6a7

Please sign in to comment.