mirror-linux/fs/smb/common
Stefan Metzmacher 68335cbcdd smb: smbdirect: introduce smbdirect_socket.send_io.lcredits.*
This will be used to implement a logic in order to make sure
we don't overflow the send submission queue for ib_post_send().

We will initialize the local credits with the
fixed sp->send_credit_target value, which matches
the reserved slots in the submission queue for ib_post_send().

We will be a local credit first and then wait for a remote credit,
if we managed to get both we are allowed to post an
IB_WR_SEND[_WITH_INV]. The local credit is given back to
the pool when we get the local ib_post_send() completion,
while remote credits are granted by the peer.

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.

The client already has some logic for this based on
smbdirect_socket.send_io.pending.count, but that
counts in the order direction and makes it complex it
share common logic for various credits classes.
That logic will be replaced soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
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>
2025-10-22 20:10:19 -05:00
..
smbdirect smb: smbdirect: introduce smbdirect_socket.send_io.lcredits.* 2025-10-22 20:10:19 -05:00
Makefile smb: Use arc4 library instead of duplicate arc4 code 2025-09-29 21:21:23 -05:00
cifs_md4.c
cifsglob.h smb: move some duplicate definitions to common/cifsglob.h 2025-10-15 07:44:17 -05:00
md4.h
smb2pdu.h cifs: Fix support for WSL-style symlinks 2025-04-08 18:38:03 -05:00
smb2status.h smb: add comment to STATUS_MCA_OCCURED 2024-09-15 10:42:44 -05:00
smbacl.h smb: common: change the data type of num_aces to le16 2025-03-02 22:50:54 -06:00
smbfsctl.h cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes 2025-02-19 10:42:27 -06:00