From: Robin Jarry <rjarry@redhat.com>
To: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Ciara Power <ciara.power@intel.com>
Subject: [PATCH dpdk] telemetry: fix adding dicts in container arrays
Date: Wed, 7 Jan 2026 22:51:30 +0100 [thread overview]
Message-ID: <20260107215129.1329960-2-rjarry@redhat.com> (raw)
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
next reply other threads:[~2026-01-07 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 21:51 Robin Jarry [this message]
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-01-08 11:07 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260107215129.1329960-2-rjarry@redhat.com \
--to=rjarry@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).