Received: by 10.223.164.197 with SMTP id h5csp685992wrb; Sat, 4 Nov 2017 22:50:07 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T0reCqMY/tp321xBJYJi4J2VnA2SSxSTpgRiCOUo0HhE+830jOAvQjvC4xMBkFZWk3wjv5 X-Received: by 10.99.127.18 with SMTP id a18mr11762993pgd.98.1509861007534; Sat, 04 Nov 2017 22:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509861007; cv=none; d=google.com; s=arc-20160816; b=VwmaBVXS0zuq2ZMvIJ6gDHkwPWs9nxQiKVQV9p+02oLsyOgeGyfyzxdhanx8YRv980 gmav38VUJJEdgkvoI+FGYpMFDgnWUUrQHCmwccUczRL5NMmkczzu64JlFHz50eGFhPGJ 2Xs3HkV1kD/gtGLcJ3ZoNFYLMSDnzrXww3p6wlCOUeKx9PwjSStI2rwkJEV1FQ2H4GAF GdT8A9XpG1HWGyhXc1yaFcCYjdc80f0NOVJGSE/N30i9NMOUe//U/+gDME7jWOuoQzIF vLd8yaB5hE3TY8RzbPbrTzZLt3PrX2BxnOCVbGMd+Vmv+PYvq4HZBsR49rTv8tUQrA0Y 8AMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=v91GKmsabNBSIymVbfKjHsWBKL68vkBezitC43NrK/A=; b=KnON2M9Q1EqegcFojzkEgDc1OY5KOCpSXl+FR1+7XewA/wk459CXy5erdLK0tZsikG yRnCZqdnmx2K0kY+Xj0MmA1RZfMWIvYtG+Y54I5kAMGhq28/MLs+sSVZW5dpFZWOtAP8 UJGMRCfci6Ls81SdoxWhGD8HI82a6d2yIUkRUx0RM1nsko1HyK8yctcTbgEUaNfA9edS QovvoKu42qGm7+VUlTgbaZ+arz6OUtguUzuhnu5PfpY6Uwv/Var2GCX2jztR1Z4vDRTJ DxE+449uz3VBI24cr7a7iEc1HE+NSDC3OQ6knvwkT+LNqBKXegOLKELaPTiAg89OP/xD bS/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71si7025850plb.563.2017.11.04.22.49.54; Sat, 04 Nov 2017 22:50:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752807AbdKEFrC (ORCPT + 96 others); Sun, 5 Nov 2017 01:47:02 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.7.4 From 1583266365667490129@xxx Sun Nov 05 22:21:08 +0000 2017 X-GM-THRID: 1582791838089625612 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread