DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: psatheesh@marvell.com
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	 Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] common/cnxk: add ROC API to get MKEX capability
Date: Tue, 5 Dec 2023 15:24:18 +0530	[thread overview]
Message-ID: <CALBAE1M16Ho=0oN+eDzabWVCTWPCy+iKfyL-eHr2vL_BQUwRAg@mail.gmail.com> (raw)
In-Reply-To: <20231108033312.1419051-1-psatheesh@marvell.com>

On Wed, Nov 8, 2023 at 9:03 AM <psatheesh@marvell.com> wrote:
>
> From: Satheesh Paul <psatheesh@marvell.com>
>
> Added ROC API to get MKEX capability.
>
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Kiran Kumar K <kirankumark@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
>

      reply	other threads:[~2023-12-05  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08  3:33 psatheesh
2023-12-05  9:54 ` Jerin Jacob [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1M16Ho=0oN+eDzabWVCTWPCy+iKfyL-eHr2vL_BQUwRAg@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=psatheesh@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).