From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 2/6] app/testpmd: allow detaching a port not closed Date: Thu, 18 Oct 2018 13:24:20 +0200 Message-ID: <5775146.fcEkvuPi5X@xps> References: <20180907233929.21950-1-thomas@monjalon.net> <3763fc32-1db1-1220-079f-fbb6e9fff041@solarflare.com> <8CEF83825BEC744B83065625E567D7C260D12CF2@IRSMSX107.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Andrew Rybchenko , "Yigit, Ferruh" , "ophirmu@mellanox.com" , "rahul.lakkireddy@chelsio.com" To: "Iremonger, Bernard" Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 460685B2E for ; Thu, 18 Oct 2018 13:24:18 +0200 (CEST) In-Reply-To: <8CEF83825BEC744B83065625E567D7C260D12CF2@IRSMSX107.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 18/10/2018 12:51, Iremonger, Bernard: > From: Andrew Rybchenko [mailto:arybchenko@solarflare.com] > > On 10/18/18 4:23 AM, Thomas Monjalon wrote: > > > The testpmd application aim is for testing; so order of operations > > > should not be enforced. > > > > > > There was a test to forbid detaching before closing a port. > > > However, it may interesting to test what happens in such case. > > > It is possible for a PMD to automatically close the port when detaching. > > > > Yes. In the case of net/sfc it requires a patch to call sfc_dev_close() from uninit. > > I think network PMD maintainers should be notified to double-check drivers. > > > > > in order to avoid a crash, it is checked that the port must be stopped > > > before detaching (as for closing). > > > > I thought that it is sufficient to stop traffic and the port may be stopped > > automatically by PMD. Not sure about it, just would like to clarify my previous > > notes. > > > > > Signed-off-by: Thomas Monjalon > > > > [...] > > This patch seems too risky as it may impact some of the PMD's. Yes, it will not work for all PMDs. If we want to allow this scenario, we'll need to improve some PMDs. This patch is just allowing to test the scenario. It will help PMD developers, so I think it is more helpful than risky.