From: Stephen Hemminger <stephen@networkplumber.org>
To: Shani Peretz <shperetz@nvidia.com>
Cc: <dev@dpdk.org>, Aman Singh <aman.deep.singh@intel.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: Re: [RFC PATCH] ethdev: add new API for enable/disable xstat counters by ID
Date: Sun, 22 Dec 2024 08:46:00 -0800 [thread overview]
Message-ID: <20241222084600.7d020991@hermes.local> (raw)
In-Reply-To: <20241222153819.62519-1-shperetz@nvidia.com>
On Sun, 22 Dec 2024 17:38:19 +0200
Shani Peretz <shperetz@nvidia.com> wrote:
> This change introduces a new API to dynamically enable or disable
> xstat counters by their IDs. Some counters may require hardware
> resources that are potentially limited, so providing the ability
> to toggle them on or off makes sense.
> In addition, adding an API to query the current state
> (enabled, disabled, or not supported) of an xstat counter is added.
> New APIs:
> - rte_eth_xstats_enable_counter(struct rte_eth_dev *dev, uint64_t id);
> - rte_eth_xstats_disable_counter(struct rte_eth_dev *dev, uint64_t id);
> - rte_eth_xstats_query_state(struct rte_eth_dev *dev, uint64_t id);
>
> Added the following testpmd subcommands:
> toggle the counter on and off
> > port (port_id) enable|disable <counter_name>
> query the state of counters:
> > set xstats-show-state on|off
>
> Note that by default, generic stats (like those provided by
> eth_basic_stats_get()) will be considered unsupported and
> will not be toggleable.
> Also all xstats will be considered unsupported for dynamic enable/disable,
> and each PMD will be able to override this in its implementation.
>
> Specifically in mlx5 PMD, expose a new xstat to track packet drops of
> hairpin Rx queue:
> - Hairpin_out_of_buffer - Port-level counter -
> counts drops from all the hairpin queues
> - Hairpin_out_of_buffer_rxq* - Queue-level counter -
> counts drops of a specific queue
> Both the port-level and per-queue counters can be
> enabled, disabled, and queried.
>
> Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Why what is the value of having a counter disabled?
Is this something that speeds up the PMD?
IMHO DPDK changes should be driven off user need, not the HW capabilities.
prev parent reply other threads:[~2024-12-22 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 15:38 Shani Peretz
2024-12-22 16:46 ` Stephen Hemminger [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=20241222084600.7d020991@hermes.local \
--to=stephen@networkplumber.org \
--cc=aman.deep.singh@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=ferruh.yigit@amd.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=shperetz@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).