Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions interface-definitions/include/vpp_host_resources.xml.i
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<properties>
<help>Maximum number of memory map areas a process may have</help>
<valueHelp>
<format>u32:65535-2147483647</format>
<format>u32:65530-2147483647</format>
<description>Areas count</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 65535-2147483647"/>
<validator name="numeric" argument="--range 65530-2147483647"/>
</constraint>
</properties>
<defaultValue>65535</defaultValue>
<defaultValue>65530</defaultValue>
</leafNode>
<leafNode name="shmmax">
<properties>
Expand Down
23 changes: 23 additions & 0 deletions smoketest/scripts/cli/test_vpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from vyos.utils.process import process_named_running
from vyos.utils.file import read_file
from vyos.utils.process import rc_cmd
from vyos.utils.system import sysctl_read
from vyos.vpp.utils import human_page_memory_to_bytes

sys.path.append(os.getenv('vyos_completion_dir'))
Expand Down Expand Up @@ -1393,6 +1394,28 @@ def test_17_vpp_nat(self):
_, out = rc_cmd('sudo vppctl show nat44 summary')
self.assertIn(f'max translations per thread: {sess_limit} fib 0', out)

@unittest.skip(
'Skipping... it will always fail due to the restriction of not to decrease values in host-resources section'
)
def test_18_vpp_host_resources(self):
max_map_count = '100000'
hr_path = base_path + ['settings', 'host-resources']

# Check if max-map-count has default value
self.assertEqual(sysctl_read('vm.max_map_count'), '65530')

# Change max-map-count and check
self.cli_set(hr_path + ['max-map-count', max_map_count])
self.cli_commit()

self.assertEqual(sysctl_read('vm.max_map_count'), max_map_count)

# We expect max-map-count will return to default '65530'
self.cli_delete(hr_path + ['max-map-count'])
self.cli_commit()

self.assertEqual(sysctl_read('vm.max_map_count'), '65530')


if __name__ == '__main__':
unittest.main(verbosity=2)