From: Jonathan Erb <jonathan.erb@threater.com>
To: David Marchand <david.marchand@redhat.com>
Cc: ciara.power@intel.com, dev@dpdk.org, bruce.richardson@intel.com
Subject: Re: [PATCH] telemetry: correct json empty dictionaries
Date: Fri, 2 Feb 2024 09:04:08 -0500 [thread overview]
Message-ID: <550a8ada-6006-43f6-982f-a9353ad844ec@threater.com> (raw)
In-Reply-To: <CAJFAV8zMdV61_QewDGv3oZK2um9ST-3y8Y_vUULsaxyUHA0Tjg@mail.gmail.com>
David,
It was just a minor oversight in following commit:
commit c933bb5177cac5fbf4533e357d466cff1f3e6c97
Author: Ciara Power <ciara.power@intel.com>
Date: Wed Sep 23 12:12:26 2020 +0100
telemetry: support array values in data object
Arrays of type uint64_t/int/string can now be included within an array
or dict. One level of embedded containers is supported. This is
necessary to allow for instances such as the ethdev queue stats to be
reported as a list of uint64_t values, rather than having multiple dict
entries with one uint64_t value for each queue stat.
The memory management APIs provided by telemetry simplify the memory
allocation/free aspect of the embedded container. The
rte_tel_data_alloc
function is called in the library/app callback to return a pointer to a
container that has been allocated memory. When adding this container
to an array/dict, a parameter is passed to indicate if the memory
should be freed by telemetry after use. This will allow reuse of the
allocated memory if the library/app wishes to do so.
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On 2/1/24 06:57, David Marchand wrote:
> On Fri, Jan 19, 2024 at 8:48 AM Jonathan Erb <jonathan.erb@threater.com> wrote:
>> Fix to allow telemetry to handle empty dictionaries correctly.
>>
>> This patch resolves an issue where empty dictionaries are reported
>> by telemetry as '[]' rather than '{}'. Initializing the output
>> buffer based on the container type resolves the issue.
>>
>> Signed-off-by: Jonathan Erb <jonathan.erb@threater.com>
> Thanks for the fix.
> Could you point at the change that introduced this issue?
>
> I will add the Fixes: tag when applying.
>
>
--
next prev parent reply other threads:[~2024-02-05 13:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-24 22:02 [PATCH v2 1/2] " Jonathan Erb
2023-12-24 22:02 ` [PATCH v2 2/2] " Jonathan Erb
2024-01-08 11:02 ` Bruce Richardson
2024-01-08 11:01 ` [PATCH v2 1/2] " Bruce Richardson
2024-01-10 17:49 ` Power, Ciara
2024-01-18 17:26 ` [PATCH] " Jonathan Erb
2024-01-19 9:56 ` Power, Ciara
2024-02-01 11:57 ` David Marchand
2024-02-02 14:04 ` Jonathan Erb [this message]
2024-02-12 10:15 ` David Marchand
-- strict thread matches above, loose matches on Subject: below --
2023-12-18 21:47 Jonathan Erb
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=550a8ada-6006-43f6-982f-a9353ad844ec@threater.com \
--to=jonathan.erb@threater.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.power@intel.com \
--cc=david.marchand@redhat.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).