[PATCH v17 01/23] net/dpaa: fix device remove
Hemant Agrawal
hemant.agrawal at nxp.com
Tue Sep 29 17:50:05 CEST 2026
NXP Confidential
> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: 29 September 2026 18:11
> To: Hemant Agrawal <hemant.agrawal at nxp.com>
> Cc: stephen at networkplumber.org; thomas at monjalon.net; dev at dpdk.org;
> stable at dpdk.org; Gagandeep Singh <G.Singh at nxp.com>
> Subject: Re: [PATCH v17 01/23] net/dpaa: fix device remove
> Importance: High
>
> On Tue, 29 Sept 2026 at 12:45, Hemant Agrawal
> <hemant.agrawal at nxp.com> wrote:
> >
> > From: Gagandeep Singh <g.singh at nxp.com>
> >
> > Adds a check to not to close device if already closed.
> >
> > Fixes: 78ea4b4fcb52 ("bus/dpaa: improve cleanup")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
> > ---
> > drivers/net/dpaa/dpaa_ethdev.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/dpaa/dpaa_ethdev.c
> > b/drivers/net/dpaa/dpaa_ethdev.c index 1aaf97f175..7dcd67fb81 100644
> > --- a/drivers/net/dpaa/dpaa_ethdev.c
> > +++ b/drivers/net/dpaa/dpaa_ethdev.c
> > @@ -2679,9 +2679,12 @@ rte_dpaa_remove(struct rte_dpaa_device
> *dpaa_dev)
> > PMD_INIT_FUNC_TRACE();
> >
> > eth_dev = rte_eth_dev_allocated(dpaa_dev->device.name);
> > - ret = dpaa_eth_dev_close(eth_dev);
> > - if (eth_dev->state != RTE_ETH_DEV_UNUSED) {
> > - dpaa_eth_dev_close(eth_dev);
> > + if (eth_dev && eth_dev->state != RTE_ETH_DEV_UNUSED) {
>
> Checking the state looks wrong.
>
> If this driver .remove op is called, it means a probing succeeded.
> And if probing succeeded and a ethdev exists, it should be in attached state.
>
> Now, in the hypothesis we end up here with an allocated "unused"
> eth_dev, it smells like a leak from a probing failure.
>
> I spotted one, but it does not seem related to the current patch.
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu
> b.com%2FDPDK%2Fdpdk%2Fblob%2Fmain%2Fdrivers%2Fnet%2Fdpaa%2Fd
> paa_ethdev.c%23L2614&data=05%7C02%7Chemant.agrawal%40nxp.com%
> 7C6f4cba907a1e4ba3f72008df1e270566%7C686ea1d3bc2b4c6fa92cd99c5
> c301635%7C0%7C0%7C639262825080789706%7CUnknown%7CTWFpbGZ
> sb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiI
> sIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=w6V36f3LY
> 6JCaZSd00vayWqHDKZtVuRtPCS8i1XIvfY%3D&reserved=0
>
>
You are right it hides the probe-path bug rather than fixing it.
Let me try to fix the real cause for it.
> --
> David Marchand
More information about the stable
mailing list