diff mbox

[v3,04/19] CIFS: SMBD: Add SMBDirect transport to SMB connection and Makefile

Message ID 20170829192915.26251-5-longli@exchange.microsoft.com (mailing list archive)
State New, archived
Headers show

Commit Message

Long Li Aug. 29, 2017, 7:29 p.m. UTC
From: Long Li <longli@microsoft.com>

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 <longli@microsoft.com>
---
 fs/cifs/Makefile   | 2 +-
 fs/cifs/cifsglob.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Pavel Shilovsky Aug. 29, 2017, 11:11 p.m. UTC | #1
2017-08-29 12:29 GMT-07:00 Long Li <longli@exchange.microsoft.com>:
> From: Long Li <longli@microsoft.com>
>
> 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 <longli@microsoft.com>
> ---
>  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 */
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

It is better to split the current patch into 2 and merge the Makefile
part to #3 and cifsglob.h part to #5.

--
Best regards,
Pavel Shilovsky
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Long Li Aug. 29, 2017, 11:14 p.m. UTC | #2
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBQYXZlbCBTaGlsb3Zza3kgW21h
aWx0bzpwaWFzdHJ5eXlAZ21haWwuY29tXQ0KPiBTZW50OiBUdWVzZGF5LCBBdWd1c3QgMjksIDIw
MTcgNDoxMiBQTQ0KPiBUbzogTG9uZyBMaSA8bG9uZ2xpQG1pY3Jvc29mdC5jb20+DQo+IENjOiBT
dGV2ZSBGcmVuY2ggPHNmcmVuY2hAc2FtYmEub3JnPjsgbGludXgtY2lmcyA8bGludXgtDQo+IGNp
ZnNAdmdlci5rZXJuZWwub3JnPjsgc2FtYmEtdGVjaG5pY2FsIDxzYW1iYS10ZWNobmljYWxAbGlz
dHMuc2FtYmEub3JnPjsNCj4gS2VybmVsIE1haWxpbmcgTGlzdCA8bGludXgta2VybmVsQHZnZXIu
a2VybmVsLm9yZz47IGxpbnV4LQ0KPiByZG1hQHZnZXIua2VybmVsLm9yZzsgQ2hyaXN0b3BoIEhl
b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M0ElMkYlMkZ2Z2VyLmsNCj4g
PiBlcm5lbC5vcmclMkZtYWpvcmRvbW8tDQo+IGluZm8uaHRtbCZkYXRhPTAyJTdDMDElN0Nsb25n
bGklNDBtaWNyb3NvZnQuY29tJQ0KPiA+DQo+IDdDNzRhNDU5YTY3YzY0NDBmODhkNDMwOGQ0ZWYz
MzU4YzUlN0M3MmY5ODhiZjg2ZjE0MWFmOTFhYjJkN2NkMDExZGINCj4gNDclDQo+ID4NCj4gN0Mx
JTdDMCU3QzYzNjM5NjQ1MTE5MjgxODMzNCZzZGF0YT1uSUZtVjV3dm5MMXhNbTZ0Q25mZEFnTE10
JQ0KPiAyQkZLSlU2b2gNCj4gPiBoTmhFWE84WkpzJTNEJnJlc2VydmVkPTANCj4gDQo+IEl0IGlz
IGJldHRlciB0byBzcGxpdCB0aGUgY3VycmVudCBwYXRjaCBpbnRvIDIgYW5kIG1lcmdlIHRoZSBN
YWtlZmlsZSBwYXJ0IHRvICMzDQo+IGFuZCBjaWZzZ2xvYi5oIHBhcnQgdG8gIzUuDQoNClN1cmUs
IHdpbGwgbWFrZSB0aGUgY2hhbmdlLg0KDQo+IA0KPiAtLQ0KPiBCZXN0IHJlZ2FyZHMsDQo+IFBh
dmVsIFNoaWxvdnNreQ0K
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 */