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 87378A0C43; Thu, 7 Oct 2021 10:36:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 505494119A; Thu, 7 Oct 2021 10:36:32 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1748241196 for ; Thu, 7 Oct 2021 10:36:30 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1972qTxR013879; Thu, 7 Oct 2021 01:36:30 -0700 Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2040.outbound.protection.outlook.com [104.47.56.40]) by mx0b-0016f401.pphosted.com with ESMTP id 3bhrg298fh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Oct 2021 01:36:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+AA5oH9Wgw3aB4m5SXElLP13H7ebaKDdo/cmg3mune8/1+qhSmRy9PyxM396OHcRNEiAuqJrAirmR7mkbPoz4ZEZQaBNqrMRUf/4lnKAVFJaSZamNSNDtt4p0fd6kIdUJTlAj5qtf7/F828cKC+0dDSFXZ5q8p563nOSUcBosu0X3TDrsf4HtLy67pH2KsdmdtStKZ22lQ5bFtlS7Rma79fU5hIY0x6J4KDf7lx4ZK53IyMGWu8b9ggUddH7oeBZedjxuweYhcKYOX8Zt5NDGmXLwFN9xIZ86DGIkcFZZQoxB4/mSV0iEtIHbQ8M8k29D9bj7jgIV8c7xsVaaQ6dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WwkvLQw+vH3oz3v4rwqNajJDLeci/ID3NulleVqVfr0=; b=A6m+GGUYWxKD7IFDsj7BYCi6Zu5lV/X7Eqk9ItCnaEvZVpAXuRbTd1cokVLO68iOpxnNtBKmGpo6Vloj5Ig940wEQNARxmfQkxndqR3rqGD98tKpREvmgJBNOkpi80IXhNpApAnmO7ldL/Zun9RaRp0w6BwT0hzGtg0/ZP1JW2mZThDD4y6NhTumP5vPhl/HszX7j158pi65y9fYgnCIynOjhlvtJGU4f7S5CB4jrWU+ZJ6cQfd91kiU8xhB4lR4xvWWPPfQCas6l5u4s9v4aIDci9W2BjL11pblIDG7z3bL3Nx+vWN6bEk2gKs53HGJ4LMZ6n5tbRJrEcKfSL5C1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WwkvLQw+vH3oz3v4rwqNajJDLeci/ID3NulleVqVfr0=; b=GiJ3B7FUDTEgz/aCJq/hE8BPcL4VAVONJFQ1U2RHRmgzFG3dAYmNW0RHXcuVfF2jApdQYv/E/x7xim4BWXmqbf19+1HE2OUN6LZ5/SceNBPMQOqcKYwGQFqq7x7oLr9kjDhKnNvh8BjBqDrgCRqOK2HotouZeTA6Ysu8HxqoFx8= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by CO6PR18MB4385.namprd18.prod.outlook.com (2603:10b6:5:341::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19; Thu, 7 Oct 2021 08:36:28 +0000 Received: from CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::8c05:ddeb:f02:7b5c]) by CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::8c05:ddeb:f02:7b5c%9]) with mapi id 15.20.4566.022; Thu, 7 Oct 2021 08:36:27 +0000 From: Gowrishankar Muthukrishnan To: Thomas Monjalon CC: "dev@dpdk.org" , "bruce.richardson@intel.com" , "ciara.power@intel.com" , Jerin Jacob Kollanukkaran Thread-Topic: [EXT] Re: [dpdk-dev] [v5] telemetry: fix json output buffer size Thread-Index: AQHXtOkWcrm2JmuG7UOFl3/sLpBhT6vGSDaAgAC8ucCAAClLgIAAFICw Date: Thu, 7 Oct 2021 08:36:27 +0000 Message-ID: References: <20210923062619.2285556-1-gmuthukrishn@marvell.com> <2034000.CuE5oqSghi@thomas> <3282535.ZEjqJjJu7l@thomas> In-Reply-To: <3282535.ZEjqJjJu7l@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8199d0ba-aaa6-49df-2d55-08d9896d8e18 x-ms-traffictypediagnostic: CO6PR18MB4385: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Xe3Pogb8FuOyQs5jaLQ+eaEXT9RiGMhOoBbmzzhS8PoSvcUXdbmetQi0+12ONyncapZ4neZH0VZXpOLgl2JyEIp1YLJMJqImSwHuYDYRoCYYmV0+xgc6pHXBkxtrTd8EqJNyGToVN3D2/C7sgM8OHrXZqdk6mF8e8AB97eaWsRGqG5fx7Ptm5CKkouWHXFHRtKmDU6YYkjBCtoBv6vD6RZvVNdUs/9Mu0MszYbo7KidGcxJhopApL0uJJko08WRsuXdxPLSdbL61TuOVI9UDN50Ae8UyA5OS+F6tMGEs9wdFGJh3yhyG6FfLuFtTF+XkqnOhmLuarIRDMFhWKyHSmla5+5LRduF9VtwOAyq06C/FRvmj3SGpgLMGukGIeRgGI+1NaNcoOOyxTC4MPO7IIaKauic0jLIuVqN6ptM2iBjxJ/iaFCPtHnrQwQyeRZVPHQuTUOdB+Qn4hKu13cRuRsf2vnuQEsfp87aQO8Oxdma6kJ0Wr+Z+hRvLaBfCRpTm7nV0Sm7zhl/atLBNNfP32uXHsCqzVboz9HQqXI+XndzCydWDAS8lcPfEqfVZt6c0eHqzzTWW8saBpPYsWBDJB+IdRcpAmBhQwyGAtL1WamZzJAvwp11PrHm1TEqneWYXHRbTBRJYuoSjPOL5+CeeEEogTdiydzVrHpwFOvHSBOwEne93Awgx04zirEt360kCBaqJ+whV5Leutqi5zDSdpw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4714.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66556008)(66946007)(186003)(64756008)(4326008)(33656002)(71200400001)(122000001)(6506007)(53546011)(8936002)(38100700002)(66446008)(76116006)(6916009)(83380400001)(7696005)(2906002)(66476007)(5660300002)(316002)(508600001)(38070700005)(107886003)(86362001)(52536014)(54906003)(9686003)(8676002)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IwGZbr076/fETs+luXFOp02k+4jn+ki3ElLbysUc4135b/2bl4ffVKcPFN3L?= =?us-ascii?Q?FN11ZXeJPYcF7PNj9UL4cqucMa80PmROp0TnyV5U4wpGNzUPHxg+JV6xdznn?= =?us-ascii?Q?CyOYTZMXNjfXy889Gl8OxThGU1KYXUpvrPKkiaT4RO5m/MEnlEDStjF/BunH?= =?us-ascii?Q?UQPyufJXiEBs+rGAcxGFVujs4lO3Vn4finN/RJ99hX7wuN20vYza95F3NOfO?= =?us-ascii?Q?G5zJ2JqNxn2t8BTkYwrfopRmSyY+ZXc+JahXnlzNd24BPs35o8ISYo+v8L4M?= =?us-ascii?Q?XQVqGApFR7miZx3aB2wg8zJzkif6WLNjSwh99bdVFownkTbl5m9VJU9GOG5r?= =?us-ascii?Q?okLy7Oe/rYTis2FdFpcpPsSWPhaJwXNyGJFCx2dj0wswSMgphf8wmGSij2qt?= =?us-ascii?Q?2w0ma2lxvlSqkPw+gCpi0rU3J421y51Aw00Oi06f2+OIAUqnLjjb2AXR3yx5?= =?us-ascii?Q?IkvzeNGtCbSoA/wjwO8XC91tOJVHVc5naWzxtkEDKq2iIIjtVr5vu8l2PEEp?= =?us-ascii?Q?maLs6AqsaKZoyYINOHJkR6ftjIQ9+QH4soZzPksyinK91aCsLHDQOVm+xy4n?= =?us-ascii?Q?yrmnLlCgGTAav70WNv2OJM9XgqIjkY/uxArNlxCP+NakOT4K0xJoJ0kx7fG+?= =?us-ascii?Q?T5HUuHAb7NOKg1islVA3Mleuo20JXOH6I6V/kCupFKIv/HlstyY0BxbLHOAY?= =?us-ascii?Q?14ldKW1Mt06wGZZq+53V1q1d0Z+cWolIvnctr1DQN4GCdOmw4t8HwW8JIkSN?= =?us-ascii?Q?ph42+jwgxuBcox1jMbCK/fwfAbSBpq1VJMAP7vQi/LQWsJGr9EX0c0mxcE8j?= =?us-ascii?Q?CLBaRxwH7F36I8VE0TeUCex+HbD00JY6eH2qfl2uRBJrr8EO6+WoibfQPmFz?= =?us-ascii?Q?s9ax7vyEIpzbIFz/gfVCzwjkIahDlMKWgP883sgY15wvtbsFjuFL2r8VAleU?= =?us-ascii?Q?QzflsBNlu5yqMbVgd8vukbDgMCaysI0z4jTmUZUTUas7QubdkO2jnkKxqEU2?= =?us-ascii?Q?8l7BsSH+dqoPZEoNllxyq13qOrlcm+HRKyv8AnaQQtYtO/dKPii6pN/HJbvn?= =?us-ascii?Q?00F58hQF5ZQpT3kisCf2tPuVpeH0oRfxf26XPvEeO5/vFMSPV1+t3agh2JTn?= =?us-ascii?Q?XUlJASCHUbqxirj4nQXkSjdSWKq2ORj9LOy4Y+RSfGK3Yb9PrqQ+aVgcqau0?= =?us-ascii?Q?qyha0bh2qitUj2It/8ie1CWd61WnL+boDsb20YEHTFmV8YHDx3+yVxdcHJO8?= =?us-ascii?Q?aEm9TBQ1QcIaMzwLYE/Z7BFM1/Bn11fl54KBFIU9lyRsMUjTqpMsyJtV9Mfo?= =?us-ascii?Q?m1KS+rshNXC957RlKm7BmE1jvKqA/+gCduCcnS6uYmtysbfBpUWQsbEX1H9x?= =?us-ascii?Q?X7m8bx2gQl1uoEXcRNN1RzHW7UsE?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4714.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8199d0ba-aaa6-49df-2d55-08d9896d8e18 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2021 08:36:27.5984 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ai07HZy1sqj2QTurepOfLw5ollFWvgSzdRNnAyiJOUDe4c7S6CFttl0FBj2lL/5f5le2wXeGq84qL2ocG/9t2TMm+3HwAN22GScLtGtkjKM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB4385 X-Proofpoint-GUID: tjduSB7-bftXjW0Xyu0UuNziqb4KsL69 X-Proofpoint-ORIG-GUID: tjduSB7-bftXjW0Xyu0UuNziqb4KsL69 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-06_04,2021-10-07_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] Re: [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" > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, October 7, 2021 12:52 PM > To: Gowrishankar Muthukrishnan > Cc: dev@dpdk.org; bruce.richardson@intel.com; ciara.power@intel.com; Jeri= n > Jacob Kollanukkaran > Subject: Re: [EXT] Re: [dpdk-dev] [v5] telemetry: fix json output buffer = size >=20 > 07/10/2021 06:58, Gowrishankar Muthukrishnan: > > From: Thomas Monjalon > > > 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 t= he fixed > buffer length of 1024 bytes as handled by __json_snprintf. > > I think it is genuine bug too which we caught up here. >=20 > So the commit log should say the JSON message was limited to 1024, and no= w > you allow any specified length. >=20 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 buffe= r 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; >=20 >=20