DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: Per queue stats
Date: Tue, 8 Oct 2024 11:04:18 +0100	[thread overview]
Message-ID: <ZwUDolgdcj0W5eZs@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F796@smartserver.smartshare.dk>

On Tue, Oct 08, 2024 at 11:58:37AM +0200, Morten Brørup wrote:
> > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com]
> > Sent: Sunday, 6 October 2024 22.51
> > 
> > On 10/4/2024 9:40 PM, Stephen Hemminger wrote:
> > > ...
> > >>>>> The stats queue mapping was a feature that was hinted at being
> > removed.
> > >>>>> It only exists because of HW limitations on Intel ixgbe NIC and
> > SW
> > >>>>> limitations from RTE_ETHDEV_QUEUE_STAT_CNTRS.
> > >>>>>
> > >>>>
> > >>>>
> > >>>> We have a plan to remove 'RTE_ETHDEV_QUEUE_STAT_CNTRS', by moving
> > queue
> > >>>> stats to xstats.
> > >>>>
> > >>>> But ixgbe limitation is there.
> > >>>>
> > >>>>> Perhaps there should be a generic SW emulation for this the
> > mapping?
> > >>>>>
> > >>>>
> > >>>> Ack, cc'ed Bruce.
> > >>>> But I am not sure ROI of the effort at this stage.
> > >>>
> > >>> Not sure what the specific ask for me is here. :-) Overall, I think
> > moving
> > >>> queue stats to xstats is the best way to go.
> > >>>
> > >>
> > >> cc'ed because of "generic SW emulation" comment.
> > >>
> > >> I was thinking if this mapping can be done transparent to the user
> > by
> > >> driver mapping queue <-> stats_register before reading stats, but
> > @Bruce
> > >> let me know this won't work because the stats tracking only happens
> > >> after the mapping.
> > >>
> > >> @Stephen, do you have something specific in your mind for SW
> > emulation
> > >> for mapping?
> > >
> > > Probably not worth doing mapping tables for SW drivers.
> > >
> > > My preference would be something like:
> > > 	1. Introduce new API's rte_ethdev_get_queue_stats() and
> > rte_ethdev_reset_queue_stats().
> > >            with callbacks in ethdev ops.
> > >            if driver does not support this, then do a shim in ethdev
> > that uses old stats fields.
> > >         2. Mark the stats mapping API's as deprecated and always
> > return error.
> > >            Making special case for ixgbe at this point really is not
> > worth maintaining.
> > >         3. After all drivers converted over, drop the fields in
> > ethdev stats for queues.
> > >            And fix the examples, etc. Yes this would be a big API
> > change.
> > >
> > > Would take a year to get done (ie 25.11).
> > >
> > 
> > The problem with existing a API, 'rte_eth_stats_get()', is it has queue
> > stats fixed sized array which limits us also for some cases causes
> > unnecessary memory consumption.
> > 
> > Our solution for now is move queue stats to xstats, as it is flexible
> > this solves the problem, but as you said in other thread xstats is free
> > form and may be hard for the application to use it.
> > 
> > One option is we can add some more data to the xstats, to help
> > application to consume it easier, like number of queues just before the
> > queue stats and define queue stats formatting syntax.
> > 
> > But if we will go with API option, instead of adding new queue stats
> > ('rte_ethdev_get_queue_stats()'), we can update the existing
> > 'rte_eth_stats_get()' to return dynamic number of queue stats.
> 
> Some users might not care about queue stats, so let's remove them entirely from rte_eth_stats_get(), and put them elsewhere.
> 
+1 for this. I think separate APIs for queue stats would make more sense.

/Bruce

  reply	other threads:[~2024-10-08 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 15:42 [PATCH] doc: update TAP device features Stephen Hemminger
2024-10-04  1:48 ` Ferruh Yigit
2024-10-04  2:26   ` Stephen Hemminger
2024-10-04  4:09     ` Ferruh Yigit
2024-10-04  7:54       ` Bruce Richardson
2024-10-04 15:24         ` Stephen Hemminger
2024-10-04 17:26         ` Ferruh Yigit
2024-10-04 20:40           ` Per queue stats Stephen Hemminger
2024-10-06 20:51             ` Ferruh Yigit
2024-10-08  9:58               ` Morten Brørup
2024-10-08 10:04                 ` Bruce Richardson [this message]
2024-10-04 20:48   ` [PATCH] doc: update TAP device features Stephen Hemminger
2024-10-06 20:36     ` Ferruh Yigit
2024-10-09 16:53       ` Stephen Hemminger
2024-10-09 23:21         ` 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=ZwUDolgdcj0W5eZs@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).