From patchwork Tue Aug 29 19:29:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9928069 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 E3BCA602B9 for ; Tue, 29 Aug 2017 19:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D736728A39 for ; Tue, 29 Aug 2017 19:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBDAF28A3B; Tue, 29 Aug 2017 19:33:21 +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 6FD7128A39 for ; Tue, 29 Aug 2017 19:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751744AbdH2Tat (ORCPT ); Tue, 29 Aug 2017 15:30:49 -0400 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:49544 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdH2Tam (ORCPT ); Tue, 29 Aug 2017 15:30:42 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id mmCedWBqJvzECmmCedlCTl; Tue, 29 Aug 2017 12:29:41 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dmmCe-0006rO-HE; Tue, 29 Aug 2017 12:29:36 -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 04/19] CIFS: SMBD: Add SMBDirect transport to SMB connection and Makefile Date: Tue, 29 Aug 2017 12:29:00 -0700 Message-Id: <20170829192915.26251-5-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: MS4wfNkSdRGReGnVkRcPqksFyBpn0HZDfjgwnt3v08LYLzOU0x6i0byJnyULH4yHbSgBzaDXfoXEeZ0LY1k8KigNJEHvZvQWHMajnRstYt4jKx79PC2D2s06 3C0IsVHa5UEH4UOLM8mViWWg1rVvtZ3O99vWGO0gBref2tfcS17he3hfwgwtNMYkUDBNSns9wnH1rbGL4ThSL04weRnqZ7x19EZhB4pOu54X6Fpst1vqEBWz frKgt6iUE++rZMbKl1EWcSqRBvCH8q5WRdHQ/zeUBO2+jutwSYkdYmBY0hUMSOsQKrHoV6K77wdBvXZfraLbczVertxE9/7o979MxrzXR8CWOWdqXOXSl5mk 2zqNW8YGh6pOaERKAd5hKIF2KVpX8kcEIa5WJipxCgoBJKat1kJtoR5Byg1t+Fj0PmBt/yqEzYQBEyqBxRe9UkWH5P72YWVkd5+F2xfgnjPqtamgFkNd9g9r FC1f0WMjHnxl95pv 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 Add SMBDirect as an optional connection to the SMB session structure in CIFS. When SMB session is connected through SMBDirect, upper layer uses this connection to carry payloads. With the transport code hooked up to upper layer, add SMBDirect code to Makefile. Signed-off-by: Long Li --- fs/cifs/Makefile | 2 +- fs/cifs/cifsglob.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile index eed7eb0..6bb9863 100644 --- a/fs/cifs/Makefile +++ b/fs/cifs/Makefile @@ -18,4 +18,4 @@ cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o cifs-$(CONFIG_CIFS_SMB2) += smb2ops.o smb2maperror.o smb2transport.o \ - smb2misc.o smb2pdu.o smb2inode.o smb2file.o + smb2misc.o smb2pdu.o smb2inode.o smb2file.o smbdirect.o diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 703c2fb..dc5404d 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -652,6 +652,8 @@ struct TCP_Server_Info { bool large_buf; /* is current buffer large? */ /* use SMBD connection instead of socket */ bool rdma; + /* point to the SMBD connection if RDMA is used instead of socket */ + struct smbd_connection *smbd_conn; struct delayed_work echo; /* echo ping workqueue job */ char *smallbuf; /* pointer to current "small" buffer */ char *bigbuf; /* pointer to current "big" buffer */