Skip to content

Commit 4d02c4f

Browse files
hcleesmfrench
authored andcommitted
ksmbd: smbd: change the default maximum read/write, receive size
Due to restriction that cannot handle multiple buffer descriptor structures, decrease the maximum read/write size for Windows clients. And set the maximum fragmented receive size in consideration of the receive queue size. Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Hyunchul Lee <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent c9f1892 commit 4d02c4f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/ksmbd/transport_rdma.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int smb_direct_max_fragmented_recv_size = 1024 * 1024;
8080
/* The maximum single-message size which can be received */
8181
static int smb_direct_max_receive_size = 8192;
8282

83-
static int smb_direct_max_read_write_size = 1024 * 1024;
83+
static int smb_direct_max_read_write_size = 1048512;
8484

8585
static int smb_direct_max_outstanding_rw_ops = 8;
8686

@@ -1908,7 +1908,9 @@ static int smb_direct_prepare(struct ksmbd_transport *t)
19081908
st->max_send_size = min_t(int, st->max_send_size,
19091909
le32_to_cpu(req->max_receive_size));
19101910
st->max_fragmented_send_size =
1911-
le32_to_cpu(req->max_fragmented_size);
1911+
le32_to_cpu(req->max_fragmented_size);
1912+
st->max_fragmented_recv_size =
1913+
(st->recv_credit_max * st->max_recv_size) / 2;
19121914

19131915
ret = smb_direct_send_negotiate_response(st, ret);
19141916
out:

0 commit comments

Comments
 (0)