From 683c7d05eb4e8f32597ed81c3a789f63eb9dbdfa Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Thu, 12 Jan 2017 12:51:14 +0800 Subject: [PATCH] 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: Cunyin Chang --- lib/iscsi/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index 283a0a9ce..c66a38081 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -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); }