summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2017-11-22 17:38:41 -0700
committerSteve French <smfrench@gmail.com>2018-01-24 19:49:06 -0600
commit2fef137a2e6a2e5a7984f991e6b9546ddd93c6f2 (patch)
tree7c75f003766f722052b2fb3c7a389986df2108f2 /fs
parentf64b78fd1835d1d764685b0c80c292c5d3daaa07 (diff)
CIFS: SMBD: Upper layer receives data via RDMA receive
With SMB Direct connected, use it for receiving data via RDMA receive. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d8bfa89161e2..1677401660d0 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -542,8 +542,10 @@ cifs_readv_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg)
if (server_unresponsive(server))
return -ECONNABORTED;
-
- length = sock_recvmsg(server->ssocket, smb_msg, 0);
+ if (cifs_rdma_enabled(server) && server->smbd_conn)
+ length = smbd_recv(server->smbd_conn, smb_msg);
+ else
+ length = sock_recvmsg(server->ssocket, smb_msg, 0);
if (server->tcpStatus == CifsExiting)
return -ESHUTDOWN;