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 8BB5CA034F for ; Wed, 10 Nov 2021 07:46:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83948410E0; Wed, 10 Nov 2021 07:46:14 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2051.outbound.protection.outlook.com [40.107.96.51]) by mails.dpdk.org (Postfix) with ESMTP id 8B10B40683 for ; Wed, 10 Nov 2021 07:46:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GeNF8gBBjS7Abk/etpNkqYupkmNvK+wnhTgKYm9tKIwoUbMczRiknV4DI/ENLf61V2YTfutN1rX4PvRDmCT26frUo35RzSHLfhmQqdYLkKkzmefFpH0DAtEl0qYb0SwisT3kYFcLaWL5OS/770hRu2+VoDPU6zQCBuA88ODYkbuo2pZJCI7kxDabPb/givQ5RVBKE3xTsm7ae7he+aZa06Xm0KdZ5K2liaM6QoL5B2PHfB2iwsKg1vWv401i83Ji0RfcwfHwxDtne2OIc74K0aak0kU4Yx2OU1P/KpC9lvoaVBDeuFUJPoInvI798ZMYQme9ynz9dFMeo3teXyXh3Q== 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=FG1DWQkXJo6z18VJ9RUqwy5Voea9SJb2VS2WeP9kw0c=; b=ascNbgFmzGViUKvhHf7aMteENOU6IMHimnnSlbJJYmjao1TtZGvb6ciirvB3YzWh7L0cP+tijFcRXxa4Ah/LsECZrRradL7nEcTBiVxViTyB1QQtgvJNB1vUmEN2rgwzPmQTF38kYBs6JagsX/s315bxVuz0JWbvbm4cFpDb8GzOWtMBxb/nxdb6XV9cNXtSzEwMO9zwXKAsRDDCNOo5wz8uYxhrReDfXdW94+uGQARcKTH7vYpAQ50eLmTr+wZbieuXexx7PKhoWev3nxr89jNQYNalYQww0ozkIwR0tw/kG9sGeF7CnS8ylWO1z0+mshDxuY3/wAr+YKogq0xd2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FG1DWQkXJo6z18VJ9RUqwy5Voea9SJb2VS2WeP9kw0c=; b=rtrO9VJlBXn6M6/LVFsMVEh23ffKPdRrX6J0pbnDmYGnRNLtkKYmR9ylHvnWHtgSq9CtdjbaLlX5XRtASTJXLyZiIhAY1X/bQVTLpnbnEDVcfRZdXaBLWNZkW/TpfMOKAYeilP2dKLgbzwY4muJ0D2bNsM8pD6wRinVCP3dLI9DUnMfARr2VWNHziv/tcOii3ucKSTpCVJrYAchWCLk9TYQA9UzxP7AHoMps4BXNw680l7I2jId14CGSQ/tfj90p4hgQ+KeuC6dF3dTuNbTXCZqvYNRQJFH4SG499PYKY7GsmakbYFv3dOwQfQr0SKh/jtbKFobozpO1llrV90z+fw== Received: from BN9PR03CA0271.namprd03.prod.outlook.com (2603:10b6:408:f5::6) by BY5PR12MB3683.namprd12.prod.outlook.com (2603:10b6:a03:1a5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Wed, 10 Nov 2021 06:46:10 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::56) by BN9PR03CA0271.outlook.office365.com (2603:10b6:408:f5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:46:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:46:10 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:46:05 +0000 From: Xueming Li To: Gowrishankar Muthukrishnan CC: Luca Boccassi , Ciara Power , dpdk stable Date: Wed, 10 Nov 2021 14:30:07 +0800 Message-ID: <20211110063216.2744012-124-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 357d4973-403f-4780-5848-08d9a415c7e2 X-MS-TrafficTypeDiagnostic: BY5PR12MB3683: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PV3Rgn7eZW5MGYZbsfB4T2eOeIUdPXlrjr7gGWMo9Vn4OyP4M0NWtA0Pe228aSrcfC3mRFLPsBJWMUvtA1PFyoybozAY9or800Oz+b6e3gomiujgNkNIlyR9e/uZo30sgD470AeuHWyUczgotOb+JBA/6E/C1h4AAD0zjhBDw2IYSNeFojMLNtJQXftHTfG7PMM6zRo7ycHxqJNS6KfXcsnVcEtHi13dLcDggY0YRyE98/tpbF8r1ymuWY1KDA+/dacZA5gNxa8ReGXs7WAr658TDIwf6Jwe3ZFG7jDO+NTLO33GFGOpKbvsni+X0p5j7HG36Yg5EsIHBP9l/uQTadawoMNdlMd9632EoM5j81NzW9qnmcHAzuGUxP+1cxt1jaiqvbYLR6IP6Kr8/zk59dKCOreqCsE3ovhpuNPOMRVHAmMm4DKPQ1iAKBcYo417aP1QiZnEEio50oxqCranh9f8vMTkdfXJR6J4VwVGymaok0ps8vhY0ktX5D9OOUvGjRcxyVXmdjoAAsf0jSaV4+cAAB66IIPC7FhcVO+Izn+TnH8I7LnVx3sQx285DXHQ0CdPzJxEPj8ZMDQ7PyRMqV4BngNRbeFXXN6Unx9gzS2sYACDR6mOA0JhqfhDsA0yF9dOoh3zqDwiBvNwJgNC2N/0h5amT4INyRdUJRVSeHjAaIE33SK7Bo8Ofe6vg1TuCjedip9llFtzUOQJT59A9RU6iiRBPCjjDSJsPz59cLCH51lzDw9TlslRrQWLPamolJlW2iMHFGgOpq9DDrfRjR7J8u0JBNhJ98z07ECwpZMAV1u9+FYd8+Jube+4Hn38iLHYhJQQ/wqgtMvnO573ixcGzTMKJCO74MY1ewWiCno= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(26005)(16526019)(54906003)(186003)(7696005)(4001150100001)(53546011)(4326008)(8676002)(5660300002)(336012)(426003)(2906002)(47076005)(316002)(2616005)(8936002)(36906005)(83380400001)(966005)(86362001)(508600001)(36756003)(43170500006)(70586007)(36860700001)(70206006)(356005)(82310400003)(1076003)(6916009)(6286002)(55016002)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:46:10.2704 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 357d4973-403f-4780-5848-08d9a415c7e2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3683 Subject: [dpdk-stable] patch 'telemetry: fix JSON output buffer length' has been queued to stable release 20.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/aa4a2ef3fee892f204a04bef2329e65775510f38 Thanks. Xueming Li --- >From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001 From: Gowrishankar Muthukrishnan Date: Mon, 11 Oct 2021 16:24:43 +0530 Subject: [PATCH] telemetry: fix JSON output buffer length Cc: Xueming Li [ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ] Earlier, JSON message length was limited to 1024 which would not allow data more than this size. Removed this limitation by creating output buffer based on requested data length. Fixes: 52af6ccb2b39 ("telemetry: add utility functions for creating JSON") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Ciara Power --- lib/librte_telemetry/telemetry_json.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h index ad270b9b30..f02a12f5b0 100644 --- a/lib/librte_telemetry/telemetry_json.h +++ b/lib/librte_telemetry/telemetry_json.h @@ -9,6 +9,7 @@ #include #include #include +#include /** * @file @@ -23,13 +24,13 @@ * @internal * Copies a value into a buffer if the buffer has enough available space. * Nothing written to buffer if an overflow ocurs. - * 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; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:07.437541909 +0800 +++ 0123-telemetry-fix-JSON-output-buffer-length.patch 2021-11-10 14:17:01.884079315 +0800 @@ -1 +1 @@ -From b76731683b048337d853cca4fa1530218b82aa40 Mon Sep 17 00:00:00 2001 +From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -16 +18 @@ - lib/telemetry/telemetry_json.h | 5 +++-- + lib/librte_telemetry/telemetry_json.h | 5 +++-- @@ -19 +21 @@ -diff --git a/lib/telemetry/telemetry_json.h b/lib/telemetry/telemetry_json.h +diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h @@ -21,2 +23,2 @@ ---- a/lib/telemetry/telemetry_json.h -+++ b/lib/telemetry/telemetry_json.h +--- a/lib/librte_telemetry/telemetry_json.h ++++ b/lib/librte_telemetry/telemetry_json.h