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 656C0A034F for ; Wed, 10 Nov 2021 07:51:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F68A40142; Wed, 10 Nov 2021 07:51:12 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) by mails.dpdk.org (Postfix) with ESMTP id 3227040E03 for ; Wed, 10 Nov 2021 07:51:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kkHREgl6JpHHkHmvJ+ZOmTVXAsTGm4Exdba6+ZSBBI2ZjEdqxWI14v/kuXbqlJtzBRIFRD0aw4PbnUK+0QEyb3ZEIobZpdDI0IhL3Ab2Z7gZkd9rHWdr2fBRy0dKz7et2uF32pQ6TDiT0va7vfkQ+zUgGsWSieWIhArrUCgjYi3H/vZcNf5DoeHadoRPNGyB8C2h1uIpvUrPyceP69U0T6RMEH+dNon6OQI08rQMDpMZG4jlNO7OO/GNinmKKp/VxbDguzKrS0vRx2MinJEEY8QOWCf5L5EOVCVjG77d767G0q1ZamS2SB5zN59JlqPPAmuEyzfzjAmwjKNF6h9XEQ== 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=g0rirj/HdJZ67JCxXXImya22V+bvj7Fk1yzb+XP3aQE=; b=BSlPyWLQ++p/l7DZLAeI9HTb6Rc084GMTIhHsUNub9DIpOPJly/SJ6wqPeQqDzHpXTb5ct/YrMOxM2bBzAzPFm/IJlZ1iSHJ+TL2TLLyD8PEMRQWIt60tvFiuVo2slgcWIlNk9nUQ0LslClTzXaRl0hwQ1nT+fwjAG2oEeELXEk/VtMejgt1T3pbacb64ER8k1OVLQ/6kgLYUOyadOsIXfeonSjeJjk+K2jxvJdMp+jkhkFNxZzt+nmw/7UtcmJfWgAQs74ZrpvkiMFnaSjkUHy3xgiykOxoNsQDtBaJ1jjQA+fIqXnwMgNsBOR8lNc9mefKILFpzHE4ayKNdusZ8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=g0rirj/HdJZ67JCxXXImya22V+bvj7Fk1yzb+XP3aQE=; b=qhdWOiBsV7KAmbhw6g11h0u89aiozCk9PtfnZWHBjQA/aT+CDXhZkTs2T9NYVGba3NEluqO6beANZdcqMikeZTLnSc8rr6xo3GxRNMjUnfBCkPuHoPkFnKo8kgRHHUZmSNPoiqaIMeSfYqBZQ4kvXYvvSzruiXQ0wDoikPw5fDaFnSd5AqifU/ESciHsGHldLmSbal9bh/+Lku+pUS5TV7meU3DLtpEac1lu43udjETLq/QdI0MDcvyUvZuqsRUPf1Cjeu4xAzZ6DQVAioxWJhth+hQRB67/ENGWLfXPmoNvMXqu4J+QACMl7zdBJ/OAjj5sCzD9Vus5iguA65c8JQ== Received: from BN8PR04CA0061.namprd04.prod.outlook.com (2603:10b6:408:d4::35) by CH0PR12MB5331.namprd12.prod.outlook.com (2603:10b6:610:d6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:51:09 +0000 Received: from BN8NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:408:d4:cafe::1c) by BN8PR04CA0061.outlook.office365.com (2603:10b6:408:d4::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:51:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT037.mail.protection.outlook.com (10.13.177.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:51:07 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:51:03 +0000 From: Xueming Li To: Andrew Rybchenko CC: Luca Boccassi , Thomas Monjalon , Ajit Khaparde , dpdk stable Date: Wed, 10 Nov 2021 14:30:51 +0800 Message-ID: <20211110063216.2744012-168-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83ce410d-b546-479e-034d-08d9a4167919 X-MS-TrafficTypeDiagnostic: CH0PR12MB5331: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Ly5Qja8FGwUS0rfzMVE86Z/wnZYiWLpJ1K2mTag5WH9zwM1+KNvxOG0OEO/Zb0pSfIcXmM92GQrTxBvfkqpRNpY+0tXjpYAMRtginuEsRQsQjvo3XPPh13SsCbruuhkFeCEzJF7ySDxAjBtRdReMU+Jww4pEOfY+NPQuTEVIt63LHYxr8MxtZNRbS04n66JcgBSAEx6X7jcPMXvk5Umd/xBPyJ33bgpU/ufeTbW78t1z/rk7a7Rp+nO7Sb6apTItXCl7mbeuYJe2s2Js4xSHZb71T0mJ8sk9r7o2D4vX+oI0Fu0damYlPM4egfgpeFh+lF8hSmfb4hB395UHoT3hp3yK3fCEIOaSkGUHoCsfbBYsAXMbLsJi2OUoCC7lqLQv9yzNyKoMpMBAdy0O7BII9ceimXmvO9B16734CcbXGzzNLLN5rWLvNoszpqrQkAEqyrhN40gFpRvQtGdk5VBYoppYnn8D8s179Hw43iiYmvU3ptyWdWWfwR4mIKyXafGAnDC/8etjy2twLEA4bZZp00AvoGfH0WFyAC7sjdYWd7GbxPDoZxdc3jEOMVS9D9d7v+qtaNjN1+j7t5qaqUxuzREZ1XyNUkf1AW7tcd+jKpiM4TdO31af1pBxZ/xzJ1Cr3mJe/KtcYUZBNaCqtadkcVQbOWNRc0IEQ+wuLPVC7M9yFPVjhA15EvVZj9/tAKnOarw1M8xjpGxQTjez2lGc9r/XYAPSXYGMsDCPIvIb1WlWvreGJ5xxqqrE0JbltanC2JlC0RnJo1mh8fJqBnJdTjMvKEOeK4q8ZplFgy3Gml6ZscjNMlJb+abj4stwa+EUEB6uNAkibyo95gCYEUv+g== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(966005)(47076005)(5660300002)(186003)(7636003)(70206006)(4001150100001)(2906002)(82310400003)(4326008)(70586007)(53546011)(36860700001)(86362001)(2616005)(6666004)(7696005)(1076003)(426003)(8676002)(356005)(36906005)(55016002)(6916009)(83380400001)(26005)(316002)(8936002)(336012)(16526019)(36756003)(508600001)(6286002)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:51:07.5745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83ce410d-b546-479e-034d-08d9a4167919 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5331 Subject: [dpdk-stable] patch 'ethdev: forbid closing started device' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 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/12/21. 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/dabe1ce96409c54a646583310ab3c79bab07744f Thanks. Xueming Li --- >From dabe1ce96409c54a646583310ab3c79bab07744f Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Wed, 20 Oct 2021 16:15:40 +0300 Subject: [PATCH] ethdev: forbid closing started device Cc: Xueming Li [ upstream commit febc855b358e3579f0eb44c76c329b623f87a376 ] Ethernet device must be stopped first before close in accordance with the documentation. Fixes: 980995f8cc56 ("ethdev: improve API comments of close and detach functions") Signed-off-by: Andrew Rybchenko Acked-by: Thomas Monjalon Acked-by: Ajit Khaparde --- lib/librte_ethdev/rte_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 22fb0b96d7..9b695e1e1b 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1814,6 +1814,12 @@ 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) { + RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n", + port_id); + return -EINVAL; + } + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); *lasterr = (*dev->dev_ops->dev_close)(dev); if (*lasterr != 0) -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.356791824 +0800 +++ 0167-ethdev-forbid-closing-started-device.patch 2021-11-10 14:17:01.980745191 +0800 @@ -1 +1 @@ -From febc855b358e3579f0eb44c76c329b623f87a376 Mon Sep 17 00:00:00 2001 +From dabe1ce96409c54a646583310ab3c79bab07744f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit febc855b358e3579f0eb44c76c329b623f87a376 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -16 +18 @@ - lib/ethdev/rte_ethdev.c | 6 ++++++ + lib/librte_ethdev/rte_ethdev.c | 6 ++++++ @@ -19,5 +21,5 @@ -diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c -index 3b8ef9ef22..f981e0226a 100644 ---- a/lib/ethdev/rte_ethdev.c -+++ b/lib/ethdev/rte_ethdev.c -@@ -1893,6 +1893,12 @@ 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 22fb0b96d7..9b695e1e1b 100644 +--- a/lib/librte_ethdev/rte_ethdev.c ++++ b/lib/librte_ethdev/rte_ethdev.c +@@ -1814,6 +1814,12 @@ rte_eth_dev_close(uint16_t port_id)