Commit 683c7d05 authored by Cunyin Chang's avatar Cunyin Chang Committed by Daniel Verkamp
Browse files

iscsi: increment the correct lcore's g_num_connections in FFP transition



When a connection enters full-feature phase and is assigned to an lcore,
we need to increment the counter for the new lcore, not the connection's
existing lcore.

Change-Id: Idced4090b6e8ac35a767fd223fbd81ba824615d3
Signed-off-by: default avatarCunyin Chang <cunyin.chang@intel.com>
parent 0a845cb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1320,7 +1320,7 @@ spdk_iscsi_conn_login_do_work(void *arg)
	if (conn->login_phase == ISCSI_FULL_FEATURE_PHASE) {
		event = spdk_iscsi_conn_get_migrate_event(conn, &lcore);
		__sync_fetch_and_sub(&g_num_connections[spdk_app_get_current_core()], 1);
		__sync_fetch_and_add(&g_num_connections[conn->lcore], 1);
		__sync_fetch_and_add(&g_num_connections[lcore], 1);
		spdk_net_framework_clear_socket_association(conn->sock);
		spdk_poller_unregister(&conn->poller, event);
	}