static void SetupCpuSets(ThreadsAffinityType *taf, SCConfNode *affinity, const char *setname)
{
CPU_ZERO(&taf->cpu_set);
-
- SCConfNode *cpu_node = SCConfNodeLookupChild(affinity->head.tqh_first, "cpu");
+ SCConfNode *cpu_node = SCConfNodeLookupChild(affinity, "cpu");
if (cpu_node != NULL) {
BuildCpuset(setname, cpu_node, &taf->cpu_set);
} else {
CPU_ZERO(&taf->lowprio_cpu);
CPU_ZERO(&taf->medprio_cpu);
CPU_ZERO(&taf->hiprio_cpu);
-
- SCConfNode *prio_node = SCConfNodeLookupChild(affinity->head.tqh_first, "prio");
+ SCConfNode *prio_node = SCConfNodeLookupChild(affinity, "prio");
if (prio_node == NULL) {
return 0;
}
*/
static int SetupAffinityMode(ThreadsAffinityType *taf, SCConfNode *affinity)
{
- SCConfNode *mode_node = SCConfNodeLookupChild(affinity->head.tqh_first, "mode");
+ SCConfNode *mode_node = SCConfNodeLookupChild(affinity, "mode");
if (mode_node == NULL) {
return 0;
}
*/
static int SetupAffinityThreads(ThreadsAffinityType *taf, SCConfNode *affinity)
{
- SCConfNode *threads_node = SCConfNodeLookupChild(affinity->head.tqh_first, "threads");
+ SCConfNode *threads_node = SCConfNodeLookupChild(affinity, "threads");
if (threads_node == NULL) {
return 0;
}
#
cpu-affinity:
- management-cpu-set:
- cpu: [ 0 ] # include only these CPUs in affinity settings
+ cpu: [ 0 ] # include only these CPUs in affinity settings
- receive-cpu-set:
- cpu: [ 0 ] # include only these CPUs in affinity settings
+ cpu: [ 0 ] # include only these CPUs in affinity settings
- worker-cpu-set:
- cpu: [ "all" ]
- mode: "exclusive"
- # Use explicitly 3 threads and don't compute number by using
- # detect-thread-ratio variable:
- # threads: 3
- prio:
- low: [ 0 ]
- medium: [ "1-2" ]
- high: [ 3 ]
- default: "medium"
+ cpu: [ "all" ]
+ mode: "exclusive"
+ # Use explicitly 3 threads and don't compute number by using
+ # detect-thread-ratio variable:
+ # threads: 3
+ prio:
+ low: [ 0 ]
+ medium: [ "1-2" ]
+ high: [ 3 ]
+ default: "medium"
#- verdict-cpu-set:
- # cpu: [ 0 ]
- # prio:
- # default: "high"
+ # cpu: [ 0 ]
+ # prio:
+ # default: "high"
#
# By default Suricata creates one "detect" thread per available CPU/CPU core.
# This setting allows controlling this behaviour. A ratio setting of 2 will