Commit d34635f0 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

nvmf: Move nvmf_tgt_poll_group_add lower in file



This is only called from one spot, so move it near there.

Change-Id: I7e98ea9f95ba86e663566f6a1cbbc4f88d89a1d4
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452470


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
parent 67234b6a
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -106,18 +106,6 @@ spdk_nvmf_subsystem_fini(void)
	_spdk_nvmf_shutdown_cb(NULL);
}

static void
nvmf_tgt_poll_group_add(void *arg1, void *arg2)
{
	struct spdk_nvmf_qpair *qpair = arg1;
	struct nvmf_tgt_poll_group *pg = arg2;

	if (spdk_nvmf_poll_group_add(pg->group, qpair) != 0) {
		SPDK_ERRLOG("Unable to add the qpair to a poll group.\n");
		spdk_nvmf_qpair_disconnect(qpair, NULL, NULL);
	}
}

/* Round robin selection of cores */
static uint32_t
spdk_nvmf_get_core_rr(void)
@@ -210,6 +198,18 @@ nvmf_tgt_get_qpair_core(struct spdk_nvmf_qpair *qpair)
	return core;
}

static void
nvmf_tgt_poll_group_add(void *arg1, void *arg2)
{
	struct spdk_nvmf_qpair *qpair = arg1;
	struct nvmf_tgt_poll_group *pg = arg2;

	if (spdk_nvmf_poll_group_add(pg->group, qpair) != 0) {
		SPDK_ERRLOG("Unable to add the qpair to a poll group.\n");
		spdk_nvmf_qpair_disconnect(qpair, NULL, NULL);
	}
}

static void
new_qpair(struct spdk_nvmf_qpair *qpair)
{