Commit 8827ee1e authored by Jim Harris's avatar Jim Harris Committed by Changpeng Liu
Browse files

iscsi: remove ExpStatSN check



Technically this check is correct, but the Linux kernel
target doesn't have it, and older versions of libiscsi
have a bug which result in stale ExpStatSN getting sent
resulting in terminated connections with the SPDK iSCSI
target at high queue depths.

Fixes #600.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I76eaf9dee2d733bfa3f8d43b86528de6b556cbd6
Reviewed-on: https://review.gerrithub.io/c/441981


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 6f62f0a1
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -4344,7 +4344,6 @@ spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
	int rc;
	struct spdk_iscsi_pdu *rsp_pdu = NULL;
	uint32_t ExpStatSN;
	uint32_t QCmdSN;
	int I_bit;
	struct spdk_iscsi_sess *sess;
	struct iscsi_bhs_scsi_req *reqh;
@@ -4430,16 +4429,6 @@ spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
		spdk_remove_acked_pdu(conn, ExpStatSN);
	}

	if (opcode == ISCSI_OP_NOPOUT || opcode == ISCSI_OP_SCSI) {
		QCmdSN = sess->MaxCmdSN - sess->ExpCmdSN + 1;
		QCmdSN += sess->queue_depth;
		if (SN32_LT(ExpStatSN + QCmdSN, conn->StatSN)) {
			SPDK_ERRLOG("StatSN(%u/%u) QCmdSN(%u) error\n",
				    ExpStatSN, conn->StatSN, QCmdSN);
			return SPDK_ISCSI_CONNECTION_FATAL;
		}
	}

	if (!I_bit && opcode != ISCSI_OP_SCSI_DATAOUT) {
		sess->ExpCmdSN++;
	}