]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: smbdirect: introduce smbdirect_socket.idle.{keepalive,immediate_work,timer_work}
authorStefan Metzmacher <metze@samba.org>
Fri, 15 Aug 2025 15:47:58 +0000 (17:47 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:48 +0000 (18:29 -0500)
This will allow client and server to use the common structures in order
to share common functions 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>
fs/smb/common/smbdirect/smbdirect_socket.h

index 3aaee6ca293459b1c4b6bddb1c3975f34989575e..11e9b365ac96737d0a182ee9dc6534c613dacb08 100644 (file)
@@ -41,6 +41,12 @@ const char *smbdirect_socket_status_string(enum smbdirect_socket_status status)
        return "<unknown>";
 }
 
+enum smbdirect_keepalive_status {
+       SMBDIRECT_KEEPALIVE_NONE,
+       SMBDIRECT_KEEPALIVE_PENDING,
+       SMBDIRECT_KEEPALIVE_SENT
+};
+
 struct smbdirect_socket {
        enum smbdirect_socket_status status;
        wait_queue_head_t status_wait;
@@ -71,6 +77,15 @@ struct smbdirect_socket {
 
        struct smbdirect_socket_parameters parameters;
 
+       /*
+        * The state for keepalive and timeout handling
+        */
+       struct {
+               enum smbdirect_keepalive_status keepalive;
+               struct work_struct immediate_work;
+               struct delayed_work timer_work;
+       } idle;
+
        /*
         * The state for posted send buffers
         */