All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Harry van Haaren <harry.van.haaren@intel.com>
Cc: dev@dpdk.org, bruce.richardson@intel.com
Subject: Re: [PATCH] event/sw: fix get of single xstat value
Date: Mon, 16 Oct 2017 17:33:45 +0530	[thread overview]
Message-ID: <20171016120344.GA30329@jerin> (raw)
In-Reply-To: <1507650477-74678-1-git-send-email-harry.van.haaren@intel.com>

-----Original Message-----
> Date: Tue, 10 Oct 2017 16:47:57 +0100
> From: Harry van Haaren <harry.van.haaren@intel.com>
> To: dev@dpdk.org
> CC: jerin.jacob@caviumnetworks.com, Harry van Haaren
>  <harry.van.haaren@intel.com>, bruce.richardson@intel.com
> Subject: [PATCH] event/sw: fix get of single xstat value
> X-Mailer: git-send-email 2.7.4
> 
> This commit allows the xstats_get() API to return just a single
> value based on its ID. Previously, the "ret_n_lt_stats" value
> set to 1 ensured a check to take place that the array was larger
> than the available xstats.
> 
> The xstats_get() API allows retriving of individual stats - hence
> this check should be removed - by setting "ret_n_lt_stats" to zero.
> 
> Fixes: c1ad03df7ad5 ("event/sw: support xstats")
> Cc: bruce.richardson@intel.com
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>


Applied to dpdk-next-eventdev/master. Thanks.

> ---
>  drivers/event/sw/sw_evdev_xstats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
> index 8cb6d88..61a5c33 100644
> --- a/drivers/event/sw/sw_evdev_xstats.c
> +++ b/drivers/event/sw/sw_evdev_xstats.c
> @@ -538,7 +538,7 @@ sw_xstats_get(const struct rte_eventdev *dev,
>  {
>  	struct sw_evdev *sw = sw_pmd_priv(dev);
>  	const uint32_t reset = 0;
> -	const uint32_t ret_n_lt_stats = 1;
> +	const uint32_t ret_n_lt_stats = 0;
>  	return sw_xstats_update(sw, mode, queue_port_id, ids, values, n,
>  				reset, ret_n_lt_stats);
>  }
> -- 
> 2.7.4
> 

      reply	other threads:[~2017-10-16 12:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 15:47 [PATCH] event/sw: fix get of single xstat value Harry van Haaren
2017-10-16 12:03 ` Jerin Jacob [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=20171016120344.GA30329@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.