]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
affinity: rename detect -> worker set internall
authorVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 08:37:59 +0000 (10:37 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 08:37:59 +0000 (10:37 +0200)
src/runmode-erf-file.c
src/runmode-pcap-file.c
src/util-affinity.h
src/util-runmodes.c

index 5e0b097ab60036c4301094bbda9364625cec91fa..e4f3c3df93741abbf702378844781bdefb19c142 100644 (file)
@@ -142,7 +142,7 @@ int RunModeErfFileAutoFp(void)
         cpu = 1;
 
     /* always create at least one thread */
-    int thread_max = TmThreadGetNbThreads(DETECT_CPU_SET);
+    int thread_max = TmThreadGetNbThreads(WORKER_CPU_SET);
     if (thread_max == 0)
         thread_max = ncpus * threading_detect_ratio;
     if (thread_max < 1)
index c6fea2b2defbb97b77de844a353bc73e2bac8e64..9db65d485e30325c8869009dbb7e0c51d407cda3 100644 (file)
@@ -109,7 +109,7 @@ int RunModeFilePcapSingle(void)
 
     SetupOutputs(tv);
 
-    TmThreadSetCPU(tv, DETECT_CPU_SET);
+    TmThreadSetCPU(tv, WORKER_CPU_SET);
 
 #ifndef AFLFUZZ_PCAP_RUNMODE
     if (TmThreadSpawn(tv) != TM_ECODE_OK) {
@@ -177,7 +177,7 @@ int RunModeFilePcapAutoFp(void)
         cpu = 1;
 
     /* always create at least one thread */
-    int thread_max = TmThreadGetNbThreads(DETECT_CPU_SET);
+    int thread_max = TmThreadGetNbThreads(WORKER_CPU_SET);
     if (thread_max == 0)
         thread_max = ncpus * threading_detect_ratio;
     if (thread_max < 1)
@@ -253,7 +253,7 @@ int RunModeFilePcapAutoFp(void)
         /* add outputs as well */
         SetupOutputs(tv_detect_ncpu);
 
-        TmThreadSetCPU(tv_detect_ncpu, DETECT_CPU_SET);
+        TmThreadSetCPU(tv_detect_ncpu, WORKER_CPU_SET);
 
         if (TmThreadSpawn(tv_detect_ncpu) != TM_ECODE_OK) {
             SCLogError(SC_ERR_RUNMODE, "TmThreadSpawn failed");
index 2c4e424b23e1d5d273a58beac4478205947155f3..db12276c943d0ec327c19230ff6353e670c75007 100644 (file)
@@ -48,7 +48,7 @@
 
 enum {
     RECEIVE_CPU_SET,
-    DETECT_CPU_SET,
+    WORKER_CPU_SET,
     VERDICT_CPU_SET,
     MANAGEMENT_CPU_SET,
     MAX_CPU_SET
index 375295b1044b6ac794db09720cc4e9299a178e0a..d2789f0f47e2365cbe280681036ba026b2bdca7b 100644 (file)
@@ -99,7 +99,7 @@ int RunModeSetLiveCaptureAutoFp(ConfigIfaceParserFunc ConfigParser,
     /* Available cpus */
     uint16_t ncpus = UtilCpuGetNumProcessorsOnline();
     int nlive = LiveGetDeviceCount();
-    int thread_max = TmThreadGetNbThreads(DETECT_CPU_SET);
+    int thread_max = TmThreadGetNbThreads(WORKER_CPU_SET);
     /* always create at least one thread */
     if (thread_max == 0)
         thread_max = ncpus * threading_detect_ratio;
@@ -253,7 +253,7 @@ int RunModeSetLiveCaptureAutoFp(ConfigIfaceParserFunc ConfigParser,
         }
         TmSlotSetFuncAppend(tv_detect_ncpu, tm_module, NULL);
 
-        TmThreadSetCPU(tv_detect_ncpu, DETECT_CPU_SET);
+        TmThreadSetCPU(tv_detect_ncpu, WORKER_CPU_SET);
 
         TmThreadSetGroupName(tv_detect_ncpu, "Detect");
 
@@ -354,7 +354,7 @@ static int RunModeSetLiveCaptureWorkersForDevice(ConfigIfaceThreadsCountFunc Mod
 
         SetupOutputs(tv);
 
-        TmThreadSetCPU(tv, DETECT_CPU_SET);
+        TmThreadSetCPU(tv, WORKER_CPU_SET);
 
         if (TmThreadSpawn(tv) != TM_ECODE_OK) {
             SCLogError(SC_ERR_THREAD_SPAWN, "TmThreadSpawn failed");
@@ -455,7 +455,7 @@ int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser,
     uint16_t ncpus = UtilCpuGetNumProcessorsOnline();
     int nqueue = LiveGetDeviceCount();
 
-    int thread_max = TmThreadGetNbThreads(DETECT_CPU_SET);
+    int thread_max = TmThreadGetNbThreads(WORKER_CPU_SET);
     /* always create at least one thread */
     if (thread_max == 0)
         thread_max = ncpus * threading_detect_ratio;
@@ -531,7 +531,7 @@ int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser,
         }
         TmSlotSetFuncAppend(tv_detect_ncpu, tm_module, NULL);
 
-        TmThreadSetCPU(tv_detect_ncpu, DETECT_CPU_SET);
+        TmThreadSetCPU(tv_detect_ncpu, WORKER_CPU_SET);
 
         SetupOutputs(tv_detect_ncpu);
 
@@ -654,7 +654,7 @@ int RunModeSetIPSWorker(ConfigIPSParserFunc ConfigParser,
 
         SetupOutputs(tv);
 
-        TmThreadSetCPU(tv, DETECT_CPU_SET);
+        TmThreadSetCPU(tv, WORKER_CPU_SET);
 
         if (TmThreadSpawn(tv) != TM_ECODE_OK) {
             SCLogError(SC_ERR_RUNMODE, "TmThreadSpawn failed");