]> git.openfabrics.org - ~shefty/libmlx4.git/commit
Make sure RQ allocation is always valid
authorRoland Dreier <rolandd@cisco.com>
Thu, 7 Jun 2007 21:11:02 +0000 (14:11 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 7 Jun 2007 23:21:47 +0000 (16:21 -0700)
commite7d065192e10851ce6a6506dbc5227f4dbaf8fcd
treeaccecb050d58bcd53ec7c8d1e34f9f8afe190c3c
parent5de6edbaf6a34967d79f1d7082ad8371e79fb766
Make sure RQ allocation is always valid

QPs attached to an SRQ must never have their own RQ, and QPs not
attached to SRQs must have an RQ with at least 1 entry.  Enforce all
of this in set_rq_size().

Also simplify how we round up queue sizes.  There's no need to pass the
context into align_queue_size(), since that parameter is completely
unused, and we don't really need two functions for rounding up to the
next power of two.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/qp.c
src/verbs.c