From: Harry van Haaren Date: Tue, 10 Oct 2017 15:47:57 +0000 (+0100) Subject: event/sw: fix get of single xstat value X-Git-Tag: spdx-start~1225 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8747b239296e7ee3731ac48e9a55e3d9e6d001a6;p=dpdk.git event/sw: fix get of single xstat value 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") Signed-off-by: Harry van Haaren --- diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c index 8cb6d88d14..61a5c33b7a 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); }