From: Hemant Agrawal <hemant.agrawal@oss.nxp.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: hemant.agrawal@nxp.com, maxime@leroys.fr,
Sachin Saxena <sachin.saxena@nxp.com>
Subject: Re: [PATCH v2 4/5] net/dpaa2: remove ethdev device in bus device
Date: Thu, 13 Nov 2025 14:45:26 +0530 [thread overview]
Message-ID: <1c6a056b-2215-4f72-9e90-c320de4528b5@oss.nxp.com> (raw)
In-Reply-To: <20251112091049.2669481-5-david.marchand@redhat.com>
On 12-11-2025 14:40, David Marchand wrote:
> Calling rte_eth_dev_allocated() is enough to retrieve the
> ethdev device object.
>
> This leaves no user of the ethdev field in the fslmc device object.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since v1:
> - dropped return on !eth_dev (this should be fixed in a separate patch),
>
> ---
> drivers/bus/fslmc/bus_fslmc_driver.h | 1 -
> drivers/net/dpaa2/dpaa2_ethdev.c | 3 +--
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
> index efa88754a7..094f885f59 100644
> --- a/drivers/bus/fslmc/bus_fslmc_driver.h
> +++ b/drivers/bus/fslmc/bus_fslmc_driver.h
> @@ -98,7 +98,6 @@ struct rte_dpaa2_device {
> TAILQ_ENTRY(rte_dpaa2_device) next; /**< Next probed DPAA2 device. */
> struct rte_device device; /**< Inherit core device */
> union {
> - struct rte_eth_dev *eth_dev; /**< ethernet device */
> struct rte_rawdev *rawdev; /**< Raw Device */
> };
> enum rte_dpaa2_dev_type dev_type; /**< Device Type */
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 7da32ce856..c545177999 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -3320,7 +3320,6 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv,
>
> eth_dev->device = &dpaa2_dev->device;
>
> - dpaa2_dev->eth_dev = eth_dev;
> eth_dev->data->rx_mbuf_alloc_failed = 0;
>
> if (dpaa2_drv->drv_flags & RTE_DPAA2_DRV_INTR_LSC)
> @@ -3349,7 +3348,7 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev)
> struct rte_eth_dev *eth_dev;
> int ret;
>
> - eth_dev = dpaa2_dev->eth_dev;
> + eth_dev = rte_eth_dev_allocated(dpaa2_dev->device.name);
I have also included this change in my patch series. otherwise it looks ok.
> dpaa2_dev_close(eth_dev);
> dpaa2_valid_dev--;
> if (!dpaa2_valid_dev)
next prev parent reply other threads:[~2025-11-13 9:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 15:32 [PATCH 0/5] Cleanup rte_dpaa2_device David Marchand
2025-11-08 15:32 ` [PATCH 1/5] crypto/dpaa2_sec: remove crypto device in bus device David Marchand
2025-11-08 15:32 ` [PATCH 2/5] dma/dpaa2: remove DMA " David Marchand
2025-11-08 15:32 ` [PATCH 3/5] net/dpaa2: remove dead code in loopback mode David Marchand
2025-11-08 15:32 ` [PATCH 4/5] net/dpaa2: remove ethdev device in bus device David Marchand
2025-11-12 8:44 ` Maxime Leroy
2025-11-12 8:56 ` David Marchand
2025-11-12 9:04 ` David Marchand
2025-11-08 15:32 ` [PATCH 5/5] bus/fslmc: remove raw " David Marchand
2025-11-12 7:35 ` [PATCH 0/5] Cleanup rte_dpaa2_device Hemant Agrawal
2025-11-12 9:10 ` [PATCH v2 " David Marchand
2025-11-12 9:10 ` [PATCH v2 1/5] crypto/dpaa2_sec: remove crypto device in bus device David Marchand
2025-11-12 9:10 ` [PATCH v2 2/5] dma/dpaa2: remove DMA " David Marchand
2025-11-12 9:10 ` [PATCH v2 3/5] net/dpaa2: remove dead code in loopback mode David Marchand
2025-11-12 9:10 ` [PATCH v2 4/5] net/dpaa2: remove ethdev device in bus device David Marchand
2025-11-13 9:15 ` Hemant Agrawal [this message]
2025-11-12 9:10 ` [PATCH v2 5/5] bus/fslmc: remove raw " David Marchand
2025-11-13 9:16 ` [PATCH v2 0/5] Cleanup rte_dpaa2_device 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=1c6a056b-2215-4f72-9e90-c320de4528b5@oss.nxp.com \
--to=hemant.agrawal@oss.nxp.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=maxime@leroys.fr \
--cc=sachin.saxena@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;
as well as URLs for NNTP newsgroup(s).