> -----Original Message----- > From: Thomas Monjalon <tho...@monjalon.net> > Sent: Thursday, October 7, 2021 12:52 PM > To: Gowrishankar Muthukrishnan <gmuthukri...@marvell.com> > Cc: dev@dpdk.org; bruce.richard...@intel.com; ciara.po...@intel.com; Jerin > Jacob Kollanukkaran <jer...@marvell.com> > Subject: Re: [EXT] Re: [dpdk-dev] [v5] telemetry: fix json output buffer size > > 07/10/2021 06:58, Gowrishankar Muthukrishnan: > > From: Thomas Monjalon <tho...@monjalon.net> > > > 29/09/2021 06:18, Gowrishankar Muthukrishnan: > > > > Fix json output buffer size for an actual data length. > > > > > > > > Fixes: 52af6ccb2b39 ("telemetry: add utility functions for > > > > creating > > > > JSON") > > > > > > Please could you give a bit more explanations? > > > What was not working and why? > > > > Without this patch, our driver end point (crypto/cnxk) could not > > successfully deliver the requested info due to its larger amount than the > > fixed > buffer length of 1024 bytes as handled by __json_snprintf. > > I think it is genuine bug too which we caught up here. > > So the commit log should say the JSON message was limited to 1024, and now > you allow any specified length. >
Ack. I'll send new version with this correction. Thanks, Gowrishankar > > > [...] > > > > - * This function is not for use for values larger than 1k. > > > > + * This function is not for use for values larger than given buffer > > > > length. > > > > */ > > > > __rte_format_printf(3, 4) > > > > static inline int > > > > __json_snprintf(char *buf, const int len, const char *format, ...) { > > > > - char tmp[1024]; > > > > + char tmp[len]; > > > > va_list ap; > > > > int ret; > >