diff options
author | Jack Wang <jinpu.wang@cloud.ionos.com> | 2021-02-22 15:15:51 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-03-11 14:50:41 -0400 |
commit | c33d516a1c742b7bf576975ba9e174e18272223b (patch) | |
tree | 756c0daa3b2cbec5dd2fc8e833e3037e0f29241d /drivers | |
parent | 3b89e92c2a95a39c38a3808f4528e502a39bd94d (diff) | |
download | linux-c33d516a1c742b7bf576975ba9e174e18272223b.tar.bz2 |
RDMA/rtrs-clt: Use rdma_event_msg in log
It's easier to understand a string instead of enum.
Link: https://lore.kernel.org/r/20210222141551.54345-2-jinpu.wang@cloud.ionos.com
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs-clt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index 4e9cf06cc17a..f95955fc2992 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -1853,12 +1853,14 @@ static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id, case RDMA_CM_EVENT_UNREACHABLE: case RDMA_CM_EVENT_ADDR_CHANGE: case RDMA_CM_EVENT_TIMEWAIT_EXIT: - rtrs_wrn(s, "CM error event %d\n", ev->event); + rtrs_wrn(s, "CM error (CM event: %s, err: %d)\n", + rdma_event_msg(ev->event), ev->status); cm_err = -ECONNRESET; break; case RDMA_CM_EVENT_ADDR_ERROR: case RDMA_CM_EVENT_ROUTE_ERROR: - rtrs_wrn(s, "CM error event %d\n", ev->event); + rtrs_wrn(s, "CM error (CM event: %s, err: %d)\n", + rdma_event_msg(ev->event), ev->status); cm_err = -EHOSTUNREACH; break; case RDMA_CM_EVENT_DEVICE_REMOVAL: @@ -1868,7 +1870,8 @@ static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id, rtrs_clt_close_conns(sess, false); return 0; default: - rtrs_err(s, "Unexpected RDMA CM event (%d)\n", ev->event); + rtrs_err(s, "Unexpected RDMA CM error (CM event: %s, err: %d)\n", + rdma_event_msg(ev->event), ev->status); cm_err = -ECONNRESET; break; } |