]> git.ipfire.org Git - thirdparty/kernel/stable.git/log
thirdparty/kernel/stable.git
7 days agosmb: server: let {free_transport,smb_direct_disconnect_rdma_{work,connection}}()...
Stefan Metzmacher [Tue, 2 Sep 2025 10:36:50 +0000 (12:36 +0200)] 
smb: server: let {free_transport,smb_direct_disconnect_rdma_{work,connection}}() wake up all wait queues

This is important in order to let all waiters notice a broken connection.

We also go via smb_direct_disconnect_rdma_{work,connection}() for broken
connections.

Acked-by: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: server: let smb_direct_disconnect_rdma_connection() disable all work but disconn...
Stefan Metzmacher [Thu, 28 Aug 2025 10:17:23 +0000 (12:17 +0200)] 
smb: server: let smb_direct_disconnect_rdma_connection() disable all work but disconnect_work

There's no point run these if we already know the connection
is broken.

Acked-by: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: server: fill in smbdirect_socket.first_error on error
Stefan Metzmacher [Thu, 28 Aug 2025 10:14:07 +0000 (12:14 +0200)] 
smb: server: fill in smbdirect_socket.first_error on error

For now we just use -ECONNABORTED, but it will get more detailed
later.

Acked-by: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: server: let smb_direct_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...
Stefan Metzmacher [Thu, 28 Aug 2025 08:39:56 +0000 (10:39 +0200)] 
smb: server: let smb_direct_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...

smb_direct_disconnect_rdma_connection() should turn the status into
an error state instead of leaving it as is until
smb_direct_disconnect_rdma_work() is running.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_send_negotiate_response()
Stefan Metzmacher [Fri, 22 Aug 2025 14:11:34 +0000 (16:11 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_send_negotiate_response()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to {enqueue,get_first}_reassembly()
Stefan Metzmacher [Fri, 22 Aug 2025 14:08:49 +0000 (16:08 +0200)] 
smb: server: pass struct smbdirect_socket to {enqueue,get_first}_reassembly()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_post_send_data()
Stefan Metzmacher [Fri, 22 Aug 2025 14:06:09 +0000 (16:06 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_post_send_data()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to post_sendmsg()
Stefan Metzmacher [Fri, 22 Aug 2025 14:03:52 +0000 (16:03 +0200)] 
smb: server: pass struct smbdirect_socket to post_sendmsg()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_create_header()
Stefan Metzmacher [Fri, 22 Aug 2025 14:02:21 +0000 (16:02 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_create_header()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to manage_keep_alive_before_sending()
Stefan Metzmacher [Fri, 22 Aug 2025 13:59:35 +0000 (15:59 +0200)] 
smb: server: pass struct smbdirect_socket to manage_keep_alive_before_sending()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to manage_credits_prior_sending()
Stefan Metzmacher [Fri, 22 Aug 2025 13:57:41 +0000 (15:57 +0200)] 
smb: server: pass struct smbdirect_socket to manage_credits_prior_sending()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to calc_rw_credits()
Stefan Metzmacher [Fri, 22 Aug 2025 13:55:20 +0000 (15:55 +0200)] 
smb: server: pass struct smbdirect_socket to calc_rw_credits()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to wait_for_rw_credits()
Stefan Metzmacher [Fri, 22 Aug 2025 13:52:47 +0000 (15:52 +0200)] 
smb: server: pass struct smbdirect_socket to wait_for_rw_credits()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to wait_for_send_credits()
Stefan Metzmacher [Fri, 22 Aug 2025 13:51:53 +0000 (15:51 +0200)] 
smb: server: pass struct smbdirect_socket to wait_for_send_credits()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to wait_for_credits()
Stefan Metzmacher [Fri, 22 Aug 2025 13:49:40 +0000 (15:49 +0200)] 
smb: server: pass struct smbdirect_socket to wait_for_credits()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_flush_send_list()
Stefan Metzmacher [Fri, 22 Aug 2025 13:48:05 +0000 (15:48 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_flush_send_list()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_post_send()
Stefan Metzmacher [Fri, 22 Aug 2025 13:46:53 +0000 (15:46 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_post_send()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: remove unused struct struct smb_direct_transport argument from smb_direc...
Stefan Metzmacher [Fri, 22 Aug 2025 13:08:27 +0000 (15:08 +0200)] 
smb: server: remove unused struct struct smb_direct_transport argument from smb_direct_send_ctx_init()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_{alloc,free}_sendmsg()
Stefan Metzmacher [Fri, 22 Aug 2025 13:07:35 +0000 (15:07 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_{alloc,free}_sendmsg()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_connect()
Stefan Metzmacher [Fri, 22 Aug 2025 12:55:50 +0000 (14:55 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_connect()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_prepare_negotiation()
Stefan Metzmacher [Fri, 22 Aug 2025 12:54:17 +0000 (14:54 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_prepare_negotiation()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_accept_client()
Stefan Metzmacher [Fri, 22 Aug 2025 12:53:13 +0000 (14:53 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_accept_client()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_post_recv()
Stefan Metzmacher [Fri, 22 Aug 2025 12:52:04 +0000 (14:52 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_post_recv()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_create_qpair()
Stefan Metzmacher [Fri, 22 Aug 2025 12:50:32 +0000 (14:50 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_create_qpair()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_qpair_handler()
Stefan Metzmacher [Fri, 22 Aug 2025 12:49:18 +0000 (14:49 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_qpair_handler()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_cm_handler()
Stefan Metzmacher [Fri, 22 Aug 2025 12:44:16 +0000 (14:44 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_cm_handler()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_disconnect_rdma_connection()
Stefan Metzmacher [Fri, 22 Aug 2025 12:48:01 +0000 (14:48 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_disconnect_rdma_connection()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_init_params()
Stefan Metzmacher [Fri, 22 Aug 2025 12:04:34 +0000 (14:04 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_init_params()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_get_max_fr_pages()
Stefan Metzmacher [Fri, 22 Aug 2025 11:55:17 +0000 (13:55 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_get_max_fr_pages()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to smb_direct_{create,destroy}_pools()
Stefan Metzmacher [Fri, 22 Aug 2025 11:50:42 +0000 (13:50 +0200)] 
smb: server: pass struct smbdirect_socket to smb_direct_{create,destroy}_pools()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: pass struct smbdirect_socket to {get_free,put}_recvmsg()
Stefan Metzmacher [Thu, 21 Aug 2025 23:14:38 +0000 (01:14 +0200)] 
smb: server: pass struct smbdirect_socket to {get_free,put}_recvmsg()

This will make it easier to move function to the common code
in future.

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>
7 days agosmb: server: make use of smbdirect_socket.workqueue
Stefan Metzmacher [Fri, 22 Aug 2025 10:32:48 +0000 (12:32 +0200)] 
smb: server: make use of smbdirect_socket.workqueue

We still use the single global workqueue, but this
will allow us to share common code soon.

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>
7 days agosmb: server: implement correct keepalive and timeout handling for smbdirect
Stefan Metzmacher [Fri, 15 Aug 2025 10:36:33 +0000 (12:36 +0200)] 
smb: server: implement correct keepalive and timeout handling for smbdirect

Now client and server behave in the same way and we can start to
share common functions.

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>
7 days agosmb: server: make use of smbdirect_socket.idle.immediate_work
Stefan Metzmacher [Fri, 15 Aug 2025 16:00:36 +0000 (18:00 +0200)] 
smb: server: make use of smbdirect_socket.idle.immediate_work

With this commit the server only uses struct smbdirect_socket!

It doesn't use the idle timer yet, but it will be added soon,
from there we'll be ready split common functions.

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>
7 days agosmb: server: make use of smbdirect_socket.rdma.legacy_iwarp
Stefan Metzmacher [Thu, 21 Aug 2025 10:32:05 +0000 (12:32 +0200)] 
smb: server: make use of smbdirect_socket.rdma.legacy_iwarp

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>
7 days agosmb: server: make use of smbdirect_socket_parameters.{initiator_depth,responder_resou...
Stefan Metzmacher [Thu, 21 Aug 2025 10:30:32 +0000 (12:30 +0200)] 
smb: server: make use of smbdirect_socket_parameters.{initiator_depth,responder_resources}

This will make it easier to specify these from the outside of the core
code first and then negotiate the value with the peer.

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>
7 days agosmb: server: make use of smbdirect_socket_parameters.negotiate_timeout_msec and chang...
Stefan Metzmacher [Fri, 15 Aug 2025 10:31:50 +0000 (12:31 +0200)] 
smb: server: make use of smbdirect_socket_parameters.negotiate_timeout_msec and change to 5s

The server negotiations timer is just 5 seconds in Windows, so use the
same. See [MS-SMBD] 3.1.7.2 Connection Arrival.

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>
7 days agosmb: server: fill smbdirect_socket_parameters at the beginning and use the values...
Stefan Metzmacher [Fri, 15 Aug 2025 10:22:09 +0000 (12:22 +0200)] 
smb: server: fill smbdirect_socket_parameters at the beginning and use the values from there

This is what we should do and it also simplifies the following changes.

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>
7 days agosmb: server: pass ksmbd_transport to get_smbd_max_read_write_size()
Stefan Metzmacher [Fri, 15 Aug 2025 10:03:40 +0000 (12:03 +0200)] 
smb: server: pass ksmbd_transport to get_smbd_max_read_write_size()

We should use the per connection value.

And for TCP return NT_STATUS_INVALID_PARAMETER if any
SMB2_CHANNEL_RDMA_V1* is used.

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>
7 days agosmb: server: remove useless casts from KSMBD_TRANS/SMBD_TRANS
Stefan Metzmacher [Fri, 15 Aug 2025 11:04:31 +0000 (13:04 +0200)] 
smb: server: remove useless casts from KSMBD_TRANS/SMBD_TRANS

At best they gain nothing, at worst we procude real bugs.
Note container_of() already casts to a pointer of the
given type.

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>
7 days agosmb: server: replace smb_trans_direct_transfort() with SMBD_TRANS()
Stefan Metzmacher [Fri, 15 Aug 2025 11:01:30 +0000 (13:01 +0200)] 
smb: server: replace smb_trans_direct_transfort() with SMBD_TRANS()

The spelling of smb_trans_direct_transfort was wrong anyway
and we don't need the logic twice.

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>
7 days agosmb: server: make use of smbdirect_socket.recv_io.{posted,credits}
Stefan Metzmacher [Thu, 14 Aug 2025 14:33:30 +0000 (16:33 +0200)] 
smb: server: make use of smbdirect_socket.recv_io.{posted,credits}

This will make it possible to introduce common helper functions
in future.

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>
7 days agosmb: server: manage recv credits by counting posted recv_io and granted credits
Stefan Metzmacher [Thu, 14 Aug 2025 14:05:47 +0000 (16:05 +0200)] 
smb: server: manage recv credits by counting posted recv_io and granted credits

(At least for me) the logic maintaining the count of posted
recv_io messages and the count of granted credits is much
easier to understand.

From there we can easily calculate the number of new_credits we'll
grant to the peer in outgoing send_io messages.

This will simplify the move to common logic that can be
shared between client and server in the following patches.

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>
7 days agosmb: server: take the recv_credit_target from the negotiate req and always limit...
Stefan Metzmacher [Thu, 14 Aug 2025 13:50:05 +0000 (15:50 +0200)] 
smb: server: take the recv_credit_target from the negotiate req and always limit the range

The clients sends the initial recv_credit_target in the negotiate req,
so we should use that.

We also limit the range between 1 and our local defined
sp->recv_credit_max. This will simplify further logic changes.

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>
7 days agosmb: server: make use of struct smbdirect_rw_io
Stefan Metzmacher [Mon, 18 Aug 2025 19:07:06 +0000 (21:07 +0200)] 
smb: server: make use of struct smbdirect_rw_io

This will allow us to create functions in the common
smbdirect code to be used by the server in future.

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>
7 days agosmb: server: make use smbdirect_socket.rw_io.credits
Stefan Metzmacher [Thu, 14 Aug 2025 10:01:50 +0000 (12:01 +0200)] 
smb: server: make use smbdirect_socket.rw_io.credits

This will allow to us to have functions moved into
common code in future (even if it's only used by the server).

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>
7 days agosmb: server: make use of struct smbdirect_send_batch
Stefan Metzmacher [Mon, 18 Aug 2025 19:16:48 +0000 (21:16 +0200)] 
smb: server: make use of struct smbdirect_send_batch

This makes it easier to move functions to the common
smbdirect code in future.

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>
7 days agosmb: server: make use of smbdirect_socket.send_io.credits.{count,wait_queue}
Stefan Metzmacher [Mon, 11 Aug 2025 15:12:58 +0000 (17:12 +0200)] 
smb: server: make use of smbdirect_socket.send_io.credits.{count,wait_queue}

This will is used by the client already and will allow to create
common helper functions.

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>
7 days agosmb: server: make use of smbdirect_socket.send_io.pending.{count,zero_wait_queue}
Stefan Metzmacher [Mon, 11 Aug 2025 13:19:51 +0000 (15:19 +0200)] 
smb: server: make use of smbdirect_socket.send_io.pending.{count,zero_wait_queue}

This will is used by the client already and will allow to create
common helper functions.

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>
7 days agosmb: server: make use of smbdirect_socket.disconnect_work
Stefan Metzmacher [Fri, 8 Aug 2025 17:07:37 +0000 (19:07 +0200)] 
smb: server: make use of smbdirect_socket.disconnect_work

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>
7 days agosmb: server: make use of smbdirect_socket_init()
Stefan Metzmacher [Fri, 8 Aug 2025 13:10:52 +0000 (15:10 +0200)] 
smb: server: make use of smbdirect_socket_init()

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>
7 days agosmb: server: don't wait for info->send_pending == 0 on error
Stefan Metzmacher [Wed, 13 Aug 2025 09:39:19 +0000 (11:39 +0200)] 
smb: server: don't wait for info->send_pending == 0 on error

Instead we just wake up the waiters and let them return -ENOTCONN.

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>
7 days agosmb: server: move smb_direct_disconnect_rdma_work() into free_transport()
Stefan Metzmacher [Tue, 12 Aug 2025 08:55:31 +0000 (10:55 +0200)] 
smb: server: move smb_direct_disconnect_rdma_work() into free_transport()

The logic is also needed when smb_direct_handle_connect_request()
calls free_transport(), because rdma_accept() and RDMA_CM_EVENT_ESTABLISHED
could already be reached.

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>
7 days agosmb: server: only turn into SMBDIRECT_SOCKET_CONNECTED when negotiation is done
Stefan Metzmacher [Fri, 8 Aug 2025 10:46:25 +0000 (12:46 +0200)] 
smb: server: only turn into SMBDIRECT_SOCKET_CONNECTED when negotiation is done

From SMBDIRECT_SOCKET_CREATED we now go via the following
stages:

1. SMBDIRECT_SOCKET_RDMA_CONNECT_NEEDED
   This indicated rdma_accept needs to be called

2. SMBDIRECT_SOCKET_RDMA_CONNECT_RUNNING
   This waits for RDMA_CM_EVENT_ESTABLISHED to
   arrive

3. SMBDIRECT_SOCKET_NEGOTIATE_NEEDED
   This waits for the negotiate request to
   arrive

4. SMBDIRECT_SOCKET_NEGOTIATE_RUNNING
   This indicates the negotiate request
   arrived and needs to be processed

5. SMBDIRECT_SOCKET_CONNECTED
   The connection is ready to use

This avoids the extra 'bool negotiation_requested'
and makes the steps more clear.

In future we may want to add trace points when
changing the states, which would be useful for
debugging.

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>
7 days agosmb: server: make use of smbdirect_socket.status_wait
Stefan Metzmacher [Thu, 7 Aug 2025 09:20:55 +0000 (11:20 +0200)] 
smb: server: make use of smbdirect_socket.status_wait

This will allow us to have common helper functions soon.

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>
7 days agosmb: server: queue post_recv_credits_work in put_recvmsg() and avoid count_avail_recvmsg
Stefan Metzmacher [Mon, 11 Aug 2025 16:23:03 +0000 (18:23 +0200)] 
smb: server: queue post_recv_credits_work in put_recvmsg() and avoid count_avail_recvmsg

This is basically what the client is doing in put_receive_buffer().

It means we don't need complicated work to maintain count_avail_recvmsg.

But we keep the logic to queue post_recv_credits_work if the
peer raises the requested credit_target and put_receive_buffer()
is not called.

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>
7 days agosmb: server: add a pr_info() when the server starts running
Stefan Metzmacher [Fri, 8 Aug 2025 16:23:59 +0000 (18:23 +0200)] 
smb: server: add a pr_info() when the server starts running

We already have a message like:
ksmbd: kill command received
when the server stops running.

This makes it easier for debugging in order to match any possible
warnings/errors in dmesg with restarted server.

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>
7 days agosmb: server: make only use of wake_up[_all]() in transport_rdma.c
Stefan Metzmacher [Thu, 14 Aug 2025 08:06:50 +0000 (10:06 +0200)] 
smb: server: make only use of wake_up[_all]() in transport_rdma.c

wake_up_interruptible(() doesn't wake up tasks waiting with wait_event().

So we better wake_up[_all]() in order to wake up all tasks in order
to simplify the logic.

As we currently don't use any wait_event_*_exclusive() it
doesn't really matter if we use wake_up() or wake_up_all().
But in this patch I try to use wake_up() for expected situations
and wake_up_all() for situations of a broken connection.
So don't need to adjust things in future when we
may use wait_event_*_exclusive() in order to wake up
only one process that should make progress.

Changing the wait_event_*() code in order to keep
wait_event(), wait_event_interruptible() and
wait_event_interruptible_timeout() or
changing them to wait_event_killable(),
wait_event_killable_timeout(),
wait_event_killable_exclusive()
is something to think about in a future patch.

The goal here is to avoid that some tasks are not
woken and freeze forever.

Also note that this patch only changes the existing
wake_up*() calls. Adding more wake_up*() calls for
other wait queues is also deferred to a future patch.

Link: https://lore.kernel.org/linux-cifs/13851363-0dc9-465c-9ced-3ede4904eef0@samba.org/T/#t
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>
7 days agosmb: server: make use of smbdirect_socket.{send,recv}_io.mem.{cache,pool}
Stefan Metzmacher [Wed, 6 Aug 2025 17:36:04 +0000 (19:36 +0200)] 
smb: server: make use of smbdirect_socket.{send,recv}_io.mem.{cache,pool}

This will allow common helper functions to be created later.

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>
7 days agosmb: server: make use of struct smbdirect_send_io
Stefan Metzmacher [Wed, 6 Aug 2025 17:36:03 +0000 (19:36 +0200)] 
smb: server: make use of struct smbdirect_send_io

This is already used by the client and will allow us
to use common helper functions soon.

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>
7 days agosmb: server: make use of SMBDIRECT_RECV_IO_MAX_SGE
Stefan Metzmacher [Wed, 6 Aug 2025 17:36:02 +0000 (19:36 +0200)] 
smb: server: make use of SMBDIRECT_RECV_IO_MAX_SGE

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>
7 days agosmb: server: make use of smbdirect_socket.recv_io.reassembly.*
Stefan Metzmacher [Wed, 6 Aug 2025 17:36:01 +0000 (19:36 +0200)] 
smb: server: make use of smbdirect_socket.recv_io.reassembly.*

This is also used by the client and will allow us to introduce
common helper functions soon.

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>
7 days agosmb: server: make use of smbdirect_socket.recv_io.free.{list,lock}
Stefan Metzmacher [Wed, 6 Aug 2025 17:36:00 +0000 (19:36 +0200)] 
smb: server: make use of smbdirect_socket.recv_io.free.{list,lock}

This is already used by the client and will allow us to
add common helper functions soon.

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>
7 days agosmb: server: make use of struct smbdirect_recv_io
Stefan Metzmacher [Wed, 6 Aug 2025 17:35:59 +0000 (19:35 +0200)] 
smb: server: make use of struct smbdirect_recv_io

This will allow us to move helper functions into common code soon
as the client already uses smbdirect_recv_io.

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>
7 days agosmb: server: make use of smbdirect_socket->recv_io.expected
Stefan Metzmacher [Wed, 6 Aug 2025 17:35:58 +0000 (19:35 +0200)] 
smb: server: make use of smbdirect_socket->recv_io.expected

The expected incoming message type can be per connection.

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>
7 days agosmb: server: make use of common smbdirect_socket_parameters
Stefan Metzmacher [Wed, 6 Aug 2025 17:35:57 +0000 (19:35 +0200)] 
smb: server: make use of common smbdirect_socket_parameters

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: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Meetakshi Setiya <meetakshisetiyaoss@gmail.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>
7 days agosmb: server: make use of common smbdirect_socket
Stefan Metzmacher [Wed, 6 Aug 2025 17:35:56 +0000 (19:35 +0200)] 
smb: server: make use of common smbdirect_socket

This is the next step in the direction of a common smbdirect layer.
Currently only structures are shared, but that will change
over time until everything is shared.

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: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Meetakshi Setiya <meetakshisetiyaoss@gmail.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>
7 days agosmb: server: make use of common smbdirect.h
Stefan Metzmacher [Wed, 6 Aug 2025 17:35:55 +0000 (19:35 +0200)] 
smb: server: make use of common smbdirect.h

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: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Meetakshi Setiya <meetakshisetiyaoss@gmail.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>
7 days agosmb: server: make use of common smbdirect_pdu.h
Stefan Metzmacher [Sat, 16 Aug 2025 01:24:30 +0000 (10:24 +0900)] 
smb: server: make use of common smbdirect_pdu.h

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: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Meetakshi Setiya <meetakshisetiyaoss@gmail.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>
7 days agosmb: server: fix IRD/ORD negotiation with the client
Stefan Metzmacher [Wed, 20 Aug 2025 13:34:58 +0000 (15:34 +0200)] 
smb: server: fix IRD/ORD negotiation with the client

Already do real negotiation in smb_direct_handle_connect_request()
where we see the requested initiator_depth and responder_resources
from the client.

We should detect legacy iwarp clients using MPA v1
with the custom IRD/ORD negotiation.

We need to send the custom IRD/ORD in big endian,
but we need to try to let clients with broken requests
using little endian (older cifs.ko) to work.

Note the reason why this uses u8 for
initiator_depth and responder_resources is
that the rdma layer also uses it.

Acked-by: 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
Cc: linux-rdma@vger.kernel.org
Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: let smbd_post_send_iter() call ib_dma_map_single() for the header first
Stefan Metzmacher [Sun, 14 Sep 2025 22:55:31 +0000 (00:55 +0200)] 
smb: client: let smbd_post_send_iter() call ib_dma_map_single() for the header first

This will simplify further changes, the important part is that
request->num_sge >= 1 is only set if request->sge[0].* is valid.

Note that ib_dma_sync_single_for_device() is called in
smbd_post_send() for each sge, so the device will still
see the packet header even if it's modified after calling
ib_dma_map_single().

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>
7 days agosmb: client: defer calling ib_alloc_pd() after we are connected
Stefan Metzmacher [Mon, 15 Sep 2025 21:32:15 +0000 (23:32 +0200)] 
smb: client: defer calling ib_alloc_pd() after we are connected

The protection domain is not needed until we're connected.

This makes further changes easier to follow...

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>
7 days agosmb: client: allocate smbdirect workqueue at the beginning of _smbd_get_connection()
Stefan Metzmacher [Tue, 26 Aug 2025 13:54:10 +0000 (15:54 +0200)] 
smb: client: allocate smbdirect workqueue at the beginning of _smbd_get_connection()

This will simplify further changes when moving to common code.

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>
7 days agosmb: client: make consitent use of spin_lock_irq{save,restore}() in smbdirect.c
Stefan Metzmacher [Wed, 27 Aug 2025 13:34:09 +0000 (15:34 +0200)] 
smb: client: make consitent use of spin_lock_irq{save,restore}() in smbdirect.c

There is a mix of using spin_lock(), spin_lock_irq() and
spin_lock_irqsave() and it seems at least enqueue_reassembly() was wrong
in using just spin_lock() as it's called via recv_done() from a SOFTIRQ
as we're using IB_POLL_SOFTIRQ.

And Documentation/kernel-hacking/locking.rst section
"Cheat Sheet For Locking" says:

-  Otherwise (== data can be touched in an interrupt), use
   spin_lock_irqsave() and
   spin_unlock_irqrestore().

So in order to keep it simple and safe we use that version
now. It will help merging functions into common code and
have consistent locking in all cases.

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>
7 days agosmb: client: let smbd_{destroy,disconnect_rdma_{work,connection}}() wake up all wait...
Stefan Metzmacher [Tue, 2 Sep 2025 10:17:56 +0000 (12:17 +0200)] 
smb: client: let smbd_{destroy,disconnect_rdma_{work,connection}}() wake up all wait queues

This is important in order to let all waiters notice a broken connection.

We also go via smbd_disconnect_rdma_{work,connection}() for broken
connections.

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>
7 days agosmb: client: let smbd_disconnect_rdma_connection() disable all work but disconnect_work
Stefan Metzmacher [Thu, 28 Aug 2025 10:15:11 +0000 (12:15 +0200)] 
smb: client: let smbd_disconnect_rdma_connection() disable all work but disconnect_work

There's no point run these if we already know the connection
is broken.

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>
7 days agosmb: client: fill in smbdirect_socket.first_error on error
Stefan Metzmacher [Thu, 28 Aug 2025 10:12:09 +0000 (12:12 +0200)] 
smb: client: fill in smbdirect_socket.first_error on error

For now we just use -ECONNABORTED, but it will get more detailed
later.

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>
7 days agosmb: client: let smbd_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...
Stefan Metzmacher [Thu, 28 Aug 2025 08:39:56 +0000 (10:39 +0200)] 
smb: client: let smbd_disconnect_rdma_connection() set SMBDIRECT_SOCKET_ERROR...

smbd_disconnect_rdma_connection() should turn the status into
an error state instead of leaving it as is until
smbd_disconnect_rdma_work() is running.

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>
7 days agosmb: client: remove unused struct smbdirect_socket argument of smbd_iter_to_mr()
Stefan Metzmacher [Thu, 21 Aug 2025 23:14:38 +0000 (01:14 +0200)] 
smb: client: remove unused struct smbdirect_socket argument of smbd_iter_to_mr()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to get_mr()
Stefan Metzmacher [Thu, 21 Aug 2025 23:14:38 +0000 (01:14 +0200)] 
smb: client: pass struct smbdirect_socket to get_mr()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_negotiate()
Stefan Metzmacher [Fri, 22 Aug 2025 09:54:30 +0000 (11:54 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_negotiate()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_send_negotiate_req()
Stefan Metzmacher [Fri, 22 Aug 2025 09:52:24 +0000 (11:52 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_send_negotiate_req()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_ia_open()
Stefan Metzmacher [Fri, 22 Aug 2025 09:34:05 +0000 (11:34 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_ia_open()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_create_id()
Stefan Metzmacher [Fri, 22 Aug 2025 09:10:57 +0000 (11:10 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_create_id()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_qp_async_error_upcall()
Stefan Metzmacher [Fri, 22 Aug 2025 09:08:13 +0000 (11:08 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_qp_async_error_upcall()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_conn_upcall()
Stefan Metzmacher [Fri, 22 Aug 2025 09:07:48 +0000 (11:07 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_conn_upcall()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_send_full_iter()
Stefan Metzmacher [Fri, 22 Aug 2025 09:03:52 +0000 (11:03 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_send_full_iter()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_send_empty()
Stefan Metzmacher [Fri, 22 Aug 2025 08:47:06 +0000 (10:47 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_send_empty()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_send_iter()
Stefan Metzmacher [Fri, 22 Aug 2025 08:27:01 +0000 (10:27 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_send_iter()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to manage_keep_alive_before_sending()
Stefan Metzmacher [Fri, 22 Aug 2025 08:21:16 +0000 (10:21 +0200)] 
smb: client: pass struct smbdirect_socket to manage_keep_alive_before_sending()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_send()
Stefan Metzmacher [Fri, 22 Aug 2025 08:19:28 +0000 (10:19 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_send()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to manage_credits_prior_sending()
Stefan Metzmacher [Fri, 22 Aug 2025 08:18:12 +0000 (10:18 +0200)] 
smb: client: pass struct smbdirect_socket to manage_credits_prior_sending()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_post_recv()
Stefan Metzmacher [Fri, 22 Aug 2025 08:14:29 +0000 (10:14 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_post_recv()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to smbd_disconnect_rdma_connection()
Stefan Metzmacher [Fri, 22 Aug 2025 08:12:35 +0000 (10:12 +0200)] 
smb: client: pass struct smbdirect_socket to smbd_disconnect_rdma_connection()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to {allocate,destroy}_mr_list()
Stefan Metzmacher [Fri, 22 Aug 2025 08:10:10 +0000 (10:10 +0200)] 
smb: client: pass struct smbdirect_socket to {allocate,destroy}_mr_list()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to {enqueue,_get_first}_reassembly()
Stefan Metzmacher [Thu, 21 Aug 2025 23:17:35 +0000 (01:17 +0200)] 
smb: client: pass struct smbdirect_socket to {enqueue,_get_first}_reassembly()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to {allocate,destroy}_caches_and_workqueue()
Stefan Metzmacher [Thu, 21 Aug 2025 23:14:38 +0000 (01:14 +0200)] 
smb: client: pass struct smbdirect_socket to {allocate,destroy}_caches_and_workqueue()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to {allocate,destroy}_receive_buffers()
Stefan Metzmacher [Thu, 21 Aug 2025 23:11:36 +0000 (01:11 +0200)] 
smb: client: pass struct smbdirect_socket to {allocate,destroy}_receive_buffers()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: pass struct smbdirect_socket to {get,put}_receive_buffer()
Stefan Metzmacher [Thu, 21 Aug 2025 23:07:11 +0000 (01:07 +0200)] 
smb: client: pass struct smbdirect_socket to {get,put}_receive_buffer()

This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
7 days agosmb: client: make use of smbdirect_socket.mr_io
Stefan Metzmacher [Thu, 21 Aug 2025 22:57:19 +0000 (00:57 +0200)] 
smb: client: make use of smbdirect_socket.mr_io

Now struct smbd_connection only contains struct smbdirect_socket,
this is an important step towards having common functions as well.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>