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 708C5428F8 for ; Sun, 9 Apr 2023 17:34:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66BB14114A; Sun, 9 Apr 2023 17:34:31 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2052.outbound.protection.outlook.com [40.107.93.52]) by mails.dpdk.org (Postfix) with ESMTP id 8FF4A40A80 for ; Sun, 9 Apr 2023 17:34:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocgIzzpNIOzxVbQ/2KSd1fMMDe1fsOgJIBUEFyKXoFIocJxp7XEqEYPdHHyDWYe+wa/63bsp6m3O1tJpznCPX7lE3kyXaG7mRDVMdGa4TH2i1i3ZKVhNVIC4wSnLSAeDEP0qI+76nM6flochlgxJ8b0/v2s0m5DJT7e6AOdm9tTbsC3jhSM0pN1x3eMQp/ws+zVN0r5aVpY04JYCNg7Zy+858Tb75BOv5BuzhAd6EzcY4HfKkWJispbSH+ShvyWcqEW82lYpsGZ5dZtXeLHnILTa3JvafzVgkHPIVWrpvWb/4U4OtdCrA3T4cD33McAflkyDKsFpBDnZ3z3d+E62vA== 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=Q0fykvkimGmnV+OdnlMNcXZr12k+hzFsF6/U9OoALDY=; b=RGD2mZfcyISryyRVaRmvRidwCcv0NAmPxkG8hIUJCY2VonbRh9hshEGE6TN426gYYpEBEUvaD637MjDCQojuLqx7NLNYeqcvdbQlvhLG2O8VFfKrEvZ5hSzcfZwxXmtl0IDqRJU+esVNe4wKFSyHeVKJiXtRSx66IQEfyqPNuktHlj6aJuSvBfVH5VD0DL1msa7JaI1w3Su82BsROUPZu2jj7HjggBDNlETZcm577O0f6RnokkaSyz+PIcLxVZclvK0YKyypI4rrUReyWHoFd0OpCKDpAV/YmKyh0vRaxyEIrEqzelteDYb3wjQUInrrvxCh+p3HIlwZUqXMJzlCQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.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=Q0fykvkimGmnV+OdnlMNcXZr12k+hzFsF6/U9OoALDY=; b=BGCslEUyExU5cSmB3XuvAB0OLoLwbtLl9anFGeNC9Us4E+EmfpTEmSw33cz6RlcAt+goWOhd6sAA65Ai8ghbx0HPvmPaciLC4GjyMfrM94/Wkbby7KU/VCbbo7Gg1j59+CC+ujqd2C7yyWNk7KyLWyen8JeZvydlrRf6WwD9OLxIQrAj66POdT0UhpaKvCh4SweNa3nQBUZVaieW8S1P7NQwX7Kh2yMo1gt4yJZG6mTorKdDVpOgJJrZPoMX6tCH8dIVwZodIFf/dcrW//kz6Tj6p7JIQZccVelBsTQtPhhzJCIzJp98whQDeuYgwixTjFJ+p+uugC0R1kmy1QhzTg== Received: from MW4P221CA0003.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::8) by DS7PR12MB5982.namprd12.prod.outlook.com (2603:10b6:8:7d::12) 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:34:27 +0000 Received: from CO1NAM11FT097.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8b:cafe::8e) by MW4P221CA0003.outlook.office365.com (2603:10b6:303:8b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:34:27 +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 CO1NAM11FT097.mail.protection.outlook.com (10.13.175.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.20 via Frontend Transport; Sun, 9 Apr 2023 15:34:27 +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.5; Sun, 9 Apr 2023 08:34:23 -0700 Received: from nvidia.com (10.126.230.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:34:21 -0700 From: Xueming Li To: Ciara Power CC: Brian Dooley , Tejasree Kondoj , Pablo de Lara , "dpdk stable" Subject: patch 'test/crypto: fix capability check for ZUC cipher-auth' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:52 +0800 Message-ID: <20230409152529.5308-105-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.230.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: CO1NAM11FT097:EE_|DS7PR12MB5982:EE_ X-MS-Office365-Filtering-Correlation-Id: 41554035-0ab6-4d0b-dad4-08db390fe79c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c/wicwnovYAqUa8hW14Wv3swpu5s7s+tL3hJQhy3498/BXmnPQaji6wsE+eOiI7d+YVF4Vfgfcx+ohKRKZN/umgcIAge1fqWf2HTAXeRc8qajisCUiCEQGZMkppjNH5yC3gvO2PFQE2l6+ZwYx9mkO5quSsPhYfeqT1wYoDefUj26i8s3B32Ux+kIWriPgN+sD44uRGaK7wBWppoukT32N3dNKfS+kBt3u3axowOqNlCmSG8IdxdIltp4D3n2vRCvAHzVG5hpL63NXr5K3ftsUNYlgP9cmEnySOg+59CipgzjRMAtfShUVnZryMa3VzfnMaXApMOrPg74viDGLNDug86QQHYCgWqI9nOzlr8zCX9TKq4AzTFJwFgYKpCg5A6l+rMnbn8hOOhLdOg5VVsBnVrtnmjOQAfyrcvnlpbVK17GrVLjdXM1JVXlZAUwPJbsieUpix4wsz8QM2yujIGpGhEgM34K/YGAZjy8XoCOmW+aWCmsTb2OI+qqqf0N9UNeFuhxINW9M9JHP4fN0N7FJo4Ir2rQdWSz/K18kN7Nv2iXNLCZ1iHEmO4gAXK9I1bE8V8TdDQhSM7vBhMJXHJt0WtLNymRTtrjZ36Sv5k3rgsKQZyO2II6WIehxVr/AtMJa46yUJIoiTByBRK/U7KeqrjproGF2qm3OY30TMJbbnI/kbe8aSY3tBhi/AmXRczFaIKYc2j9jtWIQMfH70uT0VZCWKKkP8xGRhdGuEYIx5Udf/tLT3LOOe0RCw6SOeu8fX4Jmr8JZ9ynSeEC2gMxvdW2QGiOYs/Joq8styJsU0+z8oZQ8giYZF88b2bjo2Mz2e3NoxTXI60vxXUa6CdJw== 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:(13230028)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199021)(40470700004)(36840700001)(46966006)(478600001)(7696005)(54906003)(316002)(53546011)(1076003)(26005)(16526019)(6286002)(186003)(6666004)(966005)(2906002)(4326008)(70586007)(70206006)(5660300002)(8676002)(6916009)(41300700001)(8936002)(82310400005)(7636003)(356005)(82740400003)(55016003)(86362001)(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:34:27.5228 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41554035-0ab6-4d0b-dad4-08db390fe79c 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: CO1NAM11FT097.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5982 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/58dff4134c497c31e255ee5bf79ba15b3b97ba82 Thanks. Xueming Li --- >From 58dff4134c497c31e255ee5bf79ba15b3b97ba82 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Fri, 3 Mar 2023 09:38:20 +0000 Subject: [PATCH] test/crypto: fix capability check for ZUC cipher-auth Cc: Xueming Li [ upstream commit dd4d13779d63475aa13d2b9f9de06db145e39c78 ] The cipher-auth test function for ZUC was not using the improved cipher and auth capability check functions. This meant the required key and IV lengths were not being checked, leading to problems with ZUC-256 tests running, and failing, on devices that only support ZUC-128. Fixes: 27b787132484 ("test/crypto: check cipher parameters") Fixes: f93fce6de4aa ("test/crypto: check auth parameters") Signed-off-by: Ciara Power Acked-by: Brian Dooley Acked-by: Tejasree Kondoj Acked-by: Pablo de Lara --- app/test/test_cryptodev.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index a216e9ff58..6b09b2ab56 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -136,6 +136,17 @@ security_proto_supported(enum rte_security_session_action_type action, static int dev_configure_and_start(uint64_t ff_disable); +static int +check_cipher_capability(const struct crypto_testsuite_params *ts_params, + const enum rte_crypto_cipher_algorithm cipher_algo, + const uint16_t key_size, const uint16_t iv_size); + +static int +check_auth_capability(const struct crypto_testsuite_params *ts_params, + const enum rte_crypto_auth_algorithm auth_algo, + const uint16_t key_size, const uint16_t iv_size, + const uint16_t tag_size); + static struct rte_mbuf * setup_test_string(struct rte_mempool *mpool, const char *string, size_t len, uint8_t blocksize) @@ -4761,7 +4772,6 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) unsigned int plaintext_len; struct rte_cryptodev_info dev_info; - struct rte_cryptodev_sym_capability_idx cap_idx; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); uint64_t feat_flags = dev_info.feature_flags; @@ -4783,19 +4793,14 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) return TEST_SKIPPED; /* Check if device supports ZUC EEA3 */ - cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3; - - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) + if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3, + tdata->key.len, tdata->cipher_iv.len) < 0) return TEST_SKIPPED; /* Check if device supports ZUC EIA3 */ - cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; - cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3; - - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) + if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3, + tdata->key.len, tdata->auth_iv.len, + tdata->digest.len) < 0) return TEST_SKIPPED; /* Create ZUC session */ -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:41.437880200 +0800 +++ 0104-test-crypto-fix-capability-check-for-ZUC-cipher-auth.patch 2023-04-09 21:45:38.749042200 +0800 @@ -1 +1 @@ -From dd4d13779d63475aa13d2b9f9de06db145e39c78 Mon Sep 17 00:00:00 2001 +From 58dff4134c497c31e255ee5bf79ba15b3b97ba82 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit dd4d13779d63475aa13d2b9f9de06db145e39c78 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 9447777224..26ae382ad4 100644 +index a216e9ff58..6b09b2ab56 100644