mem: fix displaying heap ID failed for heap info command
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 commit2537fb0c5f34 ("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'.
--- lib/eal/common/eal_common_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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);
Signature · 1 line
2.33.0
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")Signed-off-by Huisong Li <[email protected]>--- lib/eal/common/eal_common_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)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);
Quoted 13 lines · fengchengwen
Acked-by Chengwen Feng <[email protected]>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
Signed-off-by Huisong Li <[email protected]>
Signature · 1 line
David Marchand
Quoted 7 lines · David Marchand
Quoted 6 lines · fengchengwen
Acked-by Chengwen Feng <[email protected]>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:
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by Huisong Li <[email protected]>
Quoted 4 lines · fengchengwen
Acked-by Chengwen Feng <[email protected]>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")Signed-off-by Huisong Li <[email protected]>--- lib/eal/common/eal_common_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/eal/common/eal_common_memory.c +0
-0lib/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);.
PATCH v2 1/1 mem: fix displaying heap ID failed for heap info command
In reply to Huisong LiThe 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'.
---
-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
@@ -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
@@ -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
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 dictionarynames")
Cc: [email protected]Signed-off-by Huisong Li <[email protected]>Acked-by Chengwen Feng <[email protected]>---
Thomas Monjalon
Applied22/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.50o 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 dictionarynames")
Cc: [email protected]
Quoted 4 lines
Quoted 2 lines
Signed-off-by Huisong Li <[email protected]>Acked-by Chengwen Feng <[email protected]>Reviewed-by Morten Brørup <[email protected]>
Applied, thanks.