DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Stephen Hemminger <shemming@brocade.com>
Subject: Re: [dpdk-dev] [PATCH v2 5/6] rte_sched: allow reading statistics without clearing
Date: Thu, 12 Mar 2015 16:06:26 -0700	[thread overview]
Message-ID: <20150312160626.47315f49@urahara> (raw)
In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D89126323225F4@IRSMSX108.ger.corp.intel.com>

On Thu, 12 Mar 2015 19:28:11 +0000
"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com> wrote:

> Hi Stephen,
> 
> Thank you for adding flexibility over clearing the stats or not.
> 
> I have one concern though: why change the stats read API to add a clear parameter rather than keep prototype for the stats functions unchanged and add the flag as part of the port creation parameters in struct rte_sched_port_params? This parameter could be saved into the internal struct rte_sched_port, which is passed (as a pointer) to the stats read functions. In my opinion, this approach is slightly more elegant and it keeps the changes to a minimum.
> 
> int
> rte_sched_queue_read_stats(struct rte_sched_port *port,
> 	uint32_t queue_id,
> 	struct rte_sched_queue_stats *stats,
> 	uint16_t *qlen)
> {
> 	...
> 	if (port->clear_stats_on_read)
> 		memset(...);
> }
> 
> I made this suggestion during the previous round, but I did not get any opinion from you on it yet.
> 
> Regards,
> Cristian

I rejected the config parameter idea because I don't like it is inconsistent
with other statistics in DPDK and in related software. There is not a
config parameter that changes what BSD or Linux kernel API does.

The only reason for keeping the read and clear in one operation is
because you like it, and there are somebody might have built code
that expects it.

Changing the function signature is a nice red flag so that people will
notice at change.

  reply	other threads:[~2015-03-12 23:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 16:13 [dpdk-dev] [PATCH v2 0/6] sched: bugfixes and enhancements Stephen Hemminger
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 1/6] rte_sched: don't put tabs in log messages Stephen Hemminger
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 2/6] rte_sched: make RED optional at runtime Stephen Hemminger
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 3/6] rte_sched: expand scheduler hierarchy for more VLAN's Stephen Hemminger
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 4/6] rte_sched: keep track of RED drops Stephen Hemminger
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 5/6] rte_sched: allow reading statistics without clearing Stephen Hemminger
2015-03-12 19:28   ` Dumitrescu, Cristian
2015-03-12 23:06     ` Stephen Hemminger [this message]
2015-03-16 19:58       ` Dumitrescu, Cristian
2015-03-16 20:11         ` Stephen Hemminger
2015-03-16 20:21           ` Dumitrescu, Cristian
2015-03-16 20:33             ` Stephen Hemminger
2015-03-16 20:00   ` Dumitrescu, Cristian
2015-03-10 16:13 ` [dpdk-dev] [PATCH v2 6/6] rte_sched: eliminate floating point in calculating byte clock Stephen Hemminger
2015-03-12 19:06   ` Dumitrescu, Cristian
2015-03-12 23:09     ` Stephen Hemminger

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=20150312160626.47315f49@urahara \
    --to=stephen@networkplumber.org \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=shemming@brocade.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).