Spdk/lib
Darek Stojaczyk 60b7ff32f3 pci: allow devices to be attached by surprise
With all the error checks and segfault preventions in place,
we can finally enable hotplug in a multi-process scenario
for DPDK 18.11+.

If a device is attached in the primary process, it will send
an attach IPC request to the secondary process which needs
to succeed. Until now it would get rejected, and the attach
would fail in all the processes.

The device in secondary process will be now probed by DPDK
and will be put into the process local SPDK list of devices
to be locally attached. Either SPDK will attach it sometime
later on any attach/enumerate request, or DPDK will remove
it automatically once the same device in the primary process
gets removed.

We also allow the surprise attach in primary processes, as
it's technically possible for the pci devices (NVMe) to
be attached exclusively from the secondary process. The
fact that the NVMe stack doesn't support it is another story.
Currently the NVMe stack will handle the failure by itself
just fine.

Change-Id: Ia24a8b4610cc7c659f59a2fdda9d8a78e58af873
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/434416 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-22 08:16:19 +00:00
..
bdev bdev: unregister bdevs top-down during shutdown. 2018-12-05 17:50:50 +00:00
blob blob: Remove snpashot from the list only on blob deletion 2018-12-14 17:59:20 +00:00
blobfs blobfs: align rw buffer to lba of device underneath 2018-09-18 16:35:57 +00:00
conf conf: don't strdup name if section already exist 2018-05-17 17:13:19 +00:00
copy lib/copy: unregister copy engine on finish 2018-10-15 17:42:20 +00:00
env_dpdk pci: allow devices to be attached by surprise 2019-03-22 08:16:19 +00:00
event lib/nvmf: add the nvmf qpair to the available poll group 2018-10-16 12:54:02 +00:00
ioat ioat: change the return type of ioat_channel_destruct() to be void 2018-09-18 22:41:00 +00:00
iscsi iscsi: do not caculate the CRC in multiple times 2018-12-05 00:36:40 +00:00
json json: add utilities function enabling itaration over JSON object 2018-10-18 16:07:37 +00:00
jsonrpc jsonrpc: simplify parsing client response 2018-10-18 16:07:37 +00:00
log log: update tracelog usage message 2018-10-24 18:25:37 +00:00
lvol lvol: _spdk_add_lvs_to_list: break loop immediately if find 2018-09-14 03:56:35 +00:00
nbd nbd: add support for io_wait implement in nbd 2018-10-02 22:36:01 +00:00
net lib: fix typos in the lib directory 2018-08-24 17:15:12 +00:00
nvme nvme: fix pci device leak when detaching a controller in primary process 2019-03-22 08:16:19 +00:00
nvmf nvmf: fix the error path for shared data buffer free. 2019-02-11 19:23:41 +00:00
rocksdb blobfs: add a new API to return file's unique ID 2018-08-29 16:29:22 +00:00
rpc rpc: g_rpc_lock_path: remove redundant plus 2018-09-04 22:21:04 +00:00
scsi trace: remove alias concept 2018-09-05 18:03:43 +00:00
sock sock: set the fd with non_block flag. 2018-10-15 17:57:31 +00:00
thread nvmf: change the return type of calloc failed 2018-12-12 15:26:21 +00:00
trace trace: remove alias concept 2018-09-05 18:03:43 +00:00
ut_mock test: Simplify the mock library 2018-08-09 17:18:23 +00:00
util util: make spdk_parse_ip_addr return -EINVAL instead -1 2018-10-12 23:34:27 +00:00
vhost vhost/blk: check against hotremoved bdev in GET_CONFIG handler 2018-10-23 17:54:46 +00:00
virtio virtio: support dynamic memory registrations 2018-10-23 18:02:12 +00:00
Makefile test: remove spdk_cunit library 2018-07-06 18:35:03 +00:00