diff mbox

libqedr: fix wc wr_id initialization on failure cases

Message ID 1520937106-22602-1-git-send-email-Michal.Kalderon@cavium.com (mailing list archive)
State Accepted
Delegated to: Leon Romanovsky
Headers show

Commit Message

Kalderon, Michal March 13, 2018, 10:31 a.m. UTC
From: Yuval Bason <Yuval.Bason@cavium.com>

Assign to a wc it's relevant wr_id in each completion status
(not only in success)

Signed-off-by: Yuval Bason <yuval.bason@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
---
 providers/qedr/qelr_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky March 13, 2018, 11:08 a.m. UTC | #1
On Tue, Mar 13, 2018 at 12:31:46PM +0200, Michal Kalderon wrote:
> From: Yuval Bason <Yuval.Bason@cavium.com>
>
> Assign to a wc it's relevant wr_id in each completion status
> (not only in success)
>
> Signed-off-by: Yuval Bason <yuval.bason@cavium.com>
> Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>

Thanks, applied.

BTW,
yuval.bason@cavium.com vs. Yuval.Bason@cavium.com was the reason to DCO failures.

Thanks
diff mbox

Patch

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index 5d7aeb3..bac5aae 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -1771,6 +1771,7 @@  static void __process_resp_one(struct qelr_qp *qp, struct qelr_cq *cq,
 	uint8_t flags;
 
 	wc->opcode = IBV_WC_RECV;
+	wc->wr_id = wr_id;
 	wc->wc_flags = 0;
 
 	switch (resp->status) {
@@ -1815,7 +1816,6 @@  static void __process_resp_one(struct qelr_qp *qp, struct qelr_cq *cq,
 			break;
 		}
 
-		wc->wr_id = wr_id;
 		break;
 	default:
 		wc->status = IBV_WC_GENERAL_ERR;