From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Jastrzebski, MichalX K" <michalx.k.jastrzebski@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Jain, Deepak K" <deepak.k.jain@intel.com>,
"Piasecki, JacekX" <jacekx.piasecki@intel.com>,
"Kozak, KubaX" <kubax.kozak@intel.com>,
"Kulasek, TomaszX" <tomaszx.kulasek@intel.com>
Subject: Re: [dpdk-dev] [PATCH v5 1/3] ethdev: new xstats API add retrieving by ID
Date: Wed, 12 Apr 2017 08:56:00 +0000 [thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA612A2C29D@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <1491928644-10383-2-git-send-email-michalx.k.jastrzebski@intel.com>
> From: Jastrzebski, MichalX K
> Sent: Tuesday, April 11, 2017 5:37 PM
> To: dev@dpdk.org
> Cc: Jain, Deepak K <deepak.k.jain@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>;
> Piasecki, JacekX <jacekx.piasecki@intel.com>; Kozak, KubaX <kubax.kozak@intel.com>; Kulasek,
> TomaszX <tomaszx.kulasek@intel.com>
> Subject: [PATCH v5 1/3] ethdev: new xstats API add retrieving by ID
>
> From: Jacek Piasecki <jacekx.piasecki@intel.com>
>
> Extended xstats API in ethdev library to allow grouping of stats
> logically so they can be retrieved per logical grouping managed
> by the application.
> Changed existing functions rte_eth_xstats_get_names and
> rte_eth_xstats_get to use a new list of arguments: array of ids
> and array of values. ABI versioning mechanism was used to
> support backward compatibility.
> Introduced two new functions rte_eth_xstats_get_all and
> rte_eth_xstats_get_names_all which keeps functionality of the
> previous ones (respectively rte_eth_xstats_get and
> rte_eth_xstats_get_names) but use new API inside.
> Both functions marked as deprecated.
> Introduced new function: rte_eth_xstats_get_id_by_name
> to retrieve xstats ids by its names.
>
> test-pmd: add support for new xstats API retrieving by id in
> testpmd application: xstats_get() and
> xstats_get_names() call with modified parameters.
>
> proc_info: add support for new xstats API retrieving by id to
> proc_info application. There is a new argument --xstats-ids
> in proc_info command line to retrieve statistics given by ids.
> E.g. --xstats-ids="1,3,5,7,8"
>
> doc: add description for modified xstats API
> Documentation change for modified extended statistics API functions.
> The old API only allows retrieval of *all* of the NIC statistics
> at once. Given this requires a MMIO read PCI transaction per statistic
> it is an inefficient way of retrieving just a few key statistics.
> Often a monitoring agent only has an interest in a few key statistics,
> and the old API forces wasting CPU time and PCIe bandwidth in retrieving
> *all* statistics; even those that the application didn't explicitly
> show an interest in.
> The new, more flexible API allow retrieval of statistics per ID.
> If a PMD wishes, it can be implemented to read just the required
> NIC registers. As a result, the monitoring application no longer wastes
> PCIe bandwidth and CPU time.
>
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
As part of this patchset 3 functions were added to struct eth_dev_ops, to provide more flexible xstats() APIs.
This patchset uses symbol versioning to keep ABI stable. I have checked ABI using ./devtools/validate-abi.sh script for both GCC 5.4.0 and Clang 3.8.0. GCC indicates Compatible, while Clang says there is a single Medium issue, which I believe to be a false positive (details below).
The clang Medium issue is described as follows by the ABI report;
- struct rte_eth_dev :
Change: Size of field dev_ops has been changed from 624 bytes to 648 bytes [HvH: due to adding 3 xstats function pointers to end of struct]
Effect: Previous accesses of applications and library functions to this field and fields at higher positions of the structure definition may be broken.
The reason I believe this is a false positive is that the "dev_ops" field is defined in the rte_eth_dev struct as follows:
const struct eth_dev_ops *dev_ops;
Any accesses made to dev_ops will be by this pointer-dereference, so the *size* of dev_ops *in* rte_eth_dev struct is still a pointer - it hasn't changed. Hence "accesses to this field and fields at higher positions of the structure" will not be changed - the pointer in the rte_eth_dev struct remains a pointer.
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
next prev parent reply other threads:[~2017-04-12 8:56 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 21:50 [dpdk-dev] [PATCH v2 0/5] Extended xstats API in ethdev library to allow grouping of stats Michal Jastrzebski
2017-03-30 21:50 ` [dpdk-dev] [PATCH v2 1/5] add new xstats API retrieving by id Michal Jastrzebski
2017-04-03 12:09 ` [dpdk-dev] [PATCH v3 0/3] Extended xstats API in ethdev library to allow grouping of stats Jacek Piasecki
2017-04-03 12:09 ` [dpdk-dev] [PATCH v3 1/3] add new xstats API retrieving by id Jacek Piasecki
2017-04-03 12:37 ` Van Haaren, Harry
2017-04-04 15:03 ` Thomas Monjalon
2017-04-04 15:45 ` Van Haaren, Harry
2017-04-04 16:18 ` Thomas Monjalon
2017-04-10 17:59 ` [dpdk-dev] [PATCH v4 0/3] Extended xstats API in ethdev library to allow grouping of stats Jacek Piasecki
2017-04-10 17:59 ` [dpdk-dev] [PATCH v4 1/3] ethdev: new xstats API add retrieving by ID Jacek Piasecki
2017-04-11 16:37 ` [dpdk-dev] [PATCH v5 0/3] Extended xstats API in ethdev library to allow grouping of stats Michal Jastrzebski
2017-04-11 16:37 ` [dpdk-dev] [PATCH v5 1/3] ethdev: new xstats API add retrieving by ID Michal Jastrzebski
2017-04-12 8:56 ` Van Haaren, Harry [this message]
2017-04-12 17:10 ` Thomas Monjalon
2017-04-13 10:52 ` Mcnamara, John
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 0/5] Extended xstats API in ethdev library to allow grouping of stats Kuba Kozak
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 1/5] ethdev: new xstats API add retrieving by ID Kuba Kozak
2017-04-13 16:23 ` Van Haaren, Harry
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 2/5] ethdev: added new function for xstats ID Kuba Kozak
2017-04-13 16:23 ` Van Haaren, Harry
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 3/5] proc-info: add support for new xstats API Kuba Kozak
2017-04-13 16:23 ` Van Haaren, Harry
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 4/5] net/e1000: new xstats API add ID support for e1000 Kuba Kozak
2017-04-13 16:23 ` Van Haaren, Harry
2017-04-13 14:59 ` [dpdk-dev] [PATCH v6 5/5] net/ixgbe: new xstats API add ID support for ixgbe Kuba Kozak
2017-04-13 16:23 ` Van Haaren, Harry
2017-04-13 16:21 ` [dpdk-dev] [PATCH v6 0/5] Extended xstats API in ethdev library to allow grouping of stats Van Haaren, Harry
2017-04-20 20:31 ` Thomas Monjalon
2017-04-24 12:32 ` Olivier Matz
2017-04-24 12:41 ` Thomas Monjalon
2017-04-24 15:49 ` Mcnamara, John
2017-04-25 22:49 ` Roger B Melton
2017-04-11 16:37 ` [dpdk-dev] [PATCH v5 2/3] net/e1000: new xstats API add ID support for e1000 Michal Jastrzebski
2017-04-12 8:56 ` Van Haaren, Harry
2017-04-11 16:37 ` [dpdk-dev] [PATCH v5 3/3] net/ixgbe: new xstats API add ID support for ixgbe Michal Jastrzebski
2017-04-12 8:56 ` Van Haaren, Harry
2017-04-10 17:59 ` [dpdk-dev] [PATCH v4 2/3] net/e1000: new xstats API add ID support for e1000 Jacek Piasecki
2017-04-10 17:59 ` [dpdk-dev] [PATCH v4 3/3] net/ixgbe: new xstats API add ID support for ixgbe Jacek Piasecki
2017-04-03 12:09 ` [dpdk-dev] [PATCH v3 2/3] add new xstats API id support for e1000 Jacek Piasecki
2017-04-03 12:38 ` Van Haaren, Harry
2017-04-03 12:09 ` [dpdk-dev] [PATCH v3 3/3] add new xstats API id support for ixgbe Jacek Piasecki
2017-04-03 12:38 ` Van Haaren, Harry
2017-03-30 21:50 ` [dpdk-dev] [PATCH v2 2/5] add new xstats API id support for e1000 Michal Jastrzebski
2017-03-30 22:06 ` [dpdk-dev] [PATCH v2 3/5] add new xstats API id support for ixgbe Michal Jastrzebski
2017-03-30 22:22 ` [dpdk-dev] [PATCH v2 4/5] add support for new xstats API retrieving by id Michal Jastrzebski
2017-03-30 22:23 ` [dpdk-dev] [PATCH v2 5/5] " Michal Jastrzebski
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=E923DB57A917B54B9182A2E928D00FA612A2C29D@IRSMSX102.ger.corp.intel.com \
--to=harry.van.haaren@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=jacekx.piasecki@intel.com \
--cc=kubax.kozak@intel.com \
--cc=michalx.k.jastrzebski@intel.com \
--cc=tomaszx.kulasek@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 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).