Hi Gowrishankar, >-----Original Message----- >From: Gowrishankar Muthukrishnan <gmuthukri...@marvell.com> >Sent: Thursday 23 September 2021 06:53 >To: Power, Ciara <ciara.po...@intel.com>; dev@dpdk.org >Cc: Richardson, Bruce <bruce.richard...@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