Commit 29119cdf authored by Krzysztof Goreczny's avatar Krzysztof Goreczny Committed by Konrad Sztyber
Browse files

nvmf: move register nvmf_poll_group_poll interrupt to nvmf



Make interrupt register for nvmf_poll_group_poll more explicit by doing
it inside nvmf_poll_group_poll() rather than internals of vfio_user
transport.
This call is needed for any transport willing to work in interrupt mode,
otherwise nvmf_poll_group_poll will keep on polling.

Change-Id: I287dee1cbbff94b3843f8dc501ede9070cbea0ca
Signed-off-by: default avatarKrzysztof Goreczny <krzysztof.goreczny@dell.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23216


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBoris Glimcher <Boris.Glimcher@emc.com>
parent c7d22538
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -249,6 +249,11 @@ nvmf_poll_group_add_transport(struct spdk_nvmf_poll_group *group,
	return 0;
}

static void
nvmf_tgt_poller_set_interrupt_mode(struct spdk_poller *poller, void *cb_arg, bool interrupt_mode)
{
}

static int
nvmf_tgt_create_poll_group(void *io_device, void *ctx_buf)
{
@@ -267,6 +272,7 @@ nvmf_tgt_create_poll_group(void *io_device, void *ctx_buf)
	pthread_mutex_init(&group->mutex, NULL);

	group->poller = SPDK_POLLER_REGISTER(nvmf_poll_group_poll, group, 0);
	spdk_poller_register_interrupt(group->poller, nvmf_tgt_poller_set_interrupt_mode, NULL);

	SPDK_DTRACE_PROBE1_TICKS(nvmf_create_poll_group, spdk_thread_get_id(thread));

+0 −3
Original line number Diff line number Diff line
@@ -4726,9 +4726,6 @@ vfio_user_poll_group_add_intr(struct nvmf_vfio_user_poll_group *vu_group,
	vu_group->intr = SPDK_INTERRUPT_REGISTER(vu_group->intr_fd,
			 vfio_user_poll_group_intr, vu_group);
	assert(vu_group->intr != NULL);

	spdk_poller_register_interrupt(group->poller, set_intr_mode_noop,
				       vu_group);
}

static struct spdk_nvmf_transport_poll_group *