[dpdk-dev] [PATCH] app/testpmd: app/testpmd: add device removal command

Ferruh Yigit ferruh.yigit at intel.com
Tue Nov 28 23:02:19 CET 2017


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
> 



More information about the dev mailing list