From patchwork Sun Nov 5 05:43:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 10041945 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 32F84601EB for ; Sun, 5 Nov 2017 05:48:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2676D29573 for ; Sun, 5 Nov 2017 05:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B50A29636; Sun, 5 Nov 2017 05:48: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=-6.9 required=2.0 tests=BAYES_00,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 CDDA329573 for ; Sun, 5 Nov 2017 05:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768AbdKEFrB (ORCPT ); Sun, 5 Nov 2017 01:47:01 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:50222 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbdKEFpy (ORCPT ); Sun, 5 Nov 2017 01:45:54 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id BDjVeq3pA3w7hBDjVeBCdE; Sat, 04 Nov 2017 22:44:52 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1eBDjV-0006FO-6d; Sat, 04 Nov 2017 22:44:33 -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 , Stephen Hemminger Cc: Long Li Subject: [Patch v6 15/22] CIFS: SMBD: Upper layer receives data via RDMA receive Date: Sat, 4 Nov 2017 22:43:57 -0700 Message-Id: <20171105054404.23886-16-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171105054404.23886-1-longli@exchange.microsoft.com> References: <20171105054404.23886-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfAs4bO0gwNscWK+8c2qxIwmVjyr3uZIRVImVYe8j4W6HXUQcqlSQbP7z26l7+J6bEcE3pev+jrQTqkMPapB0UvEKhVCEiSUJDP8of+PuwJIaPSIy8WmG fXy4Mob02Xm7o3NzEJHmlPjBkFv+t/C6EdFw8wdlaKmOWnDVYtoKgjEns7Hk3Hk/WsW2tiJO7v6iWXccF6BD9c/CXsG2DMleeHfAuhHByH0CQWx5GWcDovMX iOH78/w4wxuhVU4hmjK0GEbkDi/W8tY23kdJt2nZhonHznL+sRfuld09vNT0AZywXZJXK5F9wn/aF8JPzk7JuigUFGdF/hJedRioOGtzYDei0xZoSn95gFt7 7/XTVhijqeuUvcASvhlXiq4jdsMvZJp8V/U7QhThK4NK4GoaHmtD1RkqvSnN49qgTX+Xhtw57b4jaTgBROANuEvlXytzuz+xfv5f9iIZ7gkJyGN0fV5xjQnM mQUoluAX1IzBRPv9yoe2WW4x5qEV/ClAisOezA== 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 SMB Direct connected, use it for receiving data via RDMA receive. Signed-off-by: Long Li --- fs/cifs/connect.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 23f10d1..6325062 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -545,8 +545,14 @@ cifs_readv_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg) if (server_unresponsive(server)) return -ECONNABORTED; - +#ifdef CONFIG_CIFS_SMB_DIRECT + if (server->smbd_conn) + length = smbd_recv(server->smbd_conn, smb_msg); + else + length = sock_recvmsg(server->ssocket, smb_msg, 0); +#else length = sock_recvmsg(server->ssocket, smb_msg, 0); +#endif if (server->tcpStatus == CifsExiting) return -ESHUTDOWN;