[PATCH 0/2] smb:client/server/smbdirect: correct value for max_fragmented_recv_size

Stefan Metzmacher metze at samba.org
Thu Feb 5 16:14:13 UTC 2026


Hi,

here is one additional fix for the credit problems
in the client, it most likely happens when using
signing on rdma: 'rdma,sec=ntlmsspi' as mount options.

The problem is that we announce a large
max_fragmented_recv_size to the server, while we
don't have enough recv buffers to hold
the largest possible fragmented message.

For now we use the same logic as we are
currently using in the server:

max_fragmented_recv_size = (recv_credit_max * max_recv_size) / 2

There's a lot to improve here, but this makes sure
we're able talk to a peer without running out of credits
while transferring a message that uses the full
max_fragmented_recv_size.

The server patch is basically just cosmetic
explaining the logic we're are using.
Note the value of smb_direct_max_fragmented_recv_size
is never really used as smb_direct_prepare
recalculates max_fragmented_recv_size.

This applies on top of ksmbd-for-next

Stefan Metzmacher (2):
  smb: client: correct value for smbd_max_fragmented_recv_size
  smb: server: correct value for smb_direct_max_fragmented_recv_size

 fs/smb/client/smbdirect.c      | 19 +++++++++++++--
 fs/smb/server/transport_rdma.c | 42 ++++++++++++++++++++++++++++++++--
 2 files changed, 57 insertions(+), 4 deletions(-)

-- 
2.43.0




More information about the samba-technical mailing list