ksmbd-tools: adjust smb2 max read/write/trans and cache
authorAndrea Pesaresi <andreapesaresi82@gmail.com>
Sun, 8 Dec 2024 13:04:06 +0000 (14:04 +0100)
committerRosen Penev <rosenp@gmail.com>
Tue, 10 Dec 2024 00:13:34 +0000 (16:13 -0800)
commit0ca4794564eb7294832636cf46ade680372edebf
treec431264620e5a4d36dc1ceda1f196b5a2ad988aa
parente3681cececeef6774c4c1a6abea26df7d9e4496b
ksmbd-tools: adjust smb2 max read/write/trans and cache

Now for all devices with every size of RAM it is set to:
`smb2 max read = 64K`
`smb2 max write = 64K`
`smb2 max trans = 64K`

Instead of fixed value to 64K is better to check RAM size and adjust to:

32 ~ 64MB RAM, set the value to 64K
64 ~ 128MB, set it to 128KB
128 ~ 256MB, set it to 1MB
More than 256MB leave default size to 4MB

With 64MB and 128MB is better also to disable the read/write cache
`cache read buffers = no`
`cache write buffers = no`

Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
net/ksmbd-tools/Makefile
net/ksmbd-tools/files/ksmbd.conf.template
net/ksmbd-tools/files/ksmbd.init