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 62EC34280A for ; Wed, 22 Mar 2023 12:54:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57D2D4282D; Wed, 22 Mar 2023 12:54:32 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 1A06C40A84; Wed, 22 Mar 2023 12:54:30 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E8E823200302; Wed, 22 Mar 2023 07:54:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 22 Mar 2023 07:54:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1679486067; x=1679572467; bh=84o3VsvL89j2h7HOZG/hHSblAjVNlM85mu/ 2+nSUs6s=; b=xkzP4Jkqioxas6obqulGmut694eLMu4XuoMKRhaeu+jDyStOc6S at2p3D7IBZb8t1izePkPmWcE1VXdhDsqj887XfDAPL4ohzP+BAua8O0cH0ggh6uW TjsAax6lU6EHOC2DO7QLzk3iflGU1KranYS/+Cdq3yO2ZluW5e2fxbaGOvtn3+6w sJUHa/2WIDLYmqOm5Dzup71eM7p3pq85iF1BVoowXx3EqLlNisEAwo32Og/lbHHe dLL38PtCM/AUACDJOR8qc69VqtVAHTn/afzAuvNRr5Mjp+jdMoGPWMKN2/Qfj7Wz JmmxtvbQktlP++W9E0RxgSjlATyBPlFCyEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679486067; x=1679572467; bh=84o3VsvL89j2h7HOZG/hHSblAjVNlM85mu/ 2+nSUs6s=; b=CgDZElcNOHZmOyQTIGylUxO8OPGLlOfgc36+acEcTQw8buZmeq3 y2L0KWkS+byVk/8lbVrL9mAzjPjQR0Drfe5pTFAh3T5JtwKOTu8slsjqAWZ7xxrd vi/EGCQ1pbMmwj9i/gyLzaVSnUPIdYdTyxsOG+wF+665W1wrFk5r9J7VrEAgzmsO Fh0Rha3L2wbvvHgdg31KjKIrGspzD3TAVALoj5JUq+hBUkAvvL16O0v2TY189ThR /GFGwmrFvNhM4B6G0hG830/wQa8iG1J/Yua3jjB2/eggiy2lkGoON3ueGVgHTrjO UZ1PV1tpUipYETL3Az15x93itemXwVozvYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegvddgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Mar 2023 07:54:25 -0400 (EDT) From: Thomas Monjalon To: "Huang, Wei" Cc: "dev@dpdk.org" , "david.marchand@redhat.com" , "stable@dpdk.org" , "Xu, Rosen" , "Zhang, Tianfei" , "Zhang, Qi Z" Subject: Re: [PATCH v1] raw/ifpga: remove virtual device unplug operation Date: Wed, 22 Mar 2023 12:54:24 +0100 Message-ID: <5367342.29KlJPOoH8@thomas> In-Reply-To: References: <20230316204445.360330-1-wei.huang@intel.com> <2637984.KRxA6XjA2N@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 22/03/2023 02:26, Huang, Wei: > From: Thomas Monjalon > > 21/03/2023 09:41, Huang, Wei: > > > From: Thomas Monjalon > > > > 21/03/2023 01:11, Huang, Wei: > > > > > From: Thomas Monjalon > > > > > > 16/03/2023 21:44, Wei Huang: > > > > > > > VDEV bus has implemented cleanup() function to perform cleanup > > > > > > > for devices on the bus during eal_cleanup(), so there is no > > > > > > > need for ifpga driver to record virtual devices and unplug them. > > > > > > > > > > > > Why no need? > > > > > > If the application wants to explicitly remove a device, what happens? > > > > > > > > > > > > > > > > > EAL will output an error information "Cannot find plugged device (%s)". > > > > > > > > It does not look what we expect. > > > > > > > Let me clear it. > > > With this patch, no error information will be outputted. > > > Without this patch, error information will be outputted. > > > Because bus cleanup action will unplug virtual device, then ifpga PMD > > > unplug the virtual device which is already be cleanup, > > > > Why ipfga unplug the device after the bus cleanup? > > I'm not following. > > > The virtual device is created upon ifpga, if VDEV bus doesn't perform cleanup, > ifpga has the responsibility to unplug these virtual devices. Really I don't understand the flow. Are you talking about EAL cleanup case? What happens first? Do you need ifpga to be called first? I think you need the correct checks to allow any order of cleanup. > > > bus->find_device() returns NULL, > > > EAL output "Cannot find plugged device (%s)\n" at line 302 in > > > eal_common_dev.c > > > > Anyway, the good answer is not to completely remove the "remove" > > operation. > > > If not to completely remove the "remove", the same virtual device will be unplug twice, is it reasonable? You need to add a check to not unplug something already unplugged. But you must allow the user calling "remove" directly.