DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Rakesh Kudurumalla <rkudurumalla@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>, dpdk-dev <dev@dpdk.org>,
	Jerin Jacob <jerinj@marvell.com>
Subject: Re: [PATCH] net/cnxk: fix to display extended stats
Date: Mon, 4 Jul 2022 18:29:38 +0530	[thread overview]
Message-ID: <CALBAE1M7TdHmGSeyeQMqz+Ey=Ozz1JLJwN4X+2xN51ih6j8R_g@mail.gmail.com> (raw)
In-Reply-To: <20220701125110.512275-1-rkudurumalla@marvell.com>

On Fri, Jul 1, 2022 at 6:21 PM Rakesh Kudurumalla
<rkudurumalla@marvell.com> wrote:
>
> This fix replaces the usage of roc_nix_num_xstats_get()
> which is compile time api with runtime api
> roc_nix_xstats_names_get() resolving xstat count
> difference for cn9k and cn10k while displaying xstats
> for dpdk ports
>
> Fixes: 825bd1d9d8e6 ("common/cnxk: update extra stats for inline device")
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>



Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks

    net/cnxk: fix to display extended stats

    This fix replaces the usage of roc_nix_num_xstats_get() which is compile
    time RoC API with runtime RoC  roc_nix_xstats_names_get() API resolving
    xstat count difference for cn9k and cn10k while displaying xstats
    for ethdev ports

    Fixes: 825bd1d9d8e6 ("common/cnxk: update extra stats for inline device")
    Cc: stable@dpdk.org

    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>

> ---
>  drivers/net/cnxk/cnxk_stats.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/cnxk/cnxk_stats.c b/drivers/net/cnxk/cnxk_stats.c
> index 4b0deac05e..f2f2222c89 100644
> --- a/drivers/net/cnxk/cnxk_stats.c
> +++ b/drivers/net/cnxk/cnxk_stats.c
> @@ -172,7 +172,7 @@ cnxk_nix_xstats_get_names(struct rte_eth_dev *eth_dev,
>         struct roc_nix *nix = &dev->nix;
>         int roc_size, size, i, q;
>
> -       roc_size = roc_nix_num_xstats_get(nix);
> +       roc_size = roc_nix_xstats_names_get(nix, NULL, 0);
>         /* Per Queue statistics also returned as part of xstats */
>         size = roc_size + (dev->nb_rxq * CNXK_NB_RXQ_STATS) +
>                (dev->nb_txq * CNXK_NB_TXQ_STATS);
> @@ -232,7 +232,7 @@ cnxk_nix_xstats_get_names_by_id(struct rte_eth_dev *eth_dev,
>                                 unsigned int limit)
>  {
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
> -       uint32_t nix_cnt = roc_nix_num_xstats_get(&dev->nix);
> +       uint32_t nix_cnt = roc_nix_xstats_names_get(&dev->nix, NULL, 0);
>         uint32_t stat_cnt = nix_cnt + (dev->nb_rxq * CNXK_NB_RXQ_STATS) +
>                             (dev->nb_txq * CNXK_NB_TXQ_STATS);
>         struct rte_eth_xstat_name xnames[stat_cnt];
> @@ -265,7 +265,7 @@ cnxk_nix_xstats_get_by_id(struct rte_eth_dev *eth_dev, const uint64_t *ids,
>                           uint64_t *values, unsigned int n)
>  {
>         struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
> -       uint32_t nix_cnt = roc_nix_num_xstats_get(&dev->nix);
> +       uint32_t nix_cnt = roc_nix_xstats_names_get(&dev->nix, NULL, 0);
>         uint32_t stat_cnt = nix_cnt + (dev->nb_rxq * CNXK_NB_RXQ_STATS) +
>                             (dev->nb_txq * CNXK_NB_TXQ_STATS);
>         struct rte_eth_xstat xstats[stat_cnt];
> --
> 2.25.1
>

      reply	other threads:[~2022-07-04 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 12:51 Rakesh Kudurumalla
2022-07-04 12:59 ` 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='CALBAE1M7TdHmGSeyeQMqz+Ey=Ozz1JLJwN4X+2xN51ih6j8R_g@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=rkudurumalla@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).