patch 'telemetry: fix repeat display when callback don't init dict' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:32 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/23. 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.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9d07f1d80f32a31d8fded7a84e2be080f0400682

Thanks.

Luca Boccassi

---
>From 9d07f1d80f32a31d8fded7a84e2be080f0400682 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 9 Feb 2023 01:25:33 +0000
Subject: [PATCH] telemetry: fix repeat display when callback don't init dict

[ upstream commit ff50c4f9136781bae9089c596e0a12d113e1d474 ]

When a telemetry callback doesn't initialize the telemetry data
structure and returns a non-negative number, the telemetry will repeat
to display the last result. This patch zero the data structure to avoid
the problem.

Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Reviewed-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/librte_telemetry/telemetry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index c3522b7173..ed00c17d9f 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -281,7 +281,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 static void
 perform_command(telemetry_cb fn, const char *cmd, const char *param, int s)
 {
-	struct rte_tel_data data;
+	struct rte_tel_data data = {0};
 
 	int ret = fn(cmd, param, &data);
 	if (ret < 0) {
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:29.384233750 +0000
+++ 0028-telemetry-fix-repeat-display-when-callback-don-t-ini.patch	2023-02-23 09:36:28.222169866 +0000
@@ -1 +1 @@
-From ff50c4f9136781bae9089c596e0a12d113e1d474 Mon Sep 17 00:00:00 2001
+From 9d07f1d80f32a31d8fded7a84e2be080f0400682 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff50c4f9136781bae9089c596e0a12d113e1d474 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- lib/telemetry/telemetry.c | 2 +-
+ lib/librte_telemetry/telemetry.c | 2 +-
@@ -20,5 +21,5 @@
-diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
-index 655191bcf1..7bceadcee7 100644
---- a/lib/telemetry/telemetry.c
-+++ b/lib/telemetry/telemetry.c
-@@ -333,7 +333,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
+diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
+index c3522b7173..ed00c17d9f 100644
+--- a/lib/librte_telemetry/telemetry.c
++++ b/lib/librte_telemetry/telemetry.c
+@@ -281,7 +281,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)


More information about the stable mailing list