summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2025-02-14 11:23:48 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2025-02-14 11:37:56 +0200
commit81626fb5da73af302ef8444c12679edc13bef1f5 (patch)
tree6d7130f8a316e3757b03cdc4ae8685f05e222249 /src
parent6dae0f206d67e0ef8678305c279505e3a5da6208 (diff)
downloadvyos-1x-81626fb5da73af302ef8444c12679edc13bef1f5.tar.gz
vyos-1x-81626fb5da73af302ef8444c12679edc13bef1f5.zip
T7067: VPP CPU corelist-workers should be calculated and verified
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpp.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py
index 5126b7c79..fe6436c15 100755
--- a/src/conf_mode/vpp.py
+++ b/src/conf_mode/vpp.py
@@ -382,6 +382,14 @@ def verify(config):
) and 'main_core' not in config['settings']['cpu']:
raise ConfigError('"cpu main-core" is required but not set!')
+ if (
+ 'corelist_workers' in config['settings']['cpu']
+ and 'workers' in config['settings']['cpu']
+ ):
+ raise ConfigError(
+ '"cpu corelist-workers" and "cpu workers" cannot be used at the same time!'
+ )
+
cpus = int(get_core_count())
skip_cores = 0
@@ -436,6 +444,9 @@ def verify(config):
f'"cpu main-core {main_core}" must not be included in the corelist-workers!'
)
+ if not all(el in cpus_available for el in all_core_numbers):
+ raise ConfigError('"cpu corelist-workers" is not correct')
+
verify_memory(config['settings'])
# Check if deleted interfaces are not xconnect memebrs