aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ntb/if_ntb/if_ntb.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2015-12-03 17:22:55 +0000
committerConrad Meyer <cem@FreeBSD.org>2015-12-03 17:22:55 +0000
commitb23896a221a646c6241eb8dff24a3ed40b0b7aed (patch)
tree92892da843da68a71a5902f34d1ed63b54e14aee /sys/dev/ntb/if_ntb/if_ntb.c
parent64448a2a505e7982b3b91a5e574372e3cd29e5e9 (diff)
downloadsrc-b23896a221a646c6241eb8dff24a3ed40b0b7aed.tar.gz
src-b23896a221a646c6241eb8dff24a3ed40b0b7aed.zip
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
Notes
Notes: svn path=/head/; revision=291706
Diffstat (limited to 'sys/dev/ntb/if_ntb/if_ntb.c')
-rw-r--r--sys/dev/ntb/if_ntb/if_ntb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ntb/if_ntb/if_ntb.c b/sys/dev/ntb/if_ntb/if_ntb.c
index 4cbb3f76c4fb..b28502f1d832 100644
--- a/sys/dev/ntb/if_ntb/if_ntb.c
+++ b/sys/dev/ntb/if_ntb/if_ntb.c
@@ -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)