aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2025-08-05 18:11:36 +0200
committerSteve French <stfrench@microsoft.com>2025-08-06 15:04:13 -0500
commitb7ffb4d2a0360043d821b612040088ae9299aa8c (patch)
tree8049212321f25b5766070a8ebc8581294348385a
parentsmb: client: make use of smb: smbdirect_socket.recv_io.free.{list,lock} (diff)
downloadwireguard-linux-b7ffb4d2a0360043d821b612040088ae9299aa8c.tar.xz
wireguard-linux-b7ffb4d2a0360043d821b612040088ae9299aa8c.zip
smb: smbdirect: introduce smbdirect_socket.recv_io.reassembly.*
This will be used in common between client and server 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> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/common/smbdirect/smbdirect_socket.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h
index 21a58e6078cb..3ae834ca3af1 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.h
+++ b/fs/smb/common/smbdirect/smbdirect_socket.h
@@ -60,6 +60,32 @@ struct smbdirect_socket {
struct list_head list;
spinlock_t lock;
} free;
+
+ /*
+ * The list of arrived non-empty smbdirect_recv_io
+ * structures
+ *
+ * This represents the reassembly queue.
+ */
+ struct {
+ struct list_head list;
+ spinlock_t lock;
+ wait_queue_head_t wait_queue;
+ /* total data length of reassembly queue */
+ int data_length;
+ int queue_length;
+ /* the offset to first buffer in reassembly queue */
+ int first_entry_offset;
+ /*
+ * Indicate if we have received a full packet on the
+ * connection This is used to identify the first SMBD
+ * packet of a assembled payload (SMB packet) in
+ * reassembly queue so we can return a RFC1002 length to
+ * upper layer to indicate the length of the SMB packet
+ * received
+ */
+ bool full_packet_received;
+ } reassembly;
} recv_io;
};