numam-dpdk/drivers/bus
Kevin Laatz 1cab1a40ea bus: cleanup devices on shutdown
During EAL init, all buses are probed and the devices found are
initialized. On eal_cleanup(), the inverse does not happen, meaning any
allocated memory and other configuration will not be cleaned up
appropriately on exit.

Currently, in order for device cleanup to take place, applications must
call the driver-relevant functions to ensure proper cleanup is done before
the application exits. Since initialization occurs for all devices on the
bus, not just the devices used by an application, it requires a)
application awareness of all bus devices that could have been probed on the
system, and b) code duplication across applications to ensure cleanup is
performed. An example of this is rte_eth_dev_close() which is commonly used
across the example applications.

This patch proposes adding bus cleanup to the eal_cleanup() to make EAL's
init/exit more symmetrical, ensuring all bus devices are cleaned up
appropriately without the application needing to be aware of all bus types
that may have been probed during initialization.

Contained in this patch are the changes required to perform cleanup for
devices on the PCI bus and VDEV bus during eal_cleanup(). There would be an
ask for bus maintainers to add the relevant cleanup for their buses since
they have the domain expertise.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
2022-10-04 21:20:15 +02:00
..
auxiliary dev: hide driver object 2022-09-23 16:14:34 +02:00
dpaa dev: hide driver object 2022-09-23 16:14:34 +02:00
fslmc dev: hide driver object 2022-09-23 16:14:34 +02:00
ifpga bus: hide bus object 2022-09-23 16:14:34 +02:00
pci bus: cleanup devices on shutdown 2022-10-04 21:20:15 +02:00
vdev bus: cleanup devices on shutdown 2022-10-04 21:20:15 +02:00
vmbus dev: hide driver object 2022-09-23 16:14:34 +02:00
meson.build bus/auxiliary: introduce auxiliary bus 2021-07-05 18:11:28 +02:00