IB/srpt: Reduce frequency of receive failure messages
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 8 Jan 2018 19:00:48 +0000 (11:00 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 8 Jan 2018 21:05:12 +0000 (16:05 -0500)
Disabling an SRP target port causes the state of all QPs associated
with a port to be changed into IB_QPS_ERR. Avoid that this causes
one error message per I/O context to be reported.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c

index 31b6f108dffbe1851daf8de3d3edee0f00ba35cc..6f5a4d66eacc262f4c77878587e2419ccb852b68 100644 (file)
@@ -1622,8 +1622,8 @@ static void srpt_recv_done(struct ib_cq *cq, struct ib_wc *wc)
                        pr_err("req_lim = %d < 0\n", req_lim);
                srpt_handle_new_iu(ch, ioctx, NULL);
        } else {
-               pr_info("receiving failed for ioctx %p with status %d\n",
-                       ioctx, wc->status);
+               pr_info_ratelimited("receiving failed for ioctx %p with status %d\n",
+                                   ioctx, wc->status);
        }
 }