DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] event/sw: fix get of single xstat value
@ 2017-10-10 15:47 Harry van Haaren
  2017-10-16 12:03 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Harry van Haaren @ 2017-10-10 15:47 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Harry van Haaren, bruce.richardson

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>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-16 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 15:47 [dpdk-dev] [PATCH] event/sw: fix get of single xstat value Harry van Haaren
2017-10-16 12:03 ` Jerin Jacob

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).