Skip to content

Commit 528cb9f

Browse files
authored
dpdk/eal: fix secondary process resetting NIC via eal_bus_cleanup() (#860)
dpdk/eal: fix secondary process resetting NIC via eal_bus_cleanup()
2 parents c105f32 + 9271817 commit 528cb9f

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

dpdk/lib/eal/linux/eal.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,18 @@ rte_eal_cleanup(void)
13701370
vfio_mp_sync_cleanup();
13711371
#endif
13721372
rte_mp_channel_cleanup();
1373-
eal_bus_cleanup();
1373+
/* Secondary processes should not call eal_bus_cleanup() because it
1374+
* invokes drv->remove() on all PCI devices, which for virtio PMD ends
1375+
* up calling virtio_reset() and writing VIRTIO_CONFIG_STATUS_RESET to
1376+
* the hardware. This resets the NIC owned by the primary process,
1377+
* causing it to stop accepting new connections.
1378+
*
1379+
* Upstream fix: commit 4bc53f8f0d64 ("eal: fix MP socket cleanup"),
1380+
* DPDK >= 25.07. Backport for F-Stack bundled DPDK 23.11.5.
1381+
* See also: https://github.com/F-Stack/f-stack/issues/860
1382+
*/
1383+
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
1384+
eal_bus_cleanup();
13741385
rte_eal_alarm_cleanup();
13751386
rte_trace_save();
13761387
eal_trace_fini();

0 commit comments

Comments
 (0)