Skip to content

Commit 5bf944f

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Add error messages
This patch adds error and debug messages so that every interaction with rdma-core through a verbs API call or a completion error return will generate at least one error message backed up by debug messages with more detail. With dynamic debugging one can follow up after seeing an error message by turning on the appropriate debug messages. Link: https://lore.kernel.org/r/20230303221623.8053-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 9ac01f4 commit 5bf944f

File tree

5 files changed

+609
-241
lines changed

5 files changed

+609
-241
lines changed

drivers/infiniband/sw/rxe/rxe_comp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ static void make_send_cqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
428428
uwc->wc_flags = IB_WC_WITH_IMM;
429429
uwc->byte_len = wqe->dma.length;
430430
}
431+
} else {
432+
if (wqe->status != IB_WC_WR_FLUSH_ERR)
433+
rxe_err_qp(qp, "non-flush error status = %d",
434+
wqe->status);
431435
}
432436
}
433437

drivers/infiniband/sw/rxe/rxe_loc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ int mr_check_range(struct rxe_mr *mr, u64 iova, size_t length);
8080
int advance_dma_data(struct rxe_dma_info *dma, unsigned int length);
8181
int rxe_invalidate_mr(struct rxe_qp *qp, u32 key);
8282
int rxe_reg_fast_mr(struct rxe_qp *qp, struct rxe_send_wqe *wqe);
83-
int rxe_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata);
8483
void rxe_mr_cleanup(struct rxe_pool_elem *elem);
8584

8685
/* rxe_mw.c */

drivers/infiniband/sw/rxe/rxe_mr.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -722,19 +722,6 @@ int rxe_reg_fast_mr(struct rxe_qp *qp, struct rxe_send_wqe *wqe)
722722
return 0;
723723
}
724724

725-
int rxe_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
726-
{
727-
struct rxe_mr *mr = to_rmr(ibmr);
728-
729-
/* See IBA 10.6.7.2.6 */
730-
if (atomic_read(&mr->num_mw) > 0)
731-
return -EINVAL;
732-
733-
rxe_cleanup(mr);
734-
kfree_rcu(mr);
735-
return 0;
736-
}
737-
738725
void rxe_mr_cleanup(struct rxe_pool_elem *elem)
739726
{
740727
struct rxe_mr *mr = container_of(elem, typeof(*mr), elem);

drivers/infiniband/sw/rxe/rxe_resp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,10 @@ static enum resp_states do_complete(struct rxe_qp *qp,
11511151

11521152
wc->port_num = qp->attr.port_num;
11531153
}
1154+
} else {
1155+
if (wc->status != IB_WC_WR_FLUSH_ERR)
1156+
rxe_err_qp(qp, "non-flush error status = %d",
1157+
wc->status);
11541158
}
11551159

11561160
/* have copy for srq and reference for !srq */

0 commit comments

Comments
 (0)