affinity: rename detect -> worker set internall

pull/2137/head
Victor Julien 9 years ago
parent 723e90a174
commit 5f9de1e734

@ -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)

@ -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");

@ -48,7 +48,7 @@
enum {
RECEIVE_CPU_SET,
DETECT_CPU_SET,
WORKER_CPU_SET,
VERDICT_CPU_SET,
MANAGEMENT_CPU_SET,
MAX_CPU_SET

@ -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");

Loading…
Cancel
Save