diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2025-09-15 12:56:16 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2025-09-16 17:59:53 +0300 |
| commit | a23dbe4bb921fcf7930747fc5b9d2e5684a57123 (patch) | |
| tree | bbb6669d4d503ce2b122cf87bb221e70c5f91441 /python | |
| parent | 78b961810ac346e9083659b29ada26e35dec95a1 (diff) | |
| download | vyos-1x-a23dbe4bb921fcf7930747fc5b9d2e5684a57123.tar.gz vyos-1x-a23dbe4bb921fcf7930747fc5b9d2e5684a57123.zip | |
T7806: VPP do not allow skip-cores to be configured without main-core
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/vpp/config_verify.py | 9 |
1 files changed, 5 insertions, 4 deletions
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: |
