docs: vpp: document that kernel prerequisites need their own commit and reboot (backport #2233) - #2249
Open
mergify[bot] wants to merge 1 commit into
Open
docs: vpp: document that kernel prerequisites need their own commit and reboot (backport #2233)#2249mergify[bot] wants to merge 1 commit into
mergify[bot] wants to merge 1 commit into
Conversation
…nd reboot (#2233) * docs: vpp: document that kernel prerequisites need their own commit and reboot VPP depends on hugepages and, since T8460, on isolated CPUs. Both are configured under "system option kernel", take effect only after a reboot, and are validated by VPP against the running kernel. Because "vpp" is committed at priority 295 and "system option" at 9999, the two can never be applied in the same commit - the VPP part is always rejected with "Not enough free memory to start VPP!" or "Not enough isolated CPU cores available", both of which point back at the very command the user just issued. This is independent of the NIC: the checks that fail take no interface or PCI information and run before the NIC validation. It was reproduced both with an unsupported NIC and with a validated one. Such a commit is also partial: the "system option kernel" part is applied even though the commit is reported as failed, while the "set vpp ..." statements are discarded and have to be re-entered after the reboot. The "Optimal Configuration Example" showed exactly this failing one-shot form, mixing "set system option kernel ..." and "set vpp settings ..." in a single block. Split it into the two stages that actually work and state why, and add hugepages to it so the example covers every prerequisite. Also: * add a short "Kernel Configuration" item to the requirements page, which is what a first-time user reads and which had no pointer to the kernel settings at all * document the isolated-CPU requirement on the cpu-cores page, which did not mention "isolate-cpus" * add the missing 1af4:1041 (virtio modern ID) row to the validated NIC table - it is present in SUPPORTED_PCI_IDS but was absent here * correct the allow-unsupported-nics note, which said the check is bypassed "for the specified devices". There are no specified devices: _is_device_allowed() returns True for every interface as soon as the option is set, including interfaces attached later. That wording is a leftover from the per-PCI-ID form originally proposed in T8315, which was merged as a single boolean. Verified by building the docs; the three changed pages produce no Sphinx warnings. Claude-Session: https://claude.ai/code/session_01EQsKVSw5hhDu7jPq1YzQvj * docs: vpp: correct what a failed VPP commit leaves behind Two corrections to the pages added earlier in this PR. The partial-commit note claimed that the "set vpp ..." statements are "discarded". They are not. Verified on VyOS 2026.03: after the commit fails, "compare" still shows them staged in the configuration session. [vpp settings] + resource-allocation { + memory { + main-heap-size "6G" + } + } What actually happens is worse than the previous wording suggested and worth stating precisely: the statements are neither applied nor written by "save", because "save" writes the running configuration - which "system_option.py" has already updated with the kernel options while the VPP part was rejected. The session does not survive the reboot, so the VPP statements are lost there rather than at commit time. The isolated-CPU requirement was also described as if it only applied once "cpu-cores" is raised. It applies at the default of "cpu-cores 1" as well: verify_vpp_cpu_cores() rejects the commit whenever fewer CPUs are isolated than requested, and VPP takes its main core from the isolated set. The project's own test_01_vpp_basic relies on this - it never sets "cpu-cores" and still expects "main-core" to be taken from /sys/devices/system/cpu/isolated. Without this, a reader doing a minimal setup would conclude that CPU isolation is optional for them. Claude-Session: https://claude.ai/code/session_016gXeKHVBq2N8qRAMQkrdM6 (cherry picked from commit 93f84b0)
1 task
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
VPP depends on kernel settings that live under
system option kernel—hugepages, and since T8460 also isolated CPU cores. They only take effect after
a reboot, and VPP validates them against the running kernel. Because
vppiscommitted at priority 295 and
system optionat 9999, the two can never beapplied in the same commit:
vpp.pyalways runs first, the kernel options arenever in place yet, and the VPP part is rejected with
or, on rolling, with
Not enough isolated CPU cores available. Both messagespoint back at the very command the user just issued in that same commit.
The "Optimal Configuration Example" in
docs/vpp/configuration/dataplane/system.mdshowed exactly this failingone-shot form — it mixed
set system option kernel ...andset vpp settings resource-allocation cpu-cores '2'in a single block. Copying it always fails.This PR splits it into the two stages that actually work, explains why, and
adds hugepages so the example covers every prerequisite.
This is independent of the NIC. The checks that fail take no interface or PCI
information and run before the NIC validation, so it affects every VPP
deployment, including the validated Mellanox, Intel E810, virtio, gVNIC and ENA
configurations. It was reproduced on VyOS 2026.03 both with an unsupported NIC
(Intel X710) and with a validated one (Red Hat virtio
1af4:1000, no overrideset) — identical failure in both cases.
Worth noting for reviewers: such a commit is partial.
system_option.pystillruns after
vpp.pyhas failed, so the kernel options are applied and are what alater
savewrites, while theset vpp ...statements stay behind in theconfiguration session — neither applied nor saved, and lost on the reboot — even
though the overall result is reported as
Commit failed. The documentation nowsays so.
Other fixes included
docs/vpp/requirements.md— added a shortKernel Configurationitem.This is the page a first-time user reads, and it had no pointer to the kernel
settings at all.
docs/vpp/configuration/dataplane/cpu.md— documented the isolated-CPUrequirement. The page never mentioned
isolate-cpus, althoughverify_vpp_cpu_cores()rejects the commit when fewer CPUs are isolated thancpu-coresrequests. This includes the default ofcpu-cores 1, so every VPPdeployment needs at least one isolated CPU before the dataplane can be enabled
at all —
test_01_vpp_basicrelies on exactly that, never settingcpu-coresand still expecting
main-coreto be taken from the isolated set.docs/vpp/requirements.md— added the missing1af4:1041(virtio modernID) row to the validated NIC table. It is present in
SUPPORTED_PCI_IDSbutwas absent from the table.
docs/vpp/requirements.md— corrected theallow-unsupported-nicsnote,which said the check is bypassed "for the specified devices". There are no
specified devices:
_is_device_allowed()returnsTruefor every interfaceas soon as the option is set, including interfaces attached later. That
wording looks like a leftover from the per-PCI-ID form originally proposed in
T8315, which was merged as a single boolean.
Related Task(s)
Related PR(s)
Backport
Checklist:
Verified by building the docs locally with the pinned
requirements.txt; thethree changed pages produce no Sphinx warnings.
https://claude.ai/code/session_016gXeKHVBq2N8qRAMQkrdM6
This is an automatic backport of pull request #2233 done by [Mergify](https://mergify.com).