svn commit: r291706 - head/sys/dev/ntb/if_ntb
Conrad E. Meyer
cem at FreeBSD.org
Thu Dec 3 17:22:57 UTC 2015
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)
More information about the svn-src-all
mailing list