From 8827ee1ed2e3c8b8bb83af872792ff3ca4fd2281 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 24 Jan 2019 15:49:59 -0700 Subject: [PATCH] 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 Change-Id: I76eaf9dee2d733bfa3f8d43b86528de6b556cbd6 Reviewed-on: https://review.gerrithub.io/c/441981 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker --- lib/iscsi/iscsi.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 24d94454b..2a6fbdb6b 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -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++; }