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 D5D5CA00C5 for ; Wed, 20 Jul 2022 10:23:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE0DF41614; Wed, 20 Jul 2022 10:23:57 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id CD92240697 for ; Wed, 20 Jul 2022 10:23:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZZXAEnAfMCFdybfrfAfETdqU4LLlRD5W61vpWZt8jrF3INsW+qsmcMVNojySuWIyRPw4AggZVtFKlZET/w1GwLEG6FCrOql9DHNFzDFZCW3fg4ezWSfnXxLyGR2G7/SCT+ZOr+c5+NYtdmiVbOXApEk8Cawt5BhySQPc5tkwd2BumFHnGA2o3y1v7hY2S1MqrSvRf4zW4jRWdtAsa8la36kNPE8k4oojIC6qMMY6aOKBzCe8sh+UCUfEGZPKdT3d7wWnHPDa2AuDE1Kl/1ZlisK/GhgbIuGOHGewlJvStVzulC9Tbv49Xt4M91/Hetf37jW1ScfbcF3Cld/7D5JGA== 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=Qhh14Qa+tBjJ3+jCpI96fHZ15v21KGDnld6cqQ06xoM=; b=R5G8vIs7UdF5v/6pqy6sPhp93xY5YSyei2LckpqHzyhY05eyydqRwi7bqUTzDHpifZYOg19VjS+CwrIgEWyyjlmuq05Y42+MQ1wKsbnXrrfnDlGubRigfeqiqxG3mgFc5ZVLssHSzCYwCVMBtZQaadsQAiy1zHyyRRbuWSZT0zoHWB1HEmcUYHC02vP2aT5h2FjVpab3zJ2o0zk2w4I6fQmwHJ72ktu0CL2KO+L9VAAU/g4MltEssfyV6DJQFBIA4HnZcteJeGFoyZepmbnBzfS0xElBCTcJQOYAIBkb66/KWAzk4lLoGMWrdhZnYWcAXZq9iFDxsH0IMr0LKfvHOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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=Qhh14Qa+tBjJ3+jCpI96fHZ15v21KGDnld6cqQ06xoM=; b=NicSFLufZdU+67EcF2Q93Ia110tpWztDmpLnGvL0Y9AQvo2a+oZAQLKTMYJIPfEBo2yb/dk5tH+mSQ5rvdy9v1j3GlOG7jdMXuwN/HU6UnNd0KRmS+AU8vUG1Ai5CuLBP8W3oo1437U8r2l/ecG+nPSwBwprubLAoMRqXhEPNitpx3MKDH44Lr+dC9QFvfWi+ULuLXiio1Iga05RwbGGjZTBi/Hupqy/Tz2nLVNsRrFLyfnpqq+0pvDzlqWgVfcgPPqWFSip5Nstb7hlwMimpeajP6wusSxdzQveuMG9/SLC+/HWwibHagTPWgtyyVnO4r6xhYsJGucDlD7doUaGrA== Received: from DM6PR07CA0103.namprd07.prod.outlook.com (2603:10b6:5:330::35) by BL1PR12MB5175.namprd12.prod.outlook.com (2603:10b6:208:318::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Wed, 20 Jul 2022 08:23:55 +0000 Received: from DM6NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:5:330:cafe::f0) by DM6PR07CA0103.outlook.office365.com (2603:10b6:5:330::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.13 via Frontend Transport; Wed, 20 Jul 2022 08:23:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT055.mail.protection.outlook.com (10.13.173.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:23:54 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:23:54 +0000 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.986.26; Wed, 20 Jul 2022 01:23:52 -0700 From: Xueming Li To: David Marchand CC: , Jakub Poczatek , "Maxime Coquelin" , Fan Zhang , dpdk stable Subject: patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:53 +0300 Message-ID: <20220720082132.3954126-24-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-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-Office365-Filtering-Correlation-Id: 1c272e71-765c-46cf-a6f3-08da6a292f89 X-MS-TrafficTypeDiagnostic: BL1PR12MB5175:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?dOkIJ2o53xI9Ejv6JErGMFY85f+nMd8gl2EyCm/RtAG5PGqpSDk+8ZmtfQC6?= =?us-ascii?Q?FgDbkyI+FrIksoJcNeoh6q/vy9ktUdffr0QwbEmIMKJMbDocK++/FdxqfLl3?= =?us-ascii?Q?71/z4DR0YXrcYpgHXH/rsB1JlAkJ2P7xDit3flC1vd8QS3S1ixVisR8f3oNL?= =?us-ascii?Q?ffq/2zDPpwiOFiPhg713f0V7aWRH0Q2ptxSwh4ZTgfPCjbW6u9NcSVaetg64?= =?us-ascii?Q?NuF3usQgYuovLjARThe+BoUPk3hM4HLMxl36tE4+th4l68eUndZ4Xh+i3LLw?= =?us-ascii?Q?fEez+YBGmEvH1HBnmkvRj7fK0GE8nN8QUKCm+b2q/b/C3IYRhNpeRoP7foTP?= =?us-ascii?Q?H7FvpNSezToKO2RhqZxPc+V4TnMWiUD7hZ4hbGHmUP6dsG84kiccQyoIBqfv?= =?us-ascii?Q?z7DOkNMdZ5LI0tgJ1aDarxKkD+CRDN82GDam+f21h6PgERnFkGl9YBhucPdZ?= =?us-ascii?Q?QbcIFI9ArmYcpHJLRLSGViB9O4ZYgeHBSSkSbwUgkFNigGWsWS4xFoENX1Ty?= =?us-ascii?Q?Clae3yFnJCBPgSOUbMHx6ZIQbFQjE291LEaQVA2EBvvC70v9aNprQS73Miht?= =?us-ascii?Q?iVrijNPlBXdJwWN0cRN7XVqG4LbDm3ggK6Ie2kHfNxcNFCy1akufOqGFbLcb?= =?us-ascii?Q?Lz5dYjVrxx8Rm5kG2PMPj5i5/JXpLffruzRGxcPBeS2FPUMzAaYPK4qJnPXz?= =?us-ascii?Q?3wsSUymWy4QQgqcr8beTxNno9C9sKc9PnkZOXCZ58bimTATA3hwMbbGAS7XO?= =?us-ascii?Q?FoGlWdirTZqQiGUrLSoB0uxchBVaj0sPvZ6Lwf5cEUoqAZVme4rxgerZzGFG?= =?us-ascii?Q?HhhQKc0UkJRKWexhiG9rstp81bRg73COrMztC8taJZ5lF3FVo1dsUBXOybQ6?= =?us-ascii?Q?CBDW5ystKlqXm7H3Dah1Ra5465YNg3pYg/zdfrCpC5IogxLF9Pe1/1t7bpjm?= =?us-ascii?Q?wNHwQA925YtHuk2lihxGIQ=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(376002)(39860400002)(346002)(136003)(36840700001)(40470700004)(46966006)(478600001)(26005)(966005)(7696005)(40480700001)(2906002)(70586007)(82310400005)(55016003)(53546011)(6916009)(41300700001)(86362001)(36756003)(70206006)(40460700003)(54906003)(4326008)(8676002)(316002)(47076005)(1076003)(81166007)(356005)(83380400001)(426003)(6286002)(2616005)(16526019)(336012)(8936002)(5660300002)(36860700001)(82740400003)(186003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:23:54.8850 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c272e71-765c-46cf-a6f3-08da6a292f89 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5175 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/22. 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/a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541 Thanks. Xueming Li --- >From a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 22 Jun 2022 17:30:20 +0200 Subject: [PATCH] vhost/crypto: fix descriptor processing Cc: Xueming Li [ upstream commit 2fbada91545c004f04449500af0c6276900317ab ] copy_data was returning a pointer to an increased (off by one) descriptor. Subsequent calls to copy_data in the library were then failing. Fix this by incrementing the descriptor only if there is some left data to copy. Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12") Reported-by: Jakub Poczatek Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin Tested-by: Jakub Poczatek Acked-by: Fan Zhang --- lib/librte_vhost/vhost_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index 293960d350..7d1d6a1861 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -610,8 +610,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req, return -1; left -= copied; data = RTE_PTR_ADD(data, copied); - desc++; - } while (desc < head + max_n_descs && left != 0); + } while (left != 0 && ++desc < head + max_n_descs); if (unlikely(left != 0)) return -1; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.885923988 +0800 +++ 0024-vhost-crypto-fix-descriptor-processing.patch 2022-07-20 15:00:58.711000496 +0800 @@ -1 +1 @@ -From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001 +From a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ - lib/vhost/vhost_crypto.c | 3 +-- + lib/librte_vhost/vhost_crypto.c | 3 +-- @@ -23,4 +25,4 @@ -diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c -index 96ffb82a5d..54946f46d9 100644 ---- a/lib/vhost/vhost_crypto.c -+++ b/lib/vhost/vhost_crypto.c +diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c +index 293960d350..7d1d6a1861 100644 +--- a/lib/librte_vhost/vhost_crypto.c ++++ b/lib/librte_vhost/vhost_crypto.c