diff options
| author | Stefan Metzmacher <metze@samba.org> | 2025-08-11 16:03:00 +0200 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-09-28 18:29:47 -0500 |
| commit | 2191b3471df53d87a46179b0c302c77c9ccfec11 (patch) | |
| tree | 76b783682f092aed78b0fc61fdc1bc5ba19f8145 | |
| parent | smb: smbdirect: introduce smbdirect_socket.send_io.pending.{count,{dec,zero}_... (diff) | |
| download | linux-2191b3471df53d87a46179b0c302c77c9ccfec11.tar.gz linux-2191b3471df53d87a46179b0c302c77c9ccfec11.zip | |
smb: smbdirect: introduce smbdirect_socket.send_io.credits.{count,wait_queue}
This will be shared between client and server soon.
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
| -rw-r--r-- | fs/smb/common/smbdirect/smbdirect_socket.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h index 1df43b7a87f4..7c2147a0244a 100644 --- a/fs/smb/common/smbdirect/smbdirect_socket.h +++ b/fs/smb/common/smbdirect/smbdirect_socket.h @@ -79,6 +79,14 @@ struct smbdirect_socket { } mem; /* + * The credit state for the send side + */ + struct { + atomic_t count; + wait_queue_head_t wait_queue; + } credits; + + /* * The state about posted/pending sends */ struct { @@ -163,6 +171,9 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc) init_waitqueue_head(&sc->status_wait); + atomic_set(&sc->send_io.credits.count, 0); + init_waitqueue_head(&sc->send_io.credits.wait_queue); + atomic_set(&sc->send_io.pending.count, 0); init_waitqueue_head(&sc->send_io.pending.dec_wait_queue); init_waitqueue_head(&sc->send_io.pending.zero_wait_queue); |
