]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: smbdirect: introduce struct smbdirect_send_io
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Aug 2025 17:35:50 +0000 (19:35 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Aug 2025 20:18:58 +0000 (15:18 -0500)
This will be used in client and server soon
in order to replace smbd_request/smb_direct_sendmsg.

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>
fs/smb/common/smbdirect/smbdirect_socket.h

index 7270fcee1048c4d374450656e695c3594035cedb..4660c05c358f714e36d0901dca9df4cd139992dd 100644 (file)
@@ -89,6 +89,30 @@ struct smbdirect_socket {
        } recv_io;
 };
 
+struct smbdirect_send_io {
+       struct smbdirect_socket *socket;
+       struct ib_cqe cqe;
+
+       /*
+        * The SGE entries for this work request
+        *
+        * The first points to the packet header
+        */
+#define SMBDIRECT_SEND_IO_MAX_SGE 6
+       size_t num_sge;
+       struct ib_sge sge[SMBDIRECT_SEND_IO_MAX_SGE];
+
+       /*
+        * Link to the list of sibling smbdirect_send_io
+        * messages.
+        */
+       struct list_head sibling_list;
+       struct ib_send_wr wr;
+
+       /* SMBD packet header follows this structure */
+       u8 packet[];
+};
+
 struct smbdirect_recv_io {
        struct smbdirect_socket *socket;
        struct ib_cqe cqe;