public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>
Subject: [RFC v2 3/5] drivers/bus: require probe function for NXP drivers
Date: Thu, 26 Feb 2026 17:20:54 +0100	[thread overview]
Message-ID: <20260226162057.207202-4-david.marchand@redhat.com> (raw)
In-Reply-To: <20260226162057.207202-1-david.marchand@redhat.com>

Rather than silently ignore an invalid driver, enforce every registered
driver has a probe callback.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/dpaa/dpaa_bus.c   | 6 +++---
 drivers/bus/fslmc/fslmc_bus.c | 7 +------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index d9830b68ca..5e0f32bfe8 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -614,6 +614,7 @@ void
 rte_dpaa_driver_register(struct rte_dpaa_driver *driver)
 {
 	RTE_VERIFY(driver);
+	RTE_VERIFY(driver->probe != NULL);
 
 	BUS_INIT_FUNC_TRACE();
 
@@ -808,9 +809,8 @@ rte_dpaa_bus_probe(void)
 			if (rte_dev_is_probed(&dev->device))
 				continue;
 
-			if (!drv->probe ||
-			    (dev->device.devargs &&
-			     dev->device.devargs->policy == RTE_DEV_BLOCKED))
+			if (dev->device.devargs &&
+			    dev->device.devargs->policy == RTE_DEV_BLOCKED)
 				continue;
 
 			if (probe_all ||
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index abdb0ad50d..ac9fb7a08c 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -465,9 +465,6 @@ rte_fslmc_probe(void)
 			if (ret)
 				continue;
 
-			if (!drv->probe)
-				continue;
-
 			if (rte_dev_is_probed(&dev->device))
 				continue;
 
@@ -534,6 +531,7 @@ void
 rte_fslmc_driver_register(struct rte_dpaa2_driver *driver)
 {
 	RTE_VERIFY(driver);
+	RTE_VERIFY(driver->probe != NULL);
 
 	TAILQ_INSERT_TAIL(&rte_fslmc_bus.driver_list, driver, next);
 }
@@ -601,9 +599,6 @@ fslmc_bus_plug(struct rte_device *rte_dev)
 		if (ret)
 			continue;
 
-		if (!drv->probe)
-			continue;
-
 		if (rte_dev_is_probed(&dev->device))
 			continue;
 
-- 
2.53.0


  parent reply	other threads:[~2026-02-26 16:21 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 11:29 [RFC 1/2] devtools: check packet forwarding in null test David Marchand
2026-02-25 11:29 ` [RFC 2/2] eal: configure initial device probing David Marchand
2026-02-25 12:09   ` Bruce Richardson
2026-02-25 17:53     ` David Marchand
2026-02-26 16:20 ` [RFC v2 0/5] Rework " David Marchand
2026-02-26 16:20   ` [RFC v2 1/5] devtools: check packet forwarding in null test David Marchand
2026-02-26 16:35     ` Bruce Richardson
2026-02-26 16:20   ` [RFC v2 2/5] bus/fslmc: fix bus cleanup David Marchand
2026-02-26 16:20   ` David Marchand [this message]
2026-02-26 16:24     ` [RFC v2 3/5] drivers/bus: require probe function for NXP drivers Bruce Richardson
2026-02-26 16:20   ` [RFC v2 4/5] bus: factorize device selection David Marchand
2026-02-26 16:31     ` Bruce Richardson
2026-02-27 14:17       ` David Marchand
2026-02-27 14:33         ` Bruce Richardson
2026-02-26 16:20   ` [RFC v2 5/5] eal: configure initial device probing David Marchand
2026-02-26 16:34     ` Bruce Richardson
2026-02-26 16:50     ` Robin Jarry
2026-02-27 13:43       ` Thomas Monjalon
2026-02-27 13:51         ` Bruce Richardson
2026-02-27 22:10           ` Stephen Hemminger
2026-03-02  9:02             ` Bruce Richardson
2026-03-02 11:08               ` Morten Brørup
2026-03-02 11:13               ` David Marchand
2026-03-05 16:45 ` [RFC v3 0/7] Rework " David Marchand
2026-03-05 16:45   ` [RFC v3 1/7] devtools: check packet forwarding in null test David Marchand
2026-03-05 16:45   ` [RFC v3 2/7] bus/fslmc: fix bus cleanup David Marchand
2026-03-05 16:45   ` [RFC v3 3/7] drivers/bus: require probe function for NXP drivers David Marchand
2026-03-05 16:45   ` [RFC v3 4/7] drivers: cleanup devargs lookup in bus scan David Marchand
2026-03-05 16:56     ` Bruce Richardson
2026-03-05 16:45   ` [RFC v3 5/7] bus: factorize devargs lookup David Marchand
2026-03-05 17:06     ` Bruce Richardson
2026-03-05 17:10       ` David Marchand
2026-03-05 16:45   ` [RFC v3 6/7] bus: factorize device selection David Marchand
2026-03-05 17:30     ` Bruce Richardson
2026-03-09  9:50       ` David Marchand
2026-03-07 20:59     ` Robin Jarry
2026-03-05 16:45   ` [RFC v3 7/7] eal: configure initial device probing David Marchand
2026-03-05 17:33     ` Bruce Richardson
2026-03-07 21:05     ` Robin Jarry
2026-03-06  8:26   ` [RFC v3 0/7] Rework " David Marchand

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=20260226162057.207202-4-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --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