Commit 180af18c authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

iscsi: Move PDU, session, and task pool init into iSCSI global params init



iSCSI subsystem have a pool for PDU, session, and task, respectively.

They belong to the struct spdk_iscsi_globals and are initialized by
using the parameters of the struct spdk_iscsi_globals.

Hence their initialization should be located just behind the setup of
parameters of the struct spdk_iscsi_globals.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: Ie39f63ee24c547dcd31a1a06d72d915e8c272864
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403142


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ef02d13d
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -800,6 +800,12 @@ spdk_iscsi_app_read_parameters(void)
		return -1;
	}

	rc = spdk_iscsi_initialize_all_pools();
	if (rc != 0) {
		SPDK_ERRLOG("spdk_initialize_all_pools() failed\n");
		return -1;
	}

	TAILQ_INIT(&g_spdk_iscsi.portal_head);
	TAILQ_INIT(&g_spdk_iscsi.pg_head);
	TAILQ_INIT(&g_spdk_iscsi.ig_head);
@@ -925,13 +931,6 @@ spdk_iscsi_init(spdk_iscsi_init_cb cb_fn, void *cb_arg)
		return;
	}

	rc = spdk_iscsi_initialize_all_pools();
	if (rc != 0) {
		SPDK_ERRLOG("spdk_initialize_all_pools() failed\n");
		spdk_iscsi_init_complete(-1);
		return;
	}

	rc = spdk_iscsi_portal_grp_array_create();
	if (rc < 0) {
		SPDK_ERRLOG("spdk_iscsi_portal_grp_array_create() failed\n");