From: Vladimír Čunát Date: Mon, 6 Jan 2025 15:24:17 +0000 (+0100) Subject: defer nits X-Git-Tag: v6.0.10~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fa5b810b94b6834619d1d8b98a28a33336ae32d;p=thirdparty%2Fknot-resolver.git defer nits Swapping the fields reduces the size of the struct. (I see no reason for the previous field order.) --- diff --git a/daemon/defer.h b/daemon/defer.h index c5ae26c50..18adf91b3 100644 --- a/daemon/defer.h +++ b/daemon/defer.h @@ -22,8 +22,8 @@ void defer_charge(uint64_t nsec, union kr_sockaddr *addr, bool stream); typedef struct { bool is_accounting; /// whether currently accounting the time to someone - union kr_sockaddr addr; /// request source (to which we account) or AF_UNSPEC if unknown yet bool stream; + union kr_sockaddr addr; /// request source (to which we account) or AF_UNSPEC if unknown yet uint64_t stamp; /// monotonic nanoseconds, probably won't wrap } defer_sample_state_t; extern defer_sample_state_t defer_sample_state; diff --git a/python/knot_resolver/datamodel/templates/policy-config.lua.j2 b/python/knot_resolver/datamodel/templates/policy-config.lua.j2 index 89eeb94c3..9d88537a9 100644 --- a/python/knot_resolver/datamodel/templates/policy-config.lua.j2 +++ b/python/knot_resolver/datamodel/templates/policy-config.lua.j2 @@ -36,6 +36,7 @@ cache.open({{ cfg.cache.size_max.bytes() }}, 'lmdb://{{ cfg.cache.storage }}') {% include "forward.lua.j2" %} -- DEFER section ------------------------------------ +-- Force-disable defer to avoid the default defer config. {% set disable_defer = true %} {% include "defer.lua.j2" %}