resize_cq: Fix possible endless loop scanning CQ

When calling get_sw_cqe() we need pass the consumer_index and not the
masked value. Failure to do so will cause incorrect result of
get_sw_cqe() possibly leading to endless loop.

Based on a patch by Eli Cohen <eli@dev.mellanox.co.il> fixing the same
bug in the kernel.

Signed-off-by: Roland Dreier <roland@purestorage.com>
1 file changed