DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] Bus cleanup infrastructure and fixes
@ 2026-06-11  9:45 David Marchand
  2026-06-11  9:45 ` [PATCH 01/13] bus: fix reference to plug callback David Marchand
                   ` (16 more replies)
  0 siblings, 17 replies; 55+ messages in thread
From: David Marchand @ 2026-06-11  9:45 UTC (permalink / raw)
  To: dev; +Cc: thomas, stephen, bruce.richardson, fengchengwen

This is a followup of the previous bus refactoring.
See https://inbox.dpdk.org/dev/CAJFAV8zvFpLwz8SY8DUUezyJyM43eRZ17Yj30ex808eHC4ZE=g@mail.gmail.com/.

This series refactors the bus cleanup infrastructure to reduce code
duplication and fix resource leaks in several bus drivers.
It should address the leak Thomas pointed at.

The first part of the series (patches 1-8) addresses several bugs and
inconsistencies:
- Documentation and log message inconsistencies from earlier bus
  refactoring
- Device list management issues in dma/idxd and bus/vdev
- Resource leaks in PCI and VMBUS bus cleanup (mappings and interrupts)
- Simplified device freeing in NXP buses (DPAA and FSLMC)
- Deferred interrupt allocation to probe time (NXP buses, VMBUS)

The core infrastructure changes (patches 9-10) introduce the generic
cleanup framework:
- Refactors unplug operations to be the counterpart of probe_device
- Implements rte_bus_generic_cleanup() to centralize cleanup logic
- Adds .free_device operation to struct rte_bus
- Adds compile-time verification that rte_device is at offset 0

The final patches (11-13) convert remaining buses to use the generic
cleanup helper:
- DPAA bus: add unplug support
- VMBUS bus: switch to embedded device name and add unplug support

After this series, most buses use the generic cleanup helper, eliminating
duplicated code and ensuring consistent cleanup behavior across the
codebase.


-- 
David Marchand

David Marchand (13):
  bus: fix reference to plug callback
  dma/idxd: remove next pointer in bus specific device
  bus/vdev: remove driver setting in probe
  drivers/bus: cleanup device freeing in NXP bus
  drivers/bus: allocate interrupt during probing in NXP bus
  bus/pci: fix mapping leak in bus cleanup
  bus/vmbus: fix interrupt leak in cleanup
  bus/vmbus: allocate interrupt during probing
  bus: align unplug with device probe
  bus: implement cleanup in EAL
  bus/dpaa: support unplug
  bus/vmbus: store name in bus specific device
  bus/vmbus: support unplug

 doc/guides/prog_guide/device_hotplug.rst | 20 +++--
 doc/guides/rel_notes/release_26_07.rst   |  8 ++
 drivers/bus/auxiliary/auxiliary_common.c | 56 +++-----------
 drivers/bus/cdx/cdx.c                    | 31 ++------
 drivers/bus/dpaa/dpaa_bus.c              | 96 ++++++++++--------------
 drivers/bus/fslmc/fslmc_bus.c            | 55 ++++++--------
 drivers/bus/ifpga/ifpga_bus.c            | 65 ++++------------
 drivers/bus/pci/pci_common.c             | 69 +++--------------
 drivers/bus/platform/platform.c          | 28 ++-----
 drivers/bus/uacce/uacce.c                | 61 ++-------------
 drivers/bus/vdev/vdev.c                  | 71 ++++++------------
 drivers/bus/vmbus/bus_vmbus_driver.h     |  1 +
 drivers/bus/vmbus/linux/vmbus_bus.c      | 16 +---
 drivers/bus/vmbus/vmbus_common.c         | 56 ++++++++------
 drivers/dma/idxd/idxd_bus.c              |  3 +-
 lib/eal/common/eal_common_bus.c          | 33 +++++++-
 lib/eal/common/eal_common_dev.c          | 10 ++-
 lib/eal/include/bus_driver.h             | 42 ++++++++++-
 18 files changed, 268 insertions(+), 453 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2026-06-23 11:25 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11  9:45 [PATCH 00/13] Bus cleanup infrastructure and fixes David Marchand
2026-06-11  9:45 ` [PATCH 01/13] bus: fix reference to plug callback David Marchand
2026-06-11  9:45 ` [PATCH 02/13] dma/idxd: remove next pointer in bus specific device David Marchand
2026-06-11  9:45 ` [PATCH 03/13] bus/vdev: remove driver setting in probe David Marchand
2026-06-11  9:45 ` [PATCH 04/13] drivers/bus: cleanup device freeing in NXP bus David Marchand
2026-06-11  9:45 ` [PATCH 05/13] drivers/bus: allocate interrupt during probing " David Marchand
2026-06-11  9:45 ` [PATCH 06/13] bus/pci: fix mapping leak in bus cleanup David Marchand
2026-06-11  9:45 ` [PATCH 07/13] bus/vmbus: fix interrupt leak in cleanup David Marchand
2026-06-11  9:45 ` [PATCH 08/13] bus/vmbus: allocate interrupt during probing David Marchand
2026-06-15 19:13   ` [EXTERNAL] " Long Li
2026-06-11  9:45 ` [PATCH 09/13] bus: align unplug with device probe David Marchand
2026-06-11  9:45 ` [PATCH 10/13] bus: implement cleanup in EAL David Marchand
2026-06-11  9:45 ` [PATCH 11/13] bus/dpaa: support unplug David Marchand
2026-06-11  9:45 ` [PATCH 12/13] bus/vmbus: store name in bus specific device David Marchand
2026-06-11  9:45 ` [PATCH 13/13] bus/vmbus: support unplug David Marchand
2026-06-11 10:09 ` [PATCH 00/13] Bus cleanup infrastructure and fixes David Marchand
2026-06-15 19:14 ` [EXTERNAL] " Long Li
2026-06-15 23:55   ` Long Li
2026-06-16  6:55     ` David Marchand
2026-06-16  7:47       ` David Marchand
2026-06-17  9:16         ` Hemant Agrawal
2026-06-18  8:39           ` David Marchand
2026-06-18 15:28             ` David Marchand
2026-06-18 15:28 ` [PATCH v2 00/10] " David Marchand
2026-06-18 15:28   ` [PATCH v2 01/10] bus: fix reference to plug callback David Marchand
2026-06-22  9:49     ` Bruce Richardson
2026-06-18 15:28   ` [PATCH v2 02/10] dma/idxd: remove next pointer in bus specific device David Marchand
2026-06-22  9:48     ` Bruce Richardson
2026-06-18 15:28   ` [PATCH v2 03/10] bus/vdev: remove driver setting in probe David Marchand
2026-06-18 15:28   ` [PATCH v2 04/10] bus/pci: fix mapping leak in bus cleanup David Marchand
2026-06-18 15:28   ` [PATCH v2 05/10] bus/vmbus: fix interrupt leak in cleanup David Marchand
2026-06-19 22:04     ` [EXTERNAL] " Long Li
2026-06-18 15:28   ` [PATCH v2 06/10] bus/vmbus: allocate interrupt during probing David Marchand
2026-06-19 22:05     ` [EXTERNAL] " Long Li
2026-06-18 15:28   ` [PATCH v2 07/10] bus: align unplug with device probe David Marchand
2026-06-22 10:19     ` Bruce Richardson
2026-06-22 12:44       ` David Marchand
2026-06-18 15:28   ` [PATCH v2 08/10] bus: implement cleanup in EAL David Marchand
2026-06-22 10:26     ` Bruce Richardson
2026-06-18 15:28   ` [PATCH v2 09/10] bus/vmbus: store name in bus specific device David Marchand
2026-06-22 10:28     ` Bruce Richardson
2026-06-18 15:28   ` [PATCH v2 10/10] bus/vmbus: support unplug David Marchand
2026-06-23 10:54 ` [PATCH v3 00/11] Bus cleanup infrastructure and fixes David Marchand
2026-06-23 10:54   ` [PATCH v3 01/11] bus: fix reference to plug callback David Marchand
2026-06-23 10:54   ` [PATCH v3 02/11] dma/idxd: remove next pointer in bus specific device David Marchand
2026-06-23 10:54   ` [PATCH v3 03/11] bus/vdev: remove driver setting in probe David Marchand
2026-06-23 10:54   ` [PATCH v3 04/11] bus/pci: fix mapping leak in bus cleanup David Marchand
2026-06-23 10:54   ` [PATCH v3 05/11] bus/vmbus: fix interrupt leak in cleanup David Marchand
2026-06-23 10:54   ` [PATCH v3 06/11] bus/vmbus: allocate interrupt during probing David Marchand
2026-06-23 10:54   ` [PATCH v3 07/11] bus/ifpga: " David Marchand
2026-06-23 11:25     ` Bruce Richardson
2026-06-23 10:54   ` [PATCH v3 08/11] bus: align unplug with device probe David Marchand
2026-06-23 10:54   ` [PATCH v3 09/11] bus: implement cleanup in EAL David Marchand
2026-06-23 10:54   ` [PATCH v3 10/11] bus/vmbus: store name in bus specific device David Marchand
2026-06-23 10:54   ` [PATCH v3 11/11] bus/vmbus: support unplug David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox