Spdk/test/unit
Evgeniy Kochetov 3b26e2c594 nvme/rdma: Create poller and CQ on demand
Original implementation creates pollers and CQs for all discovered
devices at poll group creation. Device (ibv_context) that has no
references, i.e. has no QPs, may be removed from the system and
ibv_context may be closed by rdma_cm. In this case we will have a CQ
that refers to closed ibv_context and it may crash in ibv_poll_cq.

With this patch pollers are created on demand when we create the first
QP for a device. When there are no more QPs on the poller, we destroy
the poller. This also helps to avoid polling CQs that don't have any
QPs attached.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I46dd2c8b9b2902168dba24e139c904f51bd1b101
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13692
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-22 07:27:22 +00:00
..
include Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
lib nvme/rdma: Create poller and CQ on demand 2022-07-22 07:27:22 +00:00
.gitignore test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
Makefile Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
unittest.sh ftl: management framework 2022-07-11 07:23:58 +00:00