Thread (121 messages) 121 messages, 10 authors, 2021-11-04

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

From: Power, Ciara <hidden>
Date: 2021-09-30 08:47:54

Hi Gowrishankar,
-----Original Message-----
From: Gowrishankar Muthukrishnan <redacted>
Sent: Thursday 23 September 2021 06:53
To: Power, Ciara <redacted>; dev@dpdk.org
Cc: Richardson, Bruce <redacted>
Subject: RE: [v2] telemetry: fix json output buffer size

Hi Ciara,
quoted
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
quoted
singular string value e.g. the response to client being   {"<cmd>" : "<string
value
quoted
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
quoted
Thanks,
Ciara
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help