patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Leroy <maxime@leroys.fr>
To: Hemant Agrawal <hemant.agrawal@nxp.com>, stephen@networkplumber.org
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
	 Sachin Saxena <sachin.saxena@nxp.com>,
	stable@dpdk.org
Subject: Re: [PATCH v5 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close
Date: Fri, 14 Nov 2025 17:53:38 +0100	[thread overview]
Message-ID: <CAHHRULWc4GVdYxfT9YndSNRHd2jBxTDXoNNnKzCAHpBHE=BR2A@mail.gmail.com> (raw)
In-Reply-To: <20251114062454.2731559-1-hemant.agrawal@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 2437 bytes --]

Hi Stephen and Hemant,

It would be great if this series could be merged for rc3. I’ve tested it
successfully with Grout on my side, and it allows us to support the DPAA2
Ethernet driver without any ugly workarounds. I’ve also reviewed all the
patches, and everything looks good with no major risks.

Regards,
Maxime Leroy

Le ven. 14 nov. 2025, 07:25, Hemant Agrawal <hemant.agrawal@nxp.com> a
écrit :

> When rte_eth_dev_close() is called, it performs the following actions:
>
> Calls dev->dev_ops->dev_close(), which in this case is dpaa2_dev_close().
> Then calls rte_eth_dev_release_port(), which releases all device data
> and sets dev->data to NULL.
>
> Later, when rte_dev_remove() is called, the FSLMC bus invokes
> dev->remove() — that is, rte_dpaa2_remove().
> However, rte_dpaa2_remove() calls dpaa2_dev_close() again. Since dev->data
> was already set to NULL by the previous call, this second invocation
> causes a crash.
>
> Fixes: 5964d36a2904 ("net/dpaa2: release port upon close")
> Cc: sachin.saxena@nxp.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> Tested-by: Maxime Leroy <maxime@leroys.fr>
> ---
>  drivers/net/dpaa2/dpaa2_ethdev.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c
> b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 7da32ce856..fcda267e0b 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -3347,14 +3347,22 @@ static int
>  rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev)
>  {
>         struct rte_eth_dev *eth_dev;
> -       int ret;
> +       int ret = 0;
> +
> +       eth_dev = rte_eth_dev_allocated(dpaa2_dev->device.name);
> +       if (eth_dev) {
> +               ret = dpaa2_dev_close(eth_dev);
> +               if (ret)
> +                       DPAA2_PMD_ERR("dpaa2_dev_close ret= %d", ret);
> +
> +               ret = rte_eth_dev_release_port(eth_dev);
> +       }
>
> -       eth_dev = dpaa2_dev->eth_dev;
> -       dpaa2_dev_close(eth_dev);
>         dpaa2_valid_dev--;
> -       if (!dpaa2_valid_dev)
> +       if (!dpaa2_valid_dev) {
>                 rte_mempool_free(dpaa2_tx_sg_pool);
> -       ret = rte_eth_dev_release_port(eth_dev);
> +               dpaa2_tx_sg_pool = NULL;
> +       }
>
>         return ret;
>  }
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 3522 bytes --]

  parent reply	other threads:[~2025-11-14 16:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 16:38 [PATCH 1/3] " Hemant Agrawal
2025-11-06 16:38 ` [PATCH 2/3] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-06 19:29   ` Stephen Hemminger
2025-11-07  9:51     ` Maxime Leroy
2025-11-07 10:38       ` Hemant Agrawal
2025-11-07  8:34   ` David Marchand
2025-11-07  8:32 ` [PATCH 1/3] net/dpaa2: fix duplicate calling of dpaa2 dev close David Marchand
2025-11-08 15:35   ` David Marchand
2025-11-12 23:06 ` Stephen Hemminger
2025-11-13  5:29 ` [PATCH v2 1/5] " Hemant Agrawal
2025-11-13  5:29   ` [PATCH v2 2/5] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13  9:59   ` [PATCH v3 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Hemant Agrawal
2025-11-13  9:59     ` [PATCH v3 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13 11:27       ` Maxime Leroy
2025-11-13 11:43     ` [PATCH v4 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Hemant Agrawal
2025-11-13 11:43       ` [PATCH v4 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13 15:11       ` [PATCH v4 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Maxime Leroy
2025-11-14  6:39         ` Hemant Agrawal
2025-11-14  6:24       ` [PATCH v5 " Hemant Agrawal
2025-11-14  6:24         ` [PATCH v5 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-14 16:53         ` Maxime Leroy [this message]
2025-11-14 16:57           ` [PATCH v5 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Stephen Hemminger

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='CAHHRULWc4GVdYxfT9YndSNRHd2jBxTDXoNNnKzCAHpBHE=BR2A@mail.gmail.com' \
    --to=maxime@leroys.fr \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@nxp.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).