Skip to contentSkip to conversation

mem: fix displaying heap ID failed for heap info command

PATCH Superseded Huisong Li 5 participants 8 messages Feb 9, 2023 – Mar 12, 2023

lore
Share & tools
lore

Huisong Li

author
#0 lore raw

PATCH 1/1 mem: fix displaying heap ID failed for heap info command

The telemetry lib has added a allowed characters set for dictionary names, 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")
---
 lib/eal/common/eal_common_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/eal/common/eal_common_memory.c +1 -1
index c917b981bc..c2a4c8f9e7 100644
@@ -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);
Signature · 1 line
2.33.0
Acked-by on v1 1/1
#1 lore raw

And, how abort add error log in telemetry valid_name, so so that problems can be identified as early as possible.

Quoted 30 lines · Huisong Li

The telemetry lib has added a allowed characters set for dictionary names, 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")
---
 lib/eal/common/eal_common_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/eal/common/eal_common_memory.c +1 -1
index c917b981bc..c2a4c8f9e7 100644
@@ -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);
#2 lore raw
Quoted 13 lines · fengchengwen

And, how abort add error log in telemetry valid_name, so so that problems can be identified as early as possible.

Quoted 6 lines · Huisong Li

The telemetry lib has added a allowed characters set for dictionary names, 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

I agree this typo is ugly, but I wonder if some telemetry users started relying on it...

Quoted 3 lines
Quoted 3 lines

'Heap_id' to replace 'Head id'.

Fixes e6732d0d6e26 ("mem: add telemetry infos")

IIUC, the commit that broke displaying "Head id" is actually the one that limited the set of chars.

Quoted 3 lines
Quoted 3 lines
Signature · 1 line
David Marchand
#3 lore raw
Quoted 7 lines · David Marchand
Quoted 6 lines · fengchengwen

And, how abort add error log in telemetry valid_name, so so that problems can be identified as early as possible.

On 2023/2/9 11:03, Huisong Li wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

The telemetry lib has added a allowed characters set for dictionary names, 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

I agree this typo is ugly, but I wonder if some telemetry users started relying on it...

we should have gotten feedback earlier if telemetry user relied on it. Because this field has not been displayed since September last year. Or do we add an announcement in rel_notes?

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

'Heap_id' to replace 'Head id'.

Fixes e6732d0d6e26 ("mem: add telemetry infos")

IIUC, the commit that broke displaying "Head id" is actually the one that limited the set of chars.

Ack, I will add the following commit:

Fixes 2537fb0c5f34 ("telemetry: limit characters allowed in dictionary names")
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
#4 lore raw
In reply to fengchengwen
Quoted 4 lines · fengchengwen

And, how abort add error log in telemetry valid_name, so so that problems can be identified as early as possible.

It might be better for adding an error log.
What do you think, Bruce?

Quoted 33 lines · Huisong Li
Quoted 22 lines

The telemetry lib has added a allowed characters set for dictionary names, 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")
---
  lib/eal/common/eal_common_memory.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/eal/common/eal_common_memory.c +0 -0
index c917b981bc..c2a4c8f9e7 100644

lib/eal/common/eal_common_memory.c handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params, · line 1145

Quoted 8 lines
lib/eal/common/eal_common_memory.c +1 -1
@@ -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);

.

author
#5 lore raw

PATCH v2 1/1 mem: fix displaying heap ID failed for heap info command

In reply to Huisong Li

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")

---
-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(-)
doc/guides/rel_notes/release_23_03.rst +2 -0
index 49c18617a5..bdee535046 100644
@@ -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
 -----------
lib/eal/common/eal_common_memory.c +1 -1
index c917b981bc..c2a4c8f9e7 100644
@@ -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);
Signature · 1 line
2.33.0
Reviewed-by on v2 1/1
#6 lore raw
Quoted 2 lines

From: Huisong Li [mailto:[email protected]]
Sent: Wednesday, 22 February 2023 08.50

o command

Quoted 9 lines

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'.

Quoted 8 lines
Fixes e6732d0d6e26 ("mem: add telemetry infos")
Fixes 2537fb0c5f34 ("telemetry: limit characters allowed in dictionary

names")
Cc: [email protected]

---

#7 lore raw

22/02/2023 08:53, Morten Brørup:

Quoted 17 lines
Quoted 2 lines

From: Huisong Li [mailto:[email protected]]
Sent: Wednesday, 22 February 2023 08.50

o command

Quoted 14 lines

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: [email protected]

Quoted 4 lines
Quoted 2 lines

Applied, thanks.