[dpdk-dev] How to replace rte_eth_dev_attach with rte_eal_hotplug_add

Andrzej Ostruszka amo at semihalf.com
Thu Sep 27 15:48:44 CEST 2018


On 27.09.2018 12:40, Hideyuki Yamashita wrote:
[...]
>>> Is it correct understanding that race condition 
>>> includes
>>> - read information before port is available
>>> - other device may be plugged (or unplugged)
>>> and so using "eth_dev_last_created_port" is 
>>> NOT reliable?
>>
>> I am thinking about the second one only.
> 
> If we assume there is only one DPDK application 
> inside the host and within the application, only one thread
> handles attach/detach of devices, then is it ok to use

This depends also a bit on the PMD you intend to use.  Some PMDs can
create more than 1 port (e.g. for internal purposes) in which case
eth_dev_last_created_port is not reliable.

Best regards
Andrzej


More information about the dev mailing list