From ebb4b887f888ba71afd8c52d17520de4bcc53889 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Tue, 12 Aug 2025 18:48:05 +0300 Subject: T7678: Remove host-resources from CLI It will be configured in section "system option host-resources" --- python/vyos/vpp/config_resource_checks/memory.py | 8 -------- python/vyos/vpp/config_verify.py | 15 --------------- 2 files changed, 23 deletions(-) (limited to 'python') diff --git a/python/vyos/vpp/config_resource_checks/memory.py b/python/vyos/vpp/config_resource_checks/memory.py index bce2df2bb..66b9fd9a3 100644 --- a/python/vyos/vpp/config_resource_checks/memory.py +++ b/python/vyos/vpp/config_resource_checks/memory.py @@ -51,14 +51,6 @@ def get_total_hugepages_memory() -> int: return hugepage_size * hugepages_total -def get_total_hugepages_count() -> int: - """ - Returns the total count of hugepages - """ - info = get_hugepages_info() - return info.get('HugePages_Total') - - def get_numa_count(): """ Run `numactl --hardware` and parse the 'available:' line. diff --git a/python/vyos/vpp/config_verify.py b/python/vyos/vpp/config_verify.py index 1beb3141b..9c56c8b95 100644 --- a/python/vyos/vpp/config_verify.py +++ b/python/vyos/vpp/config_verify.py @@ -19,7 +19,6 @@ import psutil from vyos import ConfigError -from vyos.base import Warning from vyos.utils.cpu import get_core_count as total_core_count from vyos.vpp.control_host import get_eth_driver @@ -391,17 +390,3 @@ def verify_vpp_interfaces_dpdk_num_queues(qtype: str, num_queues: int, workers: f'The number of {qtype} queues cannot be greater than the number of configured VPP workers: ' f'workers: {workers}, queues: {num_queues}' ) - - -def verify_vpp_host_resources(config: dict): - max_map_count = int(config['settings']['host_resources']['max_map_count']) - - # Get HugePages total count - hugepages = mem_checks.get_total_hugepages_count() - - if max_map_count < 2 * hugepages: - Warning( - 'The max-map-count should be greater than or equal to (2 * HugePages_Total) ' - 'or VPP could work not properly. Please set up ' - f'"vpp settings host-resources max-map-count" to {2 * hugepages} or higher' - ) -- cgit v1.2.3