From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id DE9647D05 for ; Fri, 25 Aug 2017 09:53:41 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id z91so4930445wrc.1 for ; Fri, 25 Aug 2017 00:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hNacpYe3cFsUzNSh0g3neCDQbRK1p6VKveJ7S15DDHU=; b=NhY/xjn6Ai+uTo4ZjKhf89T9HXOwc9ecWyE/oESRil8Bq8XEz+krg2iqOLUdNHjliY ueaAcZjb77gN61rKSP8QJmUyJ8EpJBh4yNCAFd6UiwAG47FIeeLPQtLlXzDvTYs93Sju SYb7WaYHxe8wFoSsJ9rEQG5LpFF9iwyGj9143qw6gqT0dUzf12JBsiHByc9F3E9rAZC9 xUK1/vavyeDAJuqyMzb8UqofkBarLMF+QP8tyxa84Gm8a5OO7goSZo4isrCMFA8NvahT +VUE1o1moSpw0vjlIq/MvKVe7dazvFgxeWSgiMQlDc4ntfApDCgvWuf29UG4eyvM37Fa Czkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=hNacpYe3cFsUzNSh0g3neCDQbRK1p6VKveJ7S15DDHU=; b=nWohQ4k0n8GHUfAwV4gI7lkE3z5CqY0mB639vN7YW7mSayDs0ZWGhUg6T34KfmRl0d FsPfjrc4XA5XPiBvSCEtp/QcwMviC1G+4NEN7LPqouPlTWKGg4dZLZArup3KUM6mISjw ldE4MyM/qZ3HU9V5DA2WYOVGD0yBtpt55OgQCaD5FyCkvg04RbknqeRk99QLqewk+TmB mqgBluvJCC9WX9wTzYXBfcN6wSxqJz9OX011StYBAIsxxikVmDFncyO4gUrtiG+yb5hv 2sKvmG2zEfxPuWnIDwMH4CLQ4G+Hz+mc/nSubDD4sPvGWQQvRNlkiJ7EzJVe31Jep5js VFrA== X-Gm-Message-State: AHYfb5iyZDDu8D7CloXNOXqLCczkqWwt1BpE4SXisGe2hL2lwafhdohd cVlye4Dnv9+/h2Qc X-Received: by 10.223.176.35 with SMTP id f32mr3132862wra.198.1503647621515; Fri, 25 Aug 2017 00:53:41 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id y95sm3135097wrc.34.2017.08.25.00.53.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Aug 2017 00:53:40 -0700 (PDT) Date: Fri, 25 Aug 2017 09:53:31 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: Raslan Darawsheh , jingjing.wu@intel.com, dev@dpdk.org, salehals@mellanox.com Message-ID: <20170825075331.GB8124@bidouze.vm.6wind.com> References: <1503499024-12480-1-git-send-email-rasland@mellanox.com> <20170823150909.GA8124@bidouze.vm.6wind.com> <2302304.eNG2ySBljJ@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2302304.eNG2ySBljJ@xps> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 25 Aug 2017 07:53:42 -0000 On Wed, Aug 23, 2017 at 06:18:34PM +0200, Thomas Monjalon wrote: > 23/08/2017 17:09, Gaëtan Rivet: > > Hello Raslan, > > > > 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. > > > > > > 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_result, > > > "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" > > > > 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. > I see, that makes sense. I will redo the review with that in mind. > > 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 = &rte_eth_devices[port_id]; > > bus = 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. -- Gaëtan Rivet 6WIND