summaryrefslogtreecommitdiffstats
path: root/sys/dev/ntb
diff options
context:
space:
mode:
authorcem <cem@FreeBSD.org>2015-12-03 17:22:55 +0000
committercem <cem@FreeBSD.org>2015-12-03 17:22:55 +0000
commit6c646483312b65d43928f2486309c56e2be4725f (patch)
tree92892da843da68a71a5902f34d1ed63b54e14aee /sys/dev/ntb
parent23270dfc9fd20614e7ad5fdedb4198a13785b2aa (diff)
downloadFreeBSD-src-6c646483312b65d43928f2486309c56e2be4725f.zip
FreeBSD-src-6c646483312b65d43928f2486309c56e2be4725f.tar.gz
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
Diffstat (limited to 'sys/dev/ntb')
-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 4cbb3f7..b28502f 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)
OpenPOWER on IntegriCloud