From owner-svn-src-all@freebsd.org Thu Jun 9 07:19:03 2016 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 AFB8BAC81AF; Thu, 9 Jun 2016 07:19:03 +0000 (UTC) (envelope-from trasz@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 80F991C06; Thu, 9 Jun 2016 07:19:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u597J2wP039043; Thu, 9 Jun 2016 07:19:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u597J2fr039041; Thu, 9 Jun 2016 07:19:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201606090719.u597J2fr039041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 9 Jun 2016 07:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301720 - head/usr.sbin/ctld 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.22 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, 09 Jun 2016 07:19:03 -0000 Author: trasz Date: Thu Jun 9 07:19:02 2016 New Revision: 301720 URL: https://svnweb.freebsd.org/changeset/base/301720 Log: Don't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed by the offload driver; there is no reason to do so, and it actually harms performance. MFC after: 1 month Modified: head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Thu Jun 9 06:55:00 2016 (r301719) +++ head/usr.sbin/ctld/ctld.h Thu Jun 9 07:19:02 2016 (r301720) @@ -49,6 +49,7 @@ #define MAX_NAME_LEN 223 #define MAX_DATA_SEGMENT_LENGTH (128 * 1024) #define MAX_BURST_LENGTH 16776192 +#define FIRST_BURST_LENGTH (128 * 1024) #define SOCKBUF_SIZE 1048576 struct auth { Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Thu Jun 9 06:55:00 2016 (r301719) +++ head/usr.sbin/ctld/login.c Thu Jun 9 07:19:02 2016 (r301720) @@ -574,13 +574,12 @@ login_negotiate_key(struct pdu *request, tmp = strtoul(value, NULL, 10); if (tmp <= 0) { login_send_error(request, 0x02, 0x00); - log_errx(1, "received invalid " - "FirstBurstLength"); + log_errx(1, "received invalid FirstBurstLength"); } - if (tmp > conn->conn_data_segment_limit) { - log_debugx("capping FirstBurstLength from %zd to %zd", - tmp, conn->conn_data_segment_limit); - tmp = conn->conn_data_segment_limit; + if (tmp > FIRST_BURST_LENGTH) { + log_debugx("capping FirstBurstLength from %zd to %d", + tmp, FIRST_BURST_LENGTH); + tmp = FIRST_BURST_LENGTH; } conn->conn_first_burst_length = tmp; keys_add_int(response_keys, name, tmp);