]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: smbdirect: introduce smbdirect_socket.recv_io.expected
authorStefan Metzmacher <metze@samba.org>
Tue, 5 Aug 2025 16:11:30 +0000 (18:11 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Aug 2025 20:04:13 +0000 (15:04 -0500)
The expected message type can be global as they never change
during the after negotiation process.

This will replace smbd_response->type and smb_direct_recvmsg->type
in future.

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 e5b15cc44a7ba5f7d2a3a7c12a43f1f7b5b848a2..5db7815b614f89c43f1ef0772e58e2c8f1ce5f31 100644 (file)
@@ -38,6 +38,20 @@ struct smbdirect_socket {
        } ib;
 
        struct smbdirect_socket_parameters parameters;
+
+       /*
+        * The state for posted receive buffers
+        */
+       struct {
+               /*
+                * The type of PDU we are expecting
+                */
+               enum {
+                       SMBDIRECT_EXPECT_NEGOTIATE_REQ = 1,
+                       SMBDIRECT_EXPECT_NEGOTIATE_REP = 2,
+                       SMBDIRECT_EXPECT_DATA_TRANSFER = 3,
+               } expected;
+       } recv_io;
 };
 
 #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__ */