]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Correct max_srq_wr returned from mlx4_ib_query_device()
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 21 Jun 2007 20:39:10 +0000 (13:39 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 21 Jun 2007 20:39:10 +0000 (13:39 -0700)
commit4e2a8edfa89b6d1fcda4dbbebc647cffdc5df923
tree4ea047565dcc3340dcd473fca5579a5cb2de349a
parente94e9f88f8efb53094b4149c8b2329661d49bf7d
IB/mlx4: Correct max_srq_wr returned from mlx4_ib_query_device()

We need to keep a spare entry in the SRQ so that there always is a
next WQE available when posting receives (so that we can tell the
difference between a full queue and an empty queue).  So subtract 1
from the value HW gives us before reporting the limit on SRQ entries
to consumers.

Found by Mellanox QA.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/main.c