Commit 02363ccb authored by Li Feng's avatar Li Feng Committed by Ben Walker
Browse files

lib/iscsi: fix iscsi connection schedule



If the qualified core wasn't found, then we should compare
spdk_env_get_core_count() with i, instead of lcore.

Signed-off-by: default avatarLi Feng <fengli@smartx.com>
Change-Id: Ie92f56712b7f0e51636008fe12fff5584b6be8ab
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456415


Reviewed-by: default avatarwuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent b7080d47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1452,7 +1452,7 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
		break;
	}

	if (lcore >= spdk_env_get_core_count()) {
	if (i >= spdk_env_get_core_count()) {
		SPDK_ERRLOG("Unable to schedule connection on allowed CPU core. Scheduling on first core instead.\n");
		lcore = spdk_env_get_first_core();
	}