aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-29 16:30:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-29 16:30:14 +0100
commitf4944ae6b90adbe300db2508c39f7bd2deb65c36 (patch)
treed1ad8598598fa671990475945b746d26ec00cfe6
parent0fcb6c7dc829b0475b3e99f79072ee01ff0b530c (diff)
downloadrspamd-f4944ae6b90adbe300db2508c39f7bd2deb65c36.tar.gz
rspamd-f4944ae6b90adbe300db2508c39f7bd2deb65c36.zip
[Minor] Add vectorized_hyperscan configuration knob
No underlaying functionality is implemented yet.
-rw-r--r--src/libserver/cfg_file.h1
-rw-r--r--src/libserver/cfg_rcl.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index 6502f37b2..8efdce092 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -277,6 +277,7 @@ struct rspamd_config {
gboolean check_all_filters; /**< check all filters */
gboolean allow_raw_input; /**< scan messages with invalid mime */
gboolean disable_hyperscan; /**< disable hyperscan usage */
+ gboolean vectorized_hyperscan; /**< use vectorized hyperscan matching */
gboolean enable_shutdown_workaround; /**< enable workaround for legacy SA clients (exim) */
gboolean ignore_received; /**< Ignore data from the first received header */
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 6bbbcfd35..288b8a505 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1792,6 +1792,12 @@ rspamd_rcl_config_init (struct rspamd_config *cfg)
0,
"Disable hyperscan optimizations for regular expressions");
rspamd_rcl_add_default_handler (sub,
+ "vectorized_hyperscan",
+ rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct rspamd_config, vectorized_hyperscan),
+ 0,
+ "Use hyperscan in vectorized mode (experimental)");
+ rspamd_rcl_add_default_handler (sub,
"cores_dir",
rspamd_rcl_parse_struct_string,
G_STRUCT_OFFSET (struct rspamd_config, cores_dir),