Commit 4d02c4fd authored by Hyunchul Lee's avatar Hyunchul Lee Committed by Steve French
Browse files

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: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarHyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent c9f18927
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static int smb_direct_max_fragmented_recv_size = 1024 * 1024;
/*  The maximum single-message size which can be received */
static int smb_direct_max_receive_size = 8192;

static int smb_direct_max_read_write_size = 1024 * 1024;
static int smb_direct_max_read_write_size = 1048512;

static int smb_direct_max_outstanding_rw_ops = 8;

@@ -1909,6 +1909,8 @@ static int smb_direct_prepare(struct ksmbd_transport *t)
				  le32_to_cpu(req->max_receive_size));
	st->max_fragmented_send_size =
		le32_to_cpu(req->max_fragmented_size);
	st->max_fragmented_recv_size =
		(st->recv_credit_max * st->max_recv_size) / 2;

	ret = smb_direct_send_negotiate_response(st, ret);
out: