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 0B0D245CE3 for ; Mon, 11 Nov 2024 07:39:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1F5840E1E; Mon, 11 Nov 2024 07:39:12 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) by mails.dpdk.org (Postfix) with ESMTP id 21D154067A for ; Mon, 11 Nov 2024 07:39:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rv7OqJHVAPXrBACU/7PFeinYAnEdPVkqcUUpejcpwlRzrjYhZQzPy+fdkQeeeVZXFMQhRm32mDXa/IaHMNmOKIvmC8/oiAXp6KZGDmI73nyO03Xgn3teHPrOaHR6KPAPVLpzkUDiiy0EzNXhrwDSeUems/f3o4pw/dwq7FIyOQF4OBREONF3LJ8X1HJc9E5A2GrEQjl2yttbDnmau4BPAT3jCbKs94IOdi26gNVJnmne2t5UPsHhZrvafL/ePwXdEg7+U8Xt4cG11zYzG692VBm+IVuJKXcKL5+gTiGaQIHPtZWr1j4I5O18iWUR5KLZJG0mETSpPJypwiisTmBiSQ== 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=rL5xOMRaquDodVLSqq4UH14t10MtjK+/PZJEDKTTMWU=; b=B6GHV8Nqf4be9XpFO6B0xo6Y30Zr9WsHmq48lyijdCfNinUPD7crDaZOQb4mRVXaolyT14JqpLh/4HaTPmizBcxmYopr334fxXkf448wDyFCu39P9XpLya9V7xPGXncXJ5WsfYA1PbiM85HgLpSGdaM4BdUw6zqeLnLqpBWK90tLbfU6TthfwWOLsa/aa1Z+BjfX6EL7ZL3U60HXZEvVuHwJmjyS9n1pgl2XrKjChyeqflGu+JAHsUkfcUbIhT8IkE6KBWWgQrUNQ1QsTnt2vtejVSAvPl77VPP5OGBcegigghtHZOm5WZQ8EMOaeRT2ibVRTonYWwt9j1gWb56UvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=networkplumber.org 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=rL5xOMRaquDodVLSqq4UH14t10MtjK+/PZJEDKTTMWU=; b=eVSvRVanwWBxAWtBJS6oCvm8rEZsskhiFSktW4qbVhk4VDj7ZLuWcrKFdll+IBhRAaXmBJAFFzNuG28HeafO0lhtdMb1BnBAwOXdn5x8tES9uyBirvpe7d4HyoeIOgIGxoLu4xAH6h9oMQCQqs9pVD1KQhYBKwISw7uAvxCp6+d5Ucoq+qHUzeOM7KLBSXLkv7zUozehRrtHvSgdpmgTX6tIMDzrOA60MxAO0mTPWMcJaS+lo1rrWuwhzmrgJqgnadnH/f+zu2pLB0aL1y/uax3giUVLJTatDbsmW90V46U+pbn38nLu1awzunYVlIrtA9F+Ea+AncZ6+sCovZBu7g== Received: from SN7PR18CA0007.namprd18.prod.outlook.com (2603:10b6:806:f3::27) by LV8PR12MB9156.namprd12.prod.outlook.com (2603:10b6:408:181::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:39:03 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:f3:cafe::87) by SN7PR18CA0007.outlook.office365.com (2603:10b6:806:f3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26 via Frontend Transport; Mon, 11 Nov 2024 06:39:03 +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 SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) 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:39:03 +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:38:52 -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:38:50 -0800 From: Xueming Li To: Stephen Hemminger CC: , Ferruh Yigit , dpdk stable Subject: patch 'net/tap: restrict maximum number of MP FDs' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:28:21 +0800 Message-ID: <20241111062847.216344-96-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: SN1PEPF0002636A:EE_|LV8PR12MB9156:EE_ X-MS-Office365-Filtering-Correlation-Id: bb89d727-207a-4485-58ff-08dd021b885a 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?57i1POC7C900LnIp1NYHwuej5x6hAa+I6FMGwBod3cJ7bPsV26N3FhRWEhjj?= =?us-ascii?Q?PYTgURj0fVClMjNOiC2ZVn1vfZHzTdLN1Nwpqx/dvsmj8RTVqiSpD5cIGw0e?= =?us-ascii?Q?DR/X6N6Y6kbaM3vzGkj5v+vRPo/KwwVE7jrbRLAYxjivNdJDhlCUDlbpfsF1?= =?us-ascii?Q?GvxSpf2sH1SJoomhHidtqvtmTPqQPorsbmB722Xwf6oOdhSHgGzA2ZiGZndl?= =?us-ascii?Q?tk83My1v3KxVKv83sj57Qd+tHDGz57cQBsBOstfOPP3Swlx9/5Ic8rd5YPyN?= =?us-ascii?Q?Wfv3tqDsCIFHkB9wb6oQ6TP4Zp52cRbpoUFnRxKeLwm5dYbpaZbh6D7mZBZZ?= =?us-ascii?Q?PCXl2UIMv6KRmaQR9oZbyaVlWETe8XKzdG57mqiG0ftqU+9LGr8+VRzv++CZ?= =?us-ascii?Q?Oo52CQh0D0L7H9t51ApZ/XpcCeFiL8FYgELessUXrFfgI10KEIEJqMfoAMuM?= =?us-ascii?Q?zv8l+ygnz0l5hNzCihEt2Vp9/SSlSy+S7yCs0T0tDEDcUZ58PmbBPebzH77z?= =?us-ascii?Q?FfmQvNULUgkTW/rcgTBFaxHOMH/CReVmnoDtv3cSoYod9Lb9jmkqGH4VY8P0?= =?us-ascii?Q?QbpEqd0FhGq+ml6kg8wn7Bwsf7JLDAoMBy922YW4Ut+jqCjgXzZnZA76AqZK?= =?us-ascii?Q?yseLiLCRHF1ZhTj6tH9tEog5fMEi9LydOGkDkmQCZ8FpF/N3xNs+frHwm3aA?= =?us-ascii?Q?A6dBUjlMQH4YGoKdXmlTZGObgK+3QKICCwnHwliVFkBLeWYeKlTPgMiwe9Hq?= =?us-ascii?Q?htzvehSBkbo1rPCzvYQrHE4o1ED4L7+mAda1RtEXURxcXKOQgJkDv46XKiK3?= =?us-ascii?Q?djnjKuedhNjZgAMHBxNAYL/pc2XQHYdIGDbpxIr1Jo98qwPoIMNzjelkOX2Z?= =?us-ascii?Q?q+f0XHRL6lARgDPYncj9VI9JuUdxYoAEPejLpb+aA96U32IibIAaXUirRvNP?= =?us-ascii?Q?/7d7GxUzd5CIMIemarJpCex5t40RGgBxvKe/WmcSr5WF4q3PFXZOHqoHmL5a?= =?us-ascii?Q?3+APPy/3rUO2ltKVoOWTS8sF/HdkwR7p6RGGRe6s/XeHPZlKkrWEvKDP1zJ/?= =?us-ascii?Q?NXG3nkTrS165Q1vL6MW3IRn8hk1cGUs1ILZ1v4jXU6G7iTWtxDJhBwvPTHQ5?= =?us-ascii?Q?/+M7vdfoiOYFIgLdWUeeCi4sTBjCe6HC6QmZ6FK5j6HeltDZZyVjGbzetWNS?= =?us-ascii?Q?DIDnKCA0VPgOG6GYE4PASNV+VffX1KKKHvVTSP2aRXJtJQHDGfMYNjDMGtUv?= =?us-ascii?Q?+GFXPKYe70+aaYYDcsSooGidf6Hofk4x/ndkx14rjbBQPILHRaUHVjPy+W3H?= =?us-ascii?Q?p0OTxD+UkKkuuWsKyQdgOE+PfCxUAT1Ln+/4SrAiRUiShpngSzC5vDGYMGik?= =?us-ascii?Q?MERnu7nx5mdaGNXzNB9P7VX1k6a28tColwbhLJetQSOuiaMIRQ=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:39:03.0535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb89d727-207a-4485-58ff-08dd021b885a 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: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9156 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=7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683 Thanks. Xueming Li --- >From 7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 11 Oct 2024 10:29:23 -0700 Subject: [PATCH] net/tap: restrict maximum number of MP FDs Cc: Xueming Li [ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ] Now that max MP fds has increased to 253 it is possible that the number of queues the TAP device can handle is less than that. Therefore the code to handle MP message should only allow the number of queues it can handle. Coverity issue: 445386 Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 3fa03cdbee..93bba3cec1 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2393,9 +2393,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) /* Fill file descriptors for all queues */ reply.num_fds = 0; reply_param->rxq_count = 0; - if (dev->data->nb_rx_queues + dev->data->nb_tx_queues > - RTE_MP_MAX_FD_NUM){ - TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds"); + + if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) { + TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u", + dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES); return -1; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:09.395312653 +0800 +++ 0095-net-tap-restrict-maximum-number-of-MP-FDs.patch 2024-11-11 14:23:05.242192837 +0800 @@ -1 +1 @@ -From 288649a11a8a332727f2a988c676ff7dfd1bc4c5 Mon Sep 17 00:00:00 2001 +From 7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -17,2 +19,2 @@ - drivers/net/tap/rte_eth_tap.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + drivers/net/tap/rte_eth_tap.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) @@ -21 +23 @@ -index 5ad3bbadd1..c486c6f073 100644 +index 3fa03cdbee..93bba3cec1 100644 @@ -24,5 +26,7 @@ -@@ -2391,9 +2391,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) - reply_param->q_count = 0; - - RTE_ASSERT(dev->data->nb_rx_queues == dev->data->nb_tx_queues); -- if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) { +@@ -2393,9 +2393,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) + /* Fill file descriptors for all queues */ + reply.num_fds = 0; + reply_param->rxq_count = 0; +- if (dev->data->nb_rx_queues + dev->data->nb_tx_queues > +- RTE_MP_MAX_FD_NUM){ +- TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds"); @@ -31,2 +35 @@ - TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u", -- dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM); ++ TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",