Commit 43062f22 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

iscsi: Pass the callback to poll group initialization as an argument



The next patch will move the location and change the callback of poll
group initialization. Besides it is probable for JSON config file to
change the callback of poll group initialization.

Passing callback as argument increases visibility and flexibility of
code.

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


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 d999e6af
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -900,7 +900,7 @@ iscsi_unregister_poll_group(void *ctx)
}

static void
spdk_initialize_iscsi_poll_group(void)
spdk_initialize_iscsi_poll_group(spdk_thread_fn cpl)
{
	size_t g_num_poll_groups = spdk_env_get_last_core() + 1;

@@ -912,7 +912,7 @@ spdk_initialize_iscsi_poll_group(void)
	}

	/* Send a message to each thread and create a poll group */
	spdk_for_each_thread(iscsi_create_poll_group, NULL, iscsi_create_poll_group_done);
	spdk_for_each_thread(iscsi_create_poll_group, NULL, cpl);
}

void
@@ -959,7 +959,7 @@ spdk_iscsi_init(spdk_iscsi_init_cb cb_fn, void *cb_arg)
		return;
	}

	spdk_initialize_iscsi_poll_group();
	spdk_initialize_iscsi_poll_group(iscsi_create_poll_group_done);
}

void