Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2015 17:22:55 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
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
Message-ID:  <201512031722.tB3HMtCP075326@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512031722.tB3HMtCP075326>