dpdk/eal: fix secondary process resetting NIC via eal_bus_cleanup()#1050
Merged
jfb8856606 merged 1 commit intodevfrom Mar 18, 2026
Merged
dpdk/eal: fix secondary process resetting NIC via eal_bus_cleanup()#1050jfb8856606 merged 1 commit intodevfrom
jfb8856606 merged 1 commit intodevfrom
Conversation
Secondary processes (e.g. ff_ifconfig, ff_sysctl) should not invoke
eal_bus_cleanup() on exit, because it calls drv->remove() on every PCI
device. For the virtio PMD this eventually reaches virtio_reset(), which
writes VIRTIO_CONFIG_STATUS_RESET (0x00) to the device status register
and resets the NIC hardware. The primary process (F-Stack / nginx) loses
its NIC after that and stops accepting new connections.
Root cause: commit 1cab1a40ea9b ("bus: cleanup devices on shutdown",
DPDK 22.11) added eal_bus_cleanup() to rte_eal_cleanup() without
distinguishing primary from secondary processes.
Fix: guard eal_bus_cleanup() with a primary-process check, identical to
the approach in upstream DPDK commit 4bc53f8f0d64 ("eal: fix MP socket
cleanup", merged for DPDK 25.07). Backported here for the bundled
DPDK 23.11.5.
Fixes: #860
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.
Problem
When a secondary DPDK process exits (e.g.
ff_ifconfig,ff_sysctl), the primary process (F-Stack/nginx) stops accepting new connections. The NIC becomes non-functional until the primary process is restarted.Reproduction:
Root Cause
DPDK commit
1cab1a40ea9b("bus: cleanup devices on shutdown", introduced in DPDK 22.11) addedeal_bus_cleanup()torte_eal_cleanup()without distinguishing between primary and secondary processes.When
rte_eal_cleanup()is called in the secondary process, it executes:virtio_reset()performs a full hardware reset of the NIC. The primary process still holds the device but its hardware state has been destroyed.Fix
Guard
eal_bus_cleanup()with a primary-process check so secondary processes skip the bus cleanup:This is consistent with the fix in upstream DPDK commit
4bc53f8f0d64("eal: fix MP socket cleanup"), which was merged for DPDK 25.07. The upstream fix also reorderseal_bus_cleanup()beforerte_mp_channel_cleanup()to handle IPC-dependent cleanup in drivers; this backport takes the simpler approach of skipping bus cleanup in secondary processes entirely.Affected Versions
All DPDK LTS releases that include commit
1cab1a40ea9bare affected:The fix is available in DPDK 25.07+ only.
References
4bc53f8f0d64("eal: fix MP socket cleanup", 2025-07-19)1cab1a40ea9b("bus: cleanup devices on shutdown", 2022-10-04)