* [PATCH dpdk] telemetry: fix adding dicts in container arrays
@ 2026-01-07 21:51 Robin Jarry
2026-01-08 9:20 ` Bruce Richardson
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
0 siblings, 2 replies; 9+ messages in thread
From: Robin Jarry @ 2026-01-07 21:51 UTC (permalink / raw)
To: dev, Bruce Richardson, Ciara Power
Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
is not supported by rte_tel_data_add_array_container. It wrongfully
returns -EINVAL where it should allow it.
This is supported by the JSON formatter.
Allow the same value types than rte_tel_data_add_dict_container().
Fixes: c933bb5177ca ("telemetry: support array values in data object")
Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
lib/telemetry/telemetry_data.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c
index 0354a0654804..0a006559ab42 100644
--- a/lib/telemetry/telemetry_data.c
+++ b/lib/telemetry/telemetry_data.c
@@ -96,10 +96,10 @@ int
rte_tel_data_add_array_container(struct rte_tel_data *d,
struct rte_tel_data *val, int keep)
{
- if (d->type != TEL_ARRAY_CONTAINER ||
- (val->type != TEL_ARRAY_UINT
+ if (d->type != TEL_ARRAY_CONTAINER || (val->type != TEL_ARRAY_UINT
&& val->type != TEL_ARRAY_INT
- && val->type != TEL_ARRAY_STRING))
+ && val->type != TEL_ARRAY_STRING
+ && val->type != TEL_DICT))
return -EINVAL;
if (d->data_len >= RTE_TEL_MAX_ARRAY_ENTRIES)
return -ENOSPC;
--
2.52.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk] telemetry: fix adding dicts in container arrays
2026-01-07 21:51 [PATCH dpdk] telemetry: fix adding dicts in container arrays Robin Jarry
@ 2026-01-08 9:20 ` Bruce Richardson
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
1 sibling, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-01-08 9:20 UTC (permalink / raw)
To: Robin Jarry; +Cc: dev, Ciara Power
On Wed, Jan 07, 2026 at 10:51:30PM +0100, Robin Jarry wrote:
> Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> is not supported by rte_tel_data_add_array_container. It wrongfully
> returns -EINVAL where it should allow it.
>
> This is supported by the JSON formatter.
>
> Allow the same value types than rte_tel_data_add_dict_container().
>
> Fixes: c933bb5177ca ("telemetry: support array values in data object")
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
> lib/telemetry/telemetry_data.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c
> index 0354a0654804..0a006559ab42 100644
> --- a/lib/telemetry/telemetry_data.c
> +++ b/lib/telemetry/telemetry_data.c
> @@ -96,10 +96,10 @@ int
> rte_tel_data_add_array_container(struct rte_tel_data *d,
> struct rte_tel_data *val, int keep)
> {
> - if (d->type != TEL_ARRAY_CONTAINER ||
> - (val->type != TEL_ARRAY_UINT
> + if (d->type != TEL_ARRAY_CONTAINER || (val->type != TEL_ARRAY_UINT
> && val->type != TEL_ARRAY_INT
> - && val->type != TEL_ARRAY_STRING))
> + && val->type != TEL_ARRAY_STRING
> + && val->type != TEL_DICT))
> return -EINVAL;
> if (d->data_len >= RTE_TEL_MAX_ARRAY_ENTRIES)
> return -ENOSPC;
> --
No objection to this, but previous implementation limited the options to
what was needed and tested by telemetry rather than trying to cover every
eventuality. If we now support dicts in arrays, please add some unit
testing around it to verify we haven't any issues with it.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-07 21:51 [PATCH dpdk] telemetry: fix adding dicts in container arrays Robin Jarry
2026-01-08 9:20 ` Bruce Richardson
@ 2026-01-08 10:50 ` Robin Jarry
2026-01-08 11:06 ` Bruce Richardson
` (3 more replies)
1 sibling, 4 replies; 9+ messages in thread
From: Robin Jarry @ 2026-01-08 10:50 UTC (permalink / raw)
To: dev, Bruce Richardson, Ciara Power; +Cc: stable
Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
is not supported by rte_tel_data_add_array_container. It wrongfully
returns -EINVAL where it should allow it.
This is supported by the JSON formatter.
Allow the same value types than rte_tel_data_add_dict_container().
Add test case to verify it works as expected.
Fixes: c933bb5177ca ("telemetry: support array values in data object")
Cc: stable@dpdk.org
Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
Notes:
v2: added test case
app/test/test_telemetry_data.c | 21 +++++++++++++++++++++
lib/telemetry/telemetry_data.c | 6 +++---
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 59898ff5e983..e904b5a7f210 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -405,6 +405,26 @@ test_array_with_array_uint_hex_values_nopadding(void)
return CHECK_OUTPUT("[[\"0x888\"],[\"0x8888\"]]");
}
+static int
+test_array_with_dict_values(void)
+{
+ rte_tel_data_start_array(&response_data, RTE_TEL_CONTAINER);
+
+ struct rte_tel_data *d1 = rte_tel_data_alloc();
+ rte_tel_data_start_dict(d1);
+ rte_tel_data_add_dict_string(d1, "name", "foo");
+ rte_tel_data_add_dict_uint(d1, "size", 42);
+ rte_tel_data_add_array_container(&response_data, d1, 0);
+
+ struct rte_tel_data *d2 = rte_tel_data_alloc();
+ rte_tel_data_start_dict(d2);
+ rte_tel_data_add_dict_string(d2, "name", "bar");
+ rte_tel_data_add_dict_uint(d2, "size", 666);
+ rte_tel_data_add_array_container(&response_data, d2, 0);
+
+ return CHECK_OUTPUT("[{\"name\":\"foo\",\"size\":42},{\"name\":\"bar\",\"size\":666}]");
+}
+
static int
test_case_array_u64(void)
{
@@ -597,6 +617,7 @@ telemetry_data_autotest(void)
test_array_with_array_string_values,
test_array_with_array_uint_hex_values_padding,
test_array_with_array_uint_hex_values_nopadding,
+ test_array_with_dict_values,
test_string_char_escaping,
test_array_char_escaping,
test_dict_char_escaping,
diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c
index 0354a0654804..0a006559ab42 100644
--- a/lib/telemetry/telemetry_data.c
+++ b/lib/telemetry/telemetry_data.c
@@ -96,10 +96,10 @@ int
rte_tel_data_add_array_container(struct rte_tel_data *d,
struct rte_tel_data *val, int keep)
{
- if (d->type != TEL_ARRAY_CONTAINER ||
- (val->type != TEL_ARRAY_UINT
+ if (d->type != TEL_ARRAY_CONTAINER || (val->type != TEL_ARRAY_UINT
&& val->type != TEL_ARRAY_INT
- && val->type != TEL_ARRAY_STRING))
+ && val->type != TEL_ARRAY_STRING
+ && val->type != TEL_DICT))
return -EINVAL;
if (d->data_len >= RTE_TEL_MAX_ARRAY_ENTRIES)
return -ENOSPC;
--
2.52.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
@ 2026-01-08 11:06 ` Bruce Richardson
2026-02-17 16:59 ` Thomas Monjalon
2026-01-08 11:07 ` Bruce Richardson
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2026-01-08 11:06 UTC (permalink / raw)
To: Robin Jarry; +Cc: dev, stable
On Thu, Jan 08, 2026 at 11:50:37AM +0100, Robin Jarry wrote:
> Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> is not supported by rte_tel_data_add_array_container. It wrongfully
> returns -EINVAL where it should allow it.
>
> This is supported by the JSON formatter.
>
> Allow the same value types than rte_tel_data_add_dict_container().
>
> Add test case to verify it works as expected.
>
> Fixes: c933bb5177ca ("telemetry: support array values in data object")
> Cc: stable@dpdk.org
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
>
> Notes:
> v2: added test case
>
> app/test/test_telemetry_data.c | 21 +++++++++++++++++++++
> lib/telemetry/telemetry_data.c | 6 +++---
> 2 files changed, 24 insertions(+), 3 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
2026-01-08 11:06 ` Bruce Richardson
@ 2026-01-08 11:07 ` Bruce Richardson
2026-01-12 15:56 ` Matthew Labrecque
2026-01-19 1:21 ` fengchengwen
3 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-01-08 11:07 UTC (permalink / raw)
To: Robin Jarry; +Cc: dev, stable
On Thu, Jan 08, 2026 at 11:50:37AM +0100, Robin Jarry wrote:
> Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> is not supported by rte_tel_data_add_array_container. It wrongfully
> returns -EINVAL where it should allow it.
>
> This is supported by the JSON formatter.
>
> Allow the same value types than rte_tel_data_add_dict_container().
>
> Add test case to verify it works as expected.
>
> Fixes: c933bb5177ca ("telemetry: support array values in data object")
> Cc: stable@dpdk.org
>
Not sure this is really a fix since it's adding a new capability, but I'll
leave that to the stable tree maintainers to decide if they want to
backport or not.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
2026-01-08 11:06 ` Bruce Richardson
2026-01-08 11:07 ` Bruce Richardson
@ 2026-01-12 15:56 ` Matthew Labrecque
2026-01-12 16:10 ` Robin Jarry
2026-01-19 1:21 ` fengchengwen
3 siblings, 1 reply; 9+ messages in thread
From: Matthew Labrecque @ 2026-01-12 15:56 UTC (permalink / raw)
To: Robin Jarry; +Cc: dev, Bruce Richardson, Ciara Power, stable
[-- Attachment #1: Type: text/plain, Size: 4027 bytes --]
Hey Robin, my name is Mathew Labrecque and I work over at the UNH
InterOperability Laboratory on the Open-Source Team.
I wanted to email you regarding the ARM cross-compile tests that failed on
the patch. While it says the tests were run on Ubuntu 20.04, these tests
were actually performed on Ubuntu 24.04. This was due to an internal error
where we hadn't properly updated the labels for the tests.
Cheers,
Matthew
On Thu, Jan 8, 2026 at 5:50 AM Robin Jarry <rjarry@redhat.com> wrote:
> Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> is not supported by rte_tel_data_add_array_container. It wrongfully
> returns -EINVAL where it should allow it.
>
> This is supported by the JSON formatter.
>
> Allow the same value types than rte_tel_data_add_dict_container().
>
> Add test case to verify it works as expected.
>
> Fixes: c933bb5177ca ("telemetry: support array values in data object")
> Cc: stable@dpdk.org
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
>
> Notes:
> v2: added test case
>
> app/test/test_telemetry_data.c | 21 +++++++++++++++++++++
> lib/telemetry/telemetry_data.c | 6 +++---
> 2 files changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/app/test/test_telemetry_data.c
> b/app/test/test_telemetry_data.c
> index 59898ff5e983..e904b5a7f210 100644
> --- a/app/test/test_telemetry_data.c
> +++ b/app/test/test_telemetry_data.c
> @@ -405,6 +405,26 @@ test_array_with_array_uint_hex_values_nopadding(void)
> return CHECK_OUTPUT("[[\"0x888\"],[\"0x8888\"]]");
> }
>
> +static int
> +test_array_with_dict_values(void)
> +{
> + rte_tel_data_start_array(&response_data, RTE_TEL_CONTAINER);
> +
> + struct rte_tel_data *d1 = rte_tel_data_alloc();
> + rte_tel_data_start_dict(d1);
> + rte_tel_data_add_dict_string(d1, "name", "foo");
> + rte_tel_data_add_dict_uint(d1, "size", 42);
> + rte_tel_data_add_array_container(&response_data, d1, 0);
> +
> + struct rte_tel_data *d2 = rte_tel_data_alloc();
> + rte_tel_data_start_dict(d2);
> + rte_tel_data_add_dict_string(d2, "name", "bar");
> + rte_tel_data_add_dict_uint(d2, "size", 666);
> + rte_tel_data_add_array_container(&response_data, d2, 0);
> +
> + return
> CHECK_OUTPUT("[{\"name\":\"foo\",\"size\":42},{\"name\":\"bar\",\"size\":666}]");
> +}
> +
> static int
> test_case_array_u64(void)
> {
> @@ -597,6 +617,7 @@ telemetry_data_autotest(void)
> test_array_with_array_string_values,
> test_array_with_array_uint_hex_values_padding,
> test_array_with_array_uint_hex_values_nopadding,
> + test_array_with_dict_values,
> test_string_char_escaping,
> test_array_char_escaping,
> test_dict_char_escaping,
> diff --git a/lib/telemetry/telemetry_data.c
> b/lib/telemetry/telemetry_data.c
> index 0354a0654804..0a006559ab42 100644
> --- a/lib/telemetry/telemetry_data.c
> +++ b/lib/telemetry/telemetry_data.c
> @@ -96,10 +96,10 @@ int
> rte_tel_data_add_array_container(struct rte_tel_data *d,
> struct rte_tel_data *val, int keep)
> {
> - if (d->type != TEL_ARRAY_CONTAINER ||
> - (val->type != TEL_ARRAY_UINT
> + if (d->type != TEL_ARRAY_CONTAINER || (val->type != TEL_ARRAY_UINT
> && val->type != TEL_ARRAY_INT
> - && val->type != TEL_ARRAY_STRING))
> + && val->type != TEL_ARRAY_STRING
> + && val->type != TEL_DICT))
> return -EINVAL;
> if (d->data_len >= RTE_TEL_MAX_ARRAY_ENTRIES)
> return -ENOSPC;
> --
> 2.52.0
>
>
--
Matthew Labrecque
Technical Intern, Open Source Team
UNH Interoperability Labs
21 Madbury Rd, Suite 100, Durham, NH 03824
www.iol.unh.edu
[-- Attachment #2: Type: text/html, Size: 6146 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-12 15:56 ` Matthew Labrecque
@ 2026-01-12 16:10 ` Robin Jarry
0 siblings, 0 replies; 9+ messages in thread
From: Robin Jarry @ 2026-01-12 16:10 UTC (permalink / raw)
To: Matthew Labrecque; +Cc: dev, Bruce Richardson, stable
Matthew Labrecque, Jan 12, 2026 at 16:56:
> Hey Robin, my name is Mathew Labrecque and I work over at the UNH
> InterOperability Laboratory on the Open-Source Team.
>
> I wanted to email you regarding the ARM cross-compile tests that failed on
> the patch. While it says the tests were run on Ubuntu 20.04, these tests
> were actually performed on Ubuntu 24.04. This was due to an internal error
> where we hadn't properly updated the labels for the tests.
Hi Matthew,
OK, thanks for the heads up. I don't think this error is relevant
anyway.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
` (2 preceding siblings ...)
2026-01-12 15:56 ` Matthew Labrecque
@ 2026-01-19 1:21 ` fengchengwen
3 siblings, 0 replies; 9+ messages in thread
From: fengchengwen @ 2026-01-19 1:21 UTC (permalink / raw)
To: Robin Jarry, dev, Bruce Richardson, Ciara Power; +Cc: stable
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 1/8/2026 6:50 PM, Robin Jarry wrote:
> Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> is not supported by rte_tel_data_add_array_container. It wrongfully
> returns -EINVAL where it should allow it.
>
> This is supported by the JSON formatter.
>
> Allow the same value types than rte_tel_data_add_dict_container().
>
> Add test case to verify it works as expected.
>
> Fixes: c933bb5177ca ("telemetry: support array values in data object")
> Cc: stable@dpdk.org
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH dpdk v2] telemetry: fix adding dicts in container arrays
2026-01-08 11:06 ` Bruce Richardson
@ 2026-02-17 16:59 ` Thomas Monjalon
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2026-02-17 16:59 UTC (permalink / raw)
To: Robin Jarry; +Cc: dev, stable, Bruce Richardson
08/01/2026 12:06, Bruce Richardson:
> On Thu, Jan 08, 2026 at 11:50:37AM +0100, Robin Jarry wrote:
> > Currently, adding TEL_DICT containers in TEL_ARRAY_CONTAINER containers
> > is not supported by rte_tel_data_add_array_container. It wrongfully
> > returns -EINVAL where it should allow it.
> >
> > This is supported by the JSON formatter.
> >
> > Allow the same value types than rte_tel_data_add_dict_container().
> >
> > Add test case to verify it works as expected.
> >
> > Fixes: c933bb5177ca ("telemetry: support array values in data object")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Robin Jarry <rjarry@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-02-17 16:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 21:51 [PATCH dpdk] telemetry: fix adding dicts in container arrays Robin Jarry
2026-01-08 9:20 ` Bruce Richardson
2026-01-08 10:50 ` [PATCH dpdk v2] " Robin Jarry
2026-01-08 11:06 ` Bruce Richardson
2026-02-17 16:59 ` Thomas Monjalon
2026-01-08 11:07 ` Bruce Richardson
2026-01-12 15:56 ` Matthew Labrecque
2026-01-12 16:10 ` Robin Jarry
2026-01-19 1:21 ` fengchengwen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox