From: Ralph Eastwood Date: Thu, 3 Aug 2023 13:03:41 +0000 (+0000) Subject: napatech: fix compilation errors in SCLog calls X-Git-Tag: suricata-7.0.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=783d07007f9845c1040f6ecff555732d8fa4da4e;p=thirdparty%2Fsuricata.git napatech: fix compilation errors in SCLog calls Since f8474344cdd00e3d128ffc3ec6d7e465bbe2894d, there is an extra argument to SCLog which indicates the module and subsystem identifier. The Napatech vendor code is missing this argument, which is fixed here. --- diff --git a/src/source-napatech.c b/src/source-napatech.c index b3d969f8fe..db6c61fc68 100644 --- a/src/source-napatech.c +++ b/src/source-napatech.c @@ -740,23 +740,23 @@ static void RecommendNUMAConfig(SCLogLevel log_level) } if (set_cpu_affinity) { - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, "Minimum host buffers that should be defined in ntservice.ini:"); - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, " NUMA Node 0: %d", + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, " NUMA Node 0: %d", (SC_ATOMIC_GET(numa0_count))); if (numa_max_node() >= 1) - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, - " NUMA Node 1: %d ", (SC_ATOMIC_GET(numa1_count))); + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, " NUMA Node 1: %d ", + (SC_ATOMIC_GET(numa1_count))); if (numa_max_node() >= 2) - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, - " NUMA Node 2: %d ", (SC_ATOMIC_GET(numa2_count))); + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, " NUMA Node 2: %d ", + (SC_ATOMIC_GET(numa2_count))); if (numa_max_node() >= 3) - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, - " NUMA Node 3: %d ", (SC_ATOMIC_GET(numa3_count))); + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, " NUMA Node 3: %d ", + (SC_ATOMIC_GET(numa3_count))); snprintf(string0, 16, "[%d, 16, 0]", SC_ATOMIC_GET(numa0_count)); snprintf(string1, 16, (numa_max_node() >= 1 ? ",[%d, 16, 1]" : ""), @@ -766,9 +766,8 @@ static void RecommendNUMAConfig(SCLogLevel log_level) snprintf(string3, 16, (numa_max_node() >= 3 ? ",[%d, 16, 3]" : ""), SC_ATOMIC_GET(numa3_count)); - SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, - "E.g.: HostBuffersRx=%s%s%s%s", string0, string1, string2, - string3); + SCLog(log_level, __FILE__, __FUNCTION__, __LINE__, _sc_module, + "E.g.: HostBuffersRx=%s%s%s%s", string0, string1, string2, string3); } else if (log_level == SC_LOG_ERROR) { SCLogError("Or, try running /opt/napatech3/bin/ntpl -e \"delete=all\" to clean-up stream " "NUMA config.");