From a23dbe4bb921fcf7930747fc5b9d2e5684a57123 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Mon, 15 Sep 2025 12:56:16 +0300 Subject: T7806: VPP do not allow skip-cores to be configured without main-core --- python/vyos/vpp/config_verify.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/vyos/vpp/config_verify.py b/python/vyos/vpp/config_verify.py index cb9b3ad19..b77b7de46 100644 --- a/python/vyos/vpp/config_verify.py +++ b/python/vyos/vpp/config_verify.py @@ -328,14 +328,15 @@ def verify_vpp_settings_cpu_skip_cores(skip_cores: int): ) -def verify_vpp_settings_cpu_and_corelist_workers(settings: dict): +def verify_vpp_settings_cpu(settings: dict): """ + Verify 'cpu main-core' is set if worker-related settings are used. `set vpp settings cpu workers` and `set vpp settings cpu corelist-workers` are mutually exclusive! """ - if ( - 'corelist_workers' in settings or 'workers' in settings - ) and 'main_core' not in settings: + worker_related = ('corelist_workers', 'workers', 'skip_cores') + + if any(key in settings for key in worker_related) and 'main_core' not in settings: raise ConfigError('"cpu main-core" is required but not set!') if 'corelist_workers' in settings and 'workers' in settings: -- cgit v1.2.3