All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Ivan Malov <Ivan.Malov@oktetlabs.ru>,
	Harry Van Haaren <harry.van.haaren@intel.com>,
	Lee Daly <lee.daly@intel.com>
Subject: Re: [PATCH v2 2/3] ethdev: fix xstats get by id APIS
Date: Tue, 24 Oct 2017 01:33:13 +0200	[thread overview]
Message-ID: <1623363.fyW1tFJoJP@xps> (raw)
In-Reply-To: <20171023231534.90996-2-ferruh.yigit@intel.com>

24/10/2017 01:15, Ferruh Yigit:
> xstats _by_id() APIs are broken because ids known by user sent directly
> to the PMDs.
> 
> ethdev xstat get by id APIs:
> rte_eth_xstats_get_names_by_id() and rte_eth_xstats_get_by_id()
> work on ids calculated as "basic stats + extended stats"
> 
> When an application asking for id less than "basic stats count", it is
> indeed asking basic stats not extended stats.
> 
> The dev_ops PMDs implements work on extended stats ids.
> 
> This patch adds a check if all requested stats are xstats and if so
> converts ids to xstats ids before passing them to PMDs.
> 
> This conversion wasn't required before commit 8c49d5f1c219, because
> _by_id dev_ops were always used to get whole stats via NULL ids.
> 
> Fixes: 8c49d5f1c219 ("ethdev: rework xstats retrieve by id")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Tested-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> ---
> Cc: Ivan Malov <Ivan.Malov@oktetlabs.ru>
> Cc: Harry Van Haaren <harry.van.haaren@intel.com>
> Cc: Lee Daly <lee.daly@intel.com>
> 
> v2:
> * variable renamed, all_ids_from_pmd -> no_basic_stat_requested
> * xstats id conversion commented.

A lot more clear :)
Thanks

Acked-by: Thomas Monjalon <thomas@monjalon.net>

  reply	other threads:[~2017-10-23 23:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20  0:03 [PATCH 1/3] ethdev: extract xstat basic stat count calculation Ferruh Yigit
2017-10-20  0:03 ` [PATCH 2/3] ethdev: fix xstats get by id APIS Ferruh Yigit
2017-10-20 12:33   ` Ivan Malov
2017-10-23 22:20   ` Thomas Monjalon
2017-10-20  0:03 ` [PATCH 3/3] ethdev: fix negative return values in xstats Ferruh Yigit
2017-10-23 22:26   ` Thomas Monjalon
2017-10-23 23:12 ` [PATCH 1/3] ethdev: extract xstat basic stat count calculation Ferruh Yigit
2017-10-23 23:12   ` [PATCH 2/3] ethdev: fix xstats get by id APIS Ferruh Yigit
2017-10-23 23:12   ` [PATCH 3/3] ethdev: check more errors in xstats retrieval Ferruh Yigit
2017-10-23 23:15   ` [PATCH v2 1/3] ethdev: extract xstat basic stat count calculation Ferruh Yigit
2017-10-23 23:15     ` [PATCH v2 2/3] ethdev: fix xstats get by id APIS Ferruh Yigit
2017-10-23 23:33       ` Thomas Monjalon [this message]
2017-10-23 23:15     ` [PATCH v2 3/3] ethdev: check more errors in xstats retrieval Ferruh Yigit
2017-10-24  0:31     ` [PATCH v2 1/3] ethdev: extract xstat basic stat count calculation Ferruh Yigit

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=1623363.fyW1tFJoJP@xps \
    --to=thomas@monjalon.net \
    --cc=Ivan.Malov@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=lee.daly@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.