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

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:59:04 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=0e846591b5028863a505897da4423d75a7edb609

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 0e846591b5028863a505897da4423d75a7edb609 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 688dc615d7..8e427bf4b4 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -1139,7 +1139,7 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
 	malloc_heap_get_stats(heap, &sock_stats);

 	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",
 				  sock_stats.heap_totalsz_bytes);
@@ -1201,13 +1201,13 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
 	mz = rte_fbarray_get(&mcfg->memzones, mz_idx);

 	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 */
 	msl = rte_mem_virt2memseg_list(mz->addr);
@@ -1222,7 +1222,7 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
 	ms_idx = RTE_PTR_DIFF(mz->addr, msl->base_va) / page_sz;
 	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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:42.103342200 +0800
+++ 0037-mem-fix-telemetry-data-truncation.patch	2023-02-27 14:08:40.749237000 +0800
@@ -1 +1 @@
-From 6243e36b837b754c33017718cf79f7574a52b09c Mon Sep 17 00:00:00 2001
+From 0e846591b5028863a505897da4423d75a7edb609 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list