DPDK patches and discussions
 help / color / mirror / Atom feed
From: Remy Horton <remy.horton@intel.com>
To: "Pattan, Reshma" <reshma.pattan@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [dpdk-dev] [PATCH v12 1/6] lib: add information metrics library
Date: Tue, 28 Mar 2017 16:00:32 +0100	[thread overview]
Message-ID: <aafe450e-1422-b998-a27d-9d7eca4134eb@intel.com> (raw)
In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F0112D6FE@irsmsx110.ger.corp.intel.com>


On 28/03/2017 15:14, Pattan, Reshma wrote:
[..]
>> +
>> +include $(RTE_SDK)/mk/rte.vars.mk
>> +
>> +# library name
>> +LIB = librte_metrics.a
>> +
>> +CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> How about adding -O3 to flags?

Off the top of my mind, I think such flags are added to CFLAGS 
separately. I think optimisation flags probably shouldn't be set at 
third-level makefiles such as this one.


>> +int
>> +rte_metrics_get_names(struct rte_metric_name *names,
>> +	uint16_t capacity)
>> +{
[..]
>> +	memzone = rte_memzone_lookup(RTE_METRICS_MEMZONE_NAME);
>> +	/* If not allocated, fail silently */
>> +	if (memzone == NULL)
>> +		return 0;
>> +
>> +	stats = memzone->addr;
>> +	rte_spinlock_lock(&stats->lock);
>> +	if (names != NULL) {
>
> You can check names == NULL at memzone check and return instead of doing that inside lock?

Since the names==NULL case still requires accessing of the protected 
memory to get the name count, don't see any gain in doing so.


>> +
>> +int
>> +rte_metrics_get_values(int port_id,
>> +	struct rte_metric_value *values,
>> +	uint16_t capacity)
>> +{
[..]
>> +	if (values != NULL) {
>
> Can we have values == NULL check  along with memzone and return? Then remove this if check here?

Same as rte_metrics_get_names() above.

Other changes noted. Will send out v12 either tonight or tomorrow.

  reply	other threads:[~2017-03-28 15:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 20:21 [dpdk-dev] [PATCH v12 0/6] Expanded statistics reporting Remy Horton
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 1/6] lib: add information metrics library Remy Horton
2017-03-28 14:14   ` Pattan, Reshma
2017-03-28 15:00     ` Remy Horton [this message]
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 2/6] app/proc_info: add metrics displaying Remy Horton
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 3/6] lib: add bitrate statistics library Remy Horton
2017-03-28 15:30   ` Pattan, Reshma
2017-03-28 15:45     ` Remy Horton
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics calculation Remy Horton
2017-03-28 15:49   ` Pattan, Reshma
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 5/6] lib: added new library for latency stats Remy Horton
2017-03-27 20:21 ` [dpdk-dev] [PATCH v12 6/6] app/test-pmd: add latency statistics calculation Remy Horton
2017-03-27 21:03 ` [dpdk-dev] [PATCH v12 0/6] Expanded statistics reporting Stephen Hemminger
2017-03-28 11:21   ` Mcnamara, John
2017-03-29 18:28 ` [dpdk-dev] [PATCH v13 " Remy Horton
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 1/6] lib: add information metrics library Remy Horton
2017-03-30 10:01     ` Pattan, Reshma
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 2/6] app/proc_info: add metrics displaying Remy Horton
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 3/6] lib: add bitrate statistics library Remy Horton
2017-03-30 10:04     ` Pattan, Reshma
2017-03-30 10:08     ` Pattan, Reshma
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 4/6] app/test-pmd: add bitrate statistics calculation Remy Horton
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 5/6] lib: added new library for latency stats Remy Horton
2017-03-29 18:28   ` [dpdk-dev] [PATCH v13 6/6] app/test-pmd: add latency statistics calculation Remy Horton
2017-03-30 10:22     ` Pattan, Reshma
2017-03-30 13:18   ` [dpdk-dev] [PATCH v13 0/6] Expanded statistics reporting Pattan, Reshma
2017-03-30 21:00   ` [dpdk-dev] [PATCH v14 " Remy Horton
2017-03-30 21:00     ` [dpdk-dev] [PATCH v14 1/6] lib: add information metrics library Remy Horton
2017-04-05 13:39       ` Thomas Monjalon
2017-04-05 14:46         ` Remy Horton
2017-04-05 15:06           ` Thomas Monjalon
2017-04-05 15:16             ` Remy Horton
2017-04-05 15:23               ` Thomas Monjalon
2017-03-30 21:00     ` [dpdk-dev] [PATCH v14 2/6] app/proc_info: add metrics displaying Remy Horton
2017-03-30 21:00     ` [dpdk-dev] [PATCH v14 3/6] lib: add bitrate statistics library Remy Horton
2017-03-30 21:01     ` [dpdk-dev] [PATCH v14 4/6] app/test-pmd: add bitrate statistics calculation Remy Horton
2017-03-30 21:01     ` [dpdk-dev] [PATCH v14 5/6] lib: added new library for latency stats Remy Horton
2017-04-05 14:24       ` Thomas Monjalon
2017-04-05 14:34         ` Remy Horton
2017-03-30 21:01     ` [dpdk-dev] [PATCH v14 6/6] app/test-pmd: add latency statistics calculation Remy Horton
2017-04-05 16:01     ` [dpdk-dev] [PATCH v14 0/6] Expanded statistics reporting Thomas Monjalon

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=aafe450e-1422-b998-a27d-9d7eca4134eb@intel.com \
    --to=remy.horton@intel.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    --cc=thomas.monjalon@6wind.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).