From patchwork Tue Aug 29 19:29:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9928085 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 9394B602B9 for ; Tue, 29 Aug 2017 19:33:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86D7628A30 for ; Tue, 29 Aug 2017 19:33:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BC5F28A3A; Tue, 29 Aug 2017 19:33:59 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 3CA8228A30 for ; Tue, 29 Aug 2017 19:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730AbdH2Tas (ORCPT ); Tue, 29 Aug 2017 15:30:48 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:40436 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbdH2Tan (ORCPT ); Tue, 29 Aug 2017 15:30:43 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id mmCkdGHvLmlENmmCkdUH52; Tue, 29 Aug 2017 12:29:42 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dmmCk-0006rs-0f; Tue, 29 Aug 2017 12:29:42 -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, Christoph Hellwig , Tom Talpey , Matthew Wilcox Cc: Long Li Subject: [Patch v3 09/19] CIFS: SMBD: Receive data from SMBDirect Date: Tue, 29 Aug 2017 12:29:05 -0700 Message-Id: <20170829192915.26251-10-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170829192915.26251-1-longli@exchange.microsoft.com> References: <20170829192915.26251-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfMYEnzlexQLengg9BBKKnHiBGCRY4qWZHnidkOBgBbYtZXTFPuPjX3mqyiUgLIJSBEc27F4TcEirzuNt7dZIaiZEqMknzQheUteSOTXkm+qnnaeZlaVo qQUcpPTKVbXqZrLcizOUcr9YE2AnUlABUa2pXukGCpoNwU7r8vUowcEwCrbRmQuNf9WA19TOygaepQPZXTPBEdtrtxKBJZoRKVR3U/geVR/0wMidzVkRZrRi kAwRiCHDjakpZj7+ClsIJfmCcIswjEqWDjypXU4/cXwC6Vnyp2R2/gWD68ZCNscac4zvTNuecbQNjtcvZtN9CWpM2SRRpFwtIpheNJk3KmaR4HqEm+lheFkO AhvmmoH0vIqh4XT1r9JLgKbEozlRvLuUTh9Oh4v1jSPoBwuDuq7tEZxqZIb7gpNdxhS7Hn/UZUZa9Qw0BbIzIZk2EhhMJF7Lq2WouYRFg1I/tq21PHma7VzO 2TRKBxPJ7u5GdfQ/ 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 With SMBDirect connected, use it for receiving data via RDMA recv. Signed-off-by: Long Li --- fs/cifs/connect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4f62337..29f384f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -546,7 +546,10 @@ cifs_readv_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg) if (server_unresponsive(server)) return -ECONNABORTED; - length = sock_recvmsg(server->ssocket, smb_msg, 0); + if (server->smbd_conn) + length = smbd_recv(server->smbd_conn, smb_msg); + else + length = sock_recvmsg(server->ssocket, smb_msg, 0); if (server->tcpStatus == CifsExiting) return -ESHUTDOWN;