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: Jim Harris <james.r.harris@intel.com>
Change-Id: I76eaf9dee2d733bfa3f8d43b86528de6b556cbd6
Reviewed-on: https://review.gerrithub.io/c/441981
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2019-01-24 15:49:59 -07:00 committed by Changpeng Liu
parent 6f62f0a187
commit 8827ee1ed2

View File

@ -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++;
}