Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1722738 > unrolled thread
| Started by | Long Li <longli@exchange.microsoft.com> |
|---|---|
| First post | 2017-08-29 21:40 +0200 |
| Last post | 2017-08-29 21:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[Patch v3 05/19] CIFS: SMBD: Connect to SMBDirect session Long Li <longli@exchange.microsoft.com> - 2017-08-29 21:40 +0200
| From | Long Li <longli@exchange.microsoft.com> |
|---|---|
| Date | 2017-08-29 21:40 +0200 |
| Subject | [Patch v3 05/19] CIFS: SMBD: Connect to SMBDirect session |
| Message-ID | <ujUwF-6Me-11@gated-at.bofh.it> |
From: Long Li <longli@microsoft.com>
When "rdma" is specified in the mount option, CIFS attempts to connect to
SMBDirect instead of TCP socket.
Signed-off-by: Long Li <longli@microsoft.com>
---
fs/cifs/connect.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 19fdca8..43b4d54 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -45,6 +45,7 @@
#include <linux/parser.h>
#include <linux/bvec.h>
+#include "smbdirect.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -2289,12 +2290,26 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
else
tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
+ if (tcp_ses->rdma) {
+ tcp_ses->smbd_conn = smbd_get_connection(
+ tcp_ses, (struct sockaddr *)&volume_info->dstaddr);
+ if (tcp_ses->smbd_conn) {
+ cifs_dbg(VFS, "RDMA transport established\n");
+ rc = 0;
+ goto connected;
+ } else {
+ rc = -ENOENT;
+ goto out_err_crypto_release;
+ }
+ }
+
rc = ip_connect(tcp_ses);
if (rc < 0) {
cifs_dbg(VFS, "Error connecting to socket. Aborting operation.\n");
goto out_err_crypto_release;
}
+connected:
/*
* since we're in a cifs function already, we know that
* this will succeed. No need for try_module_get().
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web