]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
knotd: optimize configuration cache memory usage
authorJan Hák <jan.hak@nic.cz>
Wed, 22 Mar 2023 14:14:44 +0000 (15:14 +0100)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 29 Mar 2023 13:47:35 +0000 (15:47 +0200)
It saves 1 cache line

src/knot/conf/base.h

index aa22723b0bc5933b8be62108db8413f1686ea7ea..970a470c4135976ffe085c537d0fc7b3ce9b5bdc 100644 (file)
@@ -135,10 +135,6 @@ typedef struct {
                int srv_tcp_idle_timeout;
                int srv_tcp_io_timeout;
                int srv_tcp_remote_io_timeout;
-               bool srv_tcp_reuseport;
-               bool srv_tcp_fastopen;
-               bool srv_socket_affinity;
-               unsigned srv_dbus_event;
                size_t srv_udp_threads;
                size_t srv_tcp_threads;
                size_t srv_xdp_threads;
@@ -147,25 +143,29 @@ typedef struct {
                size_t xdp_tcp_max_clients;
                size_t xdp_tcp_inbuf_max_size;
                size_t xdp_tcp_outbuf_max_size;
+               unsigned srv_dbus_event;
                uint32_t xdp_tcp_idle_close;
                uint32_t xdp_tcp_idle_reset;
                uint32_t xdp_tcp_idle_resend;
                size_t srv_quic_max_clients;
                size_t srv_quic_obuf_max_size;
+               const uint8_t *srv_nsid_data;
+               size_t srv_nsid_len;
+               const char *srv_ident;
+               const char *srv_version;
                uint32_t srv_quic_idle_close;
+               uint16_t xdp_quic;
+               int ctl_timeout;
                bool xdp_udp;
                bool xdp_tcp;
-               uint16_t xdp_quic;
                bool xdp_route_check;
-               int ctl_timeout;
-               const uint8_t *srv_nsid_data;
-               size_t srv_nsid_len;
+               bool srv_tcp_reuseport;
+               bool srv_tcp_fastopen;
+               bool srv_socket_affinity;
                bool srv_ecs;
                bool srv_ans_rotate;
                bool srv_auto_acl;
                bool srv_proxy_enabled;
-               const char *srv_ident;
-               const char *srv_version;
                bool srv_has_version;
        } cache;