]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: incorrect SDP_FMR_SIZE on 32-bit machines
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 30 Aug 2009 14:16:13 +0000 (17:16 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:38 +0000 (05:04 -0700)
On 32-bit machines, sizeof (u64 *) is 4 bytes (size of a ***pointer***).
However, the max SDP FMR pool size should be PAGE_SIZE / sizeof(an mtt entry) --
and mtt entries are u64's (or __be64's).

This resulted in SDP requesting twice as many entries per pool on 32-bit machines
as could fit on a single page -- with the result that the fmr pool allocation failed
at driver startup.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h

index b7403970f6694418da9ffc0e8c0d4f7efcef806d..d973f525326130b583927c96426b46d01c6437c1 100644 (file)
@@ -29,7 +29,7 @@
 #define SDP_TX_SIZE 0x40
 #define SDP_RX_SIZE 0x40
 
-#define SDP_FMR_SIZE (PAGE_SIZE / sizeof(u64 *))
+#define SDP_FMR_SIZE (PAGE_SIZE / sizeof(u64))
 #define SDP_FMR_POOL_SIZE      1024
 #define SDP_FMR_DIRTY_SIZE     ( SDP_FMR_POOL_SIZE / 4 )