Project

General

Profile

Actions

Task #7721

open

threading: make the Suricata 7 cpu affinity format obsolete

Added by Lukas Sismis 28 days ago. Updated 15 days ago.

Status:
Assigned
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

Suricata 8 should transition from

  cpu-affinity:
    - management-cpu-set:
        cpu: [ 0 ]  # include only these CPUs in affinity settings
    - receive-cpu-set:
        cpu: [ 0 ]  # include only these CPUs in affinity settings

to the new format.

  cpu-affinity:
    management-cpu-set:
      cpu: [ 0 ]  # include only these CPUs in affinity settings
    receive-cpu-set:
      cpu: [ 0 ]  # include only these CPUs in affinity settings

Suricata 8 supports both versions of the configuration.

Actions #1

Updated by Lukas Sismis 15 days ago

Putting this on hold as "the new" affinity format will be considered experimental in 8.

Original code:

/**
 * \brief Extract CPU affinity configuration from current config file
 */
void AffinitySetupLoadFromConfig(void)
{
#if !defined __CYGWIN__ && !defined OS_WIN32 && !defined __OpenBSD__ && !defined sun
    if (thread_affinity_init_done == 0) {
        AffinitySetupInit();
        if (AffinityConfigIsDeprecated()) {
            SCLogWarning("CPU affinity configuration uses a deprecated structure and will not be " 
                         "supported in a future major release (Suricata 9.0) Redmine ticket #7721. " 
                         "Please update your %s to the new format. " 
                         "See notes in %s/upgrade.html#upgrading-7-0-to-8-0",
                    "threading.cpu-affinity", GetDocURL());
        }
        thread_affinity_init_done = 1;
    }

    SCLogDebug("Loading %s from config", AffinityGetYamlPath(NULL));
    SCConfNode *root = SCConfGetNode(AffinityGetYamlPath(NULL));
    if (root == NULL) {
        SCLogInfo("Cannot find %s node in config", AffinityGetYamlPath(NULL));
        return;
    }

Actions

Also available in: Atom PDF