patch 'mem: fix telemetry data truncation' has been queued to stable release 21.11.4

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:05:11 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.4

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/28/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c

Thanks.

Kevin

---
>From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Mon, 19 Dec 2022 15:06:45 +0800
Subject: [PATCH] mem: fix telemetry data truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ]

The 'u32' and 'u64' data can not assigned to 'int' type variable.
They need to use the 'u64' APIs to add.

Fixes: e6732d0d6e26 ("mem: add telemetry infos")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 lib/eal/common/eal_common_memory.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index 616db5ce31..a3f2bdd0ca 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
 
 	rte_tel_data_start_dict(d);
-	rte_tel_data_add_dict_int(d, "Head id", heap_id);
+	rte_tel_data_add_dict_u64(d, "Head id", heap_id);
 	rte_tel_data_add_dict_string(d, "Name", heap->name);
 	rte_tel_data_add_dict_u64(d, "Heap_size",
@@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
 
 	rte_tel_data_start_dict(d);
-	rte_tel_data_add_dict_int(d, "Zone", mz_idx);
+	rte_tel_data_add_dict_u64(d, "Zone", mz_idx);
 	rte_tel_data_add_dict_string(d, "Name", mz->name);
-	rte_tel_data_add_dict_int(d, "Length", mz->len);
+	rte_tel_data_add_dict_u64(d, "Length", mz->len);
 	snprintf(addr, ADDR_STR, "%p", mz->addr);
 	rte_tel_data_add_dict_string(d, "Address", addr);
 	rte_tel_data_add_dict_int(d, "Socket", mz->socket_id);
-	rte_tel_data_add_dict_int(d, "Flags", mz->flags);
+	rte_tel_data_add_dict_u64(d, "Flags", mz->flags);
 
 	/* go through each page occupied by this memzone */
@@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
 	ms = rte_fbarray_get(&msl->memseg_arr, ms_idx);
 
-	rte_tel_data_add_dict_int(d, "Hugepage_size", page_sz);
+	rte_tel_data_add_dict_u64(d, "Hugepage_size", page_sz);
 	snprintf(addr, ADDR_STR, "%p", ms->addr);
 	rte_tel_data_add_dict_string(d, "Hugepage_base", addr);
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:24.334056728 +0000
+++ 0020-mem-fix-telemetry-data-truncation.patch	2023-02-23 14:46:23.728235819 +0000
@@ -1 +1 @@
-From 6243e36b837b754c33017718cf79f7574a52b09c Mon Sep 17 00:00:00 2001
+From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 688dc615d7..8e427bf4b4 100644
+index 616db5ce31..a3f2bdd0ca 100644
@@ -26 +27 @@
-@@ -1140,5 +1140,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
+@@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
@@ -33 +34 @@
-@@ -1202,11 +1202,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
+@@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
@@ -48 +49 @@
-@@ -1223,5 +1223,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
+@@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,



More information about the stable mailing list