summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-02-17 14:06:53 +0200
committerGitHub <noreply@github.com>2025-02-17 14:06:53 +0200
commit2c61b18f2033d7ec5a5cc817da335bb11c5b2504 (patch)
tree6d7130f8a316e3757b03cdc4ae8685f05e222249 /src
parent6dae0f206d67e0ef8678305c279505e3a5da6208 (diff)
parent81626fb5da73af302ef8444c12679edc13bef1f5 (diff)
downloadvyos-1x-2c61b18f2033d7ec5a5cc817da335bb11c5b2504.tar.gz
vyos-1x-2c61b18f2033d7ec5a5cc817da335bb11c5b2504.zip
Merge pull request #12 from natali-rs1985/T7067
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