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 4432645CE3 for ; Mon, 11 Nov 2024 07:34:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38DC240685; Mon, 11 Nov 2024 07:34:40 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2050.outbound.protection.outlook.com [40.107.93.50]) by mails.dpdk.org (Postfix) with ESMTP id C192A40E1F for ; Mon, 11 Nov 2024 07:34:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QrGs70zZO/WLHXEBHgfxL4/NwgY+GKfjw29TRKVipAwnh6FYN1iILMIkZ3SlBAmQYl0h9x72NqRP3WyOqqO/lN6erMo3LKL56X7rO0errT9fcKbJomQC9u2v54VQ+dnyADRsbY2C8fFAe7MlWdAvOmjAobdqsrmGEfmU7/+AtQ+mKgLcBau4tYtOBymIlO9H9hFejyNM8gjiIQrWhov+lUuZswyTq7cV1AXaZDPmu+DrAd8kwtS7AufVy4hOzkiGKTjWnuMOzu6iMSlhL5Fx3N0QbZeLwfIeGVMqEc3Uga1MFTG/Og6t97wTHDtXU/ieUz6j0SEjd+Mm/jygXzmTyQ== 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=fl+gCdgK7MPgHUuzw2eGyRu9okeR+j/VrkPvko49bBQ=; b=X9Gm7eWGzQmjTsAXGbKCjIoPysCaUNeDdxeqm3hezSdbwBGNe1HI8znBqLy9rC7pcbTXHVCNcus8iFE/b2rBnfj9mkdKR43IpumUjvm96Mn2QsKTO99f7zbYJ2mM3aieXPPQKBdg1xf7uvsrOLJOLPOYzG5h44P42sPZbZbogSY5mQw3hCfOkb5mmwP1T4dfFhJA+kTKSeWhWZbfSHOVwK8zk1GvsVRWlQmiSHSVRYPRcDmD9KZPGQtfRggH7CA6O3G015xjdPC+3C9GJ3tC5QA6N7ZHJNosPUO1toXj57P36E9hMGeVKZXvR3+vieyE9PU/L8hLoRTbWXioxt3tcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=redhat.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=fl+gCdgK7MPgHUuzw2eGyRu9okeR+j/VrkPvko49bBQ=; b=a+mDOyv1eU9V9Zr9Osb9GIUq+A09Z5lj+j3DB5aGXO+mDnH3m0dPad6kD3ZXrYl2aIsb0c3pQCkMd6FjE4JO45JnhSN2VQi4ZcttPCkXSI1dqT5mzlaGOxKMTmLDAcNkaI4wTtHtfziCJ6cFsJDwRVt1VbK57PlC25a17ge+ZE7TMT3xU19DyR+b2jQfXnT3jdBvvTSQmUc0l3Ar+MwvkRn5ZA6V1mO6R1WjF/RmeqILUXXvK+fLJBHE4vW4l7HgpI9UBTr26XlHZf2zxkbfwcK+CXG7/S4T1ICBDlibcUci5bIPjJFqK0ZJ9PSCECGV+BHBG3roovUJ2typRQxi2Q== Received: from BN0PR04CA0210.namprd04.prod.outlook.com (2603:10b6:408:e9::35) by PH0PR12MB7982.namprd12.prod.outlook.com (2603:10b6:510:28d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 06:34:35 +0000 Received: from BL02EPF00021F69.namprd02.prod.outlook.com (2603:10b6:408:e9:cafe::6b) by BN0PR04CA0210.outlook.office365.com (2603:10b6:408:e9::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:34:34 +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 BL02EPF00021F69.mail.protection.outlook.com (10.167.249.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:34:34 +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; Sun, 10 Nov 2024 22:34:21 -0800 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.1544.4; Sun, 10 Nov 2024 22:34:19 -0800 From: Xueming Li To: Maxime Coquelin CC: , Yu Jiang , David Marchand , dpdk stable Subject: patch 'vhost: restrict set max queue pair API to VDUSE' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:37 +0800 Message-ID: <20241111062847.216344-52-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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-TrafficTypeDiagnostic: BL02EPF00021F69:EE_|PH0PR12MB7982:EE_ X-MS-Office365-Filtering-Correlation-Id: 71652260-9a47-4a03-c1c6-08dd021ae852 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?HWwbD9ORvlwNHeYfQCxCwEmpKRTc870nrbvKLlWHvg0KXLn/F9JAir24o+KC?= =?us-ascii?Q?52yu3ztSj1ViqChH0bjhKDEnQeHP+1FUkXUlZ7ZTzPBw36p01/0xGT/v5Ogp?= =?us-ascii?Q?LfuG9vyX9GXFoPz3irpqHdCPL4DV7k/MDFaCZYiHIGuu9uLUsdFSNybkQYyJ?= =?us-ascii?Q?vvgDHOJUzNEI7A6apmeJR3+yU6T4pBmbW0KYtw0ioV1UjRsiQ2cp+IFg4eN6?= =?us-ascii?Q?X53u4McIM0/irHjHYweTsGGm5gjNF3gup0gynkHvbZcNzS74wxrz+NK/9Bzk?= =?us-ascii?Q?0OjuojzJiJSTP7jCpLs8Z0vEiSkeoeb2AEeRM4ARMcIoAQPInf9S0DremQ0H?= =?us-ascii?Q?sputmD218lvcnU6Emz/F1bNo79659p7iNBukhqhrMrhoZ0Hwzb53W42cI3Ot?= =?us-ascii?Q?OfwcqslFLYf26KO2omj4gd7prcivnP5Z9ectZlG4attKAbQmTzgHUyvG4yfu?= =?us-ascii?Q?4vSqkFe/gnauDF+IxaDD0BKXm9Cro8BwtYtCf3eMF30o9JphoxZJ0TgJOkw4?= =?us-ascii?Q?R3uyw0ea7VdeSU0dVamqpyuqY1wyDu2ghy7T/PGy7nbbzpmhGH9X/EyYr0by?= =?us-ascii?Q?wRp/j2f4NoN1OiFqb/33kG6G8HH9w7lT8vtZlEZyEMBqNUpse5VRsjXOeQke?= =?us-ascii?Q?cHpWJQzfdp+1uTwyxX4Xxv/GqQHdk11OXil891yZ623g2iKrBfmMFvMcLOXc?= =?us-ascii?Q?bA2ynNNniE142FYPEJKskTwwgiUI1KI9duWVSLcmmnwnw10EzRyjqqmLpIIB?= =?us-ascii?Q?hLBDYRVCxKZYZjFLaBFNldL6+5RbI5M5Nb3u5G3kU7fMMRxcp93jKgL3YUbI?= =?us-ascii?Q?XbAOOQeD3ctKWKwJVG9fBJpEEvT2bWdCriyibwj7wLF33Pu5+HDmujH2g4lZ?= =?us-ascii?Q?22UO6IZsoYyaaAxH2hDwNGb1NqUeHr/r5CRINRlhm0DBFK61uHusMwmdldmq?= =?us-ascii?Q?fSTPYk44jT1ajCkntmLU8biKU03srYwGzRRnLa6XAZP9ckk93bHqiJKCWLur?= =?us-ascii?Q?eLususXSaQhnEJgRidHxCr1jBQr4vKn/oPxA1JuqS+DYC5tbiqDu0SLuIKiq?= =?us-ascii?Q?eBmvgu97GpYukkpSvdjM1Dt1JX1Cz3qyJjabLRAePW9swXZeUQlrx0dFHKog?= =?us-ascii?Q?OkPD5d23xRHL/NfapYGchDFA1m7Yr1pQ11IyVf5J+Iql5cfe+z7NYBoBCMBF?= =?us-ascii?Q?fVbAi9K6IjxYlVr1PGHvlVRBWl33az82zMnDqF8ebZ1R/3JVgOZuTF5DjGV1?= =?us-ascii?Q?m9NwT1a/Lp3r1qxaAKPp+AHd8C/+EyZJZzxI39Z+OeMT+36vaDJe2PsZB3gH?= =?us-ascii?Q?oJHPQqitQ/inBltJS0VjP9mD4Q12abKR/O7psqs8ScqJgICtUT+C1V8TnEmW?= =?us-ascii?Q?0UBoYWE6U9jTqOdblte+j+eeTFcmD+Xm8LCGMbMbtFAU5JJ2eA=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)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:34:34.4590 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71652260-9a47-4a03-c1c6-08dd021ae852 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: BL02EPF00021F69.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7982 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.3 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/30/24. 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=e1bd966815e01d4bbac59b413ec35e5ebd0a416c Thanks. Xueming Li --- >From e1bd966815e01d4bbac59b413ec35e5ebd0a416c Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Thu, 3 Oct 2024 10:11:10 +0200 Subject: [PATCH] vhost: restrict set max queue pair API to VDUSE Cc: Xueming Li [ upstream commit e1808999d36bb2e136a649f4651f36030aa468f1 ] In order to avoid breaking Vhost-user live-migration, we want the rte_vhost_driver_set_max_queue_num API to only be effective with VDUSE. Furthermore, this API is only really needed for VDUSE where the device number of queues is defined by the backend. For Vhost-user, this is defined by the frontend (e.g. QEMU), so the advantages of restricting more the maximum number of queue pairs is limited to a small memory gain (a handful of pointers). Fixes: 4aa1f88ac13d ("vhost: add API to set max queue pairs") Reported-by: Yu Jiang Signed-off-by: Maxime Coquelin Acked-by: David Marchand --- lib/vhost/rte_vhost.h | 2 ++ lib/vhost/socket.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h index db92f05344..c6dba67a67 100644 --- a/lib/vhost/rte_vhost.h +++ b/lib/vhost/rte_vhost.h @@ -613,6 +613,8 @@ rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num); * @b EXPERIMENTAL: this API may change, or be removed, without prior notice. * * Set the maximum number of queue pairs supported by the device. + * The value set is ignored for Vhost-user backends. It is only taken into + * account with VDUSE backends. * * @param path * The vhost-user socket file path diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c index 0b95c54c5b..ffb8518e74 100644 --- a/lib/vhost/socket.c +++ b/lib/vhost/socket.c @@ -865,6 +865,17 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs) goto unlock_exit; } + /* + * This is only useful for VDUSE for which number of virtqueues is set + * by the backend. For Vhost-user, the number of virtqueues is defined + * by the frontend. + */ + if (!vsocket->is_vduse) { + VHOST_LOG_CONFIG(path, DEBUG, "Keeping %u max queue pairs for Vhost-user backend\n", + VHOST_MAX_QUEUE_PAIRS); + goto unlock_exit; + } + vsocket->max_queue_pairs = max_queue_pairs; unlock_exit: -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.569998190 +0800 +++ 0051-vhost-restrict-set-max-queue-pair-API-to-VDUSE.patch 2024-11-11 14:23:05.122192840 +0800 @@ -1 +1 @@ -From e1808999d36bb2e136a649f4651f36030aa468f1 Mon Sep 17 00:00:00 2001 +From e1bd966815e01d4bbac59b413ec35e5ebd0a416c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e1808999d36bb2e136a649f4651f36030aa468f1 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -24,2 +26,2 @@ - lib/vhost/socket.c | 12 ++++++++++++ - 2 files changed, 14 insertions(+) + lib/vhost/socket.c | 11 +++++++++++ + 2 files changed, 13 insertions(+) @@ -28 +30 @@ -index c7a5f56df8..1a91a00f02 100644 +index db92f05344..c6dba67a67 100644 @@ -31 +33 @@ -@@ -614,6 +614,8 @@ rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num); +@@ -613,6 +613,8 @@ rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num); @@ -41 +43 @@ -index a75728a2e4..d29d15494c 100644 +index 0b95c54c5b..ffb8518e74 100644 @@ -44 +46 @@ -@@ -860,6 +860,18 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs) +@@ -865,6 +865,17 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs) @@ -54,3 +56,2 @@ -+ VHOST_CONFIG_LOG(path, DEBUG, -+ "Keeping %u max queue pairs for Vhost-user backend", -+ VHOST_MAX_QUEUE_PAIRS); ++ VHOST_LOG_CONFIG(path, DEBUG, "Keeping %u max queue pairs for Vhost-user backend\n", ++ VHOST_MAX_QUEUE_PAIRS);