diff mbox

[rdma-core,2/2] providers/i40iw: Skip CQEs for destroyed QP

Message ID 20180227205633.8292-3-tatyana.e.nikolova@intel.com (mailing list archive)
State Accepted
Delegated to: Leon Romanovsky
Headers show

Commit Message

Nikolova, Tatyana E Feb. 27, 2018, 8:56 p.m. UTC
Currently CQ poll returns an error if the QP
associated with a CQE is destroyed although
there can be more CQEs for other QPs which are
still active. Fix this by skipping the CQE for
the destroyed QP and continue with CQE processing.

The patch is similar to driver commit f8a4e76c75e5
("RDMA/i40iw: Fix for checking if the QP is destroyed")

Fixes: faf6782ac8bc ("libi40iw: Initial public release of libi40iw-0.5.223")
Reported-by: Andrew Boyer <Andrew.Boyer@dell.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
---
 providers/i40iw/i40iw_uverbs.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/providers/i40iw/i40iw_uverbs.c b/providers/i40iw/i40iw_uverbs.c
index bb3cfd43..d77a4691 100644
--- a/providers/i40iw/i40iw_uverbs.c
+++ b/providers/i40iw/i40iw_uverbs.c
@@ -342,6 +342,8 @@  int i40iw_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)
 		ret = iwucq->cq.ops.iw_cq_poll_completion(&iwucq->cq, &cq_poll_info);
 		if (ret == I40IW_ERR_QUEUE_EMPTY) {
 			break;
+		} else if (ret == I40IW_ERR_QUEUE_DESTROYED) {
+			continue;
 		} else if (ret) {
 			fprintf(stderr, PFX "%s: Error polling CQ, status %d\n", __func__, ret);
 			if (!cqe_count)