Commit 3aaf8e0a authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

nvmf: Stop pg poller when all qpairs are destroyed



We stopped the poller to early, so we were not able to
reap all completions on ibv CQ, so RDMA qpair was not freed.
This patch stops the poller when all references to poll group
are released (all qpairs are destroyed)

Fixes #1578

Change-Id: I15c1697db13aef9da7567c7312476306c3ee1d62
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3962


Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent dd3d5800
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -185,6 +185,8 @@ nvmf_tgt_destroy_poll_group(void *io_device, void *ctx_buf)

	free(group->sgroups);

	spdk_poller_unregister(&group->poller);

	if (group->destroy_cb_fn) {
		group->destroy_cb_fn(group->destroy_cb_arg, 0);
	}
@@ -225,8 +227,6 @@ nvmf_tgt_destroy_poll_group_qpairs(struct spdk_nvmf_poll_group *group)
		return;
	}

	spdk_poller_unregister(&group->poller);

	ctx->group = group;
	_nvmf_tgt_disconnect_next_qpair(ctx);
}