DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] mem: fix displaying heap ID failed for heap info command
@ 2023-02-09  3:03 Huisong Li
  2023-02-09  3:23 ` fengchengwen
  2023-02-22  7:49 ` [PATCH v2] " Huisong Li
  0 siblings, 2 replies; 8+ messages in thread
From: Huisong Li @ 2023-02-09  3:03 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, mb, huangdaode, liudongdong3, fengchengwen, lihuisong

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")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 lib/eal/common/eal_common_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.33.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mem: fix displaying heap ID failed for heap info command
  2023-02-09  3:03 [PATCH] mem: fix displaying heap ID failed for heap info command Huisong Li
@ 2023-02-09  3:23 ` fengchengwen
  2023-02-09  8:48   ` David Marchand
  2023-02-11  3:04   ` lihuisong (C)
  2023-02-22  7:49 ` [PATCH v2] " Huisong Li
  1 sibling, 2 replies; 8+ messages in thread
From: fengchengwen @ 2023-02-09  3:23 UTC (permalink / raw)
  To: Huisong Li, dev; +Cc: bruce.richardson, mb, huangdaode, liudongdong3

Acked-by: Chengwen Feng <fengchengwen@huawei.com>

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:
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> ---
>  lib/eal/common/eal_common_memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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);
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mem: fix displaying heap ID failed for heap info command
  2023-02-09  3:23 ` fengchengwen
@ 2023-02-09  8:48   ` David Marchand
  2023-02-11  2:58     ` lihuisong (C)
  2023-02-11  3:04   ` lihuisong (C)
  1 sibling, 1 reply; 8+ messages in thread
From: David Marchand @ 2023-02-09  8:48 UTC (permalink / raw)
  To: fengchengwen
  Cc: Huisong Li, dev, bruce.richardson, mb, huangdaode, liudongdong3

On Thu, Feb 9, 2023 at 4:24 AM fengchengwen <fengchengwen@huawei.com> wrote:
>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
>
> 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:
> > 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...


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


> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Huisong Li <lihuisong@huawei.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mem: fix displaying heap ID failed for heap info command
  2023-02-09  8:48   ` David Marchand
@ 2023-02-11  2:58     ` lihuisong (C)
  0 siblings, 0 replies; 8+ messages in thread
From: lihuisong (C) @ 2023-02-11  2:58 UTC (permalink / raw)
  To: David Marchand, fengchengwen
  Cc: dev, bruce.richardson, mb, huangdaode, liudongdong3


在 2023/2/9 16:48, David Marchand 写道:
> On Thu, Feb 9, 2023 at 4:24 AM fengchengwen <fengchengwen@huawei.com> wrote:
>> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
>>
>> 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:
>>> 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?
>
>
>>> '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")
>
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mem: fix displaying heap ID failed for heap info command
  2023-02-09  3:23 ` fengchengwen
  2023-02-09  8:48   ` David Marchand
@ 2023-02-11  3:04   ` lihuisong (C)
  1 sibling, 0 replies; 8+ messages in thread
From: lihuisong (C) @ 2023-02-11  3:04 UTC (permalink / raw)
  To: dev, bruce.richardson; +Cc: mb, huangdaode, liudongdong3, fengchengwen


在 2023/2/9 11:23, fengchengwen 写道:
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
>
> 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?
>
> On 2023/2/9 11:03, Huisong Li wrote:
>> 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")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> ---
>>   lib/eal/common/eal_common_memory.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> 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);
>>
> .

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] mem: fix displaying heap ID failed for heap info command
  2023-02-09  3:03 [PATCH] mem: fix displaying heap ID failed for heap info command Huisong Li
  2023-02-09  3:23 ` fengchengwen
@ 2023-02-22  7:49 ` Huisong Li
  2023-02-22  7:53   ` Morten Brørup
  1 sibling, 1 reply; 8+ messages in thread
From: Huisong Li @ 2023-02-22  7:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, mb, hkalra, huangdaode, fengchengwen, lihuisong

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

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);
-- 
2.33.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v2] mem: fix displaying heap ID failed for heap info command
  2023-02-22  7:49 ` [PATCH v2] " Huisong Li
@ 2023-02-22  7:53   ` Morten Brørup
  2023-03-12  8:40     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Morten Brørup @ 2023-02-22  7:53 UTC (permalink / raw)
  To: Huisong Li, dev; +Cc: bruce.richardson, hkalra, huangdaode, fengchengwen

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] mem: fix displaying heap ID failed for heap info command
  2023-02-22  7:53   ` Morten Brørup
@ 2023-03-12  8:40     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2023-03-12  8:40 UTC (permalink / raw)
  To: Huisong Li, dev
  Cc: bruce.richardson, hkalra, huangdaode, fengchengwen, Morten Brørup

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-12  8:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09  3:03 [PATCH] mem: fix displaying heap ID failed for heap info command Huisong Li
2023-02-09  3:23 ` fengchengwen
2023-02-09  8:48   ` David Marchand
2023-02-11  2:58     ` lihuisong (C)
2023-02-11  3:04   ` lihuisong (C)
2023-02-22  7:49 ` [PATCH v2] " Huisong Li
2023-02-22  7:53   ` Morten Brørup
2023-03-12  8:40     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).