CIFS: SMBD: Upper layer receives data via RDMA receive
authorLong Li <longli@microsoft.com>
Thu, 23 Nov 2017 00:38:41 +0000 (17:38 -0700)
committerSteve French <smfrench@gmail.com>
Thu, 25 Jan 2018 01:49:06 +0000 (19:49 -0600)
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>
fs/cifs/connect.c

index d8bfa89161e24bae64b96f97baf7e6077b2c6daa..1677401660d00517e9d025f2004154b6966bf8bd 100644 (file)
@@ -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;