From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:34:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9484EF; Wed, 10 Sep 2014 13:34:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EECC1349; Wed, 10 Sep 2014 13:34:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ADYRhr064424; Wed, 10 Sep 2014 13:34:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADYRHn064423; Wed, 10 Sep 2014 13:34:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409101334.s8ADYRHn064423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 10 Sep 2014 13:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271393 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:34:27 -0000 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 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);