From owner-svn-src-projects@freebsd.org Tue Nov 24 01:12:18 2015 Return-Path: Delivered-To: svn-src-projects@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 DFDE1A35B11 for ; Tue, 24 Nov 2015 01:12:18 +0000 (UTC) (envelope-from np@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 ADC7F1ECE; Tue, 24 Nov 2015 01:12:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO1CHJp091595; Tue, 24 Nov 2015 01:12:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO1CHRn091594; Tue, 24 Nov 2015 01:12:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201511240112.tAO1CHRn091594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 24 Nov 2015 01:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r291228 - projects/cxl_iscsi/sys/dev/iscsi X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 01:12:19 -0000 Author: np Date: Tue Nov 24 01:12:17 2015 New Revision: 291228 URL: https://svnweb.freebsd.org/changeset/base/291228 Log: Do not generate PDUs with payload greater than max_data_segment_length. It is perhaps preferable to have a separate limit for send instead of reusing the receive limit. I'll discuss with trasz@ and mav@ before pulling this into head. Modified: projects/cxl_iscsi/sys/dev/iscsi/iscsi.c Modified: projects/cxl_iscsi/sys/dev/iscsi/iscsi.c ============================================================================== --- projects/cxl_iscsi/sys/dev/iscsi/iscsi.c Tue Nov 24 01:07:57 2015 (r291227) +++ projects/cxl_iscsi/sys/dev/iscsi/iscsi.c Tue Nov 24 01:12:17 2015 (r291228) @@ -1371,7 +1371,8 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ is->is_statsn = handoff->idh_statsn; is->is_initial_r2t = handoff->idh_initial_r2t; is->is_immediate_data = handoff->idh_immediate_data; - is->is_max_data_segment_length = handoff->idh_max_data_segment_length; + is->is_max_data_segment_length = min(ic->ic_max_data_segment_length, + handoff->idh_max_data_segment_length); is->is_max_burst_length = handoff->idh_max_burst_length; is->is_first_burst_length = handoff->idh_first_burst_length;