]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: smbdirect: add smbdirect_socket.{send,recv}_io.mem.{cache,pool}
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Aug 2025 17:35:52 +0000 (19:35 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Aug 2025 20:18:58 +0000 (15:18 -0500)
This will be the common location memory caches and pools.

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 4660c05c358f714e36d0901dca9df4cd139992dd..3c4a8d627aa3f512a4df106b8bbafb89ac8f8ec5 100644 (file)
@@ -39,6 +39,20 @@ struct smbdirect_socket {
 
        struct smbdirect_socket_parameters parameters;
 
+       /*
+        * The state for posted send buffers
+        */
+       struct {
+               /*
+                * Memory pools for preallocating
+                * smbdirect_send_io buffers
+                */
+               struct {
+                       struct kmem_cache       *cache;
+                       mempool_t               *pool;
+               } mem;
+       } send_io;
+
        /*
         * The state for posted receive buffers
         */
@@ -52,6 +66,15 @@ struct smbdirect_socket {
                        SMBDIRECT_EXPECT_DATA_TRANSFER = 3,
                } expected;
 
+               /*
+                * Memory pools for preallocating
+                * smbdirect_recv_io buffers
+                */
+               struct {
+                       struct kmem_cache       *cache;
+                       mempool_t               *pool;
+               } mem;
+
                /*
                 * The list of free smbdirect_recv_io
                 * structures