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 1B9CEA0548 for ; Sun, 28 Nov 2021 16:02:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1226F4068A; Sun, 28 Nov 2021 16:02:16 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2080.outbound.protection.outlook.com [40.107.94.80]) by mails.dpdk.org (Postfix) with ESMTP id E36BC4068A for ; Sun, 28 Nov 2021 16:02:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fblkUVyoi9bLlEuDF0+QRHwzn/54zE4xeU0r57lYbYDOyflaITn7ypM8qPDZk5at/2cEM5v3+IP6lejGmm+wqX1qWJA/x9u81FAPKkYhgJP4S0MA12ZOE8WMEH72ZzWDtAGJRsPpMxBnoeawhUXhbbv8Zh/889kIB13YvcRB48EequozcKj4WYC9mdpl7DuxJ2Is/IwRfNJTp9zgIwBF1Hskm19iNJeCLByNGHK5340VBUmDJUHCXuqp0NaVX5Osuooxs/Vd+UYvlWmCzVhW2MaN4Ne/fZ2Rez2Eex5yCNJqeWO6lMb8Sb8B3QfSPm6pywLzIrN1YA9DEuyi3UFJwA== 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=uBfBuQt3e39Rrb0wLEERkgfvMcSSQtzYwH5I0GA/uq4=; b=hOH9FdIx7J1Mrd0gVR6RhQfsohib0j/pKxdFBUylu6QLkHGkbupFDUTI/9uv2R175GyC4SnOFEiwf8YIIJFmAln9WWwnK+qLPqrJvF1gM8vX8E/+OUALydVnVr9KYt71rPmXw4y2n9e6c0nBVF48XjrjyXHZWeZfTNkwHXWbmqv3q4OGujuYhhLlwYksfygiJk7sA5gC2bh041skTLCbsFvLX2X+8viVpsFw/ALcPZmLuyQ6MF4bKX8kAcHv7Ir+rq4eVUawrQ47yAAt/wnSSzQE2T2QvDreZpsOMiNzLJ1XKl7t5WPDwNKF1zdipvx2jzXZDHf6T/CU/Eng1/cRvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.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=uBfBuQt3e39Rrb0wLEERkgfvMcSSQtzYwH5I0GA/uq4=; b=R0bDS/06mhtkiuD2iLQyKfC65ASg7/gWURVoDEeMMly09/Zhw1sE/Fxbd18YViFj5yVgllp4eufBcLrH4PvpTb430QJwZRQoIM4KNwMoQYnh4GS3yu3dgXtEWpx5TGvoSyUCe95dFruU9B+W2gwqA3wTAO/ySSfpur4zvRHuusYiaabF5ZDogDQcgechm/BYkOCUi7vwt2loH6vjKE1Va5OEOh7M5lx9qYcZXcjOqTRVkY+G3dyJk5v5/2LV6glVu37T3HRtiabgXJ6QgqbARr8jrGpyadrxrB/vwzm/dPJRwvbjRMJ0hvJNqh8nltUeppyj01Vk+r9VKvPZC9dwMQ== Received: from BN1PR10CA0003.namprd10.prod.outlook.com (2603:10b6:408:e0::8) by BL0PR12MB2449.namprd12.prod.outlook.com (2603:10b6:207:40::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.24; Sun, 28 Nov 2021 15:02:12 +0000 Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e0:cafe::ea) by BN1PR10CA0003.outlook.office365.com (2603:10b6:408:e0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23 via Frontend Transport; Sun, 28 Nov 2021 15:02:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:02:12 +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; Sun, 28 Nov 2021 15:02:10 +0000 From: Xueming Li To: Junxiao Shi CC: Luca Boccassi , Ferruh Yigit , dpdk stable Subject: patch 'net/memif: allow stopping and closing device' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:54:13 +0800 Message-ID: <20211128145423.3974892-70-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-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: a4de2cfd-ede1-4e9c-ec3e-08d9b2800f01 X-MS-TrafficTypeDiagnostic: BL0PR12MB2449: 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: 45GBDKmTLN5F90lP5mTP5s64o7uCx/ruaWuRPJWV/E8E6jsO+KvGIsBsvJxaZAZ1IKhwuYEWsQoq+IkdrjPeou86o1D38QTkKorJCiGclLHUJg7cA6qNfDOE/EV+12S6Th3sLAgCWGFZCLy1emHg7O2s1AuFu71rLnLu0iqUbGa6N5O1XGoMQWIo6F6ai2mZZoeWBOy4Yv8EURZkU5Nzx7yRcKMmXHayfOhKjNAadvrw4Cuum+VcweNhP32imgKkFZ4OZqfIbHqC4yiILk1mPM8GwKkDiF1oU7rkKWzYZ7yWSQ6Dd9FLbK1pjLLzii94kjzXUvu8jLbao/yXpLGMxCYlHDj/n1MLCmbyiABtNp8BzgeUDRKchtn7H186aIuwaIorYBJdf5cAUeB012ggcap33MA252Zm4lOKe4RLz6PyP+EuOrggaK+CEcBOQR9fanEkFJ7EdKf978kGNUnyMu5INqL03eFSyqhnvZgM9zSDrTySewiScthsXEYO/CN5+sJu0OXUSJITasvY+mkMSX5gR5LbJYz4crV1BiPh7ms5Aq9iBtJZ8gI7lG2H01+bIzKYd1ug8bDmYe+sYJ7JrOhabw22mbxDx2fkyI0Xas/felfEx1ZYcPMKsNNYQrDb/n2938+Tcg6vr0C8AAovFD7rb+Wq4qvPyCoPqJ+4Q3xLSqknF/wWdFV8MijoSZoNGRkdqGfnJoMnm4a+J130Vd93IJY44+PL6F79erfbpm7viK7CRCm8b4qwmx8IOGkdMgkCEiPvY0o4znzBn6QgjThX30Y8jBB9x2wryak3M2kKzs/EJLaDil9nPu7qeRM40d6fcdHAP96ERVLxnRsz9w== 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)(36840700001)(46966006)(8676002)(508600001)(426003)(36860700001)(86362001)(7696005)(53546011)(186003)(4001150100001)(336012)(7636003)(55016003)(6916009)(54906003)(356005)(70206006)(26005)(70586007)(1076003)(83380400001)(2616005)(82310400004)(2906002)(6286002)(8936002)(36756003)(5660300002)(16526019)(4326008)(966005)(316002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:02:12.4389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4de2cfd-ede1-4e9c-ec3e-08d9b2800f01 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: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2449 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.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/30/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/e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f Thanks. Xueming Li --- >From e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f Mon Sep 17 00:00:00 2001 From: Junxiao Shi Date: Thu, 18 Nov 2021 17:33:46 +0000 Subject: [PATCH] net/memif: allow stopping and closing device Cc: Xueming Li [ upstream commit 858a152ab5e99852390b3157c2a4ecbb23022b4f ] Bugzilla ID: 888 Fixes: febc855b358e ("ethdev: forbid closing started device") Signed-off-by: Junxiao Shi Reviewed-by: Ferruh Yigit --- drivers/net/memif/rte_eth_memif.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index aded2ac134..2df9a14e63 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1245,6 +1245,13 @@ memif_dev_start(struct rte_eth_dev *dev) return ret; } +static int +memif_dev_stop(struct rte_eth_dev *dev) +{ + memif_disconnect(dev); + return 0; +} + static int memif_dev_close(struct rte_eth_dev *dev) { @@ -1253,7 +1260,6 @@ memif_dev_close(struct rte_eth_dev *dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) { memif_msg_enq_disconnect(pmd->cc, "Device closed", 0); - memif_disconnect(dev); for (i = 0; i < dev->data->nb_rx_queues; i++) (*dev->dev_ops->rx_queue_release)(dev->data->rx_queues[i]); @@ -1261,8 +1267,6 @@ memif_dev_close(struct rte_eth_dev *dev) (*dev->dev_ops->tx_queue_release)(dev->data->tx_queues[i]); memif_socket_remove_device(dev); - } else { - memif_disconnect(dev); } rte_free(dev->process_private); @@ -1464,6 +1468,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused) static const struct eth_dev_ops ops = { .dev_start = memif_dev_start, + .dev_stop = memif_dev_stop, .dev_close = memif_dev_close, .dev_infos_get = memif_dev_info, .dev_configure = memif_dev_configure, -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:06.736654781 +0800 +++ 0069-net-memif-allow-stopping-and-closing-device.patch 2021-11-28 22:41:03.426872382 +0800 @@ -1 +1 @@ -From 858a152ab5e99852390b3157c2a4ecbb23022b4f Mon Sep 17 00:00:00 2001 +From e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 858a152ab5e99852390b3157c2a4ecbb23022b4f ] @@ -8 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +19 @@ -index 43d7378329..e3d523af57 100644 +index aded2ac134..2df9a14e63 100644 @@ -20 +22 @@ -@@ -1260,6 +1260,13 @@ memif_dev_start(struct rte_eth_dev *dev) +@@ -1245,6 +1245,13 @@ memif_dev_start(struct rte_eth_dev *dev) @@ -34 +36 @@ -@@ -1268,7 +1275,6 @@ memif_dev_close(struct rte_eth_dev *dev) +@@ -1253,7 +1260,6 @@ memif_dev_close(struct rte_eth_dev *dev) @@ -41,3 +43,3 @@ - (*dev->dev_ops->rx_queue_release)(dev, i); -@@ -1276,8 +1282,6 @@ memif_dev_close(struct rte_eth_dev *dev) - (*dev->dev_ops->tx_queue_release)(dev, i); + (*dev->dev_ops->rx_queue_release)(dev->data->rx_queues[i]); +@@ -1261,8 +1267,6 @@ memif_dev_close(struct rte_eth_dev *dev) + (*dev->dev_ops->tx_queue_release)(dev->data->tx_queues[i]); @@ -51 +53 @@ -@@ -1515,6 +1519,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused) +@@ -1464,6 +1468,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused)