]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Feature] Allow hyperscan for ppc64, as vectorscan now suports it. 4047/head
authorDuncan Bellamy <dunk@denkimushi.com>
Sat, 22 Jan 2022 11:41:53 +0000 (11:41 +0000)
committerDuncan Bellamy <dunk@denkimushi.com>
Tue, 25 Jan 2022 19:33:30 +0000 (19:33 +0000)
src/hs_helper.c
src/libserver/cfg_utils.c
src/libserver/maps/map_helpers.c

index e3c464786f9f263a39a82f1698b1a00be84d324c..d1bc36b810b42c642bea59d8dc452739303d8f18 100644 (file)
@@ -303,7 +303,7 @@ static gboolean
 rspamd_rs_compile (struct hs_helper_ctx *ctx, struct rspamd_worker *worker,
                gboolean forced)
 {
-#ifndef __aarch64__
+#if !defined(__aarch64__) && !defined(__powerpc64__)
        if (!(ctx->cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
                msg_warn ("CPU doesn't have SSSE3 instructions set "
                                "required for hyperscan, disable hyperscan compilation");
index 44cdbc84fde3e496af059467afc5ec0a7ffa0de1..46ec5d5c68443c95e7df9ca3c281c551269341f9 100644 (file)
@@ -817,7 +817,7 @@ rspamd_config_post_load (struct rspamd_config *cfg,
        rspamd_regexp_library_init (cfg);
        rspamd_multipattern_library_init (cfg->hs_cache_dir);
 
-#if defined(WITH_HYPERSCAN) && !defined(__aarch64__)
+#if defined(WITH_HYPERSCAN) && !defined(__aarch64__) && !defined(__powerpc64__)
        if (!cfg->disable_hyperscan) {
                if (!(cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
                        msg_warn_config ("CPU doesn't have SSSE3 instructions set "
index 4eb6b2fee12dcdb1b1cf2f09e4c23d6a53eac25f..c7b3ce00c7f36d9aede85d33d3a0fb65c3f06cb0 100644 (file)
@@ -1306,7 +1306,7 @@ rspamd_re_map_finalize (struct rspamd_regexp_map_helper *re_map)
 
        map = re_map->map;
 
-#ifndef __aarch64__
+#if !defined(__aarch64__) && !defined(__powerpc64__)
        if (!(map->cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
                msg_info_map ("disable hyperscan for map %s, ssse3 instructons are not supported by CPU",
                                map->name);