This repository was archived by the owner on Aug 15, 2025. It is now read-only.
T7655: Change VPP memory verification#55
Merged
sever-sever merged 1 commit intovyos-legacy:currentfrom Aug 6, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR changes VPP memory verification to be less strict by using total hugepages instead of free hugepages and adds an error margin for memory calculations. It also introduces a check to ensure at least 4GB of memory remains available for other system processes.
- Replaces free hugepage memory with total hugepage memory for availability checks
- Adds a 10% error margin to memory requirement calculations
- Introduces a 4GB minimum memory reservation for other system processes
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| python/vyos/vpp/config_verify.py | Updates memory verification logic to use error margins and system memory reservation |
| python/vyos/vpp/config_resource_checks/memory.py | Changes hugepage memory calculation from free to total hugepages |
Comments suppressed due to low confidence (1)
python/vyos/vpp/config_resource_checks/memory.py:48
- The variable name 'hugepages_free' is misleading since it now contains the total hugepages count, not the free count. Consider renaming it to 'hugepages_total' to match the actual data it contains.
hugepages_free = info.get('HugePages_Total')
sever-sever
suggested changes
Jul 25, 2025
4e5ba22 to
2b1d829
Compare
b67f205 to
fac7fe6
Compare
sever-sever
suggested changes
Aug 6, 2025
Get Hugepages information from /sys/kernel/mm/hugepages instead of /proc/meminfo Add an error margin for memory calculations
sever-sever
approved these changes
Aug 6, 2025
Contributor
sever-sever
left a comment
There was a problem hiding this comment.
All smoketests and manual tests work fine:
vyos@r14:~$ /usr/libexec/vyos/tests/smoke/cli/test_vpp.py
test_01_vpp_basic (__main__.TestVPP.test_01_vpp_basic) ... ok
test_02_vpp_vxlan (__main__.TestVPP.test_02_vpp_vxlan) ... ok
test_03_vpp_gre (__main__.TestVPP.test_03_vpp_gre) ... ok
test_04_vpp_geneve (__main__.TestVPP.test_04_vpp_geneve) ... skipped 'Skipping this test geneve index always is 0'
test_05_vpp_loopback (__main__.TestVPP.test_05_vpp_loopback) ... ok
test_06_vpp_bonding (__main__.TestVPP.test_06_vpp_bonding) ... skipped 'Skipping temporary bonding, sometimes get recursion T7117'
test_07_vpp_bridge (__main__.TestVPP.test_07_vpp_bridge) ... ok
test_08_vpp_ipip (__main__.TestVPP.test_08_vpp_ipip) ... ok
test_09_vpp_xconnect (__main__.TestVPP.test_09_vpp_xconnect) ... ok
test_10_vpp_driver_options (__main__.TestVPP.test_10_vpp_driver_options) ... ok
test_11_vpp_cpu_settings (__main__.TestVPP.test_11_vpp_cpu_settings) ... ok
test_12_vpp_cpu_corelist_workers (__main__.TestVPP.test_12_vpp_cpu_corelist_workers) ... ok
test_13_1_buffer_page_size (__main__.TestVPP.test_13_1_buffer_page_size) ... ok
test_13_2_statseg_page_size (__main__.TestVPP.test_13_2_statseg_page_size) ... ok
test_13_3_mem_page_size (__main__.TestVPP.test_13_3_mem_page_size) ... ok
test_14_mem_default_hugepage (__main__.TestVPP.test_14_mem_default_hugepage) ... ok
test_15_vpp_ipsec_xfrm_nl (__main__.TestVPP.test_15_vpp_ipsec_xfrm_nl) ... ok
test_16_vpp_cgnat (__main__.TestVPP.test_16_vpp_cgnat) ... ok
test_17_vpp_nat (__main__.TestVPP.test_17_vpp_nat) ... ok
test_18_vpp_sflow (__main__.TestVPP.test_18_vpp_sflow) ... ok
----------------------------------------------------------------------
Ran 20 tests in 355.336s
OK (skipped=2)
vyos@r14:~$
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Types of changes
Related Task(s)
Related PR(s)
Proposed changes
How to test
Checklist: