From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 22AB3239
 for <dev@dpdk.org>; Tue, 28 Nov 2017 23:02:21 +0100 (CET)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Nov 2017 14:02:20 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.44,468,1505804400"; 
   d="scan'208";a="7265791"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.203])
 ([10.241.225.203])
 by fmsmga004.fm.intel.com with ESMTP; 28 Nov 2017 14:02:20 -0800
To: "Wu, Jingjing" <jingjing.wu@intel.com>,
 =?UTF-8?Q?Ga=c3=abtan_Rivet?= <gaetan.rivet@6wind.com>
Cc: Raslan Darawsheh <rasland@mellanox.com>,
 "thomas@monjalon.net" <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>,
 "salehals@mellanox.com" <salehals@mellanox.com>
References: <1503499024-12480-1-git-send-email-rasland@mellanox.com>
 <20170828095523.GE8124@bidouze.vm.6wind.com>
 <2200a72f-92bb-c4e6-db9d-b00961fc328b@intel.com>
 <20170828111240.GF8124@bidouze.vm.6wind.com>
 <9BB6961774997848B5B42BEC655768F810E4255C@SHSMSX103.ccr.corp.intel.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <24d62f28-52c6-6df6-525c-920c97e52112@intel.com>
Date: Tue, 28 Nov 2017 14:02:19 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <9BB6961774997848B5B42BEC655768F810E4255C@SHSMSX103.ccr.corp.intel.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Nov 2017 22:02:22 -0000

On 9/7/2017 1:17 AM, Wu, Jingjing wrote:
>>>
>>> Since dealing with device is kind of new, it can be OK to create new
>>> command tree, but there are already hotplug commands per port:
>>> "port attach #PCI|#VDEV_NAME"
>>> "port detach #P"
>>>
>>
>> Those two commands deal with the etherdev hotplug API.
>> The new command should test the rte_dev one.
>>
> I was confused. The forwarding in testpmd setup is based on port id, right?
> And all the devices listed in testpmd is etherdev, and all functional testings are all based on port id, right?
> Then what is the difference to use port id or device name in testpmd?
> And if no difference, what is the difference between detach and remove?
> 
> The only difference here I think is
> Remove command is using rte_bus hotplug framework.
> Attach/detach is using rte_eth_dev_detach API.

Hi Raslan,

With latest code "detach" does rte_bus hotplug remove. So I believe this patch
is no more required. Can you please confirm?

Thanks,
ferruh

> 
> I think remove command should be an important command, and should not have ambiguity.
> At least we need to doc it clearly.
> 
> 
>> As Thomas pointed out, the etherdev one deals only with eth ports, while
>> hotplug could be generalized to other devices, such as cryptodev.
>>
>>> perhaps it can be good to keep "attach", "detach" keywords for device to
>>> be consistent?
>>>
>>> "device attach #name"
>>> "device detach #name"
>>>
>>
>> I made a point of naming the hotplug operations in rte_bus plug/unplug
>> to avoid the confusion with the etherdev API. hotplug_add /
>> hotplug_remove also marks the distinction.
>>
>> I don't know if it would be helpful for a developer writing a PMD,
>> searching for a way to test a functionality to have an API name
>> mismatch.
>>
>>> Also a show equivalent can be added to work in device level:
>>> "show device info"
>>>
>>
>> I think it would be useful.
>>
>>>
>>> [1]
>>> http://dpdk.org/ml/archives/dev/2017-August/072764.html
>>>
>>>
>>
>> --
>> Gaƫtan Rivet
>> 6WIND
>