[dpdk-stable] patch 'telemetry: fix port stats retrieval' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:53:23 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. 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 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power at intel.com>
Date: Thu, 27 Feb 2020 17:04:56 +0000
Subject: [PATCH] telemetry: fix port stats retrieval

[ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ]

The ep struct is used to track what type of stats are required by the
client. For PORT_STATS type, it contains the lists of port and metric
ids to query, and the number of ids in each list.

The ep struct has values set (num of port and metric ids) when a request
for port stats values by name is received. However, after this value
assignment, the struct is reset to all 0 values, meaning the number of
port and metric ids required now both show as 0, and the client will not
receive the requested data in response. To fix this issue, the memset
call is now moved above the ep struct value assignment.

Fixes: 4080e46c8078 ("telemetry: support global metrics")

Signed-off-by: Ciara Power <ciara.power at intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>
---
 lib/librte_telemetry/rte_telemetry_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c
index 9601323970..e8c269e85e 100644
--- a/lib/librte_telemetry/rte_telemetry_parser.c
+++ b/lib/librte_telemetry/rte_telemetry_parser.c
@@ -456,9 +456,9 @@ rte_telemetry_command_ports_stats_values_by_name(struct telemetry_impl
 	size_t index;
 	json_t *value;
 
+	memset(&ep, 0, sizeof(ep));
 	ep.pp.num_port_ids = json_array_size(port_ids_json);
 	ep.pp.num_metric_ids = num_stat_names;
-	memset(&ep, 0, sizeof(ep));
 	if (telemetry == NULL) {
 		TELEMETRY_LOG_ERR("Invalid telemetry argument");
 		return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.347688482 +0100
+++ 0013-telemetry-fix-port-stats-retrieval.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,8 +1,10 @@
-From 341a793eb193a104c571172e724a98b2552c55cf Mon Sep 17 00:00:00 2001
+From 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001
 From: Ciara Power <ciara.power at intel.com>
 Date: Thu, 27 Feb 2020 17:04:56 +0000
 Subject: [PATCH] telemetry: fix port stats retrieval
 
+[ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ]
+
 The ep struct is used to track what type of stats are required by the
 client. For PORT_STATS type, it contains the lists of port and metric
 ids to query, and the number of ids in each list.
@@ -15,7 +17,6 @@
 call is now moved above the ep struct value assignment.
 
 Fixes: 4080e46c8078 ("telemetry: support global metrics")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ciara Power <ciara.power at intel.com>
 Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>


More information about the stable mailing list