From patchwork Mon Oct 2 02:30:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9980123 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 A2DBA60365 for ; Mon, 2 Oct 2017 02:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D8A32766D for ; Mon, 2 Oct 2017 02:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81CA7288F9; Mon, 2 Oct 2017 02:34:06 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 4B2322766D for ; Mon, 2 Oct 2017 02:34:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbdJBCb4 (ORCPT ); Sun, 1 Oct 2017 22:31:56 -0400 Received: from a2nlsmtp01-02.prod.iad2.secureserver.net ([198.71.225.36]:43322 "EHLO a2nlsmtp01-02.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbdJBCbw (ORCPT ); Sun, 1 Oct 2017 22:31:52 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id yqVIdsk5AiuNpyqVIdg8u7; Sun, 01 Oct 2017 19:30:51 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dyqVI-0000xi-3X; Sun, 01 Oct 2017 19:30:44 -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 v4 13/22] CIFS: SMBD: Upper layer receives data via RDMA receive Date: Sun, 1 Oct 2017 19:30:21 -0700 Message-Id: <20171002023030.3582-14-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171002023030.3582-1-longli@exchange.microsoft.com> References: <20171002023030.3582-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfNOCeAxPyG/VxwBwxwlzqFPI0uGDOOZwk0k2bcin23FEr+xfhtzOPvMB4144110CGuNkYQTftlE+ojPzqTBzOVQa0nQxo1vkLyWkbhjCh4spqWkeM9Ah h3gbJZvTHnA6d7x03I9HES9kV4Z7mmVosYbopPlv7aEhCEIO+jH24ngvSpWalyfHjmufUICdeILUA7IKFxglruTNKAE85zN3QJUpDyhZy7FSJAtRnaJe3B54 lcs2PU6/XM4PvFR/x/UfPXvsQ8vFIx41QQ/VT7s7AWcp2fXBYN6kokEPTYx87GX+siKOdTufaOqAQp+zc8WN4insSZFF2PA6TDQ+r8i6NWQeHaWCatZxyS25 Bis50yJEybHdaPrPwrpUTvMcdjAed7r7Sk24r5PGbjILlDKREHSOqEVBwI2cn4CS+NqAHcgWIOSH39cZ8g9Rv9ZvAySvVM77L0A/2KnyEAwgE3+YyiXgCyMK oqekXqbPvtRexXMA 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 receive. 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 1a9f22f..8026682 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -542,7 +542,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;