From 81626fb5da73af302ef8444c12679edc13bef1f5 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Fri, 14 Feb 2025 11:23:48 +0200 Subject: T7067: VPP CPU corelist-workers should be calculated and verified --- src/conf_mode/vpp.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 -- cgit v1.2.3