From patchwork Mon Jul 8 12:00:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dragos Tatulea X-Patchwork-Id: 13726489 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2042.outbound.protection.outlook.com [40.107.223.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7588A13D8B8; Mon, 8 Jul 2024 12:02:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720440132; cv=fail; b=rl72wJ7NNw26ETwZ635ADchaNtLIlUTtNYcPgnBEia2gze8SIyfUpXS0+FI71efOvsXzRkrmpqSh74vOV+Df2WTdGliS6uRMyAofOEYZn3mEbNVIvCOSgAfkdYmdJ5oI+NG10G2TGwJr8ud7FC4N9L62PS8wmLAkN7jpeiq06Wo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720440132; c=relaxed/simple; bh=nJTWuacp/PSwLXmNgypOE6XPWF8/NdP5C298zb5GcC0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=f4jbSwnyIqcpJN1m1uJFRbG9xy84HhWyL0ycVPBKmTVGkLIYIGMiiPyAme+Xvdfv+nRdTdsywful7Elsjq5YUuz0oSKYO8RthFkO6FD/hvtPOtqUm+9hQTgcgmmPOxMbckvGrDoKg52T1vwojUBb0bmM2Gf1RBEfJZDF69qglws= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=XhDDr+B0; arc=fail smtp.client-ip=40.107.223.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="XhDDr+B0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bWUM8FRgR6cxgdmj571sWPBsEO3px/oibMDytIdDu/E1LxEd3BcTgk5qiogYg8xfW/C9pyPjxFA81Cf1TKGs6Ps+EICpGjcLhtp2nIIpq3bj0y3KY+hQ9FUJxWSdSwc5YWF+rjKqiqwz02P7Ac8MCh4UZvDC+VDYsgKDRVIuvC27RKmHdHVHvgGxsjruOqBBqQSGxByCWG6BlAjkkAmqwsO3r3T1EGom10jSxiVdCNml7334x3y8N0U6zAl1a1Vpn2+RXWNvp9Rsybr1woWOvJgzMOcI9GHLooAy/cpO0GRRR2T8i1J9XU2oJgRdo++SRxaeGd0pR82YyyljnqCNtA== 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=mniGeUGEPsgHLRktUjpUAyHPIq75TXH8m7Krz8Zo9Y4=; b=Iyj0OVVoIqzT/QlTjlWRZv4BX80NCSlw0qYH4peGT8D87jNzyu1ASZq/h3sNhMNHSeVQ5IfCuttoabb4w3t96T8UawULOwTZ0WBUSua2Jk7W5oBAjvlyGh63RVkEF1uDFmqV8U+MxwBKvhXb70Fs+J4ZdRfZ/Acc0aExcghoCxFm9e1nzp7uYsqwrWwH3nwNhxOuduFQR9z3Ss7Xq3mXK5f+ups/Oa+C97vt60hqvwyUJfwJcRHDCLMRcnPF9HXYhbztjCd5OWMomtoOBCLDAthxwbXFHxHbnO45j0h6NCYA6EXSk1aPIBsUWKHJ2NCyi2P2TC8b8rIpLJzqQ0RBtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=oracle.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=mniGeUGEPsgHLRktUjpUAyHPIq75TXH8m7Krz8Zo9Y4=; b=XhDDr+B0pTscTGESM0vOgSyuw+Ff835vI7fkgsqQDB0wZuJvkTH6hri8VJ0SIqzdxUnjY4vwV2EhobImtxKD5Zoca8ymWf3szKGIwWad6s/a3K0C5DrpxtqIpbAOuKfM4ELZ7Vf5Q1vFEfjaOyjI+c0bGAHNubd/jS8gidmkTk/i9Y0Bdk/aRniu8ENkXoKGxtgKPqX7lhYj3+i4f5S/hlyfyUB9vWNi80EAyVRWKB00RGeGZEIWbpMOw6jy/z7yUByjDdozunmQsC3AT+hsV9t20hfp7BQLAmXp8jk0xU9yxXqVWQsxrcZDME0WwkvBH6BzNFecLRJJxmT9ybmOIA== Received: from BLAPR03CA0007.namprd03.prod.outlook.com (2603:10b6:208:32b::12) by DS0PR12MB6440.namprd12.prod.outlook.com (2603:10b6:8:c8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.34; Mon, 8 Jul 2024 12:02:05 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:208:32b:cafe::4a) by BLAPR03CA0007.outlook.office365.com (2603:10b6:208:32b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36 via Frontend Transport; Mon, 8 Jul 2024 12:02:05 +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 BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Mon, 8 Jul 2024 12:02:04 +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.1544.4; Mon, 8 Jul 2024 05:01:23 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.4; Mon, 8 Jul 2024 05:01:23 -0700 Received: from dev-l-177.mtl.labs.mlnx (10.127.8.11) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 8 Jul 2024 05:01:20 -0700 From: Dragos Tatulea Date: Mon, 8 Jul 2024 15:00:30 +0300 Subject: [PATCH vhost v3 06/24] vdpa/mlx5: Remove duplicate suspend code Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240708-stage-vdpa-vq-precreate-v3-6-afe3c766e393@nvidia.com> References: <20240708-stage-vdpa-vq-precreate-v3-0-afe3c766e393@nvidia.com> In-Reply-To: <20240708-stage-vdpa-vq-precreate-v3-0-afe3c766e393@nvidia.com> To: "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Si-Wei Liu CC: , , , , Cosmin Ratiu , Dragos Tatulea X-Mailer: b4 0.13.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|DS0PR12MB6440:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f256d34-44fb-4455-477d-08dc9f45c8d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|7416014|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?NxpECEFNgzuvnaEdFmM/bOtZHKbgF3q?= =?utf-8?q?T7fwxpgWVm6oUPa3m+a5zOypH4aTbuufRwf4EuipDpwX+if2H1fwMBGeMLjkiYRY9?= =?utf-8?q?y5eQY7mgmZuSp9KHVnkLXTjSIqFMKay5pLehqVq7RF26lbTyVBsaQtugb8balLMX5?= =?utf-8?q?kxilfclH5hNlq41Zou1dhxSu1Z/JkgWVBSPBStK9mzHmSrnH8EY2zlQ1cr2765lyz?= =?utf-8?q?b98EnB3oEkTFP76KkYoQUijO+M/S3+ynjfmOnz1AR0kfl8KOpGqoiAVeQmF2Z9DSk?= =?utf-8?q?yXP1pJJoSATJy2+Mf21OT1X20BfhjKl/OnbI361NoIBWQK/KQRuwmbA0Bs3czSQRe?= =?utf-8?q?JphY5nghPxjkbETtcjiCoGS7gftPAJAaVzC2i4kwulpfDnwNrf1xVdtKcTLb5LdOK?= =?utf-8?q?Zux8ggu3/TX0Il178Vpiszecz2ZGzpUgDT9fjqBUwrp71f+wYx0B57BRebm6jiY1c?= =?utf-8?q?MQpbuYnlc4WbK/FFbRMssSmCzIrcQbbryBuqOMfgjbXscnRfT8955d3hZseRUApTO?= =?utf-8?q?12P27HsdfewRxBY4cfDRdrPNDcnghNgap5h1a+ks9Cz85jm31sPS5dxILfGhM7phQ?= =?utf-8?q?yhwyRcTDuqviRzq2I42mhze+9Rd1xi3tRtVdkjMtSDOU0paCXnXdwQcuoDD+TFlHr?= =?utf-8?q?XOPxHXLStArO6OaF94oW3EIJNhyCt41TannQEzrNAIDnuU/8+DIiZ8hLuQ3ErmpQC?= =?utf-8?q?yLPEzTQU9Gy6TwoCiS7/AtpSZMHD5a2/H807XuRzdrizZkemwCw0L2XTznx81gY+b?= =?utf-8?q?/SlCfsNbsY/grmag67w7CqH200KfvShCs83/VClpNNAtIXu2Emu0/uaytBL6RupED?= =?utf-8?q?RPQqEBX6Pp6k0d3OWVmt5j8aKOyHCjcljo52EWvO0sLnokSCrVHYWC8Vl9tpNtToS?= =?utf-8?q?tBJkOqFtmus+9OfYqZc3kFdcpNdQZXVVcD1tTWicucJEcmTxKe5hEQDJ1s3gHRCWR?= =?utf-8?q?jBY24FQmHJ54OEJZJJv64l+gwEhioPzmbA2j16JCnRA3dj/s/wBNvShhRQlbK9Z/Q?= =?utf-8?q?CBCOharz1V8+V39XRS9kmJVTNtBJs5FW97paS1GekyN2vXx0yTzMbLdco6zD4Wr2t?= =?utf-8?q?W1vsLryZsLArSbvmhvMbnDgqij6ShEm6XJ4Z7OMongTT+ZQ5IRkmcCobf6M4gp1RY?= =?utf-8?q?QONO69LsnbcccmwcwKNHcKyZcneWKUMkL1j156jy0IbWfoBY/MS72gyYzbXjJKVhd?= =?utf-8?q?yoAvN8ITz363P8RzIA1ZBa395YQiP/+81T9krRB1TcWJJznaYwDeQPL+81coO9q7h?= =?utf-8?q?N5uKZygvVomXIM08mzGq34SlBVv4NfkDltky3/xq8MOrcwLnzGg97epBCUBzI6PYQ?= =?utf-8?q?QTq4wx3AXgfsnLxTEx3uK9/3Zfo9RKLcm9UerKLgc/S5yUXUVRzM6SRw14VYSNfNg?= =?utf-8?q?9+h9jvDaMX2?= 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:(13230040)(82310400026)(36860700013)(7416014)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 12:02:04.8873 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f256d34-44fb-4455-477d-08dc9f45c8d5 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: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6440 Use the dedicated suspend_vqs() function instead. Reviewed-by: Cosmin Ratiu Reviewed-by: Eugenio PĂ©rez Signed-off-by: Dragos Tatulea --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 51630b1935f4..eca6f68c2eda 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -3355,17 +3355,12 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) { struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); - struct mlx5_vdpa_virtqueue *mvq; - int i; mlx5_vdpa_info(mvdev, "suspending device\n"); down_write(&ndev->reslock); unregister_link_notifier(ndev); - for (i = 0; i < ndev->cur_num_vqs; i++) { - mvq = &ndev->vqs[i]; - suspend_vq(ndev, mvq); - } + suspend_vqs(ndev); mlx5_vdpa_cvq_suspend(mvdev); mvdev->suspended = true; up_write(&ndev->reslock);