1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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
This commit is contained in:
Conrad Meyer 2015-12-03 17:22:55 +00:00
parent 64448a2a50
commit b23896a221
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291706

View File

@ -1342,7 +1342,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, size_t size)
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)