[openib-general] [PATCH] mthca: fix WQE size calculation in create-srq
Jack Morgenstein
jackm at mellanox.co.il
Sat Dec 17 23:52:24 PST 2005
Thinko: 64 bytes is the minimum SRQ WQE size (not the maximum).
Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>
Index: linux-kernel/drivers/infiniband/hw/mthca/mthca_srq.c
===================================================================
--- linux-kernel.orig/drivers/infiniband/hw/mthca/mthca_srq.c
+++ linux-kernel/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -198,7 +198,7 @@ int mthca_alloc_srq(struct mthca_dev *de
if (mthca_is_memfree(dev))
srq->max = roundup_pow_of_two(srq->max + 1);
- ds = min(64UL,
+ ds = max(64UL,
roundup_pow_of_two(sizeof (struct mthca_next_seg) +
srq->max_gs * sizeof (struct mthca_data_seg)));
srq->wqe_shift = long_log2(ds);
More information about the general
mailing list