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 B0289A0543 for ; Tue, 21 Jun 2022 10:11:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9679340E25; Tue, 21 Jun 2022 10:10:49 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by mails.dpdk.org (Postfix) with ESMTP id CDB0F40E25 for ; Tue, 21 Jun 2022 10:10:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kRZZJMAKgTJ6y8hb+3e0AK82SOvQMCYJ73GqsUr8R3ue8YsUThwbzGRfQvxP/kSiCikYxcvrz94P06VtzYqQ/P2ZrUNU4XQ2fcKTi//Sqa8owuDXfKz8NULTKGeGteuiozF8wFcwZNgxoHZ513IRm5I2SfUFamYe9573/mNTbPnSYiPhBcEtWiTwGv22MO+56VSLlvbxrxMmQCf5SWgiy0o+Lgmclb6d4kbCoi1VSsAauPFd4BGZHI3LD1TqzZ6XlZ3pZASF8xcEScU5NEGnyoiJALUX8vFxzJjKKq8kWmrk1MY776R6N9o96hzbJm+KjhEZKWn/WLXH4ky873c1vA== 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=/jYfZlt30Ts3LVASs8OYuve0GZQRtc1d70Jj+SdS6Xo=; b=dJMey2Y9rlUvocPX5+EE3NN38T8KlgK1O890S6n4NiIyU+sjIt5NZ3U9dOcj1Uxm1T/h+KPTSxb1Va1yWeK7Uw8cAIEt+Zfg24MxpgSAVR9B4z+7SF3wN7TdhX5SdbP4cFgFXbnR+Bt+dviRNwZuMq7w2fmRPRtv36LytTNAHbew6KZup4ECw/qCcc85u/TSNNuC6Jo7+Ho7WgbY/7L2GSLxzCW0ckF9Uwh6aq67xMSmP7BARjUzNHyP370W0f+3sdsj3bwASI+jPpijxDcSVhwJ8y4142h+jiZDwHvQGAcjCeOcNOnJYQPIGlqIX0ijHwdNlfIENwhiPrCbZ3xWpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.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 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=/jYfZlt30Ts3LVASs8OYuve0GZQRtc1d70Jj+SdS6Xo=; b=ctLd+h+Fq72bmd4nV1Hp7br7YOCsNK2E7geft/2ML/VP3jkG1xxR8+Wjd9EGLxBgMQURTk0hsD+Yp1JRdfjxeQnHbUKmOhBCIauUkEJh7M12Y9G6/EFxTPHH1yw45lfh0MJAXxZ3wTsVd+Qwd8eTdzGqZUJ9yYD9qwwytbY2HHTE8hXsSuDytDZrxVK4GKH1UbZS+88gDNnDye7RNbrX6aFlN6sjPK+E2zgwkVv09pKr9tjT/jdQYBrSfNB+vo+xhs9mpBZSbjRfurxu98tuqCDmoenM/U+odOZFKe7t1nSA8lKEXsrYHlLYZ7kVrPXvW+CMZGznAUWfwYM09bAJBA== Received: from BN9PR03CA0109.namprd03.prod.outlook.com (2603:10b6:408:fd::24) by BYAPR12MB2645.namprd12.prod.outlook.com (2603:10b6:a03:61::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Tue, 21 Jun 2022 08:10:47 +0000 Received: from BN8NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fd:cafe::23) by BN9PR03CA0109.outlook.office365.com (2603:10b6:408:fd::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:10:47 +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 BN8NAM11FT009.mail.protection.outlook.com (10.13.176.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:10:46 +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; Tue, 21 Jun 2022 08:10:46 +0000 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.986.22; Tue, 21 Jun 2022 01:10:44 -0700 From: Xueming Li To: "Min Hu (Connor)" CC: Andrew Rybchenko , dpdk stable Subject: patch 'ethdev: fix port close in secondary process' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:32 +0300 Message-ID: <20220621080301.2315720-87-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-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: 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: 78040875-c905-4adb-ae6c-08da535d8bda X-MS-TrafficTypeDiagnostic: BYAPR12MB2645:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NfCm8ePbLQ0bIJ6gAZpnGugbEtmJ5aupXLMenA8Vqxhytd2WY4BUlR5VGtuzjubyho661deSv1vh6EEQ+46SslWWYfBt7Tt7TBG1nbKtkMC7kjJsbVSjlUU1URtoHZBaEfAmRmxI9nho4VKHx3oxfOGuOElDjSyrK1Af/9B9XHWPQLCWKjUc9I+Gm56or4l/wCl5OhQSuYcYL2GXlHXlmcr3VSLe2fhJMUZuPMEcX/rfP4s4EN77qjgauNQW8/fsH7NJRdiNbiN/eqVyKq8155CTWFNad700lyNC62orgCmwwRZDxIj2LOHYNGaqBiUYkG9hDfugjzUHpXh8aMgTQYkf5eaxywX7+7flTlglGY3x2maLL/1MuwXd/Qet/hohzYtvkh3dUGX1tS0+5eTcTa6tTeg9FaOqxwb+jo4NRRuGU+pHSQt/g6/c9ha/h+sznRskku6NLBKFK2j4jYJ+qPV2cjwHE4zZWmJVgwtVuqgNIOBlorj5UTuGnP8G608dLe3Jd8dwAVteF58yNS95YH00euJR6adKBTgJs+oL5LMw4EO2KNyXwYm2/xebD1xf9Hzig8pekWwBgvJy6PHfD6HooRUcvghfBBkKkx5yOX4Va9KZjHqlGDlDNvU2U/02i9Gq5ZrGC2RxPjq68OQM7QML5OOShSL+P0aYRTmiKLExutRhzJUyH7yeZ2eFyphRA4HfVCSbFjZGHyqcxQpSAGQ84DpAauEYffsgacSuFE63sm9+9JfdzH3fYllRerTdL0vU8ObBOPYofc4IFT2rgJlKwBkV4BrbLTaPZtZJUPja+XSe6s6KZWLZnl73iae+M/P3sHCDJ75UKq/ikxy8ZFIa/C8JQ+s1IwItqPNhigU= 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)(136003)(39860400002)(376002)(396003)(346002)(36840700001)(46966006)(40470700004)(40460700003)(478600001)(6286002)(55016003)(41300700001)(6666004)(53546011)(54906003)(26005)(6916009)(82310400005)(8936002)(36756003)(8676002)(316002)(7696005)(47076005)(82740400003)(86362001)(36860700001)(426003)(4326008)(966005)(2906002)(70586007)(1076003)(16526019)(186003)(70206006)(356005)(83380400001)(336012)(40480700001)(5660300002)(81166007)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:10:46.7900 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 78040875-c905-4adb-ae6c-08da535d8bda 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: BN8NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2645 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 06/23/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/fa4da49c81448a520107c072dee1614dd048234e Thanks. Xueming Li --- >From fa4da49c81448a520107c072dee1614dd048234e Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Wed, 1 Jun 2022 11:15:13 +0800 Subject: [PATCH] ethdev: fix port close in secondary process Cc: Xueming Li [ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ] Secondary process needs to close device to release process private resources. But secondary process should not be obliged to wait for device stop before closing ethdev. Fixes: febc855b358e ("ethdev: forbid closing started device") Signed-off-by: Min Hu (Connor) Reviewed-by: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index ac88c4484e..50e32d7f0d 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1829,7 +1829,13 @@ rte_eth_dev_close(uint16_t port_id) RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; - if (dev->data->dev_started) { + /* + * Secondary process needs to close device to release process private + * resources. But secondary process should not be obliged to wait + * for device stop before closing ethdev. + */ + if (rte_eal_process_type() == RTE_PROC_PRIMARY && + dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n", port_id); return -EINVAL; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:53.127479826 +0800 +++ 0086-ethdev-fix-port-close-in-secondary-process.patch 2022-06-21 15:37:49.177785082 +0800 @@ -1 +1 @@ -From ea6101a8e483f3b6ec505c91b7e72ab1628dab1f Mon Sep 17 00:00:00 2001 +From fa4da49c81448a520107c072dee1614dd048234e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -16 +18 @@ - lib/ethdev/rte_ethdev.c | 8 +++++++- + lib/librte_ethdev/rte_ethdev.c | 8 +++++++- @@ -19,5 +21,5 @@ -diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c -index 46c088dc88..b9c5dea09f 100644 ---- a/lib/ethdev/rte_ethdev.c -+++ b/lib/ethdev/rte_ethdev.c -@@ -1576,7 +1576,13 @@ rte_eth_dev_close(uint16_t port_id) +diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c +index ac88c4484e..50e32d7f0d 100644 +--- a/lib/librte_ethdev/rte_ethdev.c ++++ b/lib/librte_ethdev/rte_ethdev.c +@@ -1829,7 +1829,13 @@ rte_eth_dev_close(uint16_t port_id)