From owner-svn-src-all@freebsd.org Thu Dec 3 17:22:56 2015 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 E0DD0A3FDDB; Thu, 3 Dec 2015 17:22:56 +0000 (UTC) (envelope-from cem@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 B037D106D; Thu, 3 Dec 2015 17:22:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HMtBu075327; Thu, 3 Dec 2015 17:22:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HMtCP075326; Thu, 3 Dec 2015 17:22:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512031722.tB3HMtCP075326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 3 Dec 2015 17:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291706 - head/sys/dev/ntb/if_ntb 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.20 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, 03 Dec 2015 17:22:57 -0000 Author: cem Date: Thu Dec 3 17:22:55 2015 New Revision: 291706 URL: https://svnweb.freebsd.org/changeset/base/291706 Log: if_ntb: Don't roundup MW size to full BAR size unnecessarily Note that the MW allocation still must be BAR *aligned*. So, this only loosens the constraints on MW allocation slightly. BAR-aligned does not play well with large (GB+) BAR sizes. Going forward, if anyone cares about if_ntb on very large BARs, I suggest they add functionality to allocate a smaller window than the BAR size, and set the BAR range to cover a window much larger than the allocated window. This will require negotiating a window offset and limit for protocol traffic. None of this is implemented in this revision. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:22:45 2015 (r291705) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:22:55 2015 (r291706) @@ -1342,7 +1342,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, return (EINVAL); xlat_size = roundup(size, mw->xlat_align_size); - buff_size = roundup(size, mw->xlat_align); + buff_size = xlat_size; /* No need to re-setup */ if (mw->xlat_size == xlat_size)