diff options
author | Dust Li <dust.li@linux.alibaba.com> | 2021-12-27 20:38:06 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-01-05 14:08:51 -0400 |
commit | a7ad9ddeb528b91de03cedeef34532dc0ba77bfd (patch) | |
tree | 68ee4646d9596aec16c37391f967ce9082ff6a81 /drivers | |
parent | 8d1cfb884e881efd69a3be4ef10772c71cb22216 (diff) | |
download | linux-a7ad9ddeb528b91de03cedeef34532dc0ba77bfd.tar.bz2 |
RDMA/mlx5: Print wc status on CQE error and dump needed
mlx5_handle_error_cqe() only dump the content of the CQE which is raw hex
data, and not straighforward for debug. Print WC status message when we
got CQE error and dump is need.
Here is an example of how the dmesg log looks like with this:
infiniband mlx5_0: mlx5_handle_error_cqe:333:(pid 0): WC error: 10, message: remote access error
infiniband mlx5_0: dump_cqe:272:(pid 0): dump error cqe
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000030: 00 00 00 00 00 00 88 13 08 03 61 b3 1e a1 42 d3
Link: https://lore.kernel.org/r/20211227123806.47530-1-dust.li@linux.alibaba.com
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mlx5/cq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index a190fb581591..08371a80fdc2 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -328,8 +328,11 @@ static void mlx5_handle_error_cqe(struct mlx5_ib_dev *dev, } wc->vendor_err = cqe->vendor_err_synd; - if (dump) + if (dump) { + mlx5_ib_warn(dev, "WC error: %d, Message: %s\n", wc->status, + ib_wc_status_msg(wc->status)); dump_cqe(dev, cqe); + } } static void handle_atomics(struct mlx5_ib_qp *qp, struct mlx5_cqe64 *cqe64, |