From owner-svn-src-all@freebsd.org Thu Nov 23 13:57:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61E8DDED5F9; Thu, 23 Nov 2017 13:57:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2BA3B6BF1A; Thu, 23 Nov 2017 13:57:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vANDvjoH024663; Thu, 23 Nov 2017 13:57:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vANDvjFo024660; Thu, 23 Nov 2017 13:57:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711231357.vANDvjFo024660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 23 Nov 2017 13:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326127 - in head/sys/dev: iscsi iser X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev: iscsi iser X-SVN-Commit-Revision: 326127 X-SVN-Commit-Repository: base 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.25 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: Thu, 23 Nov 2017 13:57:46 -0000 Author: hselasky Date: Thu Nov 23 13:57:44 2017 New Revision: 326127 URL: https://svnweb.freebsd.org/changeset/base/326127 Log: Make sure the iSCSI I/O limits are set properly so that the ISCSIDSEND IOCTL can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values. Else the login PDU will fail when passing the "-r" option to "iscsictl" which means iSCSI over RDMA instead of TCP/IP. Discussed with: np@ and trasz@ Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/iscsi.c head/sys/dev/iser/icl_iser.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Thu Nov 23 12:54:18 2017 (r326126) +++ head/sys/dev/iscsi/icl_soft.c Thu Nov 23 13:57:44 2017 (r326127) @@ -1449,6 +1449,9 @@ icl_soft_limits(struct icl_drv_limits *idl) { idl->idl_max_recv_data_segment_length = 128 * 1024; + idl->idl_max_send_data_segment_length = 128 * 1024; + idl->idl_max_burst_length = 262144; + idl->idl_first_burst_length = 65536; return (0); } Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Thu Nov 23 12:54:18 2017 (r326126) +++ head/sys/dev/iscsi/iscsi.c Thu Nov 23 13:57:44 2017 (r326127) @@ -1787,6 +1787,18 @@ iscsi_ioctl_session_add(struct iscsi_softc *sc, struct is = malloc(sizeof(*is), M_ISCSI, M_ZERO | M_WAITOK); memcpy(&is->is_conf, &isa->isa_conf, sizeof(is->is_conf)); + /* + * Set some default values, from RFC 3720, section 12. + * + * These values are updated by the handoff IOCTL, but are + * needed prior to the handoff to support sending the ISER + * login PDU. + */ + is->is_max_recv_data_segment_length = 8192; + is->is_max_send_data_segment_length = 8192; + is->is_max_burst_length = 262144; + is->is_first_burst_length = 65536; + sx_xlock(&sc->sc_lock); /* Modified: head/sys/dev/iser/icl_iser.c ============================================================================== --- head/sys/dev/iser/icl_iser.c Thu Nov 23 12:54:18 2017 (r326126) +++ head/sys/dev/iser/icl_iser.c Thu Nov 23 13:57:44 2017 (r326127) @@ -486,7 +486,11 @@ iser_conn_task_done(struct icl_conn *ic, void *prv) static int iser_limits(struct icl_drv_limits *idl) { + idl->idl_max_recv_data_segment_length = 128 * 1024; + idl->idl_max_send_data_segment_length = 128 * 1024; + idl->idl_max_burst_length = 262144; + idl->idl_first_burst_length = 65536; return (0); }