[dpdk-stable] patch 'event/sw: fix xstats reset value' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:15 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From ae419ec1d3a15d7bbefd31405c5f435f66be4ead Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads at intel.com>
Date: Tue, 27 Aug 2019 16:34:59 -0500
Subject: [PATCH] event/sw: fix xstats reset value

[ upstream commit d02c470c87976def34bae0307736ecb9c8cac9d8 ]

The sw PMD implements xstats reset by having the xstat get operations
return a value to the statistic's value at the last reset. The value at the
last reset is maintained in the per-xstat reset_value field, but the PMD
was setting reset_value = current - reset_value instead of reset_value =
current.

Fixes: c1ad03df7ad5 ("event/sw: support xstats")

Signed-off-by: Gage Eads <gage.eads at intel.com>
Acked-by: Harry van Haaren <harry.van.haaren at intel.com>
---
 drivers/event/sw/sw_evdev_xstats.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
index 61a5c33b7a..bed222f7ed 100644
--- a/drivers/event/sw/sw_evdev_xstats.c
+++ b/drivers/event/sw/sw_evdev_xstats.c
@@ -521,7 +521,7 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
 			values[xidx] = val;
 
 		if (xs->reset_allowed && reset)
-			xs->reset_value = val;
+			xs->reset_value += val;
 
 		xidx++;
 	}
@@ -574,8 +574,7 @@ sw_xstats_reset_range(struct sw_evdev *sw, uint32_t start, uint32_t num)
 		if (!xs->reset_allowed)
 			continue;
 
-		uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg)
-					- xs->reset_value;
+		uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg);
 		xs->reset_value = val;
 	}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:28.257415133 +0000
+++ 0048-event-sw-fix-xstats-reset-value.patch	2019-12-19 14:32:26.025296239 +0000
@@ -1,8 +1,10 @@
-From d02c470c87976def34bae0307736ecb9c8cac9d8 Mon Sep 17 00:00:00 2001
+From ae419ec1d3a15d7bbefd31405c5f435f66be4ead Mon Sep 17 00:00:00 2001
 From: Gage Eads <gage.eads at intel.com>
 Date: Tue, 27 Aug 2019 16:34:59 -0500
 Subject: [PATCH] event/sw: fix xstats reset value
 
+[ upstream commit d02c470c87976def34bae0307736ecb9c8cac9d8 ]
+
 The sw PMD implements xstats reset by having the xstat get operations
 return a value to the statistic's value at the last reset. The value at the
 last reset is maintained in the per-xstat reset_value field, but the PMD
@@ -10,7 +12,6 @@
 current.
 
 Fixes: c1ad03df7ad5 ("event/sw: support xstats")
-Cc: stable at dpdk.org
 
 Signed-off-by: Gage Eads <gage.eads at intel.com>
 Acked-by: Harry van Haaren <harry.van.haaren at intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
-index 7a6caa64d8..90664903bf 100644
+index 61a5c33b7a..bed222f7ed 100644
 --- a/drivers/event/sw/sw_evdev_xstats.c
 +++ b/drivers/event/sw/sw_evdev_xstats.c
-@@ -491,7 +491,7 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
+@@ -521,7 +521,7 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
  			values[xidx] = val;
  
  		if (xs->reset_allowed && reset)
@@ -31,7 +32,7 @@
  
  		xidx++;
  	}
-@@ -544,8 +544,7 @@ sw_xstats_reset_range(struct sw_evdev *sw, uint32_t start, uint32_t num)
+@@ -574,8 +574,7 @@ sw_xstats_reset_range(struct sw_evdev *sw, uint32_t start, uint32_t num)
  		if (!xs->reset_allowed)
  			continue;
  


More information about the stable mailing list