diff options
| author | 刘畅 <[email protected]> | 2023-08-16 09:54:54 +0000 |
|---|---|---|
| committer | 刘畅 <[email protected]> | 2023-08-16 09:54:54 +0000 |
| commit | 0aec8e9e9926424aa73b94d7ec479bd87422b27f (patch) | |
| tree | f63d1ce00a35bcf6fb2c5376321ae2de7da1b075 /shaping/src/shaper.cpp | |
| parent | 099951d0bd691f35c675df6dbff3031a1a522ee6 (diff) | |
| parent | 65fbdac7f653adb99cc0182b3b69eb4cd7c53a95 (diff) | |
Merge branch 'bugfix_maxlatency_type' into 'rel'v1.2.10
Bugfix maxlatency type
See merge request tango/shaping-engine!40
Diffstat (limited to 'shaping/src/shaper.cpp')
| -rw-r--r-- | shaping/src/shaper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shaping/src/shaper.cpp b/shaping/src/shaper.cpp index 2d88b01..6a5db5e 100644 --- a/shaping/src/shaper.cpp +++ b/shaping/src/shaper.cpp @@ -1073,8 +1073,10 @@ int shaper_global_conf_init(struct shaping_system_conf *conf) LOG_ERROR("%s: shaping init global conf get CPU_AFFINITY_MASK failed or incomplete config", LOG_TAG_SHAPING); return -1; } + CPU_ZERO(&conf->cpu_affinity_mask); for (int i = 0; i < conf->work_thread_num; i++) { - conf->cpu_affinity_mask |= 1 << cpu_mask[i]; + int cpu_id = cpu_mask[i]; + CPU_SET(cpu_id, &conf->cpu_affinity_mask); } ret = MESA_load_profile_int_def(SHAPING_GLOBAL_CONF_FILE, "SYSTEM", "firewall_sids", &conf->firewall_sid, 1001); |
