P4.0: source3/smbd/globals.h lib/util/samba_io_uring.h
authorStefan Metzmacher <metze@samba.org>
Wed, 30 Sep 2020 12:01:06 +0000 (14:01 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 16 Oct 2023 11:03:46 +0000 (13:03 +0200)
source3/smbd/globals.h
source3/smbd/smb2_process.c

index 59a593bd4538c58a182f6e3b17f4bd53476981eb..0d900a33f89b5e927b88947d9abccfe3bcd51df5 100644 (file)
@@ -24,6 +24,7 @@
 #include "system/select.h"
 #include "librpc/gen_ndr/smbXsrv.h"
 #include "smbprofile.h"
+#include "lib/util/samba_io_uring.h"
 
 #ifdef USE_DMAPI
 struct smbd_dmapi_context;
@@ -917,6 +918,7 @@ struct smbd_server_connection {
 
        struct notify_mid_map *notify_mid_maps;
 
+       struct samba_io_uring *uring;
        struct pthreadpool_tevent *pool;
 
        struct smbXsrv_client *client;
index d55f80646acfa7f8c0629947c273f0a6302c1705..a03d66cd003e1e9c8eec453669cb8000577f7242 100644 (file)
@@ -1796,6 +1796,13 @@ void smbd_process(struct tevent_context *ev_ctx,
                exit_server("pthreadpool_tevent_init() failed.");
        }
 
+       if (lp_parm_bool(-1, "smb2srv", "sconn_uring", false)) {
+               sconn->uring = samba_io_uring_ev_context_get_ring(sconn->ev_ctx);
+               if (sconn->uring == NULL) {
+                       exit_server("samba_io_uring_ev_context_get_ring() failed.");
+               }
+       }
+
 #if defined(WITH_SMB1SERVER)
        if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {
 #endif