diff options
| author | Nataliia S. <81954790+natali-rs1985@users.noreply.github.com> | 2025-07-24 16:33:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 15:33:11 +0100 |
| commit | d37cca0672b71691614da0a0f770eaf0fe117fa4 (patch) | |
| tree | 02980494244a71b8b88eb3de3a58ad84ff8378c1 | |
| parent | 255306c2c207d1de082261c65479683869ad377a (diff) | |
| download | vyos-1x-d37cca0672b71691614da0a0f770eaf0fe117fa4.tar.gz vyos-1x-d37cca0672b71691614da0a0f770eaf0fe117fa4.zip | |
T7658: T7656: Changes for max-map-count parameter (#53)
* T7658: Increase max-map-count interval and default value to linux default
Also input a warning instead of ConfigError in case of "host-resources max-map-count" didn't pass the verification
* T7656: Clarify warning message for max-map-count option verification
| -rw-r--r-- | interface-definitions/include/vpp_host_resources.xml.i | 6 | ||||
| -rw-r--r-- | python/vyos/vpp/config_verify.py | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/interface-definitions/include/vpp_host_resources.xml.i b/interface-definitions/include/vpp_host_resources.xml.i index 6fee0f2f3..1706c8c87 100644 --- a/interface-definitions/include/vpp_host_resources.xml.i +++ b/interface-definitions/include/vpp_host_resources.xml.i @@ -8,14 +8,14 @@ <properties> <help>Maximum number of memory map areas a process may have</help> <valueHelp> - <format>u32:0-65535</format> + <format>u32:65535-2147483647</format> <description>Areas count</description> </valueHelp> <constraint> - <validator name="numeric" argument="--range 0-65535"/> + <validator name="numeric" argument="--range 65535-2147483647"/> </constraint> </properties> - <defaultValue>4096</defaultValue> + <defaultValue>65535</defaultValue> </leafNode> <leafNode name="shmmax"> <properties> diff --git a/python/vyos/vpp/config_verify.py b/python/vyos/vpp/config_verify.py index 65dfac91a..f6c47d0c0 100644 --- a/python/vyos/vpp/config_verify.py +++ b/python/vyos/vpp/config_verify.py @@ -19,6 +19,7 @@ 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 @@ -398,6 +399,8 @@ def verify_vpp_host_resources(config: dict): hugepages = mem_checks.get_hugepages_total() if max_map_count < 2 * hugepages: - raise ConfigError( - 'The max_map_count must be greater than or equal to (2 * HugePages_Total)' + 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' ) |
