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 0CDA246A63 for ; Thu, 26 Jun 2025 14:03:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05E324026F; Thu, 26 Jun 2025 14:03:42 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2068.outbound.protection.outlook.com [40.107.243.68]) by mails.dpdk.org (Postfix) with ESMTP id 3AC85400D6 for ; Thu, 26 Jun 2025 14:03:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y2tG+Um7dVCj52CAgMz2JKBP0GJfuQZOiNa/VT5YZdQfCg83fzor0lWJ18vOQZ7FSCAPNtnjzbytG8pzymBto9MGPEhnzkivE+D0fr5zDLVOwwOyp3iakXoReuhg7Ltt49X9DKrswaN/RWO2WGh0/euKtuWTCrM4VnTPsj5q6ocgWQUptP/Mpb9ckK/TuAJ3Xy8uuwrzkF+5wBkml2ZAUqqlZTiXVHzv+b3fMG7lDbzYHYFIH0L0lO8+jPeLwig+neEXNEP0wgypyNYkDqNWH9EsI34Di4eq4DyKGmzSY2JGQd1leJ/EG3M/XAFQYSpBo3y1P42Dmsd1ORd9g+QP5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nRigOjMayWyZ0uooE7Tb+BeFHhRJBSZULAi4+3/UCt4=; b=BEA4kafqqmpNIMmdircWp9jZ/AzjlTxpDBbVIJO37J/IMtuOTk7ATbnqToqvZO2p/760vWxcfTULavMZe3UqwwLYQBBDjPFoO4wLgNfwP0MugS0M5Uy4ACsM/AXQ39nBhSww4QQx2dH52Ast9ODl8FvS4ikkFBCfLeqE8tAk3bFY5xt6svjp85rOL+xpJiigCFAA+hYK8D3f1IMKitab6Hq2Bu8c32KkTZAAp7HNdvlbMA1I1oR8akq7GbHd8/s0gm1Mcw7fcifcE9KbZ4cOdExiRuXRY3EtLS0wMg0wpbpgg/dE7oWJy+Hq74OcNxYwQqHllWG4KpVb7YSzvZZlig== 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 (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=nRigOjMayWyZ0uooE7Tb+BeFHhRJBSZULAi4+3/UCt4=; b=LPGsfjwOlcp4O47Me9mBjnSSAL29BXhQr+opXkTlPvtL+3nWRCGWB76QWWIxBeEPOwzenRKj1fui0wAmBdZDGOn6XmmQTFsjsqOzUgmx6HHlX7ceJlWiHcc0m/67X1t4lP9qTlNj5YTLHL/OjO7gCTCbUpTeBn1SqgQ/iylWt2NM2g2SPSrCkr5aIsxbUdKH9R5c5hqI9OuG8Y3g5AV63fnzOvZ74dnNw3gbc/8q4hWPnHINleTgc7fI6uQ766ahRVp4elzicIVZqFlh2bHz8g0X/PNQDG9D9sXzZpHDgJW4FUsq10Gmtnx04YQa5ax8siEGoHRxIbhdycmpEWLy3Q== Received: from BY3PR10CA0008.namprd10.prod.outlook.com (2603:10b6:a03:255::13) by PH7PR12MB7329.namprd12.prod.outlook.com (2603:10b6:510:20c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8857.28; Thu, 26 Jun 2025 12:03:37 +0000 Received: from CY4PEPF0000EE3A.namprd03.prod.outlook.com (2603:10b6:a03:255:cafe::64) by BY3PR10CA0008.outlook.office365.com (2603:10b6:a03:255::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8880.17 via Frontend Transport; Thu, 26 Jun 2025 12:03: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 CY4PEPF0000EE3A.mail.protection.outlook.com (10.167.242.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.14 via Frontend Transport; Thu, 26 Jun 2025 12:03: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.1544.4; Thu, 26 Jun 2025 05:03:22 -0700 Received: from nvidia.com (10.126.230.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.1544.14; Thu, 26 Jun 2025 05:03:20 -0700 From: Xueming Li To: Rajesh Mudimadugula CC: Xueming Li , Akhil Goyal , "dpdk stable" Subject: patch 'crypto/virtio: fix cipher data source length' has been queued to stable release 23.11.5 Date: Thu, 26 Jun 2025 20:00:37 +0800 Message-ID: <20250626120145.27369-18-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250626120145.27369-1-xuemingl@nvidia.com> References: <20250626120145.27369-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3A:EE_|PH7PR12MB7329:EE_ X-MS-Office365-Filtering-Correlation-Id: a0c968bf-02ef-4c37-aa35-08ddb4a97b91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?QdDbrQxigdhwkk9kQOnh1wSWa4sgFUrCo7vBfpYlJU1QSZ5m19Lk0M/EFJ/R?= =?us-ascii?Q?MlSZQshSyKE7g/nDUodsPRpIUSJl8PeFLAT0Rnx8qyabdmOXvIlQnyzSTAVf?= =?us-ascii?Q?ekpkupyLeBUFFBz6cYSNughOokWcMazXXPFH6/oPl8rTcwzGI3kU1fkg6Rr5?= =?us-ascii?Q?BvBTtH+HAYS5pflNVryh8TnyKB1G/qrvEnt9GMvEAwE7zoVUhOP+nA246UKo?= =?us-ascii?Q?C+TZ5j548rPYQWyqb6A3Y/WkxlfMRUuNbv+cInFZ/jta+skkUQvHWX6+DPU8?= =?us-ascii?Q?8FRMDpzF7s2NJ0U/Rs4zhzn/sSdIp8bSQkYXAo/TJcYagKtpiBdMrwRET/pe?= =?us-ascii?Q?uHq8WyeK+Kmy77gGDoJe0m9JdnM2LUjiW1hPk+B0LC+VfvwGXraTbbXFOq1I?= =?us-ascii?Q?uK078jWL/0HQXAp3orn578IAwLHWx37T+QOKRFTfWnpww/vqkFAFNTSmHovj?= =?us-ascii?Q?u6gYosqhohFW2pBFNWsmnkoNS/mpT/1BftgdBRmlubNrChQlt2QCmAB9SEBk?= =?us-ascii?Q?gSoADQyqV03IcuxqyLbh2/czpqXT1de+sTFZHCn8H/Pr8Rr4AypOUy90plxx?= =?us-ascii?Q?VevvXwzNFHAm/02DjK9D6B15zSrq0eFsezEGHXFMxg2ZR2vk/0v5SE0DwKJt?= =?us-ascii?Q?5UkGIGs4mArLvODQnnbwBv/dbHZFShLbMsr2AanCbzp/Ll22zKKaZDvgY+lx?= =?us-ascii?Q?gAYVuMrZVcKxnEfwUV9SwuIYWeOsCb/7gA9/PqXxm7yZEqkfxcsBK4QaEtFB?= =?us-ascii?Q?0TNT29joanEWAnh/PJa/VspX3JmNFjaIcQ4kIzFF34B3ZZj2yEk3anUM4f0T?= =?us-ascii?Q?Hp/bO/wvy/2ZmoVGz5Zy3XPJ66QPkUCqiNWD3sSsB6LrJ/gqC6QkA6KYDeoJ?= =?us-ascii?Q?9rull5F1xM2DxUcDsRr/yVAtyvsZYTdV35zkCGBlNjglT97bXJwneO39VTVg?= =?us-ascii?Q?llYymNx8/+7z+7fShhXVfhm8z5TizLt6RV3hXa780GkgLR148u3/uI9jGJVn?= =?us-ascii?Q?eLWtSCqYATmJVEeytLLI/0M6WvNYDVwLuekOXmgpA+y88z17pwHib8xxlqk2?= =?us-ascii?Q?wSAL981IYivEuUgUwTwTVqKHpshAFJJotSkuufU8VF5w3loLpWjnfBTPAMwq?= =?us-ascii?Q?/N/L5R5VWxA4h8gN+R1JaRgXyVs/uQqmx295lFCXhp7EsWwMAb6Qi4sZSZ8S?= =?us-ascii?Q?rBzTThE6QV93+jc/nELU8Pt2M7gJHLkTzGtywKPZcJgjONsJx89hUvPBMkbg?= =?us-ascii?Q?vUngtTwaQSN26Da2zzhPmBAg4ggcgpIJi4lziYEXw6r4QDlw7tq04qg6JIiB?= =?us-ascii?Q?zyPz8v8r2eJycE4KkCGHP8ERjT61POzjq7qsjTkMDQmycDsTHVB49VcbSPwq?= =?us-ascii?Q?wV98amsICmQjh9o2s4ewhzldt80+qaixrL4aeNAFAtGySA34HA2GEMROdnjx?= =?us-ascii?Q?fnRVqn1/P0Ja8liD7Wc0scuo+S1LftWR/BU6PD2XGLvwLmZ2EbwAaGmK0rYQ?= =?us-ascii?Q?SJRVwQswxc28FipNLMR82kaZ2HmwmHO76qPxDN881SIVTKL8u60DTbS0cg?= =?us-ascii?Q?=3D=3D?= 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:(13230040)(1800799024)(82310400026)(36860700013)(376014)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2025 12:03:37.0978 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0c968bf-02ef-4c37-aa35-08ddb4a97b91 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: CY4PEPF0000EE3A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7329 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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/28/25. 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=c2f499a7e97d138254264945ea77cf412feac0b8 Thanks. Xueming Li --- >From c2f499a7e97d138254264945ea77cf412feac0b8 Mon Sep 17 00:00:00 2001 From: Rajesh Mudimadugula Date: Thu, 3 Apr 2025 12:26:03 +0000 Subject: [PATCH] crypto/virtio: fix cipher data source length Cc: Xueming Li [ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ] In symmetric algorithm chaining, we need to consider both cipher and auth data length for cipher source. Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue") Signed-off-by: Rajesh Mudimadugula Acked-by: Akhil Goyal --- drivers/crypto/virtio/virtio_rxtx.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c index d02486661f..01977c7ec4 100644 --- a/drivers/crypto/virtio/virtio_rxtx.c +++ b/drivers/crypto/virtio/virtio_rxtx.c @@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange( req_data->u.sym_req.u.chain.para.aad_len = session->aad.length; req_data->u.sym_req.u.chain.para.src_data_len = - (sym_op->cipher.data.length + - sym_op->cipher.data.offset); + RTE_MAX((sym_op->cipher.data.length + + sym_op->cipher.data.offset), + (sym_op->auth.data.length + + sym_op->auth.data.offset)); req_data->u.sym_req.u.chain.para.dst_data_len = req_data->u.sym_req.u.chain.para.src_data_len; req_data->u.sym_req.u.chain.para.cipher_start_src_offset = @@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit( uint32_t hash_result_len = 0; struct virtio_crypto_op_cookie *crypto_op_cookie; struct virtio_crypto_alg_chain_session_para *para; + uint32_t src_len; if (unlikely(sym_op->m_src->nb_segs != 1)) return -EMSGSIZE; @@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit( desc[idx++].flags = VRING_DESC_F_NEXT; } + src_len = RTE_MAX((sym_op->cipher.data.offset + + sym_op->cipher.data.length), + (sym_op->auth.data.length + + sym_op->auth.data.offset)); /* indirect vring: src data */ desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; desc[idx++].flags = VRING_DESC_F_NEXT; /* indirect vring: dst data */ if (sym_op->m_dst) { desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; } else { desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; } desc[idx++].flags = VRING_DESC_F_WRITE | VRING_DESC_F_NEXT; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-26 19:59:18.474647199 +0800 +++ 0017-crypto-virtio-fix-cipher-data-source-length.patch 2025-06-26 19:59:17.226418051 +0800 @@ -1 +1 @@ -From fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 Mon Sep 17 00:00:00 2001 +From c2f499a7e97d138254264945ea77cf412feac0b8 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 0cc904485c..a7f1bd9753 100644 +index d02486661f..01977c7ec4 100644 @@ -22 +24 @@ -@@ -243,8 +243,10 @@ virtqueue_crypto_sym_pkt_header_arrange( +@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange( @@ -35 +37 @@ -@@ -298,6 +300,7 @@ virtqueue_crypto_sym_enqueue_xmit_split( +@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit( @@ -43 +45 @@ -@@ -371,21 +374,22 @@ virtqueue_crypto_sym_enqueue_xmit_split( +@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(