Commit 79f508b0 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

iscsi: set last_nopin when connection is established



This ensures we don't send a nopin immediately after
a connection is established, in case the nopin poller
fires before the connection reaches full feature phase.

Fixes #1441.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ieba9476bec0e9b7f85e60b9113ae8364eda5bda3

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3902


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent d84ae74d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ iscsi_conn_construct(struct spdk_iscsi_portal *portal,
	conn->timeout = g_iscsi.timeout * spdk_get_ticks_hz(); /* seconds to TSC */
	conn->nopininterval = g_iscsi.nopininterval;
	conn->nopininterval *= spdk_get_ticks_hz(); /* seconds to TSC */
	conn->last_nopin = spdk_get_ticks();
	conn->nop_outstanding = false;
	conn->data_out_cnt = 0;
	conn->data_in_cnt = 0;
@@ -1626,7 +1627,6 @@ iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
	/* Remove this connection from the previous poll group */
	iscsi_poll_group_remove_conn(conn->pg, conn);

	conn->last_nopin = spdk_get_ticks();
	conn->pg = pg;

	spdk_thread_send_msg(spdk_io_channel_get_thread(spdk_io_channel_from_ctx(pg)),