diff options
author | Maria Matejka <mq@ucw.cz> | 2023-01-23 19:05:41 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-01-23 19:05:41 +0100 |
commit | 5481bcd82f4c9dc2074267fb56858f5bf48910df (patch) | |
tree | 2166b77f8b15159ab2b0461ff7f2a0608bf9de66 | |
parent | 7bb93efc27c1c6f7d1f3cb66791005903f7b1a26 (diff) | |
parent | d3f50ede127df338f575e188566035b2a46cf6c6 (diff) |
Merge commit 'd3f50ede127df338f575e188566035b2a46cf6c6' into thread-next
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | filter/data.h | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2f37f9d0..b3735123 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,12 @@ AC_ARG_ENABLE([memcheck], [enable_memcheck=yes] ) +AC_ARG_ENABLE([compact-tries], + [AS_HELP_STRING([--enable-compact-tries], [use 4-way tries instead of 16-way ones @<:@no@:>@])], + [], + [enable_compact_tries=no] +) + AC_ARG_ENABLE([libssh], [AS_HELP_STRING([--enable-libssh], [enable LibSSH support in RPKI @<:@try@:>@])], [], @@ -415,6 +421,10 @@ if test "$enable_debug" = yes ; then fi fi +if test "$enable_compact_tries" = yes ; then + AC_DEFINE([ENABLE_COMPACT_TRIES], [1], [Define to 1 if you want 4-way tries instead of 16-way ones.]) +fi + CLIENT=birdcl CLIENT_LIBS= if test "$enable_client" = yes ; then @@ -475,6 +485,7 @@ AC_MSG_RESULT([ Object directory: $objdir]) AC_MSG_RESULT([ Iproute2 directory: $iproutedir]) AC_MSG_RESULT([ System configuration: $sysdesc]) AC_MSG_RESULT([ Debugging: $enable_debug]) +AC_MSG_RESULT([ Compact tries: $enable_compact_tries]) AC_MSG_RESULT([ Routing protocols: $protocols]) AC_MSG_RESULT([ LibSSH support in RPKI: $enable_libssh]) AC_MSG_RESULT([ Kernel MPLS support: $enable_mpls_kernel]) diff --git a/filter/data.h b/filter/data.h index ad578208..6aa34d44 100644 --- a/filter/data.h +++ b/filter/data.h @@ -68,8 +68,15 @@ struct f_tree { void *data; }; +#ifdef ENABLE_COMPACT_TRIES +/* Compact 4-way tries */ +#define TRIE_STEP 2 +#define TRIE_STACK_LENGTH 65 +#else +/* Faster 16-way tries */ #define TRIE_STEP 4 #define TRIE_STACK_LENGTH 33 +#endif struct f_trie_node4 { |