23/01/2018 14:34, Ananyev, Konstantin: > If that' s the use case, then I think you need to set device ownership at > creation time - > inside dev_allocate(). > Again that would avoid such racing conditions inside testpmd.
The devices must be allocated at a low level layer. When a new device appears (hotplug), an ethdev port should be allocated automatically if it passes the whitelist/blacklist policy test. Then we must decide who will manage this device. I suggest notifying the DPDK libs first. So a DPDK lib or PMD like failsafe can have the priority to take the ownership in its notification callback.