[v2] mem: fix displaying heap ID failed for heap info command

Message ID 20230222074953.22715-1-lihuisong@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] mem: fix displaying heap ID failed for heap info command |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

lihuisong (C) Feb. 22, 2023, 7:49 a.m. UTC
  The telemetry lib has added a allowed characters set for dictionary names.
Please see commit 2537fb0c5f34 ("telemetry: limit characters allowed in
dictionary names")

The space is not in this set, which cause the heap ID in /eal/heap_info
cannot be displayed. Additionally, 'heap' is also misspelling. So use
'Heap_id' to replace 'Head id'.

Fixes: e6732d0d6e26 ("mem: add telemetry infos")
Fixes: 2537fb0c5f34 ("telemetry: limit characters allowed in dictionary names")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 -v2: add announcement in rel_notes.
---
 doc/guides/rel_notes/release_23_03.rst | 2 ++
 lib/eal/common/eal_common_memory.c     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Comments

Morten Brørup Feb. 22, 2023, 7:53 a.m. UTC | #1
> From: Huisong Li [mailto:lihuisong@huawei.com]
> Sent: Wednesday, 22 February 2023 08.50
o command
> 
> The telemetry lib has added a allowed characters set for dictionary names.
> Please see commit 2537fb0c5f34 ("telemetry: limit characters allowed in
> dictionary names")
> 
> The space is not in this set, which cause the heap ID in /eal/heap_info
> cannot be displayed. Additionally, 'heap' is also misspelling. So use
> 'Heap_id' to replace 'Head id'.
> 
> Fixes: e6732d0d6e26 ("mem: add telemetry infos")
> Fixes: 2537fb0c5f34 ("telemetry: limit characters allowed in dictionary
> names")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> ---

Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  
Thomas Monjalon March 12, 2023, 8:40 a.m. UTC | #2
22/02/2023 08:53, Morten Brørup:
> > From: Huisong Li [mailto:lihuisong@huawei.com]
> > Sent: Wednesday, 22 February 2023 08.50
> o command
> > 
> > The telemetry lib has added a allowed characters set for dictionary names.
> > Please see commit 2537fb0c5f34 ("telemetry: limit characters allowed in
> > dictionary names")
> > 
> > The space is not in this set, which cause the heap ID in /eal/heap_info
> > cannot be displayed. Additionally, 'heap' is also misspelling. So use
> > 'Heap_id' to replace 'Head id'.
> > 
> > Fixes: e6732d0d6e26 ("mem: add telemetry infos")
> > Fixes: 2537fb0c5f34 ("telemetry: limit characters allowed in dictionary
> > names")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Huisong Li <lihuisong@huawei.com>
> > Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> 
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>

Applied, thanks.
  

Patch

diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst
index 49c18617a5..bdee535046 100644
--- a/doc/guides/rel_notes/release_23_03.rst
+++ b/doc/guides/rel_notes/release_23_03.rst
@@ -237,6 +237,8 @@  API Changes
 * The experimental structures ``struct rte_graph_param``, ``struct rte_graph``
   and ``struct graph`` were updated to support pcap trace in the graph library.
 
+* The ``Head ip`` in the displaying of ``/eal/heap_info`` telemetry command
+  is modified to ``Heap_id`` to ensure that it can be printed.
 
 ABI Changes
 -----------
diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index c917b981bc..c2a4c8f9e7 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_uint(d, "Head id", heap_id);
+	rte_tel_data_add_dict_uint(d, "Heap_id", heap_id);
 	rte_tel_data_add_dict_string(d, "Name", heap->name);
 	rte_tel_data_add_dict_uint(d, "Heap_size",
 				   sock_stats.heap_totalsz_bytes);