Skip to content

Commit dcb23bb

Browse files
Sindhu-Devalerleon
authored andcommitted
RDMA/irdma: Return correct WC error for bind operation failure
When a QP and a MR on a local host are in different PDs, the HW generates an asynchronous event (AE). The same AE is generated when a QP and a MW are in different PDs during a bind operation. Return the more appropriate IBV_WC_MW_BIND_ERR for the latter case by checking the OP type from the CQE in error. Fixes: 551c46e ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Sindhu-Devale <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 6b227bd commit dcb23bb

File tree

1 file changed

+3
-1
lines changed
  • drivers/infiniband/hw/irdma

1 file changed

+3
-1
lines changed

drivers/infiniband/hw/irdma/uk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,7 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
10051005
int ret_code;
10061006
bool move_cq_head = true;
10071007
u8 polarity;
1008+
u8 op_type;
10081009
bool ext_valid;
10091010
__le64 *ext_cqe;
10101011

@@ -1187,7 +1188,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
11871188
do {
11881189
__le64 *sw_wqe;
11891190
u64 wqe_qword;
1190-
u8 op_type;
11911191
u32 tail;
11921192

11931193
tail = qp->sq_ring.tail;
@@ -1204,6 +1204,8 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
12041204
break;
12051205
}
12061206
} while (1);
1207+
if (op_type == IRDMA_OP_TYPE_BIND_MW && info->minor_err == FLUSH_PROT_ERR)
1208+
info->minor_err = FLUSH_MW_BIND_ERR;
12071209
qp->sq_flush_seen = true;
12081210
if (!IRDMA_RING_MORE_WORK(qp->sq_ring))
12091211
qp->sq_flush_complete = true;

0 commit comments

Comments
 (0)