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 93A3643B86 for ; Tue, 5 Mar 2024 10:50:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DE0F4026B; Tue, 5 Mar 2024 10:50:22 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) by mails.dpdk.org (Postfix) with ESMTP id 9FBB94014F for ; Tue, 5 Mar 2024 10:50:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NRx5cS816UMNic5rml6n2a/37shGOBsaJFYhN8fZXBbpQJ8QGXB4BlKLh94yxXXplSShlKaGytPvRw63kxzrtC7FlDPPuLvs73/upTVzIVvqH9LjDD6kWe8asocRJWXvhClCdval7LDdCbPzU2cYQb7fIqbUl0F53QTb1jACbl81BW9fkeanoad6lttuGKz3e9KcRmw6Y+GgY2Vx8JRJ5EQOb2Y74Q7yUQJXh2vM3Z/uW+6w9JlFAX6VF0vxhXJ0aSnViC0S3wD3OT3l57qV46ef+7jxQ8mdnLu/wzAFeSXY8KBk7JUin1GWuIuklQg5gTMAFvwndeYZcIUQKvrTXg== 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=BvxpRPkIGgMkxPB8FbVLH4Eg+yZ9/e7pi6h+ec05rZE=; b=a1McGc11i1/kI+fu0SPAwVi/xWQVsER3QF5Ce950fnTM8k69+0ddXgKIq9XaVQNxt9Lns/71FtevuOtctm2H2s4sL6fV2TFft8IneIQgIWAU4Rm8HWFjFFROgQkWVZOnK3ojFZ51knbRYFrOmzYJ0pjmxZWMcRUexfwzVsVjKzUPoQBfFajsvUeCHX30EaWpSWkZUEUMwaYJ5CONJszZmIsB2LuM06h2S5PpHYBS0sjomkZQ+6xAnVuuBAufdEVa3ZzpoxyTrBNnQlKgCfUaPejKlxQg+lGuma8RcZvG/grgfH1D7Q4lJarBJ9vNPjYbIFk86BoZl8KK+AyvueJJwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=threater.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=BvxpRPkIGgMkxPB8FbVLH4Eg+yZ9/e7pi6h+ec05rZE=; b=NzFKXu8jD8htrjlKjtvZ/T/YpDgngNB3YsfxOFMRNFrVT3C33idC3onfoPKB+sjzAeEtZM/9peWNJFNSaZczlVbqkfu+Zp9A5npqtHLXwsrTNTUlgZ7oLRvdGGPXx6Wfkqeo7JAoFkNwpiOxW+hmkdTdI7r/ZScBVIi7nH7WVyiFlvjKYyfLnpyyLDZSOdpYP2xlx7J2elpiY8FIzhKvjroP9bQB0PQ6McHanuO3r/KI7+aV7QNyQUwcB4quoAewAIXz0DB8WB6vaYjnAXCkRvG1Cf0TBh8iRPaODNFo9kfcuYXpOB7HXWHGjIICURBZ5znQDpFNYecwsXg48gnguw== Received: from CY5PR13CA0028.namprd13.prod.outlook.com (2603:10b6:930::25) by DS0PR12MB8293.namprd12.prod.outlook.com (2603:10b6:8:f3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:50:17 +0000 Received: from CY4PEPF0000FCC1.namprd03.prod.outlook.com (2603:10b6:930:0:cafe::9c) by CY5PR13CA0028.outlook.office365.com (2603:10b6:930::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.23 via Frontend Transport; Tue, 5 Mar 2024 09:50:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000FCC1.mail.protection.outlook.com (10.167.242.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:50:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:50:04 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:50:03 -0800 From: Xueming Li To: Jonathan Erb CC: Ciara Power , dpdk stable Subject: patch 'telemetry: fix empty JSON dictionaries' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:02 +0800 Message-ID: <20240305094757.439387-22-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC1:EE_|DS0PR12MB8293:EE_ X-MS-Office365-Filtering-Correlation-Id: 45979d08-8ab2-4c3e-f06c-08dc3cf9a9b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kF2XepfrAdTQYtsCYQ/IwQmIF4LZKFcohVV1KPxwIjEi9GJzwpy7EXqyx512EWhigPejFbyZonPBPmTiCpKwgpTWaVDRif9MwJt45PADetFTcjVVODzBBcxVwZC7kIHXvBFDWiGChKpTqLlOVTx3i24ev4Pt4uCPuLkkcXcqM5yyCaHoOQImDY7V/aaMYBSMfBXUoKKURaYNcpddSzXY0mADJcYlVLjbdifpGRFd2n0RgCrVsOHbzWvnAcMgrVC1eLv4TMfAaqOTzYxhgP8iEzmcm1q8J1Q/DpfjSTVLUK5bribi2WxHtSowChyo7jD5QJQ+je0/I+JVmNAuWTLPTwVOXXIOlAy1ZIH3E51+PSth0qcrAi8D1MxP79sQrEYNJCurOOMJTgWGXTdzUctCvJ2d9z8+HOThrmGOr3TwDk+GlBluN8LYKfQGgGw40XWFduY8EvC1SOs/Ar+ed8lca1nY3yYIdUCkUZDBHJlvigyleQ6TX+eRSNFMvrUaHmCFuAAOcKnUgxB/w8NPAMrwHCL1EOvKLuHhU3FmZJ3PMaiit7uReyMWppzzMxRFdrZn46Uoy1x2Xg+eHU0k8O0nBfDhdtj+yHMegZ5K8Cd7X7XxOdNJx+Rr52zjEd1J3SZwUQ0q6JaqIniwN9w5gwE7sCN5kQ5OjAj8fEgxcvxjrDjJGTfjY+HZdlaRn0xdMHRRuriHiIwyeiOcz9v7gVf17TouXDohTmza7kknxqiJCpF5w2hi71thM+487JmT1Mv8 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:50:17.0354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45979d08-8ab2-4c3e-f06c-08dc3cf9a9b8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8293 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 Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b5c580913f3fd171f6324940b978bca487c36fc4 Thanks. Xueming Li --- >From b5c580913f3fd171f6324940b978bca487c36fc4 Mon Sep 17 00:00:00 2001 From: Jonathan Erb Date: Thu, 18 Jan 2024 12:26:02 -0500 Subject: [PATCH] telemetry: fix empty JSON dictionaries Cc: Xueming Li [ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ] Fix to allow telemetry to handle empty dictionaries correctly. This patch resolves an issue where empty dictionaries are reported by telemetry as '[]' rather than '{}'. Initializing the output buffer based on the container type resolves the issue. Fixes: c933bb5177ca ("telemetry: support array values in data object") Signed-off-by: Jonathan Erb Acked-by: Ciara Power --- .mailmap | 2 +- lib/telemetry/telemetry.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 8d8f5b1b5d..bff68cefd8 100644 --- a/.mailmap +++ b/.mailmap @@ -675,7 +675,7 @@ John Ousterhout John Romein John W. Linville Jonas Pfefferle -Jonathan Erb +Jonathan Erb Jonathan Tsai Jon DeVree Jon Loeliger diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c index ee4718a4b3..88d6410980 100644 --- a/lib/telemetry/telemetry.c +++ b/lib/telemetry/telemetry.c @@ -169,7 +169,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len) d->type != TEL_ARRAY_INT && d->type != TEL_ARRAY_STRING) return snprintf(out_buf, buf_len, "null"); - used = rte_tel_json_empty_array(out_buf, buf_len, 0); + if (d->type == TEL_DICT) + used = rte_tel_json_empty_obj(out_buf, buf_len, 0); + else + used = rte_tel_json_empty_array(out_buf, buf_len, 0); + if (d->type == TEL_ARRAY_UINT) for (i = 0; i < d->data_len; i++) used = rte_tel_json_add_array_uint(out_buf, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:31.721663925 +0800 +++ 0021-telemetry-fix-empty-JSON-dictionaries.patch 2024-03-05 17:39:30.703566491 +0800 @@ -1 +1 @@ -From 324ec1df541711ca829f4d99b7e2d32ffe38d3ca Mon Sep 17 00:00:00 2001 +From b5c580913f3fd171f6324940b978bca487c36fc4 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index a0756974e2..de339562f4 100644 +index 8d8f5b1b5d..bff68cefd8 100644 @@ -26 +28 @@ -@@ -676,7 +676,7 @@ John Ousterhout +@@ -675,7 +675,7 @@ John Ousterhout @@ -36 +38 @@ -index d4720197ba..1663bd8c68 100644 +index ee4718a4b3..88d6410980 100644 @@ -39 +41 @@ -@@ -170,7 +170,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len) +@@ -169,7 +169,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)