]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
napatech: fix compilation errors in SCLog calls
authorRalph Eastwood <rea@napatech.com>
Thu, 3 Aug 2023 13:03:41 +0000 (13:03 +0000)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Sep 2023 12:21:34 +0000 (14:21 +0200)
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.

src/source-napatech.c

index b3d969f8fe1388ca05f1c1646c5152b32baf7855..db6c61fc68ce42c5467b2a67a9184ede82f4b695 100644 (file)
@@ -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.");