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 4E40E428F8 for ; Sun, 9 Apr 2023 17:27:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4895B410EF; Sun, 9 Apr 2023 17:27:41 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 90DDE40141 for ; Sun, 9 Apr 2023 17:27:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bjhroTQBiOVDsGJGKGP3SI5gF4bEVw6LJaspPrxLmoXnJKGr7bBwj9vN8BQvGpNCsDkPT2K9Z3I/Rv4dkTZqudKW7uyg/0lINq3/U3Jxc0osKNydRh9WOTUwnaoaVA+0gjc/ddKU20D1nwNkPXUz+nZSuiUaxe0Bu6i0CAIzTKSt31gAMXs6GSepMDZj0D2zWnuTw22ZDZBDzZdSaLEYf9phBgwOpbSz1h1aZ6Zo5T+Qe+nx8/ROiiOQooJ8aAWwyzGJtDqdojmUFZSDPW617nI9VA+0Bl+ApE0rReIVHw9KZCG93LLJaKp1Te7k1Wz5dHlFzFepuJLk+n4Z7uLaXQ== 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=wgUvdoKOk5uPiJ7ox4tSma79h3j+XhHr1/5ja+wdyAk=; b=QLM5bmXCelHM08L+wJw5nQndhnnKphQfHztldHRkO2nMQwm7FBgOndXBlNouXj+3bUPc7pEXljc4YcSnSWIs668ep1HA8iZJJcPLSU9LhH/b5lRZa//9qOvoMuGkVZvK48Ofr4vyNYmkfF1f6XgUp7zY1DlRRUaZ7GXdN+0jhaZ9cvyqcZpl7cBn66l2+ZuepcX/J8lr6j4UUZZGk+OsT1HYnvil6YBodJdsos795wOe6D+qWSMR9TezQJb9VOw7pjVZvp6KsYgOlccj97CF+MDdjY0X5MvkdrWXrkwpOlSayyBs07sCcI4649vJ7bwQdImrQnr1scONRiJ9NAu5FA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.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 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=wgUvdoKOk5uPiJ7ox4tSma79h3j+XhHr1/5ja+wdyAk=; b=OSlWwVdl000w9uO9n/wQaQZT4ya+thaQN8qooQRuW0lpblrojyRCQUebmx+SQl35nOyJoXLlLIrT+phscclGpERQlytn7hskfVhoig8yuYaG2tOk+FoYnvZZLXMaat8uDfM0qDP4j1qIjgiIK7xrmLiaKsfw8bUNX//RSgqxybp4G0zd9VHtUxM6PKe0aDBsWL0Plgg7slGF6R23neQGUS38uzG9VovQdWpojiSx+8D8yQYb1u1HiNvC+nYzjAQUdGRXY4vbKcMxmIFhyJxb1wiBel84GYZLwyGIvWLvqr4e/zlK2H6NBHc8tRe+IrteSJNTSgyIKSKwTQNmKrnKpw== Received: from DM6PR13CA0023.namprd13.prod.outlook.com (2603:10b6:5:bc::36) by SJ2PR12MB8062.namprd12.prod.outlook.com (2603:10b6:a03:4cb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Sun, 9 Apr 2023 15:27:38 +0000 Received: from DM6NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:5:bc:cafe::5d) by DM6PR13CA0023.outlook.office365.com (2603:10b6:5:bc::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.26 via Frontend Transport; Sun, 9 Apr 2023 15:27:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT059.mail.protection.outlook.com (10.13.172.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.26 via Frontend Transport; Sun, 9 Apr 2023 15:27:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:27:34 -0700 Received: from nvidia.com (10.126.231.37) 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.986.37; Sun, 9 Apr 2023 08:27:32 -0700 From: Xueming Li To: Gowrishankar Muthukrishnan CC: Brian Dooley , dpdk stable Subject: patch 'examples/fips_validation: fix integer parsing' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:23:32 +0800 Message-ID: <20230409152529.5308-25-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT059:EE_|SJ2PR12MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: 072a2843-0b0a-4822-9c30-08db390ef367 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OsW4b+iLCQYP93A1hlKuBkISF2PgsGX0ezFncYCBREWbrGOjnv2m+hWUdikzJM/3glPinDvVrCfD4Cd0lRwEZuMuvYwxiOyjptWPh8f5xv1xPH7VsMsYVIVO+l/Xnnvsnyvzj5q5bW1T4Bt9wTfkoXJO1HZIXj7Wy568ti9K85qh6WjejHfsdAENonbqp4HbF9Uv+E7NcIGe/wUVYHgRc7p17ZJf6GK7BjJKzZFnz3CNzqym143iitE3H5S4QtlcTUhgEaXo4+345CiVmnCpObEsdeZGXsewUVpPxXWeYaoPh6zPEQhFo3VNZ6v2bBoxywZIBwASKd2l/B9eKA1+amKcWBxd/nlFY9bLMriHVR8U3Kntoevht9CTHTjGr/cOC/4KTFopxrI3s7iZsCLANfdBudAyR+wK3l4NZmXYw5Iffu6kglYAckzWvJWxqwDpfG7ock7ERBknGopCELR0rHZDGw/CBUwzw27C4H8jHd68GHNqzJMw7RFd7vCR2XjHY24X6P74dK+z3j0BcI6NMS0L2tp4fHdQDmoXXeEegQHbVEcVgR1UAchBIv2jHxwJ4/WxEiTUhFmFBIbCGhMAnY8M2QRoUUOrymPiWCkhuqqqMhr+RIgcXB/qbH1iUMAGWJmQZUFQBuQg/y7/IjYNk19pDmdSjL7bx2EYWxGD2I9No2nrNq8XKUX6mFIvzmikJdEbUkJobhQksex43T8uSGtod4xlWqOIQeES+Loa1kndA2FfwpYXC9lO3xVlIne8alfRte70t9vtszbv8/C8AaqooygDFP51T1Tgh77JflwJWruhNq2VHRefvx+SLn132NdlAzLEVLOqGnYNzgaA4w== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199021)(46966006)(36840700001)(40470700004)(478600001)(7696005)(54906003)(316002)(53546011)(1076003)(26005)(16526019)(6286002)(186003)(966005)(2906002)(4326008)(70586007)(70206006)(8676002)(6916009)(41300700001)(8936002)(5660300002)(82310400005)(7636003)(356005)(82740400003)(86362001)(55016003)(40480700001)(36756003)(40460700003)(47076005)(83380400001)(2616005)(426003)(336012)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:27:37.7630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 072a2843-0b0a-4822-9c30-08db390ef367 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8062 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 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/809de506c9e510845882ec81d2aa4db28615ea4c Thanks. Xueming Li --- >From 809de506c9e510845882ec81d2aa4db28615ea4c Mon Sep 17 00:00:00 2001 From: Gowrishankar Muthukrishnan Date: Tue, 28 Feb 2023 22:58:49 +0530 Subject: [PATCH] examples/fips_validation: fix integer parsing Cc: Xueming Li [ upstream commit 6bbb90cc061b5c6a1931143cdf69390a0ef50ef0 ] Parsing integer value in test case vector does not store it because only string was expected. This patch adds handling for integer value as well. Fixes: 58cc98801eb ("examples/fips_validation: add JSON parsing") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Brian Dooley --- examples/fips_validation/fips_validation.c | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index f7a6d821ea..d3b6099d73 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -543,15 +543,28 @@ fips_test_parse_one_json_case(void) for (i = 0; info.callbacks[i].key != NULL; i++) { param = json_object_get(json_info.json_test_case, info.callbacks[i].key); - if (param) { - strcpy(info.one_line_text, json_string_value(param)); - ret = info.callbacks[i].cb( - info.callbacks[i].key, info.one_line_text, - info.callbacks[i].val - ); - if (ret < 0) - return ret; + if (!param) + continue; + + switch (json_typeof(param)) { + case JSON_STRING: + snprintf(info.one_line_text, MAX_LINE_CHAR, "%s", + json_string_value(param)); + break; + + case JSON_INTEGER: + snprintf(info.one_line_text, MAX_LINE_CHAR, "%"JSON_INTEGER_FORMAT, + json_integer_value(param)); + break; + + default: + return -EINVAL; } + + ret = info.callbacks[i].cb(info.callbacks[i].key, info.one_line_text, + info.callbacks[i].val); + if (ret < 0) + return ret; } return 0; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:39.437978700 +0800 +++ 0024-examples-fips_validation-fix-integer-parsing.patch 2023-04-09 21:45:38.609042200 +0800 @@ -1 +1 @@ -From 6bbb90cc061b5c6a1931143cdf69390a0ef50ef0 Mon Sep 17 00:00:00 2001 +From 809de506c9e510845882ec81d2aa4db28615ea4c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6bbb90cc061b5c6a1931143cdf69390a0ef50ef0 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org