From patchwork Tue Apr 17 00:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 10344117 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 E1FAB60542 for ; Tue, 17 Apr 2018 01:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBBF128830 for ; Tue, 17 Apr 2018 01:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D03B628883; Tue, 17 Apr 2018 01:02:31 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 8646928830 for ; Tue, 17 Apr 2018 01:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbeDQBC0 (ORCPT ); Mon, 16 Apr 2018 21:02:26 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:60428 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbeDQBCY (ORCPT ); Mon, 16 Apr 2018 21:02:24 -0400 Received: from linuxonhyperv2.linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id 8Eovfs1jORnIx8EovfvA1O; Mon, 16 Apr 2018 17:50:07 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv2.linuxonhyperv.com with local (Exim 4.89_1) (envelope-from ) id 1f8Eov-0007dT-0G; Mon, 16 Apr 2018 17:50:05 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, stable@vger.kernel.org Cc: Long Li Subject: [PATCH 6/6] cifs: smbd: Dump SMB packet when configured Date: Mon, 16 Apr 2018 17:49:18 -0700 Message-Id: <20180417004918.29213-6-longli@linuxonhyperv.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180417004918.29213-1-longli@linuxonhyperv.com> References: <20180417004918.29213-1-longli@linuxonhyperv.com> Reply-To: longli@microsoft.com X-CMAE-Envelope: MS4wfP2OI0AoAdJsMAc1pVxCSeqHBNtyNLCWakS9HrDwnOdcNRsPDO4OV/6sGtDs+sbeFPwOf2+bInjGlGQa78vwyI8OMKFtx4CCgbrm1OCnFJR1OHO3bnw1 YFWM19a7iZQPn495bvP96yuF5UaZs9QUkMQsEs1Ps6nBgWuHqFEMlphey/ytdnlyY0Vep0NgLeBRtHPLlaqw0O6c8mcedaR+PANZjDMvuIbj2lprRJYVN8ZA a/r56EOrglWiXpseNDTKLlnPPyleWd7iCV3TpBW29bzb5xPh6vJwENBGvN5Cax2Xfqw9hphcVbaQ2w+k04ECnjSTTXxWXc3rcT1ucmx/Av8gy2/KvK/W8xys 8TVPLOwrfg2BCrez5MbajwV1EThBZnJbEKI0EdeBKicveBOb+xuMoexb7CBXo/RzVXk/EfxqFtNjThs032gg3tDh0Mv7wz0DW3cw5QX1BO5DDvcWOs8= Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Long Li When sending through SMB Direct, also dump the packet in SMB send path. Also fixed a typo in debug message. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index f575e9a..6ff864a 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -1029,7 +1029,7 @@ static int smbd_post_send(struct smbd_connection *info, for (i = 0; i < request->num_sge; i++) { log_rdma_send(INFO, "rdma_request sge[%d] addr=%llu length=%u\n", - i, request->sge[0].addr, request->sge[0].length); + i, request->sge[i].addr, request->sge[i].length); ib_dma_sync_single_for_device( info->id->device, request->sge[i].addr, @@ -2130,6 +2130,10 @@ int smbd_send(struct smbd_connection *info, struct smb_rqst *rqst) goto done; } + cifs_dbg(FYI, "Sending smb (RDMA): smb_len=%u\n", buflen); + for (i = 0; i < rqst->rq_nvec-1; i++) + dump_smb(iov[i].iov_base, iov[i].iov_len); + remaining_data_length = buflen; log_write(INFO, "rqst->rq_nvec=%d rqst->rq_npages=%d rq_pagesz=%d "