|
@@ -252,9 +252,14 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
|
|
|
wsize = volume_info->wsize ? volume_info->wsize : CIFS_DEFAULT_IOSIZE;
|
|
|
wsize = min_t(unsigned int, wsize, server->max_write);
|
|
|
#ifdef CONFIG_CIFS_SMB_DIRECT
|
|
|
- if (server->rdma)
|
|
|
- wsize = min_t(unsigned int,
|
|
|
+ if (server->rdma) {
|
|
|
+ if (server->sign)
|
|
|
+ wsize = min_t(unsigned int,
|
|
|
+ wsize, server->smbd_conn->max_fragmented_send_size);
|
|
|
+ else
|
|
|
+ wsize = min_t(unsigned int,
|
|
|
wsize, server->smbd_conn->max_readwrite_size);
|
|
|
+ }
|
|
|
#endif
|
|
|
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
|
|
|
wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
|
|
@@ -272,9 +277,14 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
|
|
|
rsize = volume_info->rsize ? volume_info->rsize : CIFS_DEFAULT_IOSIZE;
|
|
|
rsize = min_t(unsigned int, rsize, server->max_read);
|
|
|
#ifdef CONFIG_CIFS_SMB_DIRECT
|
|
|
- if (server->rdma)
|
|
|
- rsize = min_t(unsigned int,
|
|
|
+ if (server->rdma) {
|
|
|
+ if (server->sign)
|
|
|
+ rsize = min_t(unsigned int,
|
|
|
+ rsize, server->smbd_conn->max_fragmented_recv_size);
|
|
|
+ else
|
|
|
+ rsize = min_t(unsigned int,
|
|
|
rsize, server->smbd_conn->max_readwrite_size);
|
|
|
+ }
|
|
|
#endif
|
|
|
|
|
|
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
|