From patchwork Wed Jan 17 00:14:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10168335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 793A160567 for ; Wed, 17 Jan 2018 00:14:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F32E26E47 for ; Wed, 17 Jan 2018 00:14:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64197279E0; Wed, 17 Jan 2018 00:14:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1550626E51 for ; Wed, 17 Jan 2018 00:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750796AbeAQAOa (ORCPT ); Tue, 16 Jan 2018 19:14:30 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:58115 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbeAQAOW (ORCPT ); Tue, 16 Jan 2018 19:14:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1516149131; x=1547685131; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=9e4Bld3zRV3eZ7D9sBR/EkDPv0/gUXuPTBnQ6gOOmho=; b=fFhAksr6/VSTIXdYKX54o+bK2wZPLmE1NtR+zHim3YdxMDdBFsP80eQw lVZ3TO9XudO1ARl+GhAaEBJ0QetVhYUIf+iWxtvB0181l6VnySMkKV4mK ok8yau+mLRL3lzE28ixun8XKVWizhSB6mPDJ8SxXj5G/R9NggKX3c64Fv 9UbGAVL2UH+1vx+rjSLSR0FLExDaDos0Foegu0+2q/goynUbUcu19ljPy Yb7va3g4AwDvRzU9bjKK0gE6jaURZ5vkIabiSoIR2VG01shJ+48m1So+w vt7BOLEGgdUhxjgcFG5xmX0IXUobWiznY8N8wms7m7giGPUVQ6y1uoV2b g==; X-IronPort-AV: E=Sophos;i="5.46,369,1511798400"; d="scan'208";a="165530448" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 17 Jan 2018 08:32:08 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 16 Jan 2018 16:09:35 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.171.236]) by uls-op-cesaip01.wdc.com with ESMTP; 16 Jan 2018 16:14:20 -0800 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH v2 08/14] IB/srpt: Log all zero-length writes and completions Date: Tue, 16 Jan 2018 16:14:12 -0800 Message-Id: <20180117001418.7852-9-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180117001418.7852-1-bart.vanassche@wdc.com> References: <20180117001418.7852-1-bart.vanassche@wdc.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new pr_debug() statements are useful when debugging the ib_srpt driver. Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index b248515a4fe4..866ff4be553c 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -840,6 +840,9 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch) { 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)); wr.opcode = IB_WR_RDMA_WRITE; wr.wr_cqe = &ch->zw_cqe; @@ -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; + pr_debug("%s-%d wc->status %d\n", ch->sess_name, ch->qp->qp_num, + wc->status); + if (wc->status == IB_WC_SUCCESS) { srpt_process_wait_list(ch); } else { @@ -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", 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); if (ret < 0) { pr_err("%s-%d: queuing zero-length write failed: %d\n",