Commit 63d370a6 authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford

IB/srpt: Log all zero-length writes and completions

The new pr_debug() statements are useful when debugging the ib_srpt
driver.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 940874f8
...@@ -840,6 +840,9 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch) ...@@ -840,6 +840,9 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
{ {
struct ib_send_wr wr, *bad_wr; struct ib_send_wr wr, *bad_wr;
pr_debug("%s-%d: queued zerolength write\n", ch->sess_name,
ch->qp->qp_num);
memset(&wr, 0, sizeof(wr)); memset(&wr, 0, sizeof(wr));
wr.opcode = IB_WR_RDMA_WRITE; wr.opcode = IB_WR_RDMA_WRITE;
wr.wr_cqe = &ch->zw_cqe; wr.wr_cqe = &ch->zw_cqe;
...@@ -851,6 +854,9 @@ static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc) ...@@ -851,6 +854,9 @@ static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc)
{ {
struct srpt_rdma_ch *ch = cq->cq_context; struct srpt_rdma_ch *ch = cq->cq_context;
pr_debug("%s-%d wc->status %d\n", ch->sess_name, ch->qp->qp_num,
wc->status);
if (wc->status == IB_WC_SUCCESS) { if (wc->status == IB_WC_SUCCESS) {
srpt_process_wait_list(ch); srpt_process_wait_list(ch);
} else { } else {
...@@ -1804,8 +1810,6 @@ static bool srpt_close_ch(struct srpt_rdma_ch *ch) ...@@ -1804,8 +1810,6 @@ static bool srpt_close_ch(struct srpt_rdma_ch *ch)
pr_err("%s-%d: changing queue pair into error state failed: %d\n", pr_err("%s-%d: changing queue pair into error state failed: %d\n",
ch->sess_name, ch->qp->qp_num, ret); ch->sess_name, ch->qp->qp_num, ret);
pr_debug("%s-%d: queued zerolength write\n", ch->sess_name,
ch->qp->qp_num);
ret = srpt_zerolength_write(ch); ret = srpt_zerolength_write(ch);
if (ret < 0) { if (ret < 0) {
pr_err("%s-%d: queuing zero-length write failed: %d\n", pr_err("%s-%d: queuing zero-length write failed: %d\n",
......
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