[dpdk-dev] [v2] telemetry: fix json output buffer size

Power, Ciara ciara.power at intel.com
Thu Sep 30 10:47:46 CEST 2021


Hi Gowrishankar,

>-----Original Message-----
>From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
>Sent: Thursday 23 September 2021 06:53
>To: Power, Ciara <ciara.power at intel.com>; dev at dpdk.org
>Cc: Richardson, Bruce <bruce.richardson at intel.com>
>Subject: RE: [v2] telemetry: fix json output buffer size
>
>Hi Ciara,
>> I am not sure about why we would want this to allow for
>> "RTE_TEL_MAX_SINGLE_STRING_LEN - 6".
>> The RTE_TEL_MAX_SINGLE_STRING_LEN is used to represent the max size
>of a
>> singular string value e.g. the response to client being   {"<cmd>" : "<string
>value
>> here up to max size in length>" }
>>
>> I wonder could we use the "len" parameter in some way here, that would
>> be the available space to be filled of the "buf" being passed in,
>> allowing the function to copy in the maximum amount to fill the buffer.
>
>Got it. Yeah, "len" is actual available space. I ll send next version based on this.
>
>Also, I propose if we can have platform defined upper limits (esp
>MAX_CMD_LEN, MAX_SINGLE_STRING_LEN etc) so that, we need not revisit
>lib/telemetry for platform needs (and I don't think one size fits all platform,
>may be excess too).
>Thoughts ?

I am not sure why it is needed to have limits defined per platform - can you explain further about why it is necessary?

Thanks,
Ciara

>
>Thanks,
>Gowrishankar
>
>>
>> Thanks,
>> Ciara


More information about the dev mailing list