diff options
author | Roland Dreier <roland@purestorage.com> | 2012-03-06 17:30:40 -0800 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-03-06 17:30:40 -0800 |
commit | ed13892a51d2ba852bf4fe7ac8b149c34134334e (patch) | |
tree | 2d86cecce445f965055467c29f8d049df941a977 | |
parent | 60dade7a5e97da3b2eedf5839169c044f67577b3 (diff) | |
download | libmlx4-ed13892a51d2ba852bf4fe7ac8b149c34134334e.tar.gz |
Fix possible missed completion event
If an erroneous CQE is polled in the first iteration (i.e. npolled ==
0), we don't update the consumer index and hence the hardware could
get a wrong notion of how many CQEs software polled. Fix this by
updating the doorbell record on error too.
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | src/cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -340,7 +340,7 @@ int mlx4_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc) break; } - if (npolled) + if (npolled || err == CQ_POLL_ERR) update_cons_index(cq); pthread_spin_unlock(&cq->lock); |