Skip to content

smb:client/server/smbdirect: correct value for max_fragmented_recv_size

Stefan Metzmacher linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2smb: client: correct value for smbd_max_fragmented_recv_sizefs/smb/client/smbdirect.c+17 -20 replies
2/2smb: server: correct value for smb_direct_max_fragmented_recv_sizefs/smb/server/transport_rdma.c+40 -22 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNamjae Jeon
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 1 line
2.43.0