From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 91DAA7D3A for ; Wed, 23 Aug 2017 18:18:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3CA97208A4; Wed, 23 Aug 2017 12:18:35 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 23 Aug 2017 12:18:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=RWuEwNnTUQEcqDl aZNeuJcPSL9uegBaEtgtIFDL7z3I=; b=BDGALreVxJdwpK3tQL/v1EgrqXhJ1jJ nQSy4b6UYiMiJnCwxDmQhlm1XHnoMfu6imXzUAT3cHMK0IHWO5neWSIwIMyUBEBn Hn4AMtavtW7LsaLrlLP9jIvNWJjXQlDKWJGQmQ4ALxOvdL+5Fr2hgdJwc+Aih9nC 6bG/RpdjyiSk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=RWuEwNnTUQEcqDlaZNeuJcPSL9uegBaEtgtIFDL7z3I=; b=NAM6cF7v 9MuwalQd+U0ocKZMqVf35/1HKJhggMYkA2erTmZYZWVXJSQpp4gUsns4gUMZiqOp eWXJJQLkUGe/Ui94NYViKHR8bt8JyQK5AfbC0nuaRprKewx6q5cAo/CAkQuHTczT K430rIXyzzZdEaZ5dkc35UEtaA95O44A4QaG6v7MRRMV79t1x/VZTXl0jMsTITNv /muwCIHD2cPvXvogci5JErQJr/Synuc42Fot94mMmC62PhAhn4KtcRvm86x30crX 2NWkSLrchHYPPdicpQw/uAQlycvqWLX035D2WD1AGzH03CMwfn9SbfTJ/kKhZHhF OXd3fEkfsuW10Q== X-ME-Sender: X-Sasl-enc: eq3yyPAT6or0NN9vofcEBv6OWqDJUQoc8+QsPSyvm1Gg 1503505114 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id E1A987E300; Wed, 23 Aug 2017 12:18:34 -0400 (EDT) From: Thomas Monjalon To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Cc: Raslan Darawsheh , jingjing.wu@intel.com, dev@dpdk.org, salehals@mellanox.com Date: Wed, 23 Aug 2017 18:18:34 +0200 Message-ID: <2302304.eNG2ySBljJ@xps> In-Reply-To: <20170823150909.GA8124@bidouze.vm.6wind.com> References: <1503499024-12480-1-git-send-email-rasland@mellanox.com> <20170823150909.GA8124@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: app/testpmd: add device removal command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 16:18:35 -0000 23/08/2017 17:09, Ga=EBtan Rivet: > Hello Raslan, >=20 > On Wed, Aug 23, 2017 at 05:37:04PM +0300, Raslan Darawsheh wrote: > > Added hotplug in testpmd, to be able to test hotplug function > > in the PMD's. > >=20 > > Signed-off-by: Raslan Darawsheh [...] > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > @@ -716,6 +716,9 @@ static void cmd_help_long_parsed(void *parsed_resul= t, > > "port config (port_id|all) l2-tunnel E-tag" > > " (enable|disable)\n" > > " Enable/disable the E-tag support.\n\n" > > + > > + " device remove (device)\n" > > + " Remove a device" >=20 > I think it should still be a part of the "port" command set (port > attach|detach|stop|close, etc). I tend to disagree. As far as I know, we use port for ethdev or cryptodev. Here we want to deal with EAL rte_device. > This would probably be easier to understand for users. [...] > Continuing on using the port ... > format, then the port_id should allow to remove it instead of the device > identifier. > Using the device identifier will complexify your implementation. [...] > eth_dev =3D &rte_eth_devices[port_id]; > bus =3D rte_bus_find_by_device(eth_dev->device); Note that we are going to remove eth_dev->device which implies eth_dev but maybe also more device interfaces for the same HW. That's why I think we need to distinguish port and device somehow.