[PATCH v2 08/10] bus: implement cleanup in EAL
Bruce Richardson
bruce.richardson at intel.com
Mon Jun 22 12:26:33 CEST 2026
On Thu, Jun 18, 2026 at 05:28:23PM +0200, David Marchand wrote:
> Introduce a generic cleanup helper rte_bus_generic_cleanup() that
> eliminates code duplication across bus cleanup implementations:
> unplug probed devices, remove devargs, remove from bus list,
> and free device structures.
>
> Add .free_device operation to struct rte_bus to allow buses to specify
> how to free their device structures.
> Update all buses for the new .cleanup and RTE_REGISTER_BUS prototypes.
>
> Convert to rte_bus_generic_cleanup() the buses that have both a .cleanup
> and .unplug_device: this requires implementing .free_device for them.
>
> Untouched buses are:
> - dma/idxd which has no unplug support,
> - bus/cdx which has unplug support, but no cleanup was implemented so
> far,
> - NXP buses:
> - bus/dpaa and bus/fslmc have many issues on interrupt
> allocation/setup/freeing or VFIO setup/release,
> - bus/fslmc cleanup callback is actually implemented in its internal
> VFIO layer and requires too much refactoring,
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list