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 EB8F2A0C4D; Thu, 7 Oct 2021 06:58:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7481841170; Thu, 7 Oct 2021 06:58:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8DA9C407FF for ; Thu, 7 Oct 2021 06:58:37 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1971ICto022704; Wed, 6 Oct 2021 21:58:35 -0700 Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2045.outbound.protection.outlook.com [104.47.51.45]) by mx0a-0016f401.pphosted.com with ESMTP id 3bhjf31u3q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Oct 2021 21:58:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hftweNOAfmoy0a5TYcx5zxSEAjIpIs/WiVlwDco12rYhlhpzOsD26wCrStQJy1Jp/zQ5xSQT8ksZEoSihYioiBF+akM6WXBct9JT30QAG/YLc0fPocnDECnbhgJ3Qx0haqHxq3UVLVowgkef6PqMhVb52a99SX7cF/dhjYJBJEPvYAXFm2QSpdFSrC2jP2fcR4bim9X3PIUFGZ12m+CmenKDwvbGxHXTmTEE9pX0QD76ud86WB0ZXBcC4Tvwfm6dJUY8Gsz+qApSSgheCLCojbWrxpvFoHH9sbJUmoOWi4HNNMEZwwbkct9OxoCSmy7fER16Teqdz0OQdJvCzF1adg== 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=ZrWTYsGBhLMHpEVwMs1EdM/aGrxXN59ktRABIw4ZiVU=; b=FdxnQnouk7bgETcV0KKqTso7BVTggxCH3W2xwEwoLlQfKPDe0U9p3FSJN74rUCdKZsSBDChcwaWKlwid5wyG709/XGBv7X+cDQID4Wrt6nkpz1+O++Mp7X1hRpWQrIZNAX3VXW0JU/1MyNJdGTPDoVhKHrl8YJDmQGoeui2YoK2604Ve1So698M0uGnwOQpSZK0B6hcv5xhGJgkCfcboxobsb5VE47VI2c8QlyKvJMEncuOJblowd0QLfiitieZSqFk8P63AqxesfYgzp18y25rnUHnJa5r1TsffpVqO7f3ZnNk332r3RQHAa2FrUNC8eRPKkxyZz0U8LsNBY6m7fQ== 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=ZrWTYsGBhLMHpEVwMs1EdM/aGrxXN59ktRABIw4ZiVU=; b=L//6snrjAX01CJpmSH/XOYREYOGCJBqrVIpHHNNC1ASkHv0nN4hWq/jY6a5h75SaCeyXvc9eOVOe3NnfRVTmSYEXY5AMbc0EYMGrbVYG88K0OECI+mbz4oRCTDnWTIRZM2GahdlWmGmY09ZN39R4bm8Nt79L8nFK3p7MpjbLITI= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by CO1PR18MB4761.namprd18.prod.outlook.com (2603:10b6:303:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Thu, 7 Oct 2021 04:58:31 +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 04:58:31 +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/sLpBhT6vGSDaAgAC8ucA= Date: Thu, 7 Oct 2021 04:58:31 +0000 Message-ID: References: <20210923062619.2285556-1-gmuthukrishn@marvell.com> <2034000.CuE5oqSghi@thomas> In-Reply-To: <2034000.CuE5oqSghi@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: 50f70160-0fad-40a3-abfc-08d9894f1bd7 x-ms-traffictypediagnostic: CO1PR18MB4761: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /2YdajluXCCz5K/2m/StmJvUdq5Zz6Vuo3hpdhbf+RoO6wmejiNE1Qw9gpm+KbWuPo7SYaBtgDrwVMzIkGSjX0TkZNPmj10jwZ32EsmaZmfE2OlILYlc2WYzZLMKyVNQRZCNq9vBOuo3pY9uNZ37GXAaS/Hrzu23B/v8hfgTKBvqQ3Oh2OI3JUal17ss6UA+HkyUbkwCyoxYTcJV8eu05E2uGwh3RPPXmYMAJxG8sbg2F394uzzR1vGjkWh5zsP/Jxk4up24szqmpeLHeOUOatON7adBcbu88nAaSohkr6r45bxcUhQRUFR1L/jz5yNsh4MNyQ1NBkjFCggWW4aTMFvImyK93gUdqB9kjJI1DL//0YErInXf/tl1fjlN1H9EytCt/viPgfCKqinJUO5Uur5xhBK65VcEyeiLHfx78C7szC7yAljuNFh9h5+2MLcJaTxMELm52p3n8esNV/8xEdIlJw9/NWY6CxCObrDYDeXxtLRJWNKSALP0btgWLoY76L2OldhK00Kemgodn4elutbs04hzRBXnq6Fnhfv6Bu1n5LJfnGR74UJpnCASua7HAdlq5yTTqZF97HbvNPGrTk4EgmgM5RCLjUsH3Z8e23z1V07FeVCS9DYK/R2GSoi1+fewmL7Fw0uc50c9NV0ExrUoHOGG2mSwgyhCu2fX+oP5mXZGBjyWGlz0vNzFbiN4e92bE6bX4DZkw7gxtPGSzw== 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)(8676002)(66446008)(53546011)(76116006)(2906002)(8936002)(316002)(54906003)(4326008)(6916009)(186003)(107886003)(64756008)(66946007)(122000001)(71200400001)(52536014)(66476007)(6506007)(5660300002)(38100700002)(7696005)(55016002)(38070700005)(33656002)(86362001)(508600001)(83380400001)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9v7m0eLYWhioe54JTy9esC/FrYbOnnZZHcFvBH2cpd9q3yH+atiy44STeo+S?= =?us-ascii?Q?cuPESQYedk4vzAn+a23exHUvIIl4U9ll3sExF4Fx2QmL/dSI6OSlrW4mDIz2?= =?us-ascii?Q?2CNiKSD4U9H2bQSG0lR5JnYjjRyoUSUFQ2EvaWsxRmbgBZ9bvagm1lj1fe1j?= =?us-ascii?Q?jYNTE3Zqpk1mSgfgKAicocHAYKRZa5mgx9wzOEB/QLE2w0w8qjkUBy4AYFEm?= =?us-ascii?Q?y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zquQ4f9EUJ9oc7rT2oX2IjYR1+4o/r3mujnd?= =?us-ascii?Q?rXFPQOEcifr1Nmeb+c7XfrHiKVlNgDmosEcRmtUCxx9hkdmvZmmbwNFRufor?= =?us-ascii?Q?5wFTEaJp3qv3gsemzHPTRwTFuvnoeycorBrEynN0pgLPMKFz1kda4SHQOM/E?= =?us-ascii?Q?YpS1LJu3VMz7MIO6D0KXCgzeuRuyDQVwc+ZyZr9KV5iBIe3gLDJOuMkC9T3n?= =?us-ascii?Q?Mi1LhZCY57GGktsD4tNqoPMWZKpgJ5c02G46O7NtoWcytUwFAaOTBbNiFNI3?= =?us-ascii?Q?GnGlgJobnmDdGSJwut5/WsLnaUyy?= 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: 50f70160-0fad-40a3-abfc-08d9894f1bd7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2021 04:58:31.0474 (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: rQN9uJ4FSVEQENIEc7LrGs+AKp8zwye3Gp8EO3dK8VoKl49eBBi9qRo0RlGYmcq957JUGcA9J3/hzz5gA2B1NoSRJFbUQSq6agsy9vuoUto= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4761 X-Proofpoint-ORIG-GUID: 1KXfpcsUrnh8tp_4MVp1pvhktcDcBL68 X-Proofpoint-GUID: 1KXfpcsUrnh8tp_4MVp1pvhktcDcBL68 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-06_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" Hi Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, October 6, 2021 11:09 PM > To: Gowrishankar Muthukrishnan > Cc: dev@dpdk.org; bruce.richardson@intel.com; ciara.power@intel.com; Jeri= n > Jacob Kollanukkaran > Subject: [EXT] Re: [dpdk-dev] [v5] telemetry: fix json output buffer size >=20 > External Email >=20 > ---------------------------------------------------------------------- > 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") >=20 > 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 successful= ly deliver the requested info due to its larger amount than the fixed buffer length of 1024 bytes as hand= led by __json_snprintf. I think it is genuine bug too which we caught up here. Thanks, Gowrishankar >=20 > [...] > > - * This function is not for use for values larger than 1k. > > + * This function is not for use for values larger than given buffer le= ngth. > > */ > > __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 >=20