Commit 350ec9bc authored by Jack Wang's avatar Jack Wang Committed by Jason Gunthorpe

RDMA/rtrs: Add error messages for failed operations.

It could help debugging in case of error happens.

Link: https://lore.kernel.org/r/20210712060750.16494-2-jinpu.wang@ionos.comSigned-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Reviewed-by: default avatarAleksei Marov <aleksei.marov@ionos.com>
Reviewed-by: default avatarGioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: default avatarMd Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent e73f0f0e
...@@ -316,6 +316,7 @@ void rtrs_send_hb_ack(struct rtrs_sess *sess) ...@@ -316,6 +316,7 @@ void rtrs_send_hb_ack(struct rtrs_sess *sess)
err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm, err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm,
0, NULL); 0, NULL);
if (err) { if (err) {
rtrs_err(sess, "send HB ACK failed, errno: %d\n", err);
sess->hb_err_handler(usr_con); sess->hb_err_handler(usr_con);
return; return;
} }
...@@ -333,6 +334,7 @@ static void hb_work(struct work_struct *work) ...@@ -333,6 +334,7 @@ static void hb_work(struct work_struct *work)
usr_con = sess->con[0]; usr_con = sess->con[0];
if (sess->hb_missed_cnt > sess->hb_missed_max) { if (sess->hb_missed_cnt > sess->hb_missed_max) {
rtrs_err(sess, "HB missed max reached.\n");
sess->hb_err_handler(usr_con); sess->hb_err_handler(usr_con);
return; return;
} }
...@@ -348,6 +350,7 @@ static void hb_work(struct work_struct *work) ...@@ -348,6 +350,7 @@ static void hb_work(struct work_struct *work)
err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm, err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm,
0, NULL); 0, NULL);
if (err) { if (err) {
rtrs_err(sess, "HB send failed, errno: %d\n", err);
sess->hb_err_handler(usr_con); sess->hb_err_handler(usr_con);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment