On Wed, Nov 8, 2023 at 9:03 AM <psathe...@marvell.com> wrote: > > From: Satheesh Paul <psathe...@marvell.com> > > Added ROC API to get MKEX capability. > > Signed-off-by: Satheesh Paul <psathe...@marvell.com> > Reviewed-by: Kiran Kumar K <kirankum...@marvell.com>
Applied to dpdk-next-net-mrvl/for-main. Thanks > --- > drivers/common/cnxk/roc_npc.c | 24 ++++++++++++++++++++++++ > drivers/common/cnxk/roc_npc.h | 1 + > drivers/common/cnxk/version.map | 1 + > 3 files changed, 26 insertions(+) > > diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c > index a0d88c0743..1958b3089d 100644 > --- a/drivers/common/cnxk/roc_npc.c > +++ b/drivers/common/cnxk/roc_npc.c > @@ -235,6 +235,30 @@ roc_npc_profile_name_get(struct roc_npc *roc_npc) > return (char *)npc->profile_name; > } > > +int > +roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t *kex_capability) > +{ > + struct nix *nix = roc_nix_to_nix_priv(roc_nix); > + struct npc npc; > + int rc = 0; > + > + memset(&npc, 0, sizeof(npc)); > + > + npc.mbox = (&nix->dev)->mbox; > + > + rc = npc_mcam_fetch_kex_cfg(&npc); > + if (rc) > + return rc; > + > + rc = npc_mcam_fetch_hw_cap(&npc, &npc.hash_extract_cap); > + if (rc) > + return rc; > + > + *kex_capability = npc_get_kex_capability(&npc); > + > + return 0; > +} > + > int > roc_npc_init(struct roc_npc *roc_npc) > { > diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h > index b71ddd1578..459fa33de9 100644 > --- a/drivers/common/cnxk/roc_npc.h > +++ b/drivers/common/cnxk/roc_npc.h > @@ -399,6 +399,7 @@ struct roc_npc { > int __roc_api roc_npc_init(struct roc_npc *roc_npc); > int __roc_api roc_npc_fini(struct roc_npc *roc_npc); > const char *__roc_api roc_npc_profile_name_get(struct roc_npc *roc_npc); > +int __roc_api roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t > *kex_capability); > > struct roc_npc_flow *__roc_api roc_npc_flow_create(struct roc_npc *roc_npc, > const struct roc_npc_attr > *attr, > diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map > index aa884a8fe2..1c7c65c51a 100644 > --- a/drivers/common/cnxk/version.map > +++ b/drivers/common/cnxk/version.map > @@ -438,6 +438,7 @@ INTERNAL { > roc_npc_flow_parse; > roc_npc_get_low_priority_mcam; > roc_npc_init; > + roc_npc_kex_capa_get; > roc_npc_mark_actions_get; > roc_npc_mark_actions_sub_return; > roc_npc_vtag_actions_get; > -- > 2.39.2 >