From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB04BA0C4D; Wed, 6 Oct 2021 19:38:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54F1341100; Wed, 6 Oct 2021 19:38:55 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 206DC40696 for ; Wed, 6 Oct 2021 19:38:54 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id BB8F53200B25; Wed, 6 Oct 2021 13:38:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 06 Oct 2021 13:38:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 3Pjv2hlXZvfpyBhvi5SHUTwWXZh5mzU1JT5nMIZu4D0=; b=XmmevcN/zkJ4JxTF RJ69eInwBsy29jkrnVZ8VmW+qUf2etu0IFi/IRTFFKqsXU3C33hnQb2CMsNcurR3 kK1RMa55Byjm0qCCS1XUQGk28fnJdxG4UMfjNqrRE32k0duxD31l9HwaA4Dnjuch iNVrNcaIFwJ9wwLc+Ng0UxcaONn3h6dDwMYnuuzK0AZPfQ2FsfrfVqbIZZJh8JkR 48bCPe+QmuSDnwnhgzdI501GTe0BxQAov6p/tTSl1AMj1d1/xk2eHfhjjIJW6r7z 1XzYHpcJkczsQ2xywXrQiUO2TK3Sp0cS+Gjsuj7dGXYpnqmf1mQGPPOZNO/QgJKr pEPhPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3Pjv2hlXZvfpyBhvi5SHUTwWXZh5mzU1JT5nMIZu4 D0=; b=nwNLdgYvRu+qdxUpzTWDeWJGYfQXj4oGmeITRVVQx8iprGdqWvHn4nkqc DZq3kXXoU0KN4fRiNmXHeytjYYIvBaOrb+qTR91FodUUaUv4hcsC909Q+eRFXU6k aRU1/Ss8Dzfna2vj8AijQmSWoagL8IgW3d6OlxkTq8LREnMi/MH8Q4Vz3hm+ODjN QG9nDIo3+5UTIwX5IVlUD6Q0Ob016H6uX6IxR+5Puxcs5+b97AmmINXetQEz8g61 CZ9cAoRXWzaIT6LWFuBP9H6fsN3FW2zmoxkoHDoo3SV5+8Rcqn52pF9NWcCZkUO3 CpcSYJwH0k9r57kX10Jq9LfEQmoiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeliedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Oct 2021 13:38:50 -0400 (EDT) From: Thomas Monjalon To: Gowrishankar Muthukrishnan Cc: dev@dpdk.org, bruce.richardson@intel.com, ciara.power@intel.com, jerinj@marvell.com Date: Wed, 06 Oct 2021 19:38:47 +0200 Message-ID: <2034000.CuE5oqSghi@thomas> In-Reply-To: References: <20210923062619.2285556-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [v5] telemetry: fix json output buffer size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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? [...] > - * 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;