DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: hemant.agrawal@nxp.com, dev@dpdk.org
Subject: [RFC v2 00/16] Device unplug and bus cleanup refactoring for NXP
Date: Thu, 17 Sep 2026 09:49:00 +0200	[thread overview]
Message-ID: <20260917074917.595603-1-david.marchand@redhat.com> (raw)
In-Reply-To: <20260723135400.3621271-1-david.marchand@redhat.com>

Hello Hemant,

This is a followup to the refactoring started in 26.07.

I took some time with my best AI friend to cleanup DPAA and FSLMC bus
drivers.

Like the last time, only compilation has been checked.
I have no hardware to test runtime.

One thing that could be broken is either the order of devices
initialisation, or bugs in the device filtering that I tried to
simplify.

I went with the approach of splitting the device list between
internal bus object (that I called "control" devices, maybe a better
name can be found), and normal bus device object for which DPDK has a
driver.

I think it is worth testing and fixing, as it will make the two NXP
bus drivers similar to other bus drivers (but keep the special IO devices
handling internal to the FSLMC bus for example).


-- 
David Marchand

Changes since RFC v1:
- fixed FD leak in bus/dpaa pre existing code,
- fixed device name leak in bus/fslmc pre existing code,
- fixed other leaks found by AI review,
- split DPAA2 devices in two list:
  - one list in the bus object for devices for which a driver exists,
  - one list local to the fslmc bus code for internal resources that
    are initialised out of the EAL / bus framework,

David Marchand (16):
  drivers/bus: cleanup device freeing in NXP bus scan
  drivers/bus: fix FD leak during scan in NXP drivers
  bus/dpaa: allocate interrupt during probing
  bus/dpaa: support unplug and use generic cleanup
  bus/fslmc: fix device name leak
  bus/fslmc: fix memory leaks in scan
  bus/fslmc: fix per type device count
  bus/fslmc: fix some VFIO device FD and memory leaks
  bus/fslmc: fix interrupt leak in DPIO cleanup
  bus/fslmc: simplify device parsing in scan
  bus/fslmc: release resources on scan failure
  bus/fslmc: refactor device filtering for multiprocess
  bus/fslmc: move unplug for some device out of VFIO
  bus/fslmc: call VFIO setup for some device from bus layer
  bus/fslmc: allocate interrupt during probing
  bus/fslmc: use generic cleanup

 doc/guides/rel_notes/release_26_11.rst   |   4 +
 drivers/bus/dpaa/dpaa_bus.c              | 146 ++++----
 drivers/bus/fslmc/bus_fslmc_driver.h     |   4 +-
 drivers/bus/fslmc/fslmc_bus.c            | 431 +++++++++++++++++------
 drivers/bus/fslmc/fslmc_vfio.c           | 407 ++++++++++-----------
 drivers/bus/fslmc/fslmc_vfio.h           |   6 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c |   1 +
 drivers/bus/fslmc/private.h              |   6 +
 8 files changed, 601 insertions(+), 404 deletions(-)

-- 
2.54.0


  parent reply	other threads:[~2026-09-17  7:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 13:53 [RFC 00/11] Device unplug and bus cleanup refactoring for NXP David Marchand
2026-07-23 13:53 ` [RFC 01/11] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-07-23 13:53 ` [RFC 02/11] bus/dpaa: allocate interrupt during probing David Marchand
2026-07-23 13:53 ` [RFC 03/11] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-07-23 13:53 ` [RFC 04/11] bus/fslmc: fix memory leaks in scan David Marchand
2026-07-23 13:53 ` [RFC 05/11] bus/fslmc: fix per type device count David Marchand
2026-07-23 13:53 ` [RFC 06/11] bus/fslmc: simplify device parsing in scan David Marchand
2026-07-23 13:53 ` [RFC 07/11] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-07-23 13:53 ` [RFC 08/11] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-07-23 13:53 ` [RFC 09/11] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-07-23 13:53 ` [RFC 10/11] bus/fslmc: allocate interrupt during probing David Marchand
2026-07-23 13:53 ` [RFC 11/11] bus/fslmc: use generic cleanup David Marchand
2026-07-23 14:11 ` [RFC 00/11] Device unplug and bus cleanup refactoring for NXP Hemant Agrawal
2026-09-03 13:30   ` David Marchand
2026-09-08 14:20     ` Hemant Agrawal
2026-09-10 11:54       ` David Marchand
2026-08-11 20:09 ` Stephen Hemminger
2026-09-17  7:49 ` David Marchand [this message]
2026-09-17  7:49   ` [RFC v2 01/16] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-09-17  7:49   ` [RFC v2 02/16] drivers/bus: fix FD leak during scan in NXP drivers David Marchand
2026-09-17  7:49   ` [RFC v2 03/16] bus/dpaa: allocate interrupt during probing David Marchand
2026-09-17  7:49   ` [RFC v2 04/16] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-09-17  7:49   ` [RFC v2 05/16] bus/fslmc: fix device name leak David Marchand
2026-09-17  7:49   ` [RFC v2 06/16] bus/fslmc: fix memory leaks in scan David Marchand
2026-09-17  7:49   ` [RFC v2 07/16] bus/fslmc: fix per type device count David Marchand
2026-09-17  7:49   ` [RFC v2 08/16] bus/fslmc: fix some VFIO device FD and memory leaks David Marchand
2026-09-17  7:49   ` [RFC v2 09/16] bus/fslmc: fix interrupt leak in DPIO cleanup David Marchand
2026-09-17  7:49   ` [RFC v2 10/16] bus/fslmc: simplify device parsing in scan David Marchand
2026-09-17  7:49   ` [RFC v2 11/16] bus/fslmc: release resources on scan failure David Marchand
2026-09-17  7:49   ` [RFC v2 12/16] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-09-17  7:49   ` [RFC v2 13/16] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-09-17  7:49   ` [RFC v2 14/16] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-09-17  7:49   ` [RFC v2 15/16] bus/fslmc: allocate interrupt during probing David Marchand
2026-09-17  7:49   ` [RFC v2 16/16] bus/fslmc: use generic cleanup David Marchand
2026-09-24  6:46   ` [RFC v2 00/16] Device unplug and bus cleanup refactoring for NXP David Marchand
2026-09-24  6:53     ` Hemant Agrawal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260917074917.595603-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox