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 AF517A034F for ; Wed, 10 Nov 2021 07:45:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A86124014D; Wed, 10 Nov 2021 07:45:38 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2064.outbound.protection.outlook.com [40.107.244.64]) by mails.dpdk.org (Postfix) with ESMTP id EF6414068B for ; Wed, 10 Nov 2021 07:45:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PjB/J4Fn0/OVnbJX2MSRAgBU+kD8q/rOSTrHVfYRje9GytTmG0MiT+2YqwdeNzoWLjZg1yYEXFZsl5JPXlmHAtl8XMCbpHTTVLLlqrMS1HGcxU+nRoIfNU8V5AdY8jy5HSC2LMAoniU1e9yGkUwFKE7l/PLo2/XOLE+A8Sx8oykKDYEnHp/byHFCXavt9quduFjPKh+920RHaLt8B46HSHG2mJJ332qjPhejii7NIBvaeN81fRVH+JpUB631syW3DYWUYUYYKt6UrWZP8Q7y8jB3vSfEpA6y5icpLYo6AKze5KNJyxQ7n/p7K/WDnnS3C97VD8Yjk4AitIwoLOiX9A== 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=ljt0kB0XStXd0l+inheZrSd0DIH9C3qkJrmN67IevTY=; b=HDtLLjDEjijAVroUD05DBnfdfbZ9Zh65NWKsPOK78DRk/H2QjJmSlDoMw03bMMLhkKgjbgSYRwq3bNFqYr2gQeTvvj5OuRvFyQWy3PXH3LdVGHQHodmrsEIPIlOyza6xpeXISPCwNOId1FQ9Xp5qs1pNYg4oTNmLTLQRf8kNIMZL8wzJjXLjZoB75ybdt1BENeEq/V/K/S51/he4ihFP/0tbojnQpTPSeKTv88H9t9gSyPwszp68zqPqW80kPvEqFcIqfCCiqSPrnqptu/dsnJnPkJFHImDtsogzv2w+KIu6tsJ3Ga7ikXi1BhNlk3DPkvAlJNjVPLerjs4fR0/Zcg== 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=ljt0kB0XStXd0l+inheZrSd0DIH9C3qkJrmN67IevTY=; b=Ez866nIe31oAXvVNEkBVoF1Y9mn6oh/0ZJFzQAUsNcQPkLnUip0K5HZvUvmIhjCXUrm/xcgKTNPJfQLWUN9SXTpAQ5MHK0PpL9XMKRe8z+4WP8B13SKbxKkqhUFnTxrV4uy1m8oZr0y/m3LcLveXNDwiLS30uRk2MUklFzADMmORyFQuc+TuuU4H8sMl3bPZSIez3mFnMoRPZz4pHglZiUMt4zyipEfBD7Oq/Ki2bJv/ixYxMhCyktuSyXbvZadxPUmaO0Q8gTm5Bl/gQU4XiqqFkAwwHNXVJU8/6Qw4XTEzjOrqDnyjL77i/EVL3KUADpKH7l4xd2LIHFQMcqrk7w== Received: from BN9P222CA0012.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::17) by BL0PR12MB4660.namprd12.prod.outlook.com (2603:10b6:207:34::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 10 Nov 2021 06:45:35 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10c:cafe::b1) by BN9P222CA0012.outlook.office365.com (2603:10b6:408:10c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:45:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; 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 BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) 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:45:34 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:45:31 +0000 From: Xueming Li To: Shijith Thotton CC: Luca Boccassi , Abhinandan Gujjar , dpdk stable Date: Wed, 10 Nov 2021 14:30:01 +0800 Message-ID: <20211110063216.2744012-118-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.5] 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: 7edbcda3-8a42-484f-d8dc-08d9a415b2d5 X-MS-TrafficTypeDiagnostic: BL0PR12MB4660: 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: NHHtzXk2YADwBcs6zDiniP0eJDZ8/LyIFkj/0dBDIwyWOViMup7u2PWkIVOGP1alL4nfGWZjskTMHh3VxKenz75F+LfMWkqAuKNZRFM6B6fuUoZrNIZNkYifkmUk8FxvY8RjSNevzJ0h0l0FwYc3XhPiV1YJdVCLBR7gqsVSxJwMDjXftkFV2GyT2rgwOVo2WXXbmKcE3z4BYsDU7LJJfb3fSMO2jKKE7Ig93N82gU2hD4N42xpoUo93ijQ4ST2x7LBmvecYtzVPLsjGuTRHjxzdNSXILFc1+uBT6381/wLbS3qECS0CQzP5cCVM7aD+BQX3Nf6AOo6ZfCzdlblARuYqdcmfkxvHTLZQz8o1uyYpmDZBD/r/+qY0xYR2cFZocL720YRtZ2RAZsKl1O/gD0MwtXLJ6Mo84LFxyzbjcT42lWbSRml/zk53ITKu6ObLqxWRrmFSRbYHxxyMfWLOwxOdIv3FIc8gayUF952HpYTjhvMwTX5OFklnDT9+cpuidkmqPKSu+A7UnBE5EV2dTUaJRtn6y9jcSok7NptMYslTeCk1YCwegajGZY9QJQlwxSBd2eN4p/WLqAj3ne90dNRRCxEUhU2epA3xmPPtF/8G+ukwq5Hj+aVXrZv/lPK73YPxvR36HHIajD5Dw1ULEWR1lIrUABxajNGKnbmrcuMqEwd7WN9IaKjmzOXPEWDxVxlNGkvWkdePpAMBzhzZOjKdiV2C0M6YE1Gk2MoaUu1a/B4UhedWXI+dvVKnimKIKWxXZso62kWkrCAgUFZEkKessAzwcbvmQaE9roxaLOg4FJ78O/1/Asir+PE+4Nlnrkd+808kUkOviIYQUWJuwQ== 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)(2906002)(7696005)(86362001)(7636003)(5660300002)(26005)(53546011)(4326008)(83380400001)(54906003)(36860700001)(4001150100001)(16526019)(186003)(36756003)(508600001)(47076005)(82310400003)(8676002)(6666004)(2616005)(356005)(70206006)(6916009)(8936002)(6286002)(316002)(70586007)(55016002)(966005)(1076003)(36906005)(336012)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:45:34.9494 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7edbcda3-8a42-484f-d8dc-08d9a415b2d5 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: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4660 Subject: [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' 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/cd24395f653ffd99abc1a5fc544e96a50708079e Thanks. Xueming Li --- >From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001 From: Shijith Thotton Date: Mon, 27 Sep 2021 20:59:13 +0530 Subject: [PATCH] test/event_crypto: fix event crypto metadata write Cc: Xueming Li [ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ] Using memcpy to update event crypto metadata fields (request/response) will result in one overwriting the other. To avoid this, fields of each structure should be updated one by one. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Signed-off-by: Shijith Thotton Acked-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 71b58fcbb8..c7517e215c 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less) if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { /* Fill in private user data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(response_info)); - rte_memcpy(&m_data.request_info, &request_info, - sizeof(request_info)); + m_data.request_info.cdev_id = request_info.cdev_id; + m_data.request_info.queue_pair_id = + request_info.queue_pair_id; + m_data.response_info.event = response_info.event; rte_cryptodev_sym_session_set_user_data(sess, &m_data, sizeof(m_data)); } @@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less) uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(response_info)); - rte_memcpy(&m_data.request_info, &request_info, - sizeof(request_info)); + m_data.request_info.cdev_id = request_info.cdev_id; + m_data.request_info.queue_pair_id = request_info.queue_pair_id; + m_data.response_info.event = response_info.event; rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } @@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less) if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { /* Fill in private user data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(m_data)); + m_data.response_info.event = response_info.event; rte_cryptodev_sym_session_set_user_data(sess, &m_data, sizeof(m_data)); } @@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less) uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(m_data)); + m_data.response_info.event = response_info.event; rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:07.181933373 +0800 +++ 0117-test-event_crypto-fix-event-crypto-metadata-write.patch 2021-11-10 14:17:01.880746009 +0800 @@ -1 +1 @@ -From 67c8baecaee2ef312330102544b1f1e892a95502 Mon Sep 17 00:00:00 2001 +From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 3ad20921e2..0c7ebe6981 100644 +index 71b58fcbb8..c7517e215c 100644 @@ -23 +25 @@ -@@ -212,10 +212,10 @@ test_op_forward_mode(uint8_t session_less) +@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less) @@ -38 +40 @@ -@@ -231,10 +231,9 @@ test_op_forward_mode(uint8_t session_less) +@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less) @@ -52 +54 @@ -@@ -405,8 +404,7 @@ test_op_new_mode(uint8_t session_less) +@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less) @@ -62 +64 @@ -@@ -425,8 +423,7 @@ test_op_new_mode(uint8_t session_less) +@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)