Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751881AbdH2Tfa (ORCPT ); Tue, 29 Aug 2017 15:35:30 -0400 Received: from a2nlsmtp01-02.prod.iad2.secureserver.net ([198.71.225.36]:33218 "EHLO a2nlsmtp01-02.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbdH2Tao (ORCPT ); Tue, 29 Aug 2017 15:30:44 -0400 x-originating-ip: 107.180.71.197 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 10/19] CIFS: SMBD: Send data through SMBDirect Date: Tue, 29 Aug 2017 12:29:06 -0700 Message-Id: <20170829192915.26251-11-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: MS4wfI6h2+TVk/DZi5u7TULDFrXNyOMAovy+HWdMrHn+Igsyzl71D6SIbFmYLaucirXhWRRL5A0lGQeJUuJQKKWEbVBP87AroAGPI3xIRSjMu9g47aMVBKDD WlONBuJqbjyORLBbvzqwI+CLneWwG940uT8JS4GbNd5Io9Sc4XZJbMaii8xR183MlFgzulMT+lkVd/HejQyUxPrlvvqxr4HfwDD0UJ3WzuwpJIvGvfW1SmVJ z6/aC4rykpZ05b3VKh5l7fIuV6P4D5ELiJUY38Js4XF4gux8ity0GM0gCaIL3F9GNQ2yWTiJo/OpyZUBjUbed9FWR2rVzekF2M6n6Ta6HMk/0ItzjsJEmMA0 psZTRfHBOJHPph6pVkukN1B5d/0CVBG+ji4X2GOAblGCWWfSTyD6X2ih9GrH3pH67SyIRM3/DUbiq4ijaJB0R5yR73jryFSe9L8MeXNIli76foHDm00J8DYN EDQ5oJ426U8ZHpZ/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 43 From: Long Li With SMBDirect connected, use it for sending data via RDMA send. Signed-off-by: Long Li --- fs/cifs/transport.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index ba62aaf..bddb699 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -37,6 +37,7 @@ #include "cifsglob.h" #include "cifsproto.h" #include "cifs_debug.h" +#include "smbdirect.h" void cifs_wake_up_task(struct mid_q_entry *mid) @@ -230,6 +231,11 @@ __smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst) struct msghdr smb_msg; int val = 1; + if (server->smbd_conn) { + rc = smbd_send(server->smbd_conn, rqst); + goto done; + } + if (ssocket == NULL) return -ENOTSOCK; @@ -299,6 +305,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst) server->tcpStatus = CifsNeedReconnect; } +done: if (rc < 0 && rc != -EINTR) cifs_dbg(VFS, "Error %d sending data on socket to server\n", rc); -- 2.7.4