From d54183d749f847a556a1f3a0300786169e0c40b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 10 Oct 2018 20:34:49 +0200 Subject: lib: Initialize libgcrypt before use This initializes libgcrypt before use in the library. This fixes the "called in non-operational state" error when CRC checking is enabled. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/dev.c b/src/lib/dev.c index a7b342ba..456019d2 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -343,7 +343,10 @@ static void init(int argc, prog = argv[1]; ai.pid = getpid(); - +#ifdef HAVE_LIBGCRYPT + if (!gcry_check_version(GCRYPT_VERSION)) + goto fail_fds; +#endif ai.fds = bmp_create(PROG_MAX_FLOWS - PROG_RES_FDS, PROG_RES_FDS); if (ai.fds == NULL) goto fail_fds; -- cgit v1.2.3 From 4402b69c2535f9975d835438a52cebc89a147ba3 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 11 Oct 2018 01:44:30 +0200 Subject: lib: Disable CRC by default This sets the CRC check to be disabled by default, since it greatly hampers performance and is almost never needed. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 414a7203..5dd37346 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -176,7 +176,7 @@ set(SHM_RDRB_MULTI_BLOCK true CACHE BOOL "Packet buffer multiblock packet support") set(SHM_RBUFF_LOCKLESS 0 CACHE BOOL "Enable shared memory lockless rbuff support") -set(QOS_DISABLE_CRC 0 CACHE BOOL +set(QOS_DISABLE_CRC TRUE CACHE BOOL "Ignores ber setting on all QoS cubes") set(SOURCE_FILES_DEV -- cgit v1.2.3