Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 2014 13:34:27 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271393 - head/sys/cam/ctl
Message-ID:  <201409101334.s8ADYRHn064423@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed Sep 10 13:34:27 2014
New Revision: 271393
URL: http://svnweb.freebsd.org/changeset/base/271393

Log:
  Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting
  kern.cam.ctl.iscsi.ping_timeout to 0.  This fixes interoperability with
  some initiators that don't properly support NOP-Ins, namely iPXE/gPXE.
  
  Submitted by:	Chen Wen <pokkys@gmail.com>
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/cam/ctl/ctl_frontend_iscsi.c

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.c	Wed Sep 10 13:21:44 2014	(r271392)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c	Wed Sep 10 13:34:27 2014	(r271393)
@@ -1002,6 +1002,19 @@ cfiscsi_callout(void *context)
 	}
 #endif
 
+	if (ping_timeout <= 0) {
+		/*
+		 * Pings are disabled.  Don't send NOP-In in this case;
+		 * user might have disabled pings to work around problems
+		 * with certain initiators that can't properly handle
+		 * NOP-In, such as iPXE.  Reset the timeout, to avoid
+		 * triggering reconnection, should the user decide to
+		 * reenable them.
+		 */
+		cs->cs_timeout = 0;
+		return;
+	}
+
 	if (cs->cs_timeout >= ping_timeout) {
 		CFISCSI_SESSION_WARN(cs, "no ping reply (NOP-Out) after %d seconds; "
 		    "dropping connection",  ping_timeout);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409101334.s8ADYRHn064423>