env: describe enumerate function detail behavior

2s asynchronous delay is introduced to avoid race conditions between
user space software initialization and in-kernel device handling for
newly inserted devices. Subsequent enumerate call after the delay
shall allow for a successful device attachment.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I273111ae7a588ce5e15e593bbdfb223777c19071
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5060
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Jacek Kalwas 2020-11-09 10:10:25 -05:00 committed by Tomasz Zawadzki
parent cfccb8c383
commit 86e8085d58

View File

@ -774,6 +774,11 @@ struct spdk_pci_driver *spdk_pci_nvme_get_driver(void);
* on denylist. Because of that it becomes not possible to either use such
* devices with another application or unbind the driver (e.g. vfio).
*
* 2s asynchronous delay is introduced to avoid race conditions between
* user space software initialization and in-kernel device handling for
* newly inserted devices. Subsequent enumerate call after the delay
* shall allow for a successful device attachment.
*
* \param driver Driver for a specific device type.
* \param enum_cb Callback to be called for each non-attached PCI device.
* \param enum_ctx Additional context passed to the callback function.