Unverified Commit e7044855 authored by Thunderbrook's avatar Thunderbrook Committed by GitHub
Browse files

fix potential hang in pollcq (#371)

parent 91bb69a8
...@@ -472,7 +472,7 @@ ibgda_poll_cq(nvshmemi_ibgda_device_cq_t *cq, uint64_t idx) { ...@@ -472,7 +472,7 @@ ibgda_poll_cq(nvshmemi_ibgda_device_cq_t *cq, uint64_t idx) {
const auto cqe64 = static_cast<mlx5_cqe64*>(cq->cqe); const auto cqe64 = static_cast<mlx5_cqe64*>(cq->cqe);
const uint32_t ncqes = cq->ncqes; const uint32_t ncqes = cq->ncqes;
memory_fence_cta(); memory_fence_cta();
if (*cq->cons_idx >= idx) return;
// NOTES: this while loop is part of do-while below. // NOTES: this while loop is part of do-while below.
// `wqe_counter` is the HW consumer index. However, we always maintain `index + 1`. // `wqe_counter` is the HW consumer index. However, we always maintain `index + 1`.
// To be able to compare with the index, we need to use `wqe_counter + 1`. // To be able to compare with the index, we need to use `wqe_counter + 1`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment