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

iscsi: Always schedule discovery sessions on the acceptor thread



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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent fc35f1ae
Loading
Loading
Loading
Loading
+25 −21
Original line number Diff line number Diff line
@@ -1430,6 +1430,12 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)

	lcore = SPDK_ENV_LCORE_ID_ANY;

	if (conn->sess->session_type != SESSION_TYPE_NORMAL) {
		/* Leave all non-normal sessions on the acceptor
		 * thread. */
		return;
	}

	for (i = 0; i < spdk_env_get_core_count(); i++) {
		if (g_next_core > spdk_env_get_last_core()) {
			g_next_core = spdk_env_get_first_core();
@@ -1450,7 +1456,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
		lcore = spdk_env_get_first_core();
	}

	if (conn->sess->session_type == SESSION_TYPE_NORMAL) {
	target = conn->sess->target;
	pthread_mutex_lock(&target->mutex);
	target->num_active_conns++;
@@ -1471,7 +1476,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
		lcore = target->lcore;
	}
	pthread_mutex_unlock(&target->mutex);
	}

	iscsi_poll_group_remove_conn(conn);