diff --git a/src/suricata.c b/src/suricata.c index e834a48ba1..36af1ddf57 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -818,8 +818,8 @@ int main(int argc, char **argv) } } - /* create table for O(1) lowercase conversion lookup */ - /* + /* create table for O(1) lowercase conversion lookup. It was removed, but + * we still need it for cuda. So resintalling it back into the codebase */ uint8_t c = 0; memset(g_u8_lowercasetable, 0x00, sizeof(g_u8_lowercasetable)); for ( ; c < 255; c++) { @@ -828,7 +828,7 @@ int main(int argc, char **argv) else g_u8_lowercasetable[c] = c; } - */ + /* hardcoded initialization code */ MpmTableSetup(); /* load the pattern matchers */ SigTableSetup(); /* load the rule keywords */ diff --git a/src/suricata.h b/src/suricata.h index 6629af094b..3b833829aa 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -80,7 +80,7 @@ SCDQDataQueue data_queues[256]; void GlobalInits(); /* uppercase to lowercase conversion lookup table */ -//uint8_t g_u8_lowercasetable[256]; +uint8_t g_u8_lowercasetable[256]; /* marco to do the actual lookup */ //#define u8_tolower(c) g_u8_lowercasetable[(c)] diff --git a/src/util-mpm-b2g-cuda.c b/src/util-mpm-b2g-cuda.c index 17c53ac0f2..2fcaa102af 100644 --- a/src/util-mpm-b2g-cuda.c +++ b/src/util-mpm-b2g-cuda.c @@ -454,7 +454,6 @@ void B2gCudaPrintInfo(MpmCtx *mpm_ctx) SCLogDebug(" B2gCudaPattern %" PRIuMAX, (uintmax_t)sizeof(B2gCudaPattern)); SCLogDebug(" B2gCudaHashItem %" PRIuMAX, (uintmax_t)sizeof(B2gCudaHashItem)); SCLogDebug("Unique Patterns: %" PRIu32, mpm_ctx->pattern_cnt); - SCLogDebug("Total Patterns: %" PRIu32, mpm_ctx->total_pattern_cnt); SCLogDebug("Smallest: %" PRIu32, mpm_ctx->minlen); SCLogDebug("Largest: %" PRIu32, mpm_ctx->maxlen); SCLogDebug("Hash size: %" PRIu32, ctx->hash_size); @@ -680,7 +679,6 @@ static inline int B2gCudaAddPattern(MpmCtx *mpm_ctx, uint8_t *pat, else if (mpm_ctx->minlen > patlen) mpm_ctx->minlen = patlen; } - mpm_ctx->total_pattern_cnt++; return 0; error: