]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: server: make use of smbdirect_socket.send_io.lcredits.*
authorStefan Metzmacher <metze@samba.org>
Mon, 20 Oct 2025 18:36:01 +0000 (20:36 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Oct 2025 01:11:01 +0000 (20:11 -0500)
commit0158e864cca0c98bdc2866f1eb30c66fa21e250c
tree3e4383824503ff1b9e0537244e8eac453372cce6
parenta90227462a14f5bdf7dfd4b73c2b75c54834efce
smb: server: make use of smbdirect_socket.send_io.lcredits.*

This introduces logic to prevent on overflow of
the send submission queue with ib_post_send() easier.

As we first get a local credit and then a remote credit
before we mark us as pending.

From reading the git history of the linux smbdirect
implementations in client and server) it was seen
that a peer granted more credits than we requested.
I guess that only happened because of bugs in our
implementation which was active as client and server.
I guess Windows won't do that.

So the local credits make sure we only use the amount
of credits we asked for.

Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c