Skip to contentSkip to conversation

Bus cleanup for 22.11

RFC PATCH Superseded David Marchand 15 participants 231 messages Jun 28, 2022 – Oct 26, 2022 Page 2 of 6

Subsystems (12)
lore
Share & tools
lore
#50 lore raw

RFC v2 28/29 dev: introduce device accessors

In reply to David Marchand

Prepare for making the device object opaque by adding accessors. Update existing "external" users.

---
 app/proc-info/main.c               |  6 ++--
 examples/ethtool/lib/rte_ethtool.c |  2 +-
 examples/l3fwd/l3fwd_em.c          |  4 +--
 examples/l3fwd/l3fwd_fib.c         |  8 ++---
 examples/l3fwd/l3fwd_lpm.c         |  4 +--
 examples/vdpa/main.c               | 16 ++++-----
 lib/eal/common/eal_common_dev.c    | 24 ++++++++++++++
 lib/eal/include/rte_dev.h          | 53 ++++++++++++++++++++++++++++++
 lib/eal/version.map                |  4 +++
 lib/ethdev/rte_ethdev.h            |  2 +-
 10 files changed, 102 insertions(+), 21 deletions(-)
app/proc-info/main.c +3 -3
index 1bfba5f60d..d52ac8a038 100644
@@ -755,7 +755,7 @@ show_port(void)
 		}
 
 		printf("\t  -- driver %s device %s socket %d\n",
-		       dev_info.driver_name, dev_info.device->name,
+		       dev_info.driver_name, rte_dev_name(dev_info.device),
 		       rte_eth_dev_socket_id(i));
 
 		ret = rte_eth_dev_owner_get(i, &owner);
@@ -1254,7 +1254,7 @@ show_crypto(void)
 		       rte_cryptodev_name_get(i),
 		       dev_info.driver_name,
 		       dev_info.driver_id,
-		       dev_info.device->numa_node,
+		       rte_dev_numa_node(dev_info.device),
 		       rte_cryptodev_queue_pair_count(i));
 
 		display_crypto_feature_info(dev_info.feature_flags);
@@ -1466,7 +1466,7 @@ dump_regs(char *file_prefix)
 			else
 				printf("Device (%s) regs dumped successfully, "
 					"driver:%s version:0X%08X\n",
-					dev_info.device->name,
+					rte_dev_name(dev_info.device),
 					dev_info.driver_name, reg_info.version);
 
 			fclose(fp_regs);
examples/ethtool/lib/rte_ethtool.c +1 -1
index 88dc917b73..33acc5e3cc 100644
@@ -49,7 +49,7 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 	strlcpy(drvinfo->driver, dev_info.driver_name,
 		sizeof(drvinfo->driver));
 	strlcpy(drvinfo->version, rte_version(), sizeof(drvinfo->version));
-	strlcpy(drvinfo->bus_info, dev_info.device->name,
+	strlcpy(drvinfo->bus_info, rte_dev_name(dev_info.device),
 		sizeof(drvinfo->bus_info));
 
 	memset(&reg_info, 0, sizeof(reg_info));
examples/l3fwd/l3fwd_em.c +2 -2
index 10be24c61d..0531282a1f 100644
@@ -403,7 +403,7 @@ populate_ipv4_flow_into_table(const struct rte_hash *h)
 			   em_route_base_v4[i].v4_key.port_dst,
 			   em_route_base_v4[i].v4_key.port_src,
 			   em_route_base_v4[i].v4_key.proto,
-		       em_route_base_v4[i].if_out, dev_info.device->name);
+		       em_route_base_v4[i].if_out, rte_dev_name(dev_info.device));
 	}
 	printf("Hash: Adding 0x%" PRIx64 " keys\n",
 		(uint64_t)route_num_v4);
@@ -455,7 +455,7 @@ populate_ipv6_flow_into_table(const struct rte_hash *h)
 			   em_route_base_v6[i].v6_key.port_dst,
 			   em_route_base_v6[i].v6_key.port_src,
 			   em_route_base_v6[i].v6_key.proto,
-		       em_route_base_v6[i].if_out, dev_info.device->name);
+		       em_route_base_v6[i].if_out, rte_dev_name(dev_info.device));
 	}
 	printf("Hash: Adding 0x%" PRIx64 "keys\n",
 		(uint64_t)route_num_v6);
examples/l3fwd/l3fwd_fib.c +4 -4
index e02e4b3f5a..b82e0c0354 100644
@@ -640,11 +640,11 @@ setup_fib(const int socketid)
 			printf("FIB: Adding route %s / %d (%d) [%s]\n", abuf,
 			       route_base_v4[i].depth,
 			       route_base_v4[i].if_out,
-			       dev_info.device->name);
+			       rte_dev_name(dev_info.device));
 		} else {
 			printf("FIB: IPv4 route added to port %d [%s]\n",
 			       route_base_v4[i].if_out,
-			       dev_info.device->name);
+			       rte_dev_name(dev_info.device));
 		}
 	}
 	/* >8 End of setup fib. */
@@ -695,11 +695,11 @@ setup_fib(const int socketid)
 			printf("FIB: Adding route %s / %d (%d) [%s]\n", abuf,
 			       route_base_v6[i].depth,
 			       route_base_v6[i].if_out,
-			       dev_info.device->name);
+			       rte_dev_name(dev_info.device));
 		} else {
 			printf("FIB: IPv6 route added to port %d [%s]\n",
 			       route_base_v6[i].if_out,
-			       dev_info.device->name);
+			       rte_dev_name(dev_info.device));
 		}
 	}
 }
examples/l3fwd/l3fwd_lpm.c +2 -2
index d1b850dd5b..22d7f61a42 100644
@@ -598,7 +598,7 @@ setup_lpm(const int socketid)
 		printf("LPM: Adding route %s / %d (%d) [%s]\n",
 		       inet_ntop(AF_INET, &in, abuf, sizeof(abuf)),
 		       route_base_v4[i].depth,
-		       route_base_v4[i].if_out, dev_info.device->name);
+		       route_base_v4[i].if_out, rte_dev_name(dev_info.device));
 	}
 
 	/* create the LPM6 table */
@@ -642,7 +642,7 @@ setup_lpm(const int socketid)
 		       inet_ntop(AF_INET6, route_base_v6[i].ip_8, abuf,
 				 sizeof(abuf)),
 		       route_base_v6[i].depth,
-		       route_base_v6[i].if_out, dev_info.device->name);
+		       route_base_v6[i].if_out, rte_dev_name(dev_info.device));
 	}
 }
 
examples/vdpa/main.c +8 -8
index 7e11ef4e26..ee240dd15a 100644
@@ -119,7 +119,7 @@ new_device(int vid)
 				"Failed to get generic device for port %d\n", i);
 			continue;
 		}
-		printf("\nnew port %s, device : %s\n", ifname, dev->name);
+		printf("\nnew port %s, device : %s\n", ifname, rte_dev_name(dev));
 		vports[i].vid = vid;
 		break;
 	}
@@ -149,7 +149,7 @@ destroy_device(int vid)
 			continue;
 		}
 
-		printf("\ndestroy port %s, device: %s\n", ifname, dev->name);
+		printf("\ndestroy port %s, device: %s\n", ifname, rte_dev_name(dev));
 		break;
 	}
 }
@@ -353,23 +353,23 @@ static void cmd_list_vdpa_devices_parsed(
 
 	cmdline_printf(cl, "device name\tqueue num\tsupported features\n");
 	RTE_DEV_FOREACH(dev, "class=vdpa", &dev_iter) {
-		vdev = rte_vdpa_find_device_by_name(dev->name);
+		vdev = rte_vdpa_find_device_by_name(rte_dev_name(dev));
 		if (!vdev)
 			continue;
 		if (rte_vdpa_get_queue_num(vdev, &queue_num) < 0) {
 			RTE_LOG(ERR, VDPA,
 				"failed to get vdpa queue number "
-				"for device %s.\n", dev->name);
+				"for device %s.\n", rte_dev_name(dev));
 			continue;
 		}
 		if (rte_vdpa_get_features(vdev, &features) < 0) {
 			RTE_LOG(ERR, VDPA,
 				"failed to get vdpa features "
-				"for device %s.\n", dev->name);
+				"for device %s.\n", rte_dev_name(dev));
 			continue;
 		}
 		cmdline_printf(cl, "%s\t\t%" PRIu32 "\t\t0x%" PRIx64 "\n",
-			dev->name, queue_num, features);
+			rte_dev_name(dev), queue_num, features);
 	}
 }
 
@@ -606,10 +606,10 @@ main(int argc, char *argv[])
 		cmdline_stdin_exit(cl);
 	} else {
 		RTE_DEV_FOREACH(dev, "class=vdpa", &dev_iter) {
-			vdev = rte_vdpa_find_device_by_name(dev->name);
+			vdev = rte_vdpa_find_device_by_name(rte_dev_name(dev));
 			if (vdev == NULL) {
 				rte_panic("Failed to find vDPA dev for %s\n",
-						dev->name);
+						rte_dev_name(dev));
 			}
 			vports[devcnt].dev = vdev;
 			snprintf(vports[devcnt].ifname, MAX_PATH_LEN, "%s%d",
lib/eal/common/eal_common_dev.c +24 -0
index 5b64b80cb9..e2d77e02a5 100644
@@ -25,6 +25,30 @@ rte_driver_name(const struct rte_driver *driver)
 	return driver->name;
 }
 
+const struct rte_bus *
+rte_dev_bus(const struct rte_device *dev)
+{
+	return dev->bus;
+}
+
+const struct rte_driver *
+rte_dev_driver(const struct rte_device *dev)
+{
+	return dev->driver;
+}
+
+const char *
+rte_dev_name(const struct rte_device *dev)
+{
+	return dev->name;
+}
+
+int
+rte_dev_numa_node(const struct rte_device *dev)
+{
+	return dev->numa_node;
+}
+
 /**
  * The device event callback description.
  *
lib/eal/include/rte_dev.h +53 -0

71 lines not on this page · raw message

lib/eal/version.map +4 -0
index 54f85ab01f..660d3c7433 100644
@@ -426,6 +426,10 @@ EXPERIMENTAL {
 	# added in 22.11
 	rte_bus_name;
 	rte_driver_name;
+	rte_dev_bus;
+	rte_dev_driver;
+	rte_dev_name;
+	rte_dev_numa_node;
 };
 
 INTERNAL {
lib/ethdev/rte_ethdev.h +1 -1
index e9574f646f..2197525315 100644
@@ -3380,7 +3380,7 @@ int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
  * exists for the device and the rte_eth_dev 'dev' has been populated
  * successfully with a call to it:
  *
- * driver_name = rte_driver_name(dev->device->driver)
+ * driver_name = rte_driver_name(rte_dev_driver(dev->device));
  * nb_rx_queues = dev->data->nb_rx_queues
  * nb_tx_queues = dev->data->nb_tx_queues
  * dev_flags = &dev->data->dev_flags
Signature · 1 line
2.36.1
#51 lore raw

RFC v2 29/29 dev: hide device object

In reply to David Marchand

Make rte_device opaque for non internal users.
This will make extending this object possible without breaking the ABI.

---
 lib/eal/common/eal_private.h |  2 +-
 lib/eal/include/dev_driver.h | 14 ++++++++++++++
 lib/eal/include/rte_dev.h    | 13 +------------
 lib/vhost/vdpa.c             |  1 +
 4 files changed, 17 insertions(+), 13 deletions(-)
lib/eal/common/eal_private.h +1 -1
index 44d14241f0..3ca9ce2ffc 100644
@@ -10,7 +10,7 @@
 #include <stdio.h>
 #include <sys/queue.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
 
lib/eal/include/dev_driver.h +14 -0
index 015188abd5..01c3e30994 100644
@@ -12,6 +12,8 @@ extern "C" {
 #include <rte_common.h>
 #include <rte_dev.h>
 
+struct rte_devargs;
+
 /**
  * A structure describing a device driver.
  */
@@ -21,6 +23,18 @@ struct rte_driver {
 	const char *alias;              /**< Driver alias. */
 };
 
+/**
+ * A structure describing a generic device.
+ */
+struct rte_device {
+	RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
+	const char *name;             /**< Device name */
+	const struct rte_driver *driver; /**< Driver assigned after probing */
+	const struct rte_bus *bus;    /**< Bus handle assigned on scan */
+	int numa_node;                /**< NUMA node connection */
+	struct rte_devargs *devargs;  /**< Arguments for latest probing */
+};
+
 #ifdef __cplusplus
 }
 #endif
lib/eal/include/rte_dev.h +1 -12
index a80447a645..3077cf3f0f 100644
@@ -25,6 +25,7 @@ extern "C" {
 
 struct rte_bus;
 struct rte_driver;
+struct rte_device;
 
 /**
  * The device event type.
@@ -127,18 +128,6 @@ __rte_experimental
 int
 rte_dev_numa_node(const struct rte_device *dev);
 
-/**
- * A structure describing a generic device.
- */
-struct rte_device {
-	RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
-	const char *name;             /**< Device name */
-	const struct rte_driver *driver; /**< Driver assigned after probing */
-	const struct rte_bus *bus;    /**< Bus handle assigned on scan */
-	int numa_node;                /**< NUMA node connection */
-	struct rte_devargs *devargs;  /**< Arguments for latest probing */
-};
-
 /**
  * Query status of a device.
  *
lib/vhost/vdpa.c +1 -0
index bdebcbe565..aaf3f267e9 100644
@@ -10,6 +10,7 @@
 
 #include <sys/queue.h>
 
+#include <dev_driver.h>
 #include <rte_common.h>
 #include <rte_class.h>
 #include <rte_malloc.h>
Signature · 1 line
2.36.1
#52 lore raw

Re: [RFC v2 v2 00/29] Bus and device cleanup for 22.11

In reply to David Marchand
Quoted 31 lines · On Sat, 9 Jul 2022 10:26:15 +0200 David Marchand <[email protected]>…

This is a PoC for hiding the rte_bus, rte_driver and rte_device objects. And mark associated driver only API as internal.

A good amount of the patches are preparation work on rte_bus.h, rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies between them. This is something I had in store for some time, maybe I should have dropped it from the PoC, but I think those cleanups are worth it in any case.

Then PCI bus specific handling are moved from unit tests and examples, though there is still a special case left in testpmd that may require a new API, to be discussed.

After this series, driver-only API headers for registering to buses are not exported anymore, unless the enable_driver_sdk meson option is selected.

New accessors for rte_bus, rte_driver and rte_device have been added, marked with an experimental tag though we may declare them as stable right away so that users can switch to them directly. That's also something to agree on.

I simplified my series and switched to only update "external" users, like app/ and examples/ files.
We need some checkpatch new checks to be sure we won't get some driver-only headers included in these areas. That's something I'll work on in the non RFC series.

"Internal" users are simply using the internal headers. That helps greatly reducing the size of the changes.

Quoted 7 lines

Disclaimer: again, in this v2, this series is a bit rushed (I brute forced compilation tests in GHA so that it passes between patches, but there still may be something broken...).
Not surprisingly, the ABI check in the CI is expected to fail.

Comments welcome.

Looks good to me, lots of work but will the separation internal and external API's will help in future.

#53 lore raw

Re: [RFC v2 v2 00/29] Bus and device cleanup for 22.11

In reply to David Marchand
Quoted 13 lines · David Marchand

This is a PoC for hiding the rte_bus, rte_driver and rte_device objects. And mark associated driver only API as internal.

A good amount of the patches are preparation work on rte_bus.h, rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies between them. This is something I had in store for some time, maybe I should have dropped it from the PoC, but I think those cleanups are worth it in any case.

Then PCI bus specific handling are moved from unit tests and examples, though there is still a special case left in testpmd that may require a new API, to be discussed.

Quoted 9 lines

After this series, driver-only API headers for registering to buses are not exported anymore, unless the enable_driver_sdk meson option is selected.

New accessors for rte_bus, rte_driver and rte_device have been added, marked with an experimental tag though we may declare them as stable right away so that users can switch to them directly. That's also something to agree on.

Yes, I think we need to make them stable.

Quoted 9 lines

I simplified my series and switched to only update "external" users, like app/ and examples/ files.
We need some checkpatch new checks to be sure we won't get some driver-only headers included in these areas. That's something I'll work on in the non RFC series.

"Internal" users are simply using the internal headers. That helps greatly reducing the size of the changes.

Quoted 8 lines

Disclaimer: again, in this v2, this series is a bit rushed (I brute forced compilation tests in GHA so that it passes between patches, but there still may be something broken...).
Not surprisingly, the ABI check in the CI is expected to fail.

Comments welcome.

This is great cleanup. Thanks for all the work on it.

/Bruce

#54 lore raw

v3 cover Bus and device cleanup for 22.11

In reply to David Marchand

This is a PoC for hiding the rte_bus, rte_driver and rte_device objects. And mark associated driver only API as internal.

A good amount of the patches are preparation work on rte_bus.h, rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies between them.

PCI bus specific handling are removed from testpmd, unit tests and examples.

After this series, driver-only API headers for registering to buses are not exported anymore, unless the enable_driver_sdk meson option is selected.

New accessors for rte_bus, rte_driver and rte_device have been added, marked with an experimental tag first when introducing them, and later in the series marked as stable since external users will want to use those drop-in replacements right away.

A check is added to ensure we won't pollute app/ and examples/ again, though some unit tests are left intentionnally untouched as they test some internals of DPDK.

Comments welcome.

Changes since RFC v2:
- added check for additions of include .*_(driver|pmd)\.h in apps and examples,
- dropped legacy/debug testpmd commands to read PCI BAR0 registers,
- dropped patches on bbdev, ethdev, rawdev driver headers for now,
- reordered patches and separated changes per bus type to ease review,
- added more accessor for device,
- introduced rte_dev_bus_info to provide a Bus specific description of a device, a first use is for providing a PCI device vendor / device identifiers that are otherwise unavailable through a generic existing API,

Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples relying on PCI specific info,
- went on with masking rte_driver and rte_device too,

Signature · 409 lines
David Marchand

David Marchand (26):
  devtools: forbid inclusions of driver only headers
  common/mlx5: rework check on driver registration
  raw/ifpga: remove PCI bus accessor
  app/testpmd: drop PCI register commands
  kni: stop populating PCI info in examples
  examples/ethtool: prefer device name
  dev: hide debug messages in device iterator
  dev: move unrelated macros from header
  devargs: remove dependency on bus header
  build: export drivers headers
  bus/auxiliary: make driver-only headers private
  bus/dpaa: make driver-only headers private
  bus/fslmc: make driver-only headers private
  bus/ifpga: cleanup exported symbols
  bus/ifpga: make driver-only headers private
  bus/pci: make driver-only headers private
  bus/vdev: make driver-only headers private
  bus/vmbus: make driver-only headers private
  bus: move IOVA definition from header
  bus: introduce accessors
  bus: hide bus object
  dev: introduce driver accessors
  dev: hide driver object
  dev: introduce device accessors
  dev: provide Bus specific information
  dev: hide device object

 app/proc-info/main.c                          |   6 +-
 app/test-compress-perf/comp_perf_options.h    |   2 +
 app/test-pmd/cmdline.c                        | 339 +-----------------
 app/test-pmd/config.c                         | 222 +-----------
 app/test-pmd/csumonly.c                       |   1 -
 app/test-pmd/flowgen.c                        |   1 -
 app/test-pmd/iofwd.c                          |   1 -
 app/test-pmd/macfwd.c                         |   1 -
 app/test-pmd/macswap.c                        |   1 -
 app/test-pmd/meson.build                      |   2 +-
 app/test-pmd/parameters.c                     |   1 -
 app/test-pmd/rxonly.c                         |   1 -
 app/test-pmd/testpmd.c                        |  12 +-
 app/test-pmd/testpmd.h                        |  72 +---
 app/test-pmd/txonly.c                         |   1 -
 app/test/test_devargs.c                       |   6 +-
 app/test/test_kni.c                           |  30 --
 app/test/test_vdev.c                          |   3 +-
 app/test/virtual_pmd.c                        |   2 +-
 devtools/checkpatches.sh                      |   8 +
 doc/guides/rel_notes/deprecation.rst          |  16 -
 doc/guides/rel_notes/release_22_11.rst        |  15 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  81 -----
 drivers/baseband/acc100/rte_acc100_pmd.c      |   4 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |   4 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |   4 +-
 drivers/baseband/la12xx/bbdev_la12xx.c        |   2 +-
 drivers/baseband/null/bbdev_null.c            |   2 +-
 .../baseband/turbo_sw/bbdev_turbo_software.c  |   2 +-
 drivers/bus/auxiliary/auxiliary_common.c      |   5 +-
 drivers/bus/auxiliary/auxiliary_params.c      |   5 +-
 ...bus_auxiliary.h => bus_auxiliary_driver.h} |  26 +-
 drivers/bus/auxiliary/linux/auxiliary.c       |   2 -
 drivers/bus/auxiliary/meson.build             |   4 +-
 drivers/bus/auxiliary/private.h               |  30 +-
 drivers/bus/auxiliary/version.map             |   3 +-
 drivers/bus/dpaa/base/qbman/qman.c            |   2 +-
 .../{rte_dpaa_bus.h => bus_dpaa_driver.h}     |  25 +-
 drivers/bus/dpaa/dpaa_bus.c                   |  22 +-
 .../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} |  30 +-
 drivers/bus/fslmc/fslmc_bus.c                 |  14 +-
 drivers/bus/fslmc/fslmc_vfio.c                |   5 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c      |   4 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpci.c      |   4 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |   4 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dprc.c      |   4 +-
 drivers/bus/fslmc/private.h                   |  27 ++
 .../{rte_bus_ifpga.h => bus_ifpga_driver.h}   |  18 +-
 drivers/bus/ifpga/ifpga_bus.c                 |  21 +-
 drivers/bus/ifpga/ifpga_common.c              |  88 -----
 drivers/bus/ifpga/ifpga_common.h              |  54 ++-
 drivers/bus/ifpga/meson.build                 |   4 +-
 drivers/bus/ifpga/version.map                 |   4 +-
 drivers/bus/pci/bsd/pci.c                     |  11 +-
 drivers/bus/pci/bus_pci_driver.h              | 201 +++++++++++
 drivers/bus/pci/linux/pci.c                   |  27 +-
 drivers/bus/pci/linux/pci_vfio.c              |   2 +-
 drivers/bus/pci/meson.build                   |   1 +
 drivers/bus/pci/pci_common.c                  |  21 +-
 drivers/bus/pci/pci_params.c                  |   4 +-
 drivers/bus/pci/private.h                     |  29 +-
 drivers/bus/pci/rte_bus_pci.h                 | 201 +----------
 drivers/bus/pci/version.map                   |  11 +-
 drivers/bus/pci/windows/pci.c                 |   7 +-
 drivers/bus/pci/windows/pci_netuio.c          |   1 +
 drivers/bus/vdev/bus_vdev_driver.h            | 151 ++++++++
 drivers/bus/vdev/meson.build                  |   1 +
 drivers/bus/vdev/rte_bus_vdev.h               | 134 -------
 drivers/bus/vdev/vdev.c                       |  12 +-
 drivers/bus/vdev/vdev_params.c                |   3 +-
 drivers/bus/vdev/version.map                  |   9 +-
 drivers/bus/vmbus/bus_vmbus_driver.h          | 106 ++++++
 drivers/bus/vmbus/linux/vmbus_uio.c           |   1 -
 drivers/bus/vmbus/meson.build                 |   1 +
 drivers/bus/vmbus/private.h                   |  20 +-
 drivers/bus/vmbus/rte_bus_vmbus.h             | 104 ------
 drivers/bus/vmbus/version.map                 |   9 +-
 drivers/bus/vmbus/vmbus_bufring.c             |   1 -
 drivers/bus/vmbus/vmbus_channel.c             |   1 -
 drivers/bus/vmbus/vmbus_common.c              |   3 -
 drivers/bus/vmbus/vmbus_common_uio.c          |   1 -
 drivers/common/cnxk/roc_platform.h            |   2 +-
 .../common/mlx5/linux/mlx5_common_auxiliary.c |  12 +-
 drivers/common/mlx5/linux/mlx5_common_os.c    |   4 +-
 drivers/common/mlx5/linux/mlx5_common_os.h    |   2 +-
 drivers/common/mlx5/mlx5_common.h             |   2 +-
 drivers/common/mlx5/mlx5_common_pci.c         |   3 +-
 drivers/common/mlx5/mlx5_common_private.h     |   2 +-
 drivers/common/mlx5/windows/mlx5_common_os.c  |   2 +-
 drivers/common/qat/dev/qat_dev_gen4.c         |   2 +-
 drivers/common/qat/qat_device.c               |   1 +
 drivers/common/qat/qat_device.h               |   2 +-
 drivers/common/qat/qat_qp.c                   |   4 +-
 drivers/common/sfc_efx/sfc_efx.h              |   2 +-
 drivers/compress/isal/isal_compress_pmd.c     |   2 +-
 drivers/compress/mlx5/mlx5_compress.c         |   2 +-
 drivers/compress/octeontx/otx_zip.h           |   2 +-
 drivers/compress/qat/qat_comp.c               |   2 +-
 drivers/compress/qat/qat_comp_pmd.c           |   1 +
 drivers/compress/zlib/zlib_pmd.c              |   2 +-
 drivers/compress/zlib/zlib_pmd_ops.c          |   1 +
 drivers/crypto/armv8/rte_armv8_pmd.c          |   2 +-
 drivers/crypto/bcmfs/bcmfs_device.h           |   2 +-
 drivers/crypto/bcmfs/bcmfs_qp.c               |   2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |   2 +-
 drivers/crypto/caam_jr/caam_jr.c              |   2 +-
 drivers/crypto/ccp/ccp_dev.h                  |   2 +-
 drivers/crypto/ccp/ccp_pci.h                  |   2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |   6 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |   4 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |   4 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |   4 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c   |   2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |   4 +-
 drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c     |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.c    |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.h    |   2 +-
 drivers/crypto/ipsec_mb/pmd_kasumi.c          |   2 +-
 drivers/crypto/mlx5/mlx5_crypto.c             |   2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |   2 +-
 drivers/crypto/nitrox/nitrox_device.h         |   2 +-
 drivers/crypto/null/null_crypto_pmd.c         |   2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |   2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |   2 +-
 drivers/crypto/qat/qat_sym.c                  |   2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |   1 +
 drivers/crypto/scheduler/scheduler_pmd.c      |   2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |   2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |   2 +-
 drivers/crypto/virtio/virtio_pci.c            |   1 -
 drivers/crypto/virtio/virtio_pci.h            |   2 +-
 drivers/dma/cnxk/cnxk_dmadev.c                |   3 +-
 drivers/dma/dpaa/dpaa_qdma.c                  |   2 +-
 drivers/dma/dpaa2/dpaa2_qdma.c                |   2 +-
 drivers/dma/hisilicon/hisi_dmadev.c           |   2 +-
 drivers/dma/idxd/idxd_bus.c                   |   3 +-
 drivers/dma/idxd/idxd_pci.c                   |   2 +-
 drivers/dma/ioat/ioat_dmadev.c                |   2 +-
 drivers/dma/skeleton/skeleton_dmadev.c        |   2 +-
 drivers/event/dlb2/dlb2.c                     |   2 +-
 drivers/event/dlb2/pf/dlb2_main.h             |   2 +-
 drivers/event/dlb2/pf/dlb2_pf.c               |   4 +-
 drivers/event/dpaa/dpaa_eventdev.c            |   4 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |   6 +-
 drivers/event/dpaa2/dpaa2_eventdev_selftest.c |   4 +-
 drivers/event/dpaa2/dpaa2_hw_dpcon.c          |   4 +-
 drivers/event/octeontx/ssovf_evdev.c          |   4 +-
 drivers/event/octeontx/ssovf_evdev_selftest.c |   2 +-
 drivers/event/octeontx/ssovf_probe.c          |   2 +-
 drivers/event/octeontx/timvf_probe.c          |   2 +-
 drivers/event/opdl/opdl_evdev.c               |   2 +-
 drivers/event/opdl/opdl_evdev_init.c          |   2 +-
 drivers/event/opdl/opdl_test.c                |   2 +-
 drivers/event/skeleton/skeleton_eventdev.c    |   4 +-
 drivers/event/sw/sw_evdev.c                   |   2 +-
 drivers/event/sw/sw_evdev_selftest.c          |   2 +-
 drivers/gpu/cuda/cuda.c                       |   4 +-
 drivers/mempool/cnxk/cnxk_mempool.c           |   2 +-
 drivers/mempool/dpaa/dpaa_mempool.h           |   2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |   2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |   2 +-
 drivers/meson.build                           |   4 +
 drivers/net/af_packet/rte_eth_af_packet.c     |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |   4 +-
 drivers/net/ark/ark_ethdev.c                  |   2 +-
 drivers/net/ark/ark_global.h                  |   2 +-
 drivers/net/avp/avp_ethdev.c                  |   4 +-
 drivers/net/axgbe/axgbe_common.h              |   2 +-
 drivers/net/bnx2x/bnx2x.h                     |   2 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |   2 +-
 drivers/net/bnxt/bnxt.h                       |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c               |   2 +-
 drivers/net/bonding/rte_eth_bond_api.c        |   2 +-
 drivers/net/bonding/rte_eth_bond_args.c       |   3 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |   2 +-
 drivers/net/cxgbe/base/adapter.h              |   2 +-
 drivers/net/cxgbe/base/t4_hw.c                |   2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |   4 +-
 drivers/net/cxgbe/cxgbe_main.c                |   2 +-
 drivers/net/cxgbe/sge.c                       |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   2 +-
 drivers/net/dpaa/dpaa_rxtx.c                  |   2 +-
 drivers/net/dpaa2/base/dpaa2_hw_dpni.c        |   2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   4 +-
 drivers/net/dpaa2/dpaa2_ethdev.h              |   2 +-
 drivers/net/dpaa2/dpaa2_mux.c                 |   2 +-
 drivers/net/dpaa2/dpaa2_ptp.c                 |   2 +-
 drivers/net/dpaa2/dpaa2_recycle.c             |   4 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |   4 +-
 drivers/net/dpaa2/dpaa2_sparser.c             |   2 +-
 drivers/net/e1000/em_ethdev.c                 |   4 +-
 drivers/net/e1000/em_rxtx.c                   |   2 +-
 drivers/net/e1000/igb_ethdev.c                |   4 +-
 drivers/net/e1000/igb_flow.c                  |   2 +-
 drivers/net/e1000/igb_pf.c                    |   2 +-
 drivers/net/ena/ena_ethdev.h                  |   4 +-
 drivers/net/enic/base/vnic_dev.h              |   2 +-
 drivers/net/enic/enic_ethdev.c                |   4 +-
 drivers/net/enic/enic_main.c                  |   2 +-
 drivers/net/enic/enic_vf_representor.c        |   4 +-
 drivers/net/failsafe/failsafe.c               |   3 +-
 drivers/net/failsafe/failsafe_eal.c           |   1 +
 drivers/net/failsafe/failsafe_private.h       |   2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   2 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c      |   2 +-
 drivers/net/hinic/base/hinic_pmd_hwif.c       |   2 +-
 drivers/net/hinic/base/hinic_pmd_nicio.c      |   2 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   2 +-
 drivers/net/hns3/hns3_common.c                |   2 +-
 drivers/net/hns3/hns3_ethdev.c                |   2 +-
 drivers/net/hns3/hns3_rxtx.c                  |   2 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/i40e/i40e_vf_representor.c        |   2 +-
 drivers/net/iavf/iavf_ethdev.c                |   2 +-
 drivers/net/iavf/iavf_vchnl.c                 |   2 +-
 drivers/net/ice/ice_dcf.c                     |   2 +-
 drivers/net/ice/ice_dcf_ethdev.c              |   2 +-
 drivers/net/igc/igc_ethdev.c                  |   2 +-
 drivers/net/ionic/ionic.h                     |   2 +-
 drivers/net/ionic/ionic_ethdev.c              |   2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |   4 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h            |   4 +-
 drivers/net/ipn3ke/ipn3ke_flow.c              |   2 +-
 drivers/net/ipn3ke/ipn3ke_representor.c       |   4 +-
 drivers/net/ipn3ke/ipn3ke_tm.c                |   4 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   4 +-
 drivers/net/ixgbe/ixgbe_ethdev.h              |   2 +-
 drivers/net/ixgbe/ixgbe_flow.c                |   2 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c             |   1 +
 drivers/net/kni/rte_eth_kni.c                 |   2 +-
 drivers/net/liquidio/lio_ethdev.c             |   1 +
 drivers/net/memif/memif_socket.c              |   2 +-
 drivers/net/memif/rte_eth_memif.c             |   2 +-
 drivers/net/mlx4/mlx4.c                       |   2 +-
 drivers/net/mlx4/mlx4_ethdev.c                |   2 +-
 drivers/net/mlx5/linux/mlx5_ethdev_os.c       |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c              |   5 +-
 drivers/net/mlx5/mlx5.c                       |   2 +-
 drivers/net/mlx5/mlx5_ethdev.c                |   2 +-
 drivers/net/mlx5/mlx5_flow_dv.c               |   2 +-
 drivers/net/mlx5/mlx5_txq.c                   |   2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |   2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |   2 +-
 drivers/net/netvsc/hn_ethdev.c                |   5 +-
 drivers/net/netvsc/hn_nvs.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   4 +-
 drivers/net/netvsc/hn_rxtx.c                  |   4 +-
 drivers/net/netvsc/hn_vf.c                    |   4 +-
 drivers/net/nfp/nfp_common.c                  |   2 +-
 drivers/net/nfp/nfp_ethdev.c                  |   2 +-
 drivers/net/ngbe/base/ngbe_osdep.h            |   2 +-
 drivers/net/ngbe/ngbe_pf.c                    |   2 +-
 drivers/net/null/rte_eth_null.c               |   2 +-
 drivers/net/octeontx/base/octeontx_pkivf.c    |   2 +-
 drivers/net/octeontx/base/octeontx_pkovf.c    |   2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |   4 +-
 drivers/net/pcap/pcap_ethdev.c                |   2 +-
 drivers/net/pfe/pfe_ethdev.c                  |   2 +-
 drivers/net/qede/base/bcm_osal.h              |   2 +-
 drivers/net/qede/qede_ethdev.h                |   2 +-
 drivers/net/ring/rte_eth_ring.c               |   2 +-
 drivers/net/sfc/sfc.h                         |   2 +-
 drivers/net/sfc/sfc_ethdev.c                  |   4 +-
 drivers/net/sfc/sfc_sriov.c                   |   2 +-
 drivers/net/sfc/sfc_sw_stats.c                |   2 +-
 drivers/net/sfc/sfc_sw_stats.h                |   2 +-
 drivers/net/softnic/rte_eth_softnic.c         |   2 +-
 drivers/net/tap/rte_eth_tap.c                 |   2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |   4 +-
 drivers/net/txgbe/txgbe_ethdev.h              |   2 +-
 drivers/net/txgbe/txgbe_flow.c                |   2 +-
 drivers/net/txgbe/txgbe_pf.c                  |   2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c         |   6 +-
 drivers/net/vhost/rte_eth_vhost.c             |   2 +-
 drivers/net/virtio/virtio_ethdev.c            |   2 +-
 drivers/net/virtio/virtio_pci.c               |   2 +-
 drivers/net/virtio/virtio_pci.h               |   2 +-
 drivers/net/virtio/virtio_pci_ethdev.c        |   4 +-
 drivers/net/virtio/virtio_user_ethdev.c       |   2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   4 +-
 drivers/raw/cnxk_bphy/cnxk_bphy.c             |   4 +-
 drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c         |   2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy_irq.c         |   2 +-
 drivers/raw/cnxk_gpio/cnxk_gpio.c             |   2 +-
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c         |   2 +-
 drivers/raw/ifpga/afu_pmd_core.h              |   2 +-
 drivers/raw/ifpga/afu_pmd_he_hssi.c           |   4 +-
 drivers/raw/ifpga/afu_pmd_he_lpbk.c           |   4 +-
 drivers/raw/ifpga/afu_pmd_he_mem.c            |   4 +-
 drivers/raw/ifpga/afu_pmd_n3000.c             |   4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  15 +-
 drivers/raw/ifpga/ifpga_rawdev.h              |   1 -
 drivers/raw/ifpga/rte_pmd_ifpga.c             |   8 +-
 drivers/raw/ifpga/rte_pmd_ifpga.h             |  10 -
 drivers/raw/ifpga/version.map                 |   1 -
 drivers/raw/ioat/idxd_bus.c                   |   2 +-
 drivers/raw/ioat/idxd_pci.c                   |   2 +-
 drivers/raw/ioat/ioat_rawdev.c                |   2 +-
 drivers/raw/ntb/ntb.c                         |   2 +-
 drivers/raw/ntb/ntb_hw_intel.c                |   2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |   4 +-
 drivers/raw/skeleton/skeleton_rawdev_test.c   |   4 +-
 drivers/regex/mlx5/mlx5_regex.c               |   2 +-
 drivers/regex/mlx5/mlx5_regex_control.c       |   2 +-
 drivers/regex/mlx5/mlx5_regex_fastpath.c      |   2 +-
 drivers/vdpa/ifc/base/ifcvf_osdep.h           |   2 +-
 drivers/vdpa/ifc/ifcvf_vdpa.c                 |   2 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |   2 +-
 drivers/vdpa/sfc/sfc_vdpa.h                   |   2 +-
 examples/ethtool/lib/rte_ethtool.c            |  17 +-
 examples/ip_pipeline/kni.c                    |  10 -
 examples/l3fwd/l3fwd_em.c                     |   4 +-
 examples/l3fwd/l3fwd_fib.c                    |   8 +-
 examples/l3fwd/l3fwd_lpm.c                    |   4 +-
 examples/multi_process/hotplug_mp/commands.c  |   6 +-
 examples/vdpa/main.c                          |  16 +-
 lib/compressdev/rte_compressdev.c             |   2 +
 lib/compressdev/rte_compressdev_pmd.c         |   1 +
 lib/compressdev/rte_compressdev_pmd.h         |   1 +
 lib/cryptodev/cryptodev_pmd.c                 |   2 +
 lib/cryptodev/cryptodev_pmd.h                 |   1 +
 lib/cryptodev/rte_cryptodev.c                 |   2 +-
 lib/dmadev/rte_dmadev.c                       |   1 +
 lib/dmadev/rte_dmadev_pmd.h                   |   2 +-
 lib/eal/common/eal_common_bus.c               |  28 +-
 lib/eal/common/eal_common_dev.c               |  53 ++-
 lib/eal/common/eal_common_devargs.c           |   2 +-
 lib/eal/common/eal_private.h                  |   2 +-
 lib/eal/common/eal_thread.h                   |   1 +
 lib/eal/common/hotplug_mp.c                   |   1 +
 lib/eal/include/bus_driver.h                  | 296 +++++++++++++++
 lib/eal/include/dev_driver.h                  |  41 +++
 lib/eal/include/meson.build                   |   5 +
 lib/eal/include/rte_bus.h                     | 290 +--------------
 lib/eal/include/rte_common.h                  |  11 +
 lib/eal/include/rte_dev.h                     | 108 ++++--
 lib/eal/include/rte_devargs.h                 |   4 +-
 lib/eal/include/rte_eal.h                     |  15 +-
 lib/eal/include/rte_lcore.h                   |   2 +
 lib/eal/linux/eal_dev.c                       |   2 +-
 lib/eal/version.map                           |  12 +-
 lib/eal/windows/eal.c                         |   1 +
 lib/ethdev/ethdev_driver.c                    |   1 +
 lib/ethdev/ethdev_driver.h                    |   1 +
 lib/ethdev/ethdev_pci.h                       |   3 +-
 lib/ethdev/ethdev_vdev.h                      |   2 +-
 lib/ethdev/rte_ethdev.c                       |   1 +
 lib/ethdev/rte_ethdev.h                       |   2 +-
 lib/eventdev/eventdev_pmd.h                   |   2 +-
 lib/eventdev/eventdev_pmd_pci.h               |   2 +-
 lib/eventdev/eventdev_pmd_vdev.h              |   2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |   2 +-
 lib/eventdev/rte_event_eth_rx_adapter.c       |   2 +-
 lib/eventdev/rte_eventdev.c                   |   2 +-
 lib/gpudev/gpudev_driver.h                    |   2 +-
 lib/mempool/rte_mempool_ops.c                 |   3 +-
 lib/pcapng/rte_pcapng.c                       |   3 +-
 lib/rawdev/rte_rawdev.c                       |   2 +-
 lib/rawdev/rte_rawdev_pmd.h                   |   2 +-
 lib/regexdev/rte_regexdev.c                   |   1 +
 lib/security/rte_security.c                   |   3 +-
 lib/vhost/vdpa.c                              |   2 +
 364 files changed, 1700 insertions(+), 2215 deletions(-)
 rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)
 rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
 rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (88%)
 create mode 100644 drivers/bus/fslmc/private.h
 rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
 delete mode 100644 drivers/bus/ifpga/ifpga_common.c
 create mode 100644 drivers/bus/pci/bus_pci_driver.h
 create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
 create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
 create mode 100644 lib/eal/include/bus_driver.h
 create mode 100644 lib/eal/include/dev_driver.h

-- 
2.36.1
#55 lore raw

RFC v3 1/26 devtools: forbid inclusions of driver only headers

Let's be good citizens and enforce not using driver only headers in our own examples.

---
 devtools/checkpatches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
devtools/checkpatches.sh +8 -0
index 1edc5810ad..0e82c01947 100755
@@ -142,6 +142,14 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# forbid inclusion of driver specific headers in apps and examples
+	awk -v FOLDERS='app examples' \
+		-v EXPRESSIONS='include.*_driver\\.h include.*_pmd\\.h' \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Using driver specific headers in applications' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	# SVG must be included with wildcard extension to allow conversion
 	awk -v FOLDERS='doc' \
 		-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
Signature · 1 line
2.36.1
#57 lore raw

RFC v3 2/26 common/mlx5: rework check on driver registration

In reply to David Marchand

Rely on a local flag rather than dereference a bus object. This will help next commits.

---
 drivers/common/mlx5/linux/mlx5_common_auxiliary.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/common/mlx5/linux/mlx5_common_auxiliary.c +8 -2
index 6584aeb18e..a182a8bdde 100644
@@ -179,14 +179,20 @@ static struct rte_auxiliary_driver mlx5_auxiliary_driver = {
 	.dma_unmap = mlx5_common_auxiliary_dma_unmap,
 };
 
+static bool mlx5_common_auxiliary_initialized;
+
 void mlx5_common_auxiliary_init(void)
 {
-	if (mlx5_auxiliary_driver.bus == NULL)
+	if (!mlx5_common_auxiliary_initialized) {
 		rte_auxiliary_register(&mlx5_auxiliary_driver);
+		mlx5_common_auxiliary_initialized = true;
+	}
 }
 
 RTE_FINI(mlx5_common_auxiliary_driver_finish)
 {
-	if (mlx5_auxiliary_driver.bus != NULL)
+	if (mlx5_common_auxiliary_initialized) {
 		rte_auxiliary_unregister(&mlx5_auxiliary_driver);
+		mlx5_common_auxiliary_initialized = false;
+	}
 }
Signature · 1 line
2.36.1
#58 lore raw

RFC v3 3/26 raw/ifpga: remove PCI bus accessor

In reply to David Marchand

There is no in-tree user for this accessor that returns the PCI bus object.
On the other hand, a bus object can be retrieved by name using rte_bus_find_by_name.
We can remove this driver specific API.

---
Changes since RFC v2:
- updated release notes,

---
 doc/guides/rel_notes/deprecation.rst   |  3 ---
 doc/guides/rel_notes/release_22_11.rst |  2 ++
 drivers/raw/ifpga/ifpga_rawdev.c       |  7 +------
 drivers/raw/ifpga/ifpga_rawdev.h       |  1 -
 drivers/raw/ifpga/rte_pmd_ifpga.c      |  6 ------
 drivers/raw/ifpga/rte_pmd_ifpga.h      | 10 ----------
 drivers/raw/ifpga/version.map          |  1 -
 7 files changed, 3 insertions(+), 27 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -3
index e7583cae4c..dba252067c 100644
@@ -228,9 +228,6 @@ Deprecation Notices
 * raw/dpaa2_cmdif: The ``dpaa2_cmdif`` rawdev driver will be deprecated
   in DPDK 22.11, as it is no longer in use, no active user known.
 
-* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` will be removed
-  in DPDK 22.11.
-
 * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
   functionality is provided through the new ``dmadev`` infrastructure.
   To continue to use hardware previously supported by the ``ioat`` rawdev driver,
doc/guides/rel_notes/release_22_11.rst +2 -0
index 8c021cf050..3cea3aa8eb 100644
@@ -84,6 +84,8 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
+
 
 ABI Changes
 -----------
drivers/raw/ifpga/ifpga_rawdev.c +1 -6
index 8c05302a65..78a7123528 100644
@@ -10,8 +10,8 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/epoll.h>
+
 #include <rte_log.h>
-#include <rte_bus.h>
 #include <rte_malloc.h>
 #include <rte_devargs.h>
 #include <rte_memcpy.h>
@@ -1888,11 +1888,6 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,
 	"port=<int> "
 	"afu_bts=<path>");
 
-struct rte_pci_bus *ifpga_get_pci_bus(void)
-{
-	return rte_ifpga_rawdev_pmd.bus;
-}
-
 int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
 	const char *file)
 {
drivers/raw/ifpga/ifpga_rawdev.h +0 -1
index 4c191190ca..0fb66cbaae 100644
@@ -91,7 +91,6 @@ int
 ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
 		int vec_start, rte_intr_callback_fn handler, void *arg);
 
-struct rte_pci_bus *ifpga_get_pci_bus(void);
 int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
 	const char *file);
 void ifpga_rawdev_cleanup(void);
drivers/raw/ifpga/rte_pmd_ifpga.c +0 -6
index 23146432c2..1ca248123b 100644
@@ -402,12 +402,6 @@ rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page)
 	return opae_mgr_reload(adapter->mgr, type, page);
 }
 
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void)
-{
-	return ifpga_get_pci_bus();
-}
-
 int
 rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
 {
drivers/raw/ifpga/rte_pmd_ifpga.h +0 -10
index 3fa5d3435a..791543f2cd 100644
@@ -220,16 +220,6 @@ rte_pmd_ifpga_reboot_try(uint16_t dev_id);
 int
 rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
 
-/**
- * Get PCI bus the Intel FPGA driver register to
- *
- * @return
- *   - (valid pointer) if successful.
- *   - (NULL) if the Intel FPGA driver is not registered to any PCI bus.
- */
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void);
-
 /**
  * Perform PR (partial reconfiguration) on specified Intel FPGA device
  *
drivers/raw/ifpga/version.map +0 -1
index f5c3959b7f..916da8a4f2 100644
@@ -3,7 +3,6 @@ DPDK_23 {
 
 	rte_pmd_ifpga_cleanup;
 	rte_pmd_ifpga_get_dev_id;
-	rte_pmd_ifpga_get_pci_bus;
 	rte_pmd_ifpga_get_phy_info;
 	rte_pmd_ifpga_get_property;
 	rte_pmd_ifpga_get_rsu_status;
Signature · 1 line
2.36.1
Acked-by on v3 3/26
#59 lore raw

RE: [RFC v3 03/26] raw/ifpga: remove PCI bus accessor

Hi,

Quoted 18 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 23:26
To: [email protected]
Cc: Ray Kinsella <[email protected]>; Xu, Rosen <[email protected]>; Zhang, Tianfei <[email protected]>
Subject: [RFC v3 03/26] raw/ifpga: remove PCI bus accessor

There is no in-tree user for this accessor that returns the PCI bus object. On the other hand, a bus object can be retrieved by name using rte_bus_find_by_name.
We can remove this driver specific API.

---
Changes since RFC v2:
- updated release notes,

Quoted 10 lines
---
 doc/guides/rel_notes/deprecation.rst   |  3 ---
 doc/guides/rel_notes/release_22_11.rst |  2 ++
 drivers/raw/ifpga/ifpga_rawdev.c       |  7 +------
 drivers/raw/ifpga/ifpga_rawdev.h       |  1 -
 drivers/raw/ifpga/rte_pmd_ifpga.c      |  6 ------
 drivers/raw/ifpga/rte_pmd_ifpga.h      | 10 ----------
 drivers/raw/ifpga/version.map          |  1 -
 7 files changed, 3 insertions(+), 27 deletions(-)
#60 lore raw

RFC v3 4/26 app/testpmd: drop PCI register commands

In reply to David Marchand

Those commands date back to the early stages of DPDK when only PCI devices were supported.
At the time, developers may have used those commands to help in debugging their buggy^Wwork in progress drivers.

Removing them, we can drop the dependency on the PCI bus and library and make testpmd bus agnostic.

---
 app/test-pmd/cmdline.c                      | 339 +-------------------
 app/test-pmd/config.c                       | 195 -----------
 app/test-pmd/csumonly.c                     |   1 -
 app/test-pmd/flowgen.c                      |   1 -
 app/test-pmd/iofwd.c                        |   1 -
 app/test-pmd/macfwd.c                       |   1 -
 app/test-pmd/macswap.c                      |   1 -
 app/test-pmd/meson.build                    |   2 +-
 app/test-pmd/parameters.c                   |   1 -
 app/test-pmd/rxonly.c                       |   1 -
 app/test-pmd/testpmd.c                      |   1 -
 app/test-pmd/testpmd.h                      |  72 +----
 app/test-pmd/txonly.c                       |   1 -
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  81 -----
 14 files changed, 4 insertions(+), 694 deletions(-)
app/test-pmd/cmdline.c +2 -337
index b4fe9dfb17..4697b7c494 100644
@@ -28,7 +28,6 @@
 #include <rte_ring.h>
 #include <rte_mempool.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
@@ -89,7 +88,6 @@ static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
 		"information.\n"
 		"    help config                     : Configuration information.\n"
 		"    help ports                      : Configuring ports.\n"
-		"    help registers                  : Reading and setting port registers.\n"
 		"    help filters                    : Filters configuration help.\n"
 		"    help traffic_management         : Traffic Management commands.\n"
 		"    help devices                    : Device related commands.\n"
@@ -799,34 +797,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 		);
 	}
 
-	if (show_all || !strcmp(res->section, "registers")) {
-
-		cmdline_printf(
-			cl,
-			"\n"
-			"Registers:\n"
-			"----------\n\n"
-
-			"read reg (port_id) (address)\n"
-			"    Display value of a port register.\n\n"
-
-			"read regfield (port_id) (address) (bit_x) (bit_y)\n"
-			"    Display a port register bit field.\n\n"
-
-			"read regbit (port_id) (address) (bit_x)\n"
-			"    Display a single port register bit.\n\n"
-
-			"write reg (port_id) (address) (value)\n"
-			"    Set value of a port register.\n\n"
-
-			"write regfield (port_id) (address) (bit_x) (bit_y)"
-			" (value)\n"
-			"    Set bit field of a port register.\n\n"
-
-			"write regbit (port_id) (address) (bit_x) (value)\n"
-			"    Set single bit value of a port register.\n\n"
-		);
-	}
 	if (show_all || !strcmp(res->section, "filters")) {
 
 		cmdline_printf(
@@ -1077,13 +1047,13 @@ static cmdline_parse_token_string_t cmd_help_long_help =
 
 static cmdline_parse_token_string_t cmd_help_long_section =
 	TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section,
-		"all#control#display#config#ports#registers#"
+		"all#control#display#config#ports#"
 		"filters#traffic_management#devices#drivers");
 
 static cmdline_parse_inst_t cmd_help_long = {
 	.f = cmd_help_long_parsed,
 	.data = NULL,
-	.help_str = "help all|control|display|config|ports|register|"
+	.help_str = "help all|control|display|config|ports|"
 		"filters|traffic_management|devices|drivers: "
 		"Show help",
 	.tokens = {
@@ -7390,305 +7360,6 @@ static cmdline_parse_inst_t cmd_showfwdall = {
 	},
 };
 
-/* *** READ PORT REGISTER *** */
-struct cmd_read_reg_result {
-	cmdline_fixed_string_t read;
-	cmdline_fixed_string_t reg;
-	portid_t port_id;
-	uint32_t reg_off;
-};
-
-static void
-cmd_read_reg_parsed(void *parsed_result,
-		    __rte_unused struct cmdline *cl,
-		    __rte_unused void *data)
-{
-	struct cmd_read_reg_result *res = parsed_result;
-	port_reg_display(res->port_id, res->reg_off);
-}
-
-static cmdline_parse_token_string_t cmd_read_reg_read =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_result, read, "read");
-static cmdline_parse_token_string_t cmd_read_reg_reg =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_result, reg, "reg");
-static cmdline_parse_token_num_t cmd_read_reg_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_result, port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_read_reg_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_result, reg_off, RTE_UINT32);
-
-static cmdline_parse_inst_t cmd_read_reg = {
-	.f = cmd_read_reg_parsed,
-	.data = NULL,
-	.help_str = "read reg <port_id> <reg_off>",
-	.tokens = {
-		(void *)&cmd_read_reg_read,
-		(void *)&cmd_read_reg_reg,
-		(void *)&cmd_read_reg_port_id,
-		(void *)&cmd_read_reg_reg_off,
-		NULL,
-	},
-};
-
-/* *** READ PORT REGISTER BIT FIELD *** */
-struct cmd_read_reg_bit_field_result {
-	cmdline_fixed_string_t read;
-	cmdline_fixed_string_t regfield;
-	portid_t port_id;
-	uint32_t reg_off;
-	uint8_t bit1_pos;
-	uint8_t bit2_pos;
-};
-
-static void
-cmd_read_reg_bit_field_parsed(void *parsed_result,
-			      __rte_unused struct cmdline *cl,
-			      __rte_unused void *data)
-{
-	struct cmd_read_reg_bit_field_result *res = parsed_result;
-	port_reg_bit_field_display(res->port_id, res->reg_off,
-				   res->bit1_pos, res->bit2_pos);
-}
-
-static cmdline_parse_token_string_t cmd_read_reg_bit_field_read =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_bit_field_result, read,
-				 "read");
-static cmdline_parse_token_string_t cmd_read_reg_bit_field_regfield =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_bit_field_result,
-				 regfield, "regfield");
-static cmdline_parse_token_num_t cmd_read_reg_bit_field_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_field_result, port_id,
-			      RTE_UINT16);
-static cmdline_parse_token_num_t cmd_read_reg_bit_field_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_field_result, reg_off,
-			      RTE_UINT32);
-static cmdline_parse_token_num_t cmd_read_reg_bit_field_bit1_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_field_result, bit1_pos,
-			      RTE_UINT8);
-static cmdline_parse_token_num_t cmd_read_reg_bit_field_bit2_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_field_result, bit2_pos,
-			      RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_read_reg_bit_field = {
-	.f = cmd_read_reg_bit_field_parsed,
-	.data = NULL,
-	.help_str = "read regfield <port_id> <reg_off> <bit_x> <bit_y>: "
-	"Read register bit field between bit_x and bit_y included",
-	.tokens = {
-		(void *)&cmd_read_reg_bit_field_read,
-		(void *)&cmd_read_reg_bit_field_regfield,
-		(void *)&cmd_read_reg_bit_field_port_id,
-		(void *)&cmd_read_reg_bit_field_reg_off,
-		(void *)&cmd_read_reg_bit_field_bit1_pos,
-		(void *)&cmd_read_reg_bit_field_bit2_pos,
-		NULL,
-	},
-};
-
-/* *** READ PORT REGISTER BIT *** */
-struct cmd_read_reg_bit_result {
-	cmdline_fixed_string_t read;
-	cmdline_fixed_string_t regbit;
-	portid_t port_id;
-	uint32_t reg_off;
-	uint8_t bit_pos;
-};
-
-static void
-cmd_read_reg_bit_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_read_reg_bit_result *res = parsed_result;
-	port_reg_bit_display(res->port_id, res->reg_off, res->bit_pos);
-}
-
-static cmdline_parse_token_string_t cmd_read_reg_bit_read =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_bit_result, read, "read");
-static cmdline_parse_token_string_t cmd_read_reg_bit_regbit =
-	TOKEN_STRING_INITIALIZER(struct cmd_read_reg_bit_result,
-				 regbit, "regbit");
-static cmdline_parse_token_num_t cmd_read_reg_bit_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_result, port_id,
-				 RTE_UINT16);
-static cmdline_parse_token_num_t cmd_read_reg_bit_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_result, reg_off,
-				 RTE_UINT32);
-static cmdline_parse_token_num_t cmd_read_reg_bit_bit_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_read_reg_bit_result, bit_pos,
-				 RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_read_reg_bit = {
-	.f = cmd_read_reg_bit_parsed,
-	.data = NULL,
-	.help_str = "read regbit <port_id> <reg_off> <bit_x>: 0 <= bit_x <= 31",
-	.tokens = {
-		(void *)&cmd_read_reg_bit_read,
-		(void *)&cmd_read_reg_bit_regbit,
-		(void *)&cmd_read_reg_bit_port_id,
-		(void *)&cmd_read_reg_bit_reg_off,
-		(void *)&cmd_read_reg_bit_bit_pos,
-		NULL,
-	},
-};
-
-/* *** WRITE PORT REGISTER *** */
-struct cmd_write_reg_result {
-	cmdline_fixed_string_t write;
-	cmdline_fixed_string_t reg;
-	portid_t port_id;
-	uint32_t reg_off;
-	uint32_t value;
-};
-
-static void
-cmd_write_reg_parsed(void *parsed_result,
-		     __rte_unused struct cmdline *cl,
-		     __rte_unused void *data)
-{
-	struct cmd_write_reg_result *res = parsed_result;
-	port_reg_set(res->port_id, res->reg_off, res->value);
-}
-
-static cmdline_parse_token_string_t cmd_write_reg_write =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_result, write, "write");
-static cmdline_parse_token_string_t cmd_write_reg_reg =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_result, reg, "reg");
-static cmdline_parse_token_num_t cmd_write_reg_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_result, port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_write_reg_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_result, reg_off, RTE_UINT32);
-static cmdline_parse_token_num_t cmd_write_reg_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_result, value, RTE_UINT32);
-
-static cmdline_parse_inst_t cmd_write_reg = {
-	.f = cmd_write_reg_parsed,
-	.data = NULL,
-	.help_str = "write reg <port_id> <reg_off> <reg_value>",
-	.tokens = {
-		(void *)&cmd_write_reg_write,
-		(void *)&cmd_write_reg_reg,
-		(void *)&cmd_write_reg_port_id,
-		(void *)&cmd_write_reg_reg_off,
-		(void *)&cmd_write_reg_value,
-		NULL,
-	},
-};
-
-/* *** WRITE PORT REGISTER BIT FIELD *** */
-struct cmd_write_reg_bit_field_result {
-	cmdline_fixed_string_t write;
-	cmdline_fixed_string_t regfield;
-	portid_t port_id;
-	uint32_t reg_off;
-	uint8_t bit1_pos;
-	uint8_t bit2_pos;
-	uint32_t value;
-};
-
-static void
-cmd_write_reg_bit_field_parsed(void *parsed_result,
-			       __rte_unused struct cmdline *cl,
-			       __rte_unused void *data)
-{
-	struct cmd_write_reg_bit_field_result *res = parsed_result;
-	port_reg_bit_field_set(res->port_id, res->reg_off,
-			  res->bit1_pos, res->bit2_pos, res->value);
-}
-
-static cmdline_parse_token_string_t cmd_write_reg_bit_field_write =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_bit_field_result, write,
-				 "write");
-static cmdline_parse_token_string_t cmd_write_reg_bit_field_regfield =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_bit_field_result,
-				 regfield, "regfield");
-static cmdline_parse_token_num_t cmd_write_reg_bit_field_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_field_result, port_id,
-			      RTE_UINT16);
-static cmdline_parse_token_num_t cmd_write_reg_bit_field_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_field_result, reg_off,
-			      RTE_UINT32);
-static cmdline_parse_token_num_t cmd_write_reg_bit_field_bit1_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_field_result, bit1_pos,
-			      RTE_UINT8);
-static cmdline_parse_token_num_t cmd_write_reg_bit_field_bit2_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_field_result, bit2_pos,
-			      RTE_UINT8);
-static cmdline_parse_token_num_t cmd_write_reg_bit_field_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_field_result, value,
-			      RTE_UINT32);
-
-static cmdline_parse_inst_t cmd_write_reg_bit_field = {
-	.f = cmd_write_reg_bit_field_parsed,
-	.data = NULL,
-	.help_str = "write regfield <port_id> <reg_off> <bit_x> <bit_y> "
-		"<reg_value>: "
-		"Set register bit field between bit_x and bit_y included",
-	.tokens = {
-		(void *)&cmd_write_reg_bit_field_write,
-		(void *)&cmd_write_reg_bit_field_regfield,
-		(void *)&cmd_write_reg_bit_field_port_id,
-		(void *)&cmd_write_reg_bit_field_reg_off,
-		(void *)&cmd_write_reg_bit_field_bit1_pos,
-		(void *)&cmd_write_reg_bit_field_bit2_pos,
-		(void *)&cmd_write_reg_bit_field_value,
-		NULL,
-	},
-};
-
-/* *** WRITE PORT REGISTER BIT *** */
-struct cmd_write_reg_bit_result {
-	cmdline_fixed_string_t write;
-	cmdline_fixed_string_t regbit;
-	portid_t port_id;
-	uint32_t reg_off;
-	uint8_t bit_pos;
-	uint8_t value;
-};
-
-static void
-cmd_write_reg_bit_parsed(void *parsed_result,
-			 __rte_unused struct cmdline *cl,
-			 __rte_unused void *data)
-{
-	struct cmd_write_reg_bit_result *res = parsed_result;
-	port_reg_bit_set(res->port_id, res->reg_off, res->bit_pos, res->value);
-}
-
-static cmdline_parse_token_string_t cmd_write_reg_bit_write =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_bit_result, write,
-				 "write");
-static cmdline_parse_token_string_t cmd_write_reg_bit_regbit =
-	TOKEN_STRING_INITIALIZER(struct cmd_write_reg_bit_result,
-				 regbit, "regbit");
-static cmdline_parse_token_num_t cmd_write_reg_bit_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_result, port_id,
-				 RTE_UINT16);
-static cmdline_parse_token_num_t cmd_write_reg_bit_reg_off =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_result, reg_off,
-				 RTE_UINT32);
-static cmdline_parse_token_num_t cmd_write_reg_bit_bit_pos =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_result, bit_pos,
-				 RTE_UINT8);
-static cmdline_parse_token_num_t cmd_write_reg_bit_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_write_reg_bit_result, value,
-				 RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_write_reg_bit = {
-	.f = cmd_write_reg_bit_parsed,
-	.data = NULL,
-	.help_str = "write regbit <port_id> <reg_off> <bit_x> 0|1: "
-		"0 <= bit_x <= 31",
-	.tokens = {
-		(void *)&cmd_write_reg_bit_write,
-		(void *)&cmd_write_reg_bit_regbit,
-		(void *)&cmd_write_reg_bit_port_id,
-		(void *)&cmd_write_reg_bit_reg_off,
-		(void *)&cmd_write_reg_bit_bit_pos,
-		(void *)&cmd_write_reg_bit_value,
-		NULL,
-	},
-};
-
 /* *** READ A RING DESCRIPTOR OF A PORT RX/TX QUEUE *** */
 struct cmd_read_rxd_txd_result {
 	cmdline_fixed_string_t read;
@@ -14222,12 +13893,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_priority_flow_control_set,
 	(cmdline_parse_inst_t *)&cmd_queue_priority_flow_control_set,
 	(cmdline_parse_inst_t *)&cmd_config_dcb,
-	(cmdline_parse_inst_t *)&cmd_read_reg,
-	(cmdline_parse_inst_t *)&cmd_read_reg_bit_field,
-	(cmdline_parse_inst_t *)&cmd_read_reg_bit,
-	(cmdline_parse_inst_t *)&cmd_write_reg,
-	(cmdline_parse_inst_t *)&cmd_write_reg_bit_field,
-	(cmdline_parse_inst_t *)&cmd_write_reg_bit,
 	(cmdline_parse_inst_t *)&cmd_read_rxd_txd,
 	(cmdline_parse_inst_t *)&cmd_stop,
 	(cmdline_parse_inst_t *)&cmd_mac_addr,
app/test-pmd/config.c +0 -195

207 lines not on this page · raw message

app/test-pmd/csumonly.c +0 -1
index 1a3fd9ce8a..144f28819c 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_ip.h>
app/test-pmd/flowgen.c +0 -1
index 1e01120ae9..fd6abc0f41 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_ip.h>
app/test-pmd/iofwd.c +0 -1
index 71849aaf96..8fafdec548 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
app/test-pmd/macfwd.c +0 -1
index 79c9241d00..beb220fbb4 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_ip.h>
app/test-pmd/macswap.c +0 -1
index acb0fd7fb4..4f8deb3382 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_ip.h>
app/test-pmd/meson.build +1 -1
index 74399178dd..8488efc138 100644
@@ -32,7 +32,7 @@ if dpdk_conf.has('RTE_HAS_JANSSON')
     ext_deps += jansson_dep
 endif
 
-deps += ['ethdev', 'cmdline', 'bus_pci']
+deps += ['ethdev', 'cmdline']
 if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
     deps += 'crypto_scheduler'
 endif
app/test-pmd/parameters.c +0 -1
index e3c9757f3f..c77624302f 100644
@@ -33,7 +33,6 @@
 #include <rte_branch_prediction.h>
 #include <rte_mempool.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
app/test-pmd/rxonly.c +0 -1
index 04457010f4..d528d4f34e 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
app/test-pmd/testpmd.c +0 -1
index addcbcac85..ee686393c5 100644
@@ -42,7 +42,6 @@
 #include <rte_mbuf.h>
 #include <rte_mbuf_pool_ops.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_dev.h>
app/test-pmd/testpmd.h +1 -71

96 lines not on this page · raw message

app/test-pmd/txonly.c +0 -1
index e1bc78b73d..021624952d 100644
@@ -28,7 +28,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_ip.h>
doc/guides/testpmd_app_ug/testpmd_funcs.rst +0 -81

93 lines not on this page · raw message

Signature · 1 line
2.36.1
Acked-by on v3 4/26
#61 lore raw

Re: [RFC v3 04/26] app/testpmd: drop PCI register commands

Quoted 10 lines · David Marchand

Those commands date back to the early stages of DPDK when only PCI devices were supported.
At the time, developers may have used those commands to help in debugging their buggy^Wwork in progress drivers.

Removing them, we can drop the dependency on the PCI bus and library and make testpmd bus agnostic.

---

This should really have been flagged in a deprecation notice in advance, I think, but there is no rule that mandates a deprecation process for testpmd changes. Therefore:

#62 lore raw

RFC v3 5/26 kni: stop populating PCI info in examples

In reply to David Marchand

addr and id fields are deprecated and are not used in the kni library. Stop populating them in the in-tree examples.

---
 app/test/test_kni.c        | 30 ------------------------------
 examples/ip_pipeline/kni.c | 10 ----------
 2 files changed, 40 deletions(-)
app/test/test_kni.c +0 -30
index 622315c8b1..4039da0b08 100644
@@ -25,7 +25,6 @@ test_kni(void)
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_ethdev.h>
-#include <rte_bus_pci.h>
 #include <rte_cycles.h>
 #include <rte_kni.h>
 
@@ -426,8 +425,6 @@ test_kni_processing(uint16_t port_id, struct rte_mempool *mp)
 	struct rte_kni_conf conf;
 	struct rte_eth_dev_info info;
 	struct rte_kni_ops ops;
-	const struct rte_pci_device *pci_dev;
-	const struct rte_bus *bus = NULL;
 
 	if (!mp)
 		return -1;
@@ -443,13 +440,6 @@ test_kni_processing(uint16_t port_id, struct rte_mempool *mp)
 		return -1;
 	}
 
-	if (info.device)
-		bus = rte_bus_find_by_device(info.device);
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(info.device);
-		conf.addr = pci_dev->addr;
-		conf.id = pci_dev->id;
-	}
 	snprintf(conf.name, sizeof(conf.name), TEST_KNI_PORT);
 
 	/* core id 1 configured for kernel thread */
@@ -545,8 +535,6 @@ test_kni(void)
 	struct rte_kni_conf conf;
 	struct rte_eth_dev_info info;
 	struct rte_kni_ops ops;
-	const struct rte_pci_device *pci_dev;
-	const struct rte_bus *bus;
 	FILE *fd;
 	DIR *dir;
 	char buf[16];
@@ -645,15 +633,6 @@ test_kni(void)
 		return -1;
 	}
 
-	if (info.device)
-		bus = rte_bus_find_by_device(info.device);
-	else
-		bus = NULL;
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(info.device);
-		conf.addr = pci_dev->addr;
-		conf.id = pci_dev->id;
-	}
 	conf.group_id = port_id;
 	conf.mbuf_size = MAX_PACKET_SZ;
 
@@ -689,15 +668,6 @@ test_kni(void)
 		goto fail;
 	}
 
-	if (info.device)
-		bus = rte_bus_find_by_device(info.device);
-	else
-		bus = NULL;
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(info.device);
-		conf.addr = pci_dev->addr;
-		conf.id = pci_dev->id;
-	}
 	conf.group_id = port_id;
 	conf.mbuf_size = MAX_PACKET_SZ;
 
examples/ip_pipeline/kni.c +0 -10
index a2d3331cb0..cd02c39478 100644
@@ -6,7 +6,6 @@
 #include <string.h>
 
 #include <rte_ethdev.h>
-#include <rte_bus_pci.h>
 #include <rte_string_fns.h>
 
 #include "kni.h"
@@ -107,8 +106,6 @@ kni_create(const char *name, struct kni_params *params)
 	struct mempool *mempool;
 	struct link *link;
 	struct rte_kni *k;
-	const struct rte_pci_device *pci_dev;
-	const struct rte_bus *bus = NULL;
 	int ret;
 
 	/* Check input params */
@@ -134,13 +131,6 @@ kni_create(const char *name, struct kni_params *params)
 	kni_conf.core_id = params->thread_id;
 	kni_conf.group_id = link->port_id;
 	kni_conf.mbuf_size = mempool->buffer_size;
-	if (dev_info.device)
-		bus = rte_bus_find_by_device(dev_info.device);
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(dev_info.device);
-		kni_conf.addr = pci_dev->addr;
-		kni_conf.id = pci_dev->id;
-	}
 
 	memset(&kni_ops, 0, sizeof(kni_ops));
 	kni_ops.port_id = link->port_id;
Signature · 1 line
2.36.1
#64 lore raw

RFC v3 6/26 examples/ethtool: prefer device name

In reply to David Marchand

Rely on the generic device name rather than restrict to only supporting PCI devices.

---
 examples/ethtool/lib/rte_ethtool.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
examples/ethtool/lib/rte_ethtool.c +2 -15
index ffaad96498..88dc917b73 100644
@@ -8,7 +8,6 @@
 #include <rte_version.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
-#include <rte_bus_pci.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -23,8 +22,6 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_dev_reg_info reg_info;
-	const struct rte_pci_device *pci_dev;
-	const struct rte_bus *bus = NULL;
 	int n;
 	int ret;
 
@@ -52,18 +49,8 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 	strlcpy(drvinfo->driver, dev_info.driver_name,
 		sizeof(drvinfo->driver));
 	strlcpy(drvinfo->version, rte_version(), sizeof(drvinfo->version));
-	/* TODO: replace bus_info by rte_devargs.name */
-	if (dev_info.device)
-		bus = rte_bus_find_by_device(dev_info.device);
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(dev_info.device);
-		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
-			"%04x:%02x:%02x.%x",
-			pci_dev->addr.domain, pci_dev->addr.bus,
-			pci_dev->addr.devid, pci_dev->addr.function);
-	} else {
-		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info), "N/A");
-	}
+	strlcpy(drvinfo->bus_info, dev_info.device->name,
+		sizeof(drvinfo->bus_info));
 
 	memset(&reg_info, 0, sizeof(reg_info));
 	rte_eth_dev_get_reg_info(port_id, &reg_info);
Signature · 1 line
2.36.1
#65 lore raw

Re: [RFC v3 06/26] examples/ethtool: prefer device name

Quoted 38 lines · David Marchand

Rely on the generic device name rather than restrict to only supporting PCI devices.

---
 examples/ethtool/lib/rte_ethtool.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
examples/ethtool/lib/rte_ethtool.c +0 -8
index ffaad96498..88dc917b73 100644
@@ -8,7 +8,6 @@
 #include <rte_version.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
-#include <rte_bus_pci.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -23,8 +22,6 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_dev_reg_info reg_info;
-	const struct rte_pci_device *pci_dev;
-	const struct rte_bus *bus = NULL;
 	int n;
 	int ret;
 
@@ -52,18 +49,8 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 	strlcpy(drvinfo->driver, dev_info.driver_name,
 		sizeof(drvinfo->driver));
 	strlcpy(drvinfo->version, rte_version(), sizeof(drvinfo->version));
-	/* TODO: replace bus_info by rte_devargs.name */
-	if (dev_info.device)
-		bus = rte_bus_find_by_device(dev_info.device);
-	if (bus && !strcmp(bus->name, "pci")) {
-		pci_dev = RTE_DEV_TO_PCI(dev_info.device);

examples/ethtool/lib/rte_ethtool.c rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo) · line 54

Quoted 10 lines
examples/ethtool/lib/rte_ethtool.c +2 -7
-		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
-			"%04x:%02x:%02x.%x",
-			pci_dev->addr.domain, pci_dev->addr.bus,
-			pci_dev->addr.devid, pci_dev->addr.function);
-	} else {
-		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info), "N/A");
-	}
+	strlcpy(drvinfo->bus_info, dev_info.device->name,
+		sizeof(drvinfo->bus_info));
 

Does the bus_info field need to be renamed now? It seems strange coping a device name to a bus info field.

#66 lore raw

Re: [RFC v3 06/26] examples/ethtool: prefer device name

Quoted 45 lines · Bruce Richardson
Quoted 43 lines · David Marchand

Rely on the generic device name rather than restrict to only supporting PCI devices.

---
 examples/ethtool/lib/rte_ethtool.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
examples/ethtool/lib/rte_ethtool.c +0 -13
index ffaad96498..88dc917b73 100644
@@ -8,7 +8,6 @@
 #include <rte_version.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
-#include <rte_bus_pci.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -23,8 +22,6 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 {
      struct rte_eth_dev_info dev_info;
      struct rte_dev_reg_info reg_info;
-     const struct rte_pci_device *pci_dev;
-     const struct rte_bus *bus = NULL;
      int n;
      int ret;
 
@@ -52,18 +49,8 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
      strlcpy(drvinfo->driver, dev_info.driver_name,
              sizeof(drvinfo->driver));
      strlcpy(drvinfo->version, rte_version(), sizeof(drvinfo->version));
-     /* TODO: replace bus_info by rte_devargs.name */
-     if (dev_info.device)
-             bus = rte_bus_find_by_device(dev_info.device);
-     if (bus && !strcmp(bus->name, "pci")) {
-             pci_dev = RTE_DEV_TO_PCI(dev_info.device);
-             snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
-                     "%04x:%02x:%02x.%x",
-                     pci_dev->addr.domain, pci_dev->addr.bus,
-                     pci_dev->addr.devid, pci_dev->addr.function);
-     } else {
Quoted 8 lines

examples/ethtool/lib/rte_ethtool.c rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo) · line 54

Quoted 5 lines
examples/ethtool/lib/rte_ethtool.c +2 -2
-             snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info), "N/A");
-     }
+     strlcpy(drvinfo->bus_info, dev_info.device->name,
+             sizeof(drvinfo->bus_info));
 

Does the bus_info field need to be renamed now? It seems strange coping a device name to a bus info field.

This bus_info name in the example is copied from ethtool.

So maybe it is the other way, and I should rename the new field I added in rte_device..

Signature · 1 line
David Marchand
#67 lore raw

RFC v3 7/26 dev: hide debug messages in device iterator

In reply to David Marchand

For any bus that does not support device iteration, rte_dev_iterator_init both returned an error code and logged an error message.
An application (like testpmd) that only wants to list devices, would have no choice but to inspect a bus object to avoid spewing error logs.

Make those log messages debug level, and remove the check in testpmd.

---
 app/test-pmd/config.c           | 4 ----
 lib/eal/common/eal_common_dev.c | 7 +++----
 2 files changed, 3 insertions(+), 8 deletions(-)
app/test-pmd/config.c +0 -4
index 3a53b616d8..bc73819183 100644
@@ -641,10 +641,6 @@ device_infos_display(const char *identifier)
 		if (identifier && da.bus != next)
 			continue;
 
-		/* Skip buses that don't have iterate method */
-		if (!next->dev_iterate)
-			continue;
-
 		snprintf(devstr, sizeof(devstr), "bus=%s", next->name);
 		RTE_DEV_FOREACH(dev, devstr, &dev_iter) {
 
lib/eal/common/eal_common_dev.c +3 -4
index 9d913e5478..b6f0392f30 100644
@@ -592,18 +592,17 @@ rte_dev_iterator_init(struct rte_dev_iterator *it,
 	 * one layer specified.
 	 */
 	if (bus == NULL && cls == NULL) {
-		RTE_LOG(ERR, EAL,
-			"Either bus or class must be specified.\n");
+		RTE_LOG(DEBUG, EAL, "Either bus or class must be specified.\n");
 		rte_errno = EINVAL;
 		goto get_out;
 	}
 	if (bus != NULL && bus->dev_iterate == NULL) {
-		RTE_LOG(ERR, EAL, "Bus %s not supported\n", bus->name);
+		RTE_LOG(DEBUG, EAL, "Bus %s not supported\n", bus->name);
 		rte_errno = ENOTSUP;
 		goto get_out;
 	}
 	if (cls != NULL && cls->dev_iterate == NULL) {
-		RTE_LOG(ERR, EAL, "Class %s not supported\n", cls->name);
+		RTE_LOG(DEBUG, EAL, "Class %s not supported\n", cls->name);
 		rte_errno = ENOTSUP;
 		goto get_out;
 	}
Signature · 1 line
2.36.1
Acked-by on v3 7/26
#68 lore raw

Re: [RFC v3 07/26] dev: hide debug messages in device iterator

Quoted 9 lines · David Marchand

For any bus that does not support device iteration, rte_dev_iterator_init both returned an error code and logged an error message.
An application (like testpmd) that only wants to list devices, would have no choice but to inspect a bus object to avoid spewing error logs.

Make those log messages debug level, and remove the check in testpmd.

---

#69 lore raw

RFC v3 8/26 dev: move unrelated macros from header

In reply to David Marchand

RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object and associated API.
Move them to rte_common.h and include it where needed.

---
 drivers/common/qat/qat_device.c                    |  1 +
 drivers/compress/qat/qat_comp_pmd.c                |  1 +
 drivers/crypto/scheduler/rte_cryptodev_scheduler.c |  1 +
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  1 +
 drivers/net/liquidio/lio_ethdev.c                  |  1 +
 lib/compressdev/rte_compressdev.c                  |  1 +
 lib/dmadev/rte_dmadev.c                            |  1 +
 lib/eal/include/rte_common.h                       | 11 +++++++++++
 lib/eal/include/rte_dev.h                          | 11 -----------
 lib/ethdev/ethdev_driver.c                         |  1 +
 lib/ethdev/ethdev_pci.h                            |  1 +
 lib/mempool/rte_mempool_ops.c                      |  1 +
 lib/regexdev/rte_regexdev.c                        |  1 +
 lib/security/rte_security.c                        |  1 +
 lib/vhost/vdpa.c                                   |  1 +
 15 files changed, 24 insertions(+), 11 deletions(-)
drivers/common/qat/qat_device.c +1 -0
index db4b087d2b..6583cf0554 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2018-2022 Intel Corporation
  */
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_devargs.h>
 #include <ctype.h>
drivers/compress/qat/qat_comp_pmd.c +1 -0
index dc8db84a68..e4cac159be 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2015-2022 Intel Corporation
  */
 
+#include <rte_common.h>
 #include <rte_malloc.h>
 
 #include "qat_comp.h"
drivers/crypto/scheduler/rte_cryptodev_scheduler.c +1 -0
index 1e0c4fe464..88c9b21cd8 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2017 Intel Corporation
  */
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
drivers/net/ixgbe/rte_pmd_ixgbe.c +1 -0
index 9729f8575f..8ae4d9b39a 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2010-2017 Intel Corporation
  */
 
+#include <rte_common.h>
 #include <ethdev_driver.h>
 
 #include "base/ixgbe_api.h"
drivers/net/liquidio/lio_ethdev.c +1 -0
index 90ffe31b9f..ccbd0ff849 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2017 Cavium, Inc
  */
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
lib/compressdev/rte_compressdev.c +1 -0
index 22c438f2dd..12469042f7 100644
@@ -6,6 +6,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_eal.h>
lib/dmadev/rte_dmadev.c +1 -0
index 174d4c40ae..e199b888c8 100644
@@ -5,6 +5,7 @@
 
 #include <inttypes.h>
 
+#include <rte_common.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_log.h>
lib/eal/include/rte_common.h +11 -0
index a96cc2a138..e2d1271c53 100644
@@ -861,6 +861,17 @@ rte_log2_u64(uint64_t v)
 /** Number of elements in the array. */
 #define	RTE_DIM(a)	(sizeof (a) / sizeof ((a)[0]))
 
+/** Macros to check for invalid function pointers. */
+#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
+	if ((func) == NULL) \
+		return retval; \
+} while (0)
+
+#define RTE_FUNC_PTR_OR_RET(func) do { \
+	if ((func) == NULL) \
+		return; \
+} while (0)
+
 /**
  * Converts a numeric string to the equivalent uint64_t value.
  * As well as straight number conversion, also recognises the suffixes
lib/eal/include/rte_dev.h +0 -11
index e6ff1218f9..24f9122558 100644
@@ -36,17 +36,6 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_name,
 					enum rte_dev_event_type event,
 					void *cb_arg);
 
-/* Macros to check for invalid function pointers */
-#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
-	if ((func) == NULL) \
-		return retval; \
-} while (0)
-
-#define RTE_FUNC_PTR_OR_RET(func) do { \
-	if ((func) == NULL) \
-		return; \
-} while (0)
-
 /**
  * Device policies.
  */
lib/ethdev/ethdev_driver.c +1 -0
index a285f213f0..86f5a37874 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2022 Intel Corporation
  */
 
+#include <rte_common.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 
lib/ethdev/ethdev_pci.h +1 -0
index 0549842709..b4bb460dcb 100644
@@ -10,6 +10,7 @@
 extern "C" {
 #endif
 
+#include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
lib/mempool/rte_mempool_ops.c +1 -0
index 2d36dee8f0..d60235a7e3 100644
@@ -6,6 +6,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
lib/regexdev/rte_regexdev.c +1 -0
index 02a388bc5d..aa57ab5bfa 100644
@@ -5,6 +5,7 @@
 
 #include <string.h>
 
+#include <rte_common.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
 
lib/security/rte_security.c +1 -0
index 4f5e4b4d49..046b6496d2 100644
@@ -4,6 +4,7 @@
  * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
  */
 
+#include <rte_common.h>
 #include <rte_cryptodev.h>
 #include <rte_dev.h>
 #include <rte_telemetry.h>
lib/vhost/vdpa.c +1 -0
index b2a2919fc0..bdebcbe565 100644
@@ -10,6 +10,7 @@
 
 #include <sys/queue.h>
 
+#include <rte_common.h>
 #include <rte_class.h>
 #include <rte_malloc.h>
 #include <rte_spinlock.h>
Signature · 1 line
2.36.1
#70 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 6 lines · David Marchand

RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object and associated API.
Move them to rte_common.h and include it where needed.

---

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

#71 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 6 lines · Bruce Richardson
Quoted 4 lines · David Marchand

RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object and associated API.
Move them to rte_common.h and include it where needed.

Quoted 8 lines
Quoted 2 lines

---

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

I don't like them either.
Not sure where to put them though...

My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later.

Signature · 1 line
David Marchand
#72 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 17 lines · David Marchand
Quoted 6 lines · Bruce Richardson
Quoted 4 lines · David Marchand

RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object and associated API.
Move them to rte_common.h and include it where needed.

Quoted 8 lines
Quoted 2 lines

---

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

Quoted 6 lines

I don't like them either.
Not sure where to put them though...

My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later.

+1 to that.
Can they be marked as deprecated as part of the move perhaps (assuming we get agreement to kill them?)

#73 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 9 lines · Bruce Richardson
Quoted 9 lines
Quoted 5 lines

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

I don't like them either.
Not sure where to put them though...

Quoted 6 lines
Quoted 3 lines

My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later.

+1 to that.
Can they be marked as deprecated as part of the move perhaps (assuming we get agreement to kill them?)

Yes.
I'll wait for others to chime in, which means this will wait for after my days off :-).

Signature · 1 line
David Marchand
#74 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
Quoted 9 lines
Quoted 5 lines

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

I don't like them either.
Not sure where to put them though...

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later.

+1 to that.
Can they be marked as deprecated as part of the move perhaps (assuming we get agreement to kill them?)

Let's see if techboard members have an opinion.

Quoted 4 lines

Yes.
I'll wait for others to chime in, which means this will wait for after my days off :-).

Signature · 1 line
David Marchand
#75 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

24/08/2022 08:50, David Marchand:

Quoted 14 lines
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
Quoted 9 lines
Quoted 5 lines

Personally, I really don't like these macros at all. I think having the check explicitly in the code would be far more readable, and would only be one line of code longer than the macro call. Is there some private header file we could move these to instead of rte_common.h so we can drop their use in future if we decide to?

I don't like them either.
Not sure where to put them though...

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

My "grep-all" shows no user in the projects consuming DPDK I track. We could mark those macros deprecated, fix our code and drop them later.

+1 to that.
Can they be marked as deprecated as part of the move perhaps (assuming we get agreement to kill them?)

Let's see if techboard members have an opinion.

These macros have no added value for an external user.
I think it is OK to mark them deprecated and plan for a future removal.

Copy of the code for the context:

/** Macros to check for invalid function pointers. */

#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
       if ((func) == NULL) \
               return retval; \
} while (0)
#define RTE_FUNC_PTR_OR_RET(func) do { \
       if ((func) == NULL) \
               return; \
} while (0)
#76 lore raw

RE: [RFC v3 08/26] dev: move unrelated macros from header

Quoted 29 lines

From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, 24 August 2022 09.39

24/08/2022 08:50, David Marchand:

Quoted 6 lines
Quoted 4 lines · David Marchand
Quoted 1 line · Bruce Richardson
Quoted 1 line
Quoted 1 line

Personally, I really don't like these macros at all. I think

having the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

check explicitly in the code would be far more readable, and

would only be

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

one line of code longer than the macro call. Is there some

private header

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

file we could move these to instead of rte_common.h so we can

drop their

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

use in future if we decide to?

I don't like them either.
Not sure where to put them though...

My "grep-all" shows no user in the projects consuming DPDK I

track.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

We could mark those macros deprecated, fix our code and drop

them later.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

+1 to that.
Can they be marked as deprecated as part of the move perhaps

Quoted 7 lines

(assuming we

Quoted 3 lines
Quoted 1 line
Quoted 1 line

get agreement to kill them?)

Let's see if techboard members have an opinion.

These macros have no added value for an external user.
I think it is OK to mark them deprecated and plan for a future removal.

+1 from a community member :-)

Quoted 16 lines

Copy of the code for the context:

/** Macros to check for invalid function pointers. */

#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
       if ((func) == NULL) \
               return retval; \
} while (0)
#define RTE_FUNC_PTR_OR_RET(func) do { \
       if ((func) == NULL) \
               return; \
} while (0)
#77 lore raw

Re: [RFC v3 08/26] dev: move unrelated macros from header

24/08/2022 13:52, Morten Brørup:

Quoted 15 lines
Quoted 15 lines

From: Thomas Monjalon [mailto:[email protected]] 24/08/2022 08:50, David Marchand:

Quoted 6 lines
Quoted 4 lines · David Marchand
Quoted 4 lines
Quoted 4 lines

I don't like them either.
Not sure where to put them though...

My "grep-all" shows no user in the projects consuming DPDK I

track.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

We could mark those macros deprecated, fix our code and drop

them later.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

+1 to that.
Can they be marked as deprecated as part of the move perhaps

(assuming we

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

get agreement to kill them?)

Let's see if techboard members have an opinion.

These macros have no added value for an external user.
I think it is OK to mark them deprecated and plan for a future removal.

+1 from a community member :-)

As usual, your voice is very valuable Morten :)

#78 lore raw

RFC v3 9/26 devargs: remove dependency on bus header

In reply to David Marchand

We don't need to include rte_bus.h in rte_devargs.h.
Only a forward declaration of rte_bus and an inclusion of rte_dev.h are needed.

---
 app/test/test_vdev.c          | 1 +
 lib/eal/include/rte_devargs.h | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
app/test/test_vdev.c +1 -0
index 720722c363..5eeff3106d 100644
@@ -8,6 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_kvargs.h>
+#include <rte_bus.h>
 #include <rte_bus_vdev.h>
 
 #include "test.h"
lib/eal/include/rte_devargs.h +3 -1
index 37a0f042ab..38dee2f288 100644
@@ -22,7 +22,9 @@ extern "C" {
 
 #include <stdio.h>
 #include <rte_compat.h>
-#include <rte_bus.h>
+#include <rte_dev.h>
+
+struct rte_bus;
 
 /**
  * Bus type key in global devargs syntax.
Signature · 1 line
2.36.1
#80 lore raw

RFC v3 10/26 build: export drivers headers

In reply to David Marchand

Same as for device classes, external DPDK users may need to include some bus headers for their out of tree drivers.

---
 drivers/meson.build | 4 ++++
 1 file changed, 4 insertions(+)
drivers/meson.build +4 -0
index b22c2adda7..7449643fa9 100644
@@ -89,6 +89,7 @@ foreach subpath:subdirs
         name = drv
         sources = []
         headers = []
+        driver_sdk_headers = [] # public headers included by drivers
         objs = []
         cflags = default_cflags
         includes = [include_directories(drv_path)]
@@ -158,6 +159,9 @@ foreach subpath:subdirs
         dpdk_extra_ldflags += pkgconfig_extra_libs
 
         install_headers(headers)
+        if get_option('enable_driver_sdk')
+            install_headers(driver_sdk_headers)
+        endif
 
         # generate pmdinfo sources by building a temporary
         # lib and then running pmdinfogen on the contents of
Signature · 1 line
2.36.1
#82 lore raw

RFC v3 11/26 bus/auxiliary: make driver-only headers private

In reply to David Marchand

The auxiliary bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 doc/guides/rel_notes/release_22_11.rst        |  5 ++++
 drivers/bus/auxiliary/auxiliary_common.c      |  3 --
 drivers/bus/auxiliary/auxiliary_params.c      |  1 -
 ...bus_auxiliary.h => bus_auxiliary_driver.h} | 24 +++++++--------
 drivers/bus/auxiliary/linux/auxiliary.c       |  2 --
 drivers/bus/auxiliary/meson.build             |  4 +--
 drivers/bus/auxiliary/private.h               | 30 +++++++++----------
 drivers/bus/auxiliary/version.map             |  3 +-
 .../common/mlx5/linux/mlx5_common_auxiliary.c |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.c    |  2 +-
 drivers/common/mlx5/mlx5_common_private.h     |  2 +-
 drivers/net/mlx5/linux/mlx5_os.c              |  2 +-
 12 files changed, 36 insertions(+), 44 deletions(-)
 rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)
doc/guides/rel_notes/release_22_11.rst +5 -0
index 3cea3aa8eb..7247acebd2 100644
@@ -84,6 +84,11 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* drivers: Registering a driver on the ``auxiliary``,
+  buses has been marked as an internal API.
+  External users may still register their driver using the associated driver
+  headers (see ``enable_driver_sdk`` meson option).
+
 * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
 
 
drivers/bus/auxiliary/auxiliary_common.c +0 -3
index 2cf8fe672d..6cf6c170ec 100644
@@ -23,7 +23,6 @@
 #include <rte_devargs.h>
 
 #include "private.h"
-#include "rte_bus_auxiliary.h"
 
 static struct rte_devargs *
 auxiliary_devargs_lookup(const char *name)
@@ -259,7 +258,6 @@ void
 rte_auxiliary_register(struct rte_auxiliary_driver *driver)
 {
 	TAILQ_INSERT_TAIL(&auxiliary_bus.driver_list, driver, next);
-	driver->bus = &auxiliary_bus;
 }
 
 /* Unregister a driver */
@@ -267,7 +265,6 @@ void
 rte_auxiliary_unregister(struct rte_auxiliary_driver *driver)
 {
 	TAILQ_REMOVE(&auxiliary_bus.driver_list, driver, next);
-	driver->bus = NULL;
 }
 
 /* Add a device to auxiliary bus */
drivers/bus/auxiliary/auxiliary_params.c +0 -1
index 9017118b36..0289777922 100644
@@ -10,7 +10,6 @@
 #include <rte_kvargs.h>
 
 #include "private.h"
-#include "rte_bus_auxiliary.h"
 
 enum auxiliary_params {
 	RTE_AUXILIARY_PARAM_NAME,
drivers/bus/auxiliary/bus_auxiliary_driver.h renamed from drivers/bus/auxiliary/rte_bus_auxiliary.h +11 -13
similarity index 90%
rename from drivers/bus/auxiliary/rte_bus_auxiliary.h
rename to drivers/bus/auxiliary/bus_auxiliary_driver.h
index 93b266daf7..1c2d2c04af 100644
@@ -2,8 +2,8 @@
  * Copyright (c) 2021 NVIDIA Corporation & Affiliates
  */
 
-#ifndef RTE_BUS_AUXILIARY_H
-#define RTE_BUS_AUXILIARY_H
+#ifndef BUS_AUXILIARY_DRIVER_H
+#define BUS_AUXILIARY_DRIVER_H
 
 /**
  * @file
@@ -22,17 +22,16 @@ extern "C" {
 #include <stdint.h>
 #include <inttypes.h>
 
+#include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
 #include <rte_dev.h>
-#include <rte_bus.h>
 #include <rte_kvargs.h>
 
 #define RTE_BUS_AUXILIARY_NAME "auxiliary"
 
 /* Forward declarations */
 struct rte_auxiliary_driver;
-struct rte_auxiliary_bus;
 struct rte_auxiliary_device;
 
 /**
@@ -43,7 +42,7 @@ struct rte_auxiliary_device;
  * @return
  *   Whether the driver can handle the auxiliary device.
  */
-typedef bool(rte_auxiliary_match_t)(const char *name);
+typedef bool (rte_auxiliary_match_t)(const char *name);
 
 /**
  * Initialization function for the driver called during auxiliary probing.
@@ -56,8 +55,8 @@ typedef bool(rte_auxiliary_match_t)(const char *name);
  *   - 0 On success.
  *   - Negative value and rte_errno is set otherwise.
  */
-typedef int(rte_auxiliary_probe_t)(struct rte_auxiliary_driver *drv,
-				    struct rte_auxiliary_device *dev);
+typedef int (rte_auxiliary_probe_t)(struct rte_auxiliary_driver *drv,
+	struct rte_auxiliary_device *dev);
 
 /**
  * Uninitialization function for the driver called during hotplugging.
@@ -87,7 +86,7 @@ typedef int (rte_auxiliary_remove_t)(struct rte_auxiliary_device *dev);
  *   - Negative value and rte_errno is set otherwise.
  */
 typedef int (rte_auxiliary_dma_map_t)(struct rte_auxiliary_device *dev,
-				       void *addr, uint64_t iova, size_t len);
+	void *addr, uint64_t iova, size_t len);
 
 /**
  * Driver-specific DMA un-mapping. After a successful call the device
@@ -106,7 +105,7 @@ typedef int (rte_auxiliary_dma_map_t)(struct rte_auxiliary_device *dev,
  *   - Negative value and rte_errno is set otherwise.
  */
 typedef int (rte_auxiliary_dma_unmap_t)(struct rte_auxiliary_device *dev,
-					 void *addr, uint64_t iova, size_t len);
+	void *addr, uint64_t iova, size_t len);
 
 /**
  * A structure describing an auxiliary device.
@@ -125,7 +124,6 @@ struct rte_auxiliary_device {
 struct rte_auxiliary_driver {
 	RTE_TAILQ_ENTRY(rte_auxiliary_driver) next; /**< Next in list. */
 	struct rte_driver driver;             /**< Inherit core driver. */
-	struct rte_auxiliary_bus *bus;        /**< Auxiliary bus reference. */
 	rte_auxiliary_match_t *match;         /**< Device match function. */
 	rte_auxiliary_probe_t *probe;         /**< Device probe function. */
 	rte_auxiliary_remove_t *remove;       /**< Device remove function. */
@@ -160,7 +158,7 @@ struct rte_auxiliary_driver {
  *   A pointer to a rte_auxiliary_driver structure describing the driver
  *   to be registered.
  */
-__rte_experimental
+__rte_internal
 void rte_auxiliary_register(struct rte_auxiliary_driver *driver);
 
 /** Helper for auxiliary device registration from driver instance */
@@ -182,11 +180,11 @@ void rte_auxiliary_register(struct rte_auxiliary_driver *driver);
  *   A pointer to a rte_auxiliary_driver structure describing the driver
  *   to be unregistered.
  */
-__rte_experimental
+__rte_internal
 void rte_auxiliary_unregister(struct rte_auxiliary_driver *driver);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* RTE_BUS_AUXILIARY_H */
+#endif /* BUS_AUXILIARY_DRIVER_H */
drivers/bus/auxiliary/linux/auxiliary.c +0 -2
index 9bd4ee3295..d4c564cd78 100644
@@ -6,13 +6,11 @@
 #include <dirent.h>
 
 #include <rte_log.h>
-#include <rte_bus.h>
 #include <rte_malloc.h>
 #include <rte_devargs.h>
 #include <rte_memcpy.h>
 #include <eal_filesystem.h>
 
-#include "../rte_bus_auxiliary.h"
 #include "../private.h"
 
 #define AUXILIARY_SYSFS_PATH "/sys/bus/auxiliary/devices"
drivers/bus/auxiliary/meson.build +1 -3
index e2b356f8d2..fcb1a349c4 100644
@@ -1,9 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2021 NVIDIA Corporation & Affiliates
 
-headers = files(
-        'rte_bus_auxiliary.h',
-)
+driver_sdk_headers += files('bus_auxiliary_driver.h')
 sources = files(
         'auxiliary_common.c',
         'auxiliary_params.c',
drivers/bus/auxiliary/private.h +14 -16
index d22e83cf7a..3f49f62493 100644
@@ -9,9 +9,10 @@
 #include <stdio.h>
 #include <sys/queue.h>
 
-#include "rte_bus_auxiliary.h"
+#include <rte_bus.h>
+
+#include "bus_auxiliary_driver.h"
 
-extern struct rte_auxiliary_bus auxiliary_bus;
 extern int auxiliary_bus_logtype;
 
 #define AUXILIARY_LOG(level, ...) \
@@ -19,27 +20,24 @@ extern int auxiliary_bus_logtype;
 		RTE_FMT("auxiliary bus: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
 			RTE_FMT_TAIL(__VA_ARGS__,)))
 
-/* Auxiliary bus iterators */
-#define FOREACH_DEVICE_ON_AUXILIARY_BUS(p) \
-		TAILQ_FOREACH(p, &(auxiliary_bus.device_list), next)
-
-#define FOREACH_DRIVER_ON_AUXILIARY_BUS(p) \
-		TAILQ_FOREACH(p, &(auxiliary_bus.driver_list), next)
-
-/* List of auxiliary devices. */
-TAILQ_HEAD(rte_auxiliary_device_list, rte_auxiliary_device);
-/* List of auxiliary drivers. */
-TAILQ_HEAD(rte_auxiliary_driver_list, rte_auxiliary_driver);
-
 /*
  * Structure describing the auxiliary bus
  */
 struct rte_auxiliary_bus {
 	struct rte_bus bus;                  /* Inherit the generic class */
-	struct rte_auxiliary_device_list device_list;  /* List of devices */
-	struct rte_auxiliary_driver_list driver_list;  /* List of drivers */
+	TAILQ_HEAD(, rte_auxiliary_device) device_list;  /* List of devices */
+	TAILQ_HEAD(, rte_auxiliary_driver) driver_list;  /* List of drivers */
 };
 
+extern struct rte_auxiliary_bus auxiliary_bus;
+
+/* Auxiliary bus iterators */
+#define FOREACH_DEVICE_ON_AUXILIARY_BUS(p) \
+	TAILQ_FOREACH(p, &(auxiliary_bus.device_list), next)
+
+#define FOREACH_DRIVER_ON_AUXILIARY_BUS(p) \
+	TAILQ_FOREACH(p, &(auxiliary_bus.driver_list), next)
+
 /*
  * Test whether the auxiliary device exist.
  */
drivers/bus/auxiliary/version.map +1 -2
index dc993e84ff..e9322e0b11 100644
@@ -1,7 +1,6 @@
-EXPERIMENTAL {
+INTERNAL {
 	global:
 
-	# added in 21.08
 	rte_auxiliary_register;
 	rte_auxiliary_unregister;
 
drivers/common/mlx5/linux/mlx5_common_auxiliary.c +1 -1
index a182a8bdde..33479ffd68 100644
@@ -8,7 +8,7 @@
 
 #include <rte_malloc.h>
 #include <rte_errno.h>
-#include <rte_bus_auxiliary.h>
+#include <bus_auxiliary_driver.h>
 #include <rte_common.h>
 #include "eal_filesystem.h"
 
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index c57e1918d2..b42102e84c 100644
@@ -16,7 +16,7 @@
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_auxiliary.h>
+#include <bus_auxiliary_driver.h>
 
 #include "mlx5_common.h"
 #include "mlx5_nl.h"
drivers/common/mlx5/mlx5_common_private.h +1 -1
index 04c0af3763..12a5bdb41b 100644
@@ -6,7 +6,7 @@
 #define MLX5_COMMON_PRIVATE_H
 
 #include <rte_pci.h>
-#include <rte_bus_auxiliary.h>
+#include <bus_auxiliary_driver.h>
 
 #include "mlx5_common.h"
 
drivers/net/mlx5/linux/mlx5_os.c +1 -1
index 0741028dab..c9ed38ef7c 100644
@@ -20,7 +20,7 @@
 #include <ethdev_pci.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_auxiliary.h>
+#include <bus_auxiliary_driver.h>
 #include <rte_common.h>
 #include <rte_kvargs.h>
 #include <rte_rwlock.h>
Signature · 1 line
2.36.1
#83 lore raw

RFC v3 12/26 bus/dpaa: make driver-only headers private

In reply to David Marchand

The dpaa bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup internal structures:
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and update code that relied on it,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 drivers/bus/dpaa/base/qbman/qman.c            |  2 +-
 .../{rte_dpaa_bus.h => bus_dpaa_driver.h}     | 25 ++++++-------------
 drivers/bus/dpaa/dpaa_bus.c                   | 20 +++++++--------
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c     |  2 +-
 drivers/dma/dpaa/dpaa_qdma.c                  |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/mempool/dpaa/dpaa_mempool.h           |  2 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa/dpaa_rxtx.c                  |  2 +-
 10 files changed, 26 insertions(+), 35 deletions(-)
 rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
drivers/bus/dpaa/base/qbman/qman.c +1 -1
index 447c091770..3949bf8712 100644
@@ -7,7 +7,7 @@
 
 #include "qman.h"
 #include <rte_branch_prediction.h>
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_eventdev.h>
 #include <rte_byteorder.h>
 
drivers/bus/dpaa/bus_dpaa_driver.h renamed from drivers/bus/dpaa/rte_dpaa_bus.h +8 -17
similarity index 92%
rename from drivers/bus/dpaa/rte_dpaa_bus.h
rename to drivers/bus/dpaa/bus_dpaa_driver.h
index 1f04d9ebd3..cf66fc0c53 100644
@@ -3,12 +3,14 @@
  *   Copyright 2017-2022 NXP
  *
  */
-#ifndef __RTE_DPAA_BUS_H__
-#define __RTE_DPAA_BUS_H__
+#ifndef BUS_DPAA_DRIVER_H
+#define BUS_DPAA_DRIVER_H
 
-#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
 #include <rte_mbuf_dyn.h>
 #include <rte_mempool.h>
+
 #include <dpaax_iova_table.h>
 
 #include <dpaa_of.h>
@@ -73,24 +75,12 @@ extern unsigned int dpaa_svr_family;
 struct rte_dpaa_device;
 struct rte_dpaa_driver;
 
-/* DPAA Device and Driver lists for DPAA bus */
-TAILQ_HEAD(rte_dpaa_device_list, rte_dpaa_device);
-TAILQ_HEAD(rte_dpaa_driver_list, rte_dpaa_driver);
-
 enum rte_dpaa_type {
 	FSL_DPAA_ETH = 1,
 	FSL_DPAA_CRYPTO,
 	FSL_DPAA_QDMA
 };
 
-struct rte_dpaa_bus {
-	struct rte_bus bus;
-	struct rte_dpaa_device_list device_list;
-	struct rte_dpaa_driver_list driver_list;
-	int device_count;
-	int detected;
-};
-
 struct dpaa_device_id {
 	uint8_t fman_id; /**< Fman interface ID, for ETH type device */
 	uint8_t mac_id; /**< Fman MAC interface ID, for ETH type device */
@@ -119,7 +109,6 @@ typedef int (*rte_dpaa_remove_t)(struct rte_dpaa_device *dpaa_dev);
 struct rte_dpaa_driver {
 	TAILQ_ENTRY(rte_dpaa_driver) next;
 	struct rte_driver driver;
-	struct rte_dpaa_bus *dpaa_bus;
 	enum rte_dpaa_type drv_type;
 	rte_dpaa_probe_t probe;
 	rte_dpaa_remove_t remove;
@@ -166,6 +155,7 @@ extern struct dpaa_memseg_list rte_dpaa_memsegs;
 /* Either iterate over the list of internal memseg references or fallback to
  * EAL memseg based iova2virt.
  */
+__rte_internal
 static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
 {
 	struct dpaa_memseg *ms;
@@ -192,6 +182,7 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
 	return va;
 }
 
+__rte_internal
 static inline rte_iova_t
 rte_dpaa_mem_vtop(void *vaddr)
 {
@@ -263,4 +254,4 @@ struct fm_eth_port_cfg *dpaa_get_eth_port_cfg(int dev_id);
 }
 #endif
 
-#endif /* __RTE_DPAA_BUS_H__ */
+#endif /* BUS_DPAA_DRIVER_H */
drivers/bus/dpaa/dpaa_bus.c +10 -10
index e442bc4c33..1ac6aa314f 100644
@@ -34,7 +34,7 @@
 #include <rte_mbuf_dyn.h>
 
 #include <dpaa_of.h>
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_dpaa_logs.h>
 #include <dpaax_iova_table.h>
 
@@ -43,6 +43,14 @@
 #include <fsl_bman.h>
 #include <netcfg.h>
 
+struct rte_dpaa_bus {
+	struct rte_bus bus;
+	TAILQ_HEAD(, rte_dpaa_device) device_list;
+	TAILQ_HEAD(, rte_dpaa_driver) driver_list;
+	int device_count;
+	int detected;
+};
+
 static struct rte_dpaa_bus rte_dpaa_bus;
 struct netcfg_info *dpaa_netcfg;
 
@@ -520,23 +528,15 @@ rte_dpaa_driver_register(struct rte_dpaa_driver *driver)
 	BUS_INIT_FUNC_TRACE();
 
 	TAILQ_INSERT_TAIL(&rte_dpaa_bus.driver_list, driver, next);
-	/* Update Bus references */
-	driver->dpaa_bus = &rte_dpaa_bus;
 }
 
 /* un-register a dpaa bus based dpaa driver */
 void
 rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver)
 {
-	struct rte_dpaa_bus *dpaa_bus;
-
 	BUS_INIT_FUNC_TRACE();
 
-	dpaa_bus = driver->dpaa_bus;
-
-	TAILQ_REMOVE(&dpaa_bus->driver_list, driver, next);
-	/* Update Bus references */
-	driver->dpaa_bus = NULL;
+	TAILQ_REMOVE(&rte_dpaa_bus.driver_list, driver, next);
 }
 
 static int
drivers/crypto/dpaa_sec/dpaa_sec.c +1 -1
index 05415dbf3b..7e554cb2b1 100644
@@ -41,7 +41,7 @@
 #include <desc/pdcp.h>
 #include <desc/sdap.h>
 
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <dpaa_sec.h>
 #include <dpaa_sec_event.h>
 #include <dpaa_sec_log.h>
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c +1 -1
index d081953e26..29c5935739 100644
@@ -15,7 +15,7 @@
 #include <desc/algo.h>
 #include <desc/ipsec.h>
 
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <dpaa_sec.h>
 #include <dpaa_sec_log.h>
 
drivers/dma/dpaa/dpaa_qdma.c +1 -1
index 9386fe5698..10e65ef1d7 100644
@@ -2,7 +2,7 @@
  * Copyright 2021 NXP
  */
 
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_dmadev_pmd.h>
 
 #include "dpaa_qdma.h"
drivers/event/dpaa/dpaa_eventdev.c +1 -1
index ff6cc0be18..aa403f9e06 100644
@@ -29,7 +29,7 @@
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
 #include <cryptodev_pmd.h>
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_dpaa_logs.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
drivers/mempool/dpaa/dpaa_mempool.h +1 -1
index dc0058e6dd..3f0eafa7dd 100644
@@ -14,7 +14,7 @@
 
 #include <rte_mempool.h>
 
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_dpaa_logs.h>
 
 #include <fsl_usd.h>
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index e5a072cf49..f21cbba0d9 100644
@@ -33,7 +33,7 @@
 #include <rte_malloc.h>
 #include <rte_ring.h>
 
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <rte_dpaa_logs.h>
 #include <dpaa_mempool.h>
 
drivers/net/dpaa/dpaa_rxtx.c +1 -1
index 956fe946fa..20b75efb63 100644
@@ -37,7 +37,7 @@
 
 #include "dpaa_ethdev.h"
 #include "dpaa_rxtx.h"
-#include <rte_dpaa_bus.h>
+#include <bus_dpaa_driver.h>
 #include <dpaa_mempool.h>
 
 #include <qman.h>
Signature · 1 line
2.36.1
#84 lore raw

RFC v3 13/26 bus/fslmc: make driver-only headers private

In reply to David Marchand

The fslmc bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup internal structures:
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and update code that relied on it,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 .../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} | 28 +++----------------
 drivers/bus/fslmc/fslmc_bus.c                 | 12 ++------
 drivers/bus/fslmc/fslmc_vfio.c                |  3 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpci.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dprc.c      |  2 +-
 drivers/bus/fslmc/private.h                   | 27 ++++++++++++++++++
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c   |  2 +-
 drivers/dma/dpaa2/dpaa2_qdma.c                |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev_selftest.c |  2 +-
 drivers/event/dpaa2/dpaa2_hw_dpcon.c          |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.h              |  2 +-
 drivers/net/dpaa2/dpaa2_mux.c                 |  2 +-
 drivers/net/dpaa2/dpaa2_ptp.c                 |  2 +-
 drivers/net/dpaa2/dpaa2_recycle.c             |  2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |  2 +-
 20 files changed, 50 insertions(+), 52 deletions(-)
 rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (89%)
 create mode 100644 drivers/bus/fslmc/private.h
drivers/bus/fslmc/bus_fslmc_driver.h renamed from drivers/bus/fslmc/rte_fslmc.h +4 -24
similarity index 89%
rename from drivers/bus/fslmc/rte_fslmc.h
rename to drivers/bus/fslmc/bus_fslmc_driver.h
index 8c67bfba55..798ddebf3a 100644
@@ -4,8 +4,8 @@
  *
  */
 
-#ifndef _RTE_FSLMC_H_
-#define _RTE_FSLMC_H_
+#ifndef BUS_FSLMC_DRIVER_H
+#define BUS_FSLMC_DRIVER_H
 
 /**
  * @file
@@ -26,10 +26,10 @@ extern "C" {
 #include <inttypes.h>
 #include <linux/vfio.h>
 
+#include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
 #include <rte_dev.h>
-#include <rte_bus.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
 #include <rte_mbuf.h>
@@ -69,15 +69,9 @@ dpaa2_seqn(struct rte_mbuf *mbuf)
 
 struct rte_dpaa2_driver;
 
-/* DPAA2 Device and Driver lists for FSLMC bus */
-TAILQ_HEAD(rte_fslmc_device_list, rte_dpaa2_device);
-TAILQ_HEAD(rte_fslmc_driver_list, rte_dpaa2_driver);
-
 #define RTE_DEV_TO_FSLMC_CONST(ptr) \
 	container_of(ptr, const struct rte_dpaa2_device, device)
 
-extern struct rte_fslmc_bus rte_fslmc_bus;
-
 enum rte_dpaa2_dev_type {
 	/* Devices backed by DPDK driver */
 	DPAA2_ETH,	/**< DPNI type device*/
@@ -146,26 +140,12 @@ typedef int (*rte_dpaa2_remove_t)(struct rte_dpaa2_device *dpaa2_dev);
 struct rte_dpaa2_driver {
 	TAILQ_ENTRY(rte_dpaa2_driver) next; /**< Next in list. */
 	struct rte_driver driver;           /**< Inherit core driver. */
-	struct rte_fslmc_bus *fslmc_bus;    /**< FSLMC bus reference */
 	uint32_t drv_flags;                 /**< Flags for controlling device.*/
 	enum rte_dpaa2_dev_type drv_type;   /**< Driver Type */
 	rte_dpaa2_probe_t probe;
 	rte_dpaa2_remove_t remove;
 };
 
-/*
- * FSLMC bus
- */
-struct rte_fslmc_bus {
-	struct rte_bus bus;     /**< Generic Bus object */
-	struct rte_fslmc_device_list device_list;
-				/**< FSLMC DPAA2 Device list */
-	struct rte_fslmc_driver_list driver_list;
-				/**< FSLMC DPAA2 Driver list */
-	int device_count[DPAA2_DEVTYPE_MAX];
-				/**< Count of all devices scanned */
-};
-
 /**
  * Register a DPAA2 driver.
  *
@@ -230,4 +210,4 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
 }
 #endif
 
-#endif /* _RTE_FSLMC_H_ */
+#endif /* BUS_FSLMC_DRIVER_H */
drivers/bus/fslmc/fslmc_bus.c +2 -10
index e9edc27e0a..b9b0981329 100644
@@ -16,7 +16,7 @@
 #include <ethdev_driver.h>
 #include <rte_mbuf_dyn.h>
 
-#include <rte_fslmc.h>
+#include "private.h"
 #include <fslmc_vfio.h>
 #include "fslmc_logs.h"
 
@@ -530,27 +530,19 @@ rte_fslmc_driver_register(struct rte_dpaa2_driver *driver)
 	RTE_VERIFY(driver);
 
 	TAILQ_INSERT_TAIL(&rte_fslmc_bus.driver_list, driver, next);
-	/* Update Bus references */
-	driver->fslmc_bus = &rte_fslmc_bus;
 }
 
 /*un-register a fslmc bus based dpaa2 driver */
 void
 rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver)
 {
-	struct rte_fslmc_bus *fslmc_bus;
-
-	fslmc_bus = driver->fslmc_bus;
-
 	/* Cleanup the PA->VA Translation table; From wherever this function
 	 * is called from.
 	 */
 	if (rte_eal_iova_mode() == RTE_IOVA_PA)
 		dpaax_iova_table_depopulate();
 
-	TAILQ_REMOVE(&fslmc_bus->driver_list, driver, next);
-	/* Update Bus references */
-	driver->fslmc_bus = NULL;
+	TAILQ_REMOVE(&rte_fslmc_bus.driver_list, driver, next);
 }
 
 /*
drivers/bus/fslmc/fslmc_vfio.c +1 -2
index 3d4e71a80a..8604e43947 100644
@@ -29,10 +29,9 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_bus.h>
 #include <rte_eal_memconfig.h>
 
-#include "rte_fslmc.h"
+#include "private.h"
 #include "fslmc_vfio.h"
 #include "fslmc_logs.h"
 #include <mc/fsl_dpmng.h>
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +1 -1
index 122aa1740d..cfe4280f87 100644
@@ -23,7 +23,7 @@
 #include <rte_mbuf_pool_ops.h>
 
 #include <fslmc_logs.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <mc/fsl_dpbp.h>
 #include "portal/dpaa2_hw_pvt.h"
 #include "portal/dpaa2_hw_dpio.h"
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +1 -1
index 8ed969c7c0..b7d81b518c 100644
@@ -21,7 +21,7 @@
 #include <ethdev_driver.h>
 
 #include <fslmc_logs.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <mc/fsl_dpci.h>
 #include "portal/dpaa2_hw_pvt.h"
 #include "portal/dpaa2_hw_dpio.h"
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +1 -1
index 22c51c1a82..071b0d297d 100644
@@ -33,7 +33,7 @@
 #include <rte_dev.h>
 
 #include <fslmc_logs.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include "dpaa2_hw_pvt.h"
 #include "dpaa2_hw_dpio.h"
 #include <mc/fsl_dpmng.h>
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c +1 -1
index ca1d0304d5..223e34bcba 100644
@@ -12,8 +12,8 @@
 #include <rte_malloc.h>
 #include <rte_dev.h>
 
+#include "private.h"
 #include <fslmc_logs.h>
-#include <rte_fslmc.h>
 #include <mc/fsl_dprc.h>
 #include "portal/dpaa2_hw_pvt.h"
 
drivers/bus/fslmc/private.h new file +27 -0
new file mode 100644
index 0000000000..60d68155e1
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ *   Copyright 2016,2021 NXP
+ */
+
+#ifndef BUS_FSLMC_PRIVATE_H
+#define BUS_FSLMC_PRIVATE_H
+
+#include <rte_bus.h>
+
+#include <bus_fslmc_driver.h>
+
+/*
+ * FSLMC bus
+ */
+struct rte_fslmc_bus {
+	struct rte_bus bus;     /**< Generic Bus object */
+	TAILQ_HEAD(, rte_dpaa2_device) device_list;
+				/**< FSLMC DPAA2 Device list */
+	TAILQ_HEAD(, rte_dpaa2_driver) driver_list;
+				/**< FSLMC DPAA2 Driver list */
+	int device_count[DPAA2_DEVTYPE_MAX];
+				/**< Count of all devices scanned */
+};
+
+extern struct rte_fslmc_bus rte_fslmc_bus;
+
+#endif /* BUS_FSLMC_PRIVATE_H */
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +1 -1
index 8444f1a795..0cce861899 100644
@@ -20,7 +20,7 @@
 #include <rte_dev.h>
 #include <cryptodev_pmd.h>
 #include <rte_common.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <fslmc_vfio.h>
 #include <dpaa2_hw_pvt.h>
 #include <dpaa2_hw_dpio.h>
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c +1 -1
index e68a4875dd..b3242791ac 100644
@@ -3,7 +3,7 @@
  */
 
 #include <cryptodev_pmd.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <fslmc_vfio.h>
 #include <dpaa2_hw_pvt.h>
 #include <dpaa2_hw_dpio.h>
drivers/dma/dpaa2/dpaa2_qdma.c +1 -1
index 0500e8c225..d5a5f08ecc 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_eal.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <rte_dmadev.h>
 #include <rte_dmadev_pmd.h>
 #include <rte_kvargs.h>
drivers/event/dpaa2/dpaa2_eventdev.c +1 -1
index ffc7b8b073..5de3e9e5f5 100644
@@ -16,7 +16,7 @@
 #include <rte_debug.h>
 #include <rte_dev.h>
 #include <rte_eal.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <rte_lcore.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
drivers/event/dpaa2/dpaa2_eventdev_selftest.c +1 -1
index b549bdfcbb..941fb8fc43 100644
@@ -19,7 +19,7 @@
 #include <rte_random.h>
 #include <rte_bus_vdev.h>
 #include <rte_test.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 
 #include "dpaa2_eventdev.h"
 #include "dpaa2_eventdev_logs.h"
drivers/event/dpaa2/dpaa2_hw_dpcon.c +1 -1
index acc1fde771..3882a9cf1d 100644
@@ -20,7 +20,7 @@
 #include <rte_dev.h>
 #include <ethdev_driver.h>
 
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <mc/fsl_dpcon.h>
 #include <portal/dpaa2_hw_pvt.h>
 #include "dpaa2_eventdev.h"
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 52eb6df310..f876f4790c 100644
@@ -16,7 +16,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 #include "rte_dpaa2_mempool.h"
 
drivers/net/dpaa2/dpaa2_ethdev.h +1 -1
index a459181139..f69df95253 100644
@@ -11,7 +11,7 @@
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_pmd_dpaa2.h>
 
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <dpaa2_hw_pvt.h>
 #include "dpaa2_tm.h"
 
drivers/net/dpaa2/dpaa2_mux.c +1 -1
index e8689a7832..3289f388e1 100644
@@ -16,7 +16,7 @@
 #include <rte_flow_driver.h>
 #include <rte_tailq.h>
 
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <fsl_dpdmux.h>
 #include <fsl_dpkg.h>
 
drivers/net/dpaa2/dpaa2_ptp.c +1 -1
index 4e6d375d1c..c08aa0f3bf 100644
@@ -16,7 +16,7 @@
 #include <rte_malloc.h>
 #include <rte_time.h>
 
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <fsl_dprtc.h>
 #include <fsl_dpkg.h>
 
drivers/net/dpaa2/dpaa2_recycle.c +1 -1
index 336506dc0d..932570c6e0 100644
@@ -15,7 +15,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 
 #include "dpaa2_pmd_logs.h"
drivers/net/dpaa2/dpaa2_rxtx.c +1 -1
index c17f6ebda9..7b9c528d13 100644
@@ -16,7 +16,7 @@
 #include <rte_dev.h>
 #include <rte_hexdump.h>
 
-#include <rte_fslmc.h>
+#include <bus_fslmc_driver.h>
 #include <fslmc_vfio.h>
 #include <dpaa2_hw_pvt.h>
 #include <dpaa2_hw_dpio.h>
Signature · 1 line
2.36.1
#85 lore raw

RFC v3 14/26 bus/ifpga: cleanup exported symbols

In reply to David Marchand

Remove unused symbols (exposed only in an internal header which guarantees that no application out there relied on them).

Remove rte_ prefix and inline the rest to avoid having to expose them as global symbols for a relatively small added value.

---
 drivers/bus/ifpga/ifpga_bus.c    | 13 +++--
 drivers/bus/ifpga/ifpga_common.c | 88 --------------------------------
 drivers/bus/ifpga/ifpga_common.h | 54 ++++++++++++++++----
 drivers/bus/ifpga/meson.build    |  2 +-
 drivers/bus/ifpga/version.map    |  2 -
 drivers/raw/ifpga/ifpga_rawdev.c |  2 +-
 6 files changed, 53 insertions(+), 108 deletions(-)
 delete mode 100644 drivers/bus/ifpga/ifpga_common.c
drivers/bus/ifpga/ifpga_bus.c +6 -7
index e005f2cb70..b1e9eb7cc4 100644
@@ -117,9 +117,9 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
 
 	if (rte_kvargs_count(kvlist, IFPGA_ARG_PORT) == 1) {
 		if (rte_kvargs_process(kvlist, IFPGA_ARG_PORT,
-		&rte_ifpga_get_integer32_arg, &afu_pr_conf.afu_id.port) < 0) {
-			IFPGA_BUS_ERR("error to parse %s",
-				     IFPGA_ARG_PORT);
+				ifpga_get_integer32_arg,
+				&afu_pr_conf.afu_id.port) < 0) {
+			IFPGA_BUS_ERR("error to parse %s", IFPGA_ARG_PORT);
 			goto end;
 		}
 	} else {
@@ -130,9 +130,8 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
 
 	if (rte_kvargs_count(kvlist, IFPGA_AFU_BTS) == 1) {
 		if (rte_kvargs_process(kvlist, IFPGA_AFU_BTS,
-				       &rte_ifpga_get_string_arg, &path) < 0) {
-			IFPGA_BUS_ERR("Failed to parse %s",
-				     IFPGA_AFU_BTS);
+				ifpga_get_string_arg, &path) < 0) {
+			IFPGA_BUS_ERR("Failed to parse %s", IFPGA_AFU_BTS);
 			goto end;
 		}
 		afu_pr_conf.pr_enable = 1;
@@ -228,7 +227,7 @@ ifpga_scan(void)
 
 		if (rte_kvargs_count(kvlist, IFPGA_ARG_NAME) == 1) {
 			if (rte_kvargs_process(kvlist, IFPGA_ARG_NAME,
-				       &rte_ifpga_get_string_arg, &name) < 0) {
+					ifpga_get_string_arg, &name) < 0) {
 				IFPGA_BUS_ERR("error to parse %s",
 				     IFPGA_ARG_NAME);
 				goto end;
drivers/bus/ifpga/ifpga_common.c deleted +0 -88

88 lines not on this page · raw message

drivers/bus/ifpga/ifpga_common.h +45 -9

59 lines not on this page · raw message

drivers/bus/ifpga/meson.build +1 -1
index cc5047e3ce..9d56a4bb2b 100644
@@ -9,4 +9,4 @@ endif
 
 deps += ['pci', 'kvargs', 'rawdev']
 headers = files('rte_bus_ifpga.h')
-sources = files('ifpga_common.c', 'ifpga_bus.c')
+sources = files('ifpga_bus.c')
drivers/bus/ifpga/version.map +0 -2
index c0a1eecae8..da7f92c2a0 100644
@@ -4,8 +4,6 @@ DPDK_23 {
 	rte_ifpga_driver_register;
 	rte_ifpga_driver_unregister;
 	rte_ifpga_find_afu_by_name;
-	rte_ifpga_get_integer32_arg;
-	rte_ifpga_get_string_arg;
 
 	local: *;
 };
drivers/raw/ifpga/ifpga_rawdev.c +1 -1
index 78a7123528..93a7e74959 100644
@@ -1752,7 +1752,7 @@ ifpga_vdev_parse_devargs(struct rte_devargs *devargs,
 
 	if (rte_kvargs_count(kvlist, IFPGA_ARG_PORT) == 1) {
 		if (rte_kvargs_process(kvlist, IFPGA_ARG_PORT,
-			&rte_ifpga_get_integer32_arg, &port) < 0) {
+				ifpga_get_integer32_arg, &port) < 0) {
 			IFPGA_RAWDEV_PMD_ERR("error to parse %s",
 				IFPGA_ARG_PORT);
 			goto end;
Signature · 1 line
2.36.1
Acked-by on v3 14/26
#86 lore raw

RE: [RFC v3 14/26] bus/ifpga: cleanup exported symbols

Hi,

Quoted 23 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 23:26
To: [email protected]
Cc: Xu, Rosen <[email protected]>; Ray Kinsella <[email protected]>; Zhang, Tianfei <[email protected]>
Subject: [RFC v3 14/26] bus/ifpga: cleanup exported symbols

Remove unused symbols (exposed only in an internal header which guarantees that no application out there relied on them).

Remove rte_ prefix and inline the rest to avoid having to expose them as global symbols for a relatively small added value.

---
 drivers/bus/ifpga/ifpga_bus.c    | 13 +++--
 drivers/bus/ifpga/ifpga_common.c | 88 --------------------------------
drivers/bus/ifpga/ifpga_common.h | 54 ++++++++++++++++----
 drivers/bus/ifpga/meson.build    |  2 +-
 drivers/bus/ifpga/version.map    |  2 -
 drivers/raw/ifpga/ifpga_rawdev.c |  2 +-
 6 files changed, 53 insertions(+), 108 deletions(-)  delete mode 100644
Quoted 2 lines

drivers/bus/ifpga/ifpga_common.c

#87 lore raw

RFC v3 15/26 bus/ifpga: make driver-only headers private

In reply to David Marchand

The ifpga bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 doc/guides/rel_notes/release_22_11.rst         |  2 +-
 .../{rte_bus_ifpga.h => bus_ifpga_driver.h}    | 18 ++++++++----------
 drivers/bus/ifpga/ifpga_bus.c                  |  6 +++---
 drivers/bus/ifpga/ifpga_common.h               |  2 +-
 drivers/bus/ifpga/meson.build                  |  2 +-
 drivers/bus/ifpga/version.map                  |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c             |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h             |  2 +-
 drivers/net/ipn3ke/ipn3ke_flow.c               |  2 +-
 drivers/net/ipn3ke/ipn3ke_representor.c        |  2 +-
 drivers/net/ipn3ke/ipn3ke_tm.c                 |  2 +-
 drivers/raw/ifpga/afu_pmd_core.h               |  2 +-
 drivers/raw/ifpga/afu_pmd_he_hssi.c            |  2 +-
 drivers/raw/ifpga/afu_pmd_he_lpbk.c            |  2 +-
 drivers/raw/ifpga/afu_pmd_he_mem.c             |  2 +-
 drivers/raw/ifpga/afu_pmd_n3000.c              |  2 +-
 drivers/raw/ifpga/ifpga_rawdev.c               |  2 +-
 17 files changed, 26 insertions(+), 28 deletions(-)
 rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
doc/guides/rel_notes/release_22_11.rst +1 -1
index 7247acebd2..8aae628d71 100644
@@ -84,7 +84,7 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
-* drivers: Registering a driver on the ``auxiliary``,
+* drivers: Registering a driver on the ``auxiliary``, ``ifpga``
   buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
drivers/bus/ifpga/bus_ifpga_driver.h renamed from drivers/bus/ifpga/rte_bus_ifpga.h +8 -10
similarity index 91%
rename from drivers/bus/ifpga/rte_bus_ifpga.h
rename to drivers/bus/ifpga/bus_ifpga_driver.h
index 007ad19875..7b75c2ddbc 100644
@@ -2,8 +2,8 @@
  * Copyright(c) 2010-2018 Intel Corporation
  */
 
-#ifndef _RTE_BUS_IFPGA_H_
-#define _RTE_BUS_IFPGA_H_
+#ifndef BUS_IFPGA_DRIVER_H
+#define BUS_IFPGA_DRIVER_H
 
 /**
  * @file
@@ -15,23 +15,17 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <rte_bus.h>
+#include <rte_compat.h>
 #include <rte_pci.h>
 #include <rte_interrupts.h>
 #include <rte_spinlock.h>
 
-/** Name of Intel FPGA Bus */
 #define IFPGA_BUS_NAME ifpga
 
 /* Forward declarations */
 struct rte_afu_device;
 struct rte_afu_driver;
 
-/** Double linked list of Intel FPGA AFU device. */
-RTE_TAILQ_HEAD(ifpga_afu_dev_list, rte_afu_device);
-/** Double linked list of Intel FPGA AFU device drivers. */
-RTE_TAILQ_HEAD(ifpga_afu_drv_list, rte_afu_driver);
-
 #define IFPGA_BUS_BITSTREAM_PATH_MAX_LEN 256
 
 struct rte_afu_uuid {
@@ -112,6 +106,7 @@ struct rte_afu_driver {
 	const struct rte_afu_uuid *id_table;    /**< AFU uuid within FPGA. */
 };
 
+__rte_internal
 static inline const char *
 rte_ifpga_device_name(const struct rte_afu_device *afu)
 {
@@ -126,6 +121,7 @@ rte_ifpga_device_name(const struct rte_afu_device *afu)
  * @param name
  *   A pointer to AFU name string.
  */
+__rte_internal
 struct rte_afu_device *
 rte_ifpga_find_afu_by_name(const char *name);
 
@@ -136,6 +132,7 @@ rte_ifpga_find_afu_by_name(const char *name);
  *   A pointer to a rte_afu_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_ifpga_driver_register(struct rte_afu_driver *driver);
 
 /**
@@ -145,6 +142,7 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver);
  *   A pointer to a rte_afu_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_ifpga_driver_unregister(struct rte_afu_driver *driver);
 
 #define RTE_PMD_REGISTER_AFU(nm, afudrv)\
@@ -164,4 +162,4 @@ static const char *afudrvinit_ ## nm ## _alias = RTE_STR(alias)
 }
 #endif /* __cplusplus */
 
-#endif /* _RTE_BUS_IFPGA_H_ */
+#endif /* BUS_IFPGA_DRIVER_H */
drivers/bus/ifpga/ifpga_bus.c +3 -3
index b1e9eb7cc4..27e2de7072 100644
@@ -28,7 +28,7 @@
 
 #include "rte_rawdev.h"
 #include "rte_rawdev_pmd.h"
-#include "rte_bus_ifpga.h"
+#include "bus_ifpga_driver.h"
 #include "ifpga_logs.h"
 #include "ifpga_common.h"
 
@@ -37,9 +37,9 @@
  */
 static struct rte_bus rte_ifpga_bus;
 
-static struct ifpga_afu_dev_list ifpga_afu_dev_list =
+static TAILQ_HEAD(, rte_afu_device) ifpga_afu_dev_list =
 	TAILQ_HEAD_INITIALIZER(ifpga_afu_dev_list);
-static struct ifpga_afu_drv_list ifpga_afu_drv_list =
+static TAILQ_HEAD(, rte_afu_driver) ifpga_afu_drv_list =
 	TAILQ_HEAD_INITIALIZER(ifpga_afu_drv_list);
 
 
drivers/bus/ifpga/ifpga_common.h +1 -1
index bb6524030f..a41a1628f5 100644
@@ -9,7 +9,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_common.h>
 
 static inline int
drivers/bus/ifpga/meson.build +1 -1
index 9d56a4bb2b..dedc94db2d 100644
@@ -8,5 +8,5 @@ if is_windows
 endif
 
 deps += ['pci', 'kvargs', 'rawdev']
-headers = files('rte_bus_ifpga.h')
+driver_sdk_headers += files('bus_ifpga_driver.h')
 sources = files('ifpga_bus.c')
drivers/bus/ifpga/version.map +1 -1
index da7f92c2a0..3d1943afe4 100644
@@ -1,4 +1,4 @@
-DPDK_23 {
+INTERNAL {
 	global:
 
 	rte_ifpga_driver_register;
drivers/net/ipn3ke/ipn3ke_ethdev.c +1 -1
index 550a8b0466..2e39113941 100644
@@ -16,7 +16,7 @@
 #include <rte_io.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <ifpga_common.h>
 #include <ifpga_logs.h>
 #include <ifpga_rawdev.h>
drivers/net/ipn3ke/ipn3ke_ethdev.h +1 -1
index 58fcc50c57..dbf57f9ba8 100644
@@ -24,7 +24,7 @@
 #include <rte_spinlock.h>
 
 #include <rte_cycles.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_tm_driver.h>
 
 #define IPN3KE_TM_SCRATCH_RW 0
drivers/net/ipn3ke/ipn3ke_flow.c +1 -1
index 66ae31a5a9..5b57ee9341 100644
@@ -20,7 +20,7 @@
 #include <rte_tailq.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <ifpga_common.h>
 #include <ifpga_logs.h>
 #include <ifpga_rawdev.h>
drivers/net/ipn3ke/ipn3ke_representor.c +1 -1
index abbecfdf2e..2f088d767f 100644
@@ -18,7 +18,7 @@
 #include <rte_io.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <ifpga_logs.h>
 
 #include "ipn3ke_rawdev_api.h"
drivers/net/ipn3ke/ipn3ke_tm.c +1 -1
index 6a9b98fd7f..2f242b678a 100644
@@ -19,7 +19,7 @@
 #include <rte_io.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <ifpga_logs.h>
 
 #include "ipn3ke_rawdev_api.h"
drivers/raw/ifpga/afu_pmd_core.h +1 -1
index 91118a19ab..ab5a228147 100644
@@ -15,7 +15,7 @@ extern "C" {
 
 #include <rte_spinlock.h>
 #include <rte_cycles.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
 #include "ifpga_rawdev.h"
drivers/raw/ifpga/afu_pmd_he_hssi.c +1 -1
index 102de50812..eca1edc270 100644
@@ -19,7 +19,7 @@
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
 #include "afu_pmd_core.h"
drivers/raw/ifpga/afu_pmd_he_lpbk.c +1 -1
index 8b2c85b5f8..da0aba6e00 100644
@@ -19,7 +19,7 @@
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
 #include "afu_pmd_core.h"
drivers/raw/ifpga/afu_pmd_he_mem.c +1 -1
index 0f57a03b0e..3c41aa9ee8 100644
@@ -18,7 +18,7 @@
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
 #include "afu_pmd_core.h"
drivers/raw/ifpga/afu_pmd_n3000.c +1 -1
index 5120df5f77..b7438bd372 100644
@@ -19,7 +19,7 @@
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <rte_bus_pci.h>
-#include <rte_bus_ifpga.h>
+#include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
 #include "afu_pmd_core.h"
drivers/raw/ifpga/ifpga_rawdev.c +1 -1
index 93a7e74959..bd9966a6c3 100644
@@ -35,7 +35,7 @@
 #include "base/ifpga_api.h"
 #include "rte_rawdev.h"
 #include "rte_rawdev_pmd.h"
-#include "rte_bus_ifpga.h"
+#include "bus_ifpga_driver.h"
 #include "ifpga_common.h"
 #include "ifpga_logs.h"
 #include "ifpga_rawdev.h"
Signature · 1 line
2.36.1
Acked-by on v3 15/26
#88 lore raw

RE: [RFC v3 15/26] bus/ifpga: make driver-only headers private

Hi,

Quoted 42 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 23:26
To: [email protected]
Cc: Xu, Rosen <[email protected]>; Ray Kinsella <[email protected]>; Zhang, Tianfei <[email protected]>
Subject: [RFC v3 15/26] bus/ifpga: make driver-only headers private

The ifpga bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 doc/guides/rel_notes/release_22_11.rst         |  2 +-
 .../{rte_bus_ifpga.h => bus_ifpga_driver.h}    | 18 ++++++++----------
 drivers/bus/ifpga/ifpga_bus.c                  |  6 +++---
 drivers/bus/ifpga/ifpga_common.h               |  2 +-
 drivers/bus/ifpga/meson.build                  |  2 +-
 drivers/bus/ifpga/version.map                  |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c             |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h             |  2 +-
 drivers/net/ipn3ke/ipn3ke_flow.c               |  2 +-
 drivers/net/ipn3ke/ipn3ke_representor.c        |  2 +-
 drivers/net/ipn3ke/ipn3ke_tm.c                 |  2 +-
 drivers/raw/ifpga/afu_pmd_core.h               |  2 +-
 drivers/raw/ifpga/afu_pmd_he_hssi.c            |  2 +-
 drivers/raw/ifpga/afu_pmd_he_lpbk.c            |  2 +-
 drivers/raw/ifpga/afu_pmd_he_mem.c             |  2 +-
 drivers/raw/ifpga/afu_pmd_n3000.c              |  2 +-
 drivers/raw/ifpga/ifpga_rawdev.c               |  2 +-
 17 files changed, 26 insertions(+), 28 deletions(-)  rename
Quoted 2 lines

drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)

#89 lore raw

RFC v3 16/26 bus/pci: make driver-only headers private

In reply to David Marchand

The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 app/test/virtual_pmd.c                        |   2 +-
 doc/guides/rel_notes/release_22_11.rst        |   2 +-
 drivers/baseband/acc100/rte_acc100_pmd.c      |   2 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |   2 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |   2 +-
 drivers/bus/pci/bsd/pci.c                     |   3 -
 drivers/bus/pci/bus_pci_driver.h              | 200 +++++++++++++++++
 drivers/bus/pci/linux/pci.c                   |   3 -
 drivers/bus/pci/meson.build                   |   1 +
 drivers/bus/pci/pci_common.c                  |   2 -
 drivers/bus/pci/private.h                     |  19 +-
 drivers/bus/pci/rte_bus_pci.h                 | 201 +-----------------
 drivers/bus/pci/version.map                   |  11 +-
 drivers/bus/pci/windows/pci.c                 |   1 +
 drivers/bus/pci/windows/pci_netuio.c          |   1 +
 drivers/common/cnxk/roc_platform.h            |   2 +-
 drivers/common/mlx5/linux/mlx5_common_os.c    |   2 +-
 drivers/common/mlx5/linux/mlx5_common_os.h    |   2 +-
 drivers/common/mlx5/mlx5_common.h             |   2 +-
 drivers/common/mlx5/mlx5_common_pci.c         |   3 +-
 drivers/common/mlx5/windows/mlx5_common_os.c  |   2 +-
 drivers/common/qat/qat_device.h               |   2 +-
 drivers/common/qat/qat_qp.c                   |   2 +-
 drivers/common/sfc_efx/sfc_efx.h              |   2 +-
 drivers/compress/mlx5/mlx5_compress.c         |   2 +-
 drivers/compress/octeontx/otx_zip.h           |   2 +-
 drivers/compress/qat/qat_comp.c               |   2 +-
 drivers/crypto/ccp/ccp_dev.h                  |   2 +-
 drivers/crypto/ccp/ccp_pci.h                  |   2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |   2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |   2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |   2 +-
 drivers/crypto/mlx5/mlx5_crypto.c             |   2 +-
 drivers/crypto/nitrox/nitrox_device.h         |   2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |   2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |   2 +-
 drivers/crypto/qat/qat_sym.c                  |   2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |   2 +-
 drivers/crypto/virtio/virtio_pci.c            |   1 -
 drivers/crypto/virtio/virtio_pci.h            |   2 +-
 drivers/dma/cnxk/cnxk_dmadev.c                |   3 +-
 drivers/dma/hisilicon/hisi_dmadev.c           |   2 +-
 drivers/dma/idxd/idxd_pci.c                   |   2 +-
 drivers/dma/ioat/ioat_dmadev.c                |   2 +-
 drivers/event/dlb2/pf/dlb2_main.h             |   2 +-
 drivers/event/dlb2/pf/dlb2_pf.c               |   2 +-
 drivers/event/octeontx/ssovf_probe.c          |   2 +-
 drivers/event/octeontx/timvf_probe.c          |   2 +-
 drivers/gpu/cuda/cuda.c                       |   2 +-
 drivers/mempool/cnxk/cnxk_mempool.c           |   2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |   2 +-
 drivers/net/ark/ark_ethdev.c                  |   2 +-
 drivers/net/avp/avp_ethdev.c                  |   2 +-
 drivers/net/bnx2x/bnx2x.h                     |   2 +-
 drivers/net/bnxt/bnxt.h                       |   2 +-
 drivers/net/bonding/rte_eth_bond_args.c       |   3 +-
 drivers/net/cxgbe/base/adapter.h              |   2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |   2 +-
 drivers/net/e1000/em_ethdev.c                 |   2 +-
 drivers/net/e1000/em_rxtx.c                   |   2 +-
 drivers/net/e1000/igb_ethdev.c                |   2 +-
 drivers/net/e1000/igb_pf.c                    |   2 +-
 drivers/net/ena/ena_ethdev.h                  |   2 +-
 drivers/net/enic/base/vnic_dev.h              |   2 +-
 drivers/net/enic/enic_ethdev.c                |   2 +-
 drivers/net/enic/enic_main.c                  |   2 +-
 drivers/net/enic/enic_vf_representor.c        |   2 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c      |   2 +-
 drivers/net/hinic/base/hinic_pmd_hwif.c       |   2 +-
 drivers/net/hinic/base/hinic_pmd_nicio.c      |   2 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   2 +-
 drivers/net/hns3/hns3_common.c                |   2 +-
 drivers/net/hns3/hns3_ethdev.c                |   2 +-
 drivers/net/hns3/hns3_rxtx.c                  |   2 +-
 drivers/net/i40e/i40e_ethdev.c                |   2 +-
 drivers/net/i40e/i40e_vf_representor.c        |   2 +-
 drivers/net/igc/igc_ethdev.c                  |   2 +-
 drivers/net/ionic/ionic.h                     |   2 +-
 drivers/net/ionic/ionic_ethdev.c              |   2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |   2 +-
 drivers/net/ipn3ke/ipn3ke_representor.c       |   2 +-
 drivers/net/ipn3ke/ipn3ke_tm.c                |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.h              |   2 +-
 drivers/net/mlx4/mlx4_ethdev.c                |   2 +-
 drivers/net/mlx5/linux/mlx5_ethdev_os.c       |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c              |   3 +-
 drivers/net/mlx5/mlx5.c                       |   2 +-
 drivers/net/mlx5/mlx5_ethdev.c                |   2 +-
 drivers/net/mlx5/mlx5_flow_dv.c               |   2 +-
 drivers/net/mlx5/mlx5_txq.c                   |   2 +-
 drivers/net/netvsc/hn_vf.c                    |   2 +-
 drivers/net/ngbe/base/ngbe_osdep.h            |   2 +-
 drivers/net/ngbe/ngbe_pf.c                    |   2 +-
 drivers/net/octeontx/base/octeontx_pkivf.c    |   2 +-
 drivers/net/octeontx/base/octeontx_pkovf.c    |   2 +-
 drivers/net/qede/base/bcm_osal.h              |   2 +-
 drivers/net/sfc/sfc.h                         |   2 +-
 drivers/net/sfc/sfc_ethdev.c                  |   2 +-
 drivers/net/sfc/sfc_sriov.c                   |   2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |   2 +-
 drivers/net/txgbe/txgbe_ethdev.h              |   2 +-
 drivers/net/txgbe/txgbe_flow.c                |   2 +-
 drivers/net/txgbe/txgbe_pf.c                  |   2 +-
 drivers/net/virtio/virtio_pci.h               |   2 +-
 drivers/net/virtio/virtio_pci_ethdev.c        |   2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy.c             |   2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c         |   2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy_irq.c         |   2 +-
 drivers/raw/ifpga/afu_pmd_he_hssi.c           |   2 +-
 drivers/raw/ifpga/afu_pmd_he_lpbk.c           |   2 +-
 drivers/raw/ifpga/afu_pmd_he_mem.c            |   2 +-
 drivers/raw/ifpga/afu_pmd_n3000.c             |   2 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |   2 +-
 drivers/raw/ifpga/rte_pmd_ifpga.c             |   2 +-
 drivers/raw/ioat/idxd_pci.c                   |   2 +-
 drivers/raw/ioat/ioat_rawdev.c                |   2 +-
 drivers/raw/ntb/ntb.c                         |   2 +-
 drivers/raw/ntb/ntb_hw_intel.c                |   2 +-
 drivers/regex/mlx5/mlx5_regex.c               |   2 +-
 drivers/regex/mlx5/mlx5_regex_fastpath.c      |   2 +-
 drivers/vdpa/ifc/base/ifcvf_osdep.h           |   2 +-
 drivers/vdpa/ifc/ifcvf_vdpa.c                 |   2 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |   2 +-
 drivers/vdpa/sfc/sfc_vdpa.h                   |   2 +-
 lib/ethdev/ethdev_pci.h                       |   2 +-
 lib/eventdev/eventdev_pmd_pci.h               |   2 +-
 128 files changed, 350 insertions(+), 331 deletions(-)
 create mode 100644 drivers/bus/pci/bus_pci_driver.h
app/test/virtual_pmd.c +1 -1
index cd4611ab48..2b55c85fd8 100644
@@ -6,7 +6,7 @@
 #include <rte_ethdev.h>
 #include <ethdev_driver.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_memory.h>
doc/guides/rel_notes/release_22_11.rst +1 -1
index 8aae628d71..79ec128533 100644
@@ -84,7 +84,7 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
-* drivers: Registering a driver on the ``auxiliary``, ``ifpga``
+* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``
   buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
drivers/baseband/acc100/rte_acc100_pmd.c +1 -1
index a8482bd411..801e8920df 100644
@@ -14,7 +14,7 @@
 #include <rte_branch_prediction.h>
 #include <rte_hexdump.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
 #endif
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +1 -1
index 82ae6ba678..c1d877c87f 100644
@@ -11,7 +11,7 @@
 #include <rte_mempool.h>
 #include <rte_errno.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 #ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +1 -1
index 21d35292a3..f16814e241 100644
@@ -11,7 +11,7 @@
 #include <rte_mempool.h>
 #include <rte_errno.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 #ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
drivers/bus/pci/bsd/pci.c +0 -3
index 9a11f99ae3..bc560a2a56 100644
@@ -28,7 +28,6 @@
 #include <rte_interrupts.h>
 #include <rte_log.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_launch.h>
 #include <rte_memory.h>
@@ -48,8 +47,6 @@
  * PCI probing under BSD.
  */
 
-extern struct rte_pci_bus rte_pci_bus;
-
 /* Map pci device */
 int
 rte_pci_map_device(struct rte_pci_device *dev)
drivers/bus/pci/bus_pci_driver.h new file +200 -0

200 lines not on this page · raw message

drivers/bus/pci/linux/pci.c +0 -3
index e521459870..fa5d5e131d 100644
@@ -6,7 +6,6 @@
 #include <dirent.h>
 
 #include <rte_log.h>
-#include <rte_bus.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_malloc.h>
@@ -24,8 +23,6 @@
  * PCI probing using Linux sysfs.
  */
 
-extern struct rte_pci_bus rte_pci_bus;
-
 static int
 pci_get_kernel_driver_by_path(const char *filename, char *dri_name,
 			      size_t len)
drivers/bus/pci/meson.build +1 -0
index 81c7e94c00..f50f039a68 100644
@@ -3,6 +3,7 @@
 
 deps += ['pci']
 headers = files('rte_bus_pci.h')
+driver_sdk_headers = files('bus_pci_driver.h')
 sources = files('pci_common.c',
     'pci_params.c')
 if is_linux
drivers/bus/pci/pci_common.c +0 -2
index 37ab879779..0d61d49287 100644
@@ -443,7 +443,6 @@ void
 rte_pci_register(struct rte_pci_driver *driver)
 {
 	TAILQ_INSERT_TAIL(&rte_pci_bus.driver_list, driver, next);
-	driver->bus = &rte_pci_bus;
 }
 
 /* unregister a driver */
@@ -451,7 +450,6 @@ void
 rte_pci_unregister(struct rte_pci_driver *driver)
 {
 	TAILQ_REMOVE(&rte_pci_bus.driver_list, driver, next);
-	driver->bus = NULL;
 }
 
 /* Add a device to PCI bus */
drivers/bus/pci/private.h +18 -1
index 0fbef8e1d8..4e40a2ed85 100644
@@ -8,12 +8,29 @@
 #include <stdbool.h>
 #include <stdio.h>
 
-#include <rte_bus_pci.h>
+#include <rte_bus.h>
+#include <bus_pci_driver.h>
 #include <rte_os_shim.h>
 #include <rte_pci.h>
 
+/**
+ * Structure describing the PCI bus
+ */
+struct rte_pci_bus {
+	struct rte_bus bus;               /**< Inherit the generic class */
+	RTE_TAILQ_HEAD(, rte_pci_device) device_list; /**< List of PCI devices */
+	RTE_TAILQ_HEAD(, rte_pci_driver) driver_list; /**< List of PCI drivers */
+};
+
 extern struct rte_pci_bus rte_pci_bus;
 
+/* PCI Bus iterators */
+#define FOREACH_DEVICE_ON_PCIBUS(p)	\
+	RTE_TAILQ_FOREACH(p, &(rte_pci_bus.device_list), next)
+
+#define FOREACH_DRIVER_ON_PCIBUS(p)	\
+	RTE_TAILQ_FOREACH(p, &(rte_pci_bus.driver_list), next)
+
 struct rte_pci_driver;
 struct rte_pci_device;
 
drivers/bus/pci/rte_bus_pci.h +1 -200

227 lines not on this page · raw message

drivers/bus/pci/version.map +8 -3
index 3d5c2f3068..161ab86d3b 100644
@@ -2,16 +2,13 @@ DPDK_23 {
 	global:
 
 	rte_pci_dump;
-	rte_pci_get_sysfs_path;
 	rte_pci_ioport_map;
 	rte_pci_ioport_read;
 	rte_pci_ioport_unmap;
 	rte_pci_ioport_write;
 	rte_pci_map_device;
 	rte_pci_read_config;
-	rte_pci_register;
 	rte_pci_unmap_device;
-	rte_pci_unregister;
 	rte_pci_write_config;
 
 	local: *;
@@ -25,3 +22,11 @@ EXPERIMENTAL {
 	# added in 21.08
 	rte_pci_set_bus_master;
 };
+
+INTERNAL {
+	global:
+
+	rte_pci_get_sysfs_path;
+	rte_pci_register;
+	rte_pci_unregister;
+};
drivers/bus/pci/windows/pci.c +1 -0
index 7bf091158b..f013b743b3 100644
@@ -9,6 +9,7 @@
 #include <rte_log.h>
 #include <rte_eal.h>
 #include <rte_memory.h>
+#include <rte_bus_pci.h>
 
 #include "private.h"
 #include "pci_netuio.h"
drivers/bus/pci/windows/pci_netuio.c +1 -0
index 5460399eea..314bbcf547 100644
@@ -8,6 +8,7 @@
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_eal.h>
+#include <rte_bus_pci.h>
 
 #ifdef __MINGW32__
 #include <ddk/ndisguid.h>
drivers/common/cnxk/roc_platform.h +1 -1
index 502f243a81..a7cbe444ae 100644
@@ -7,7 +7,7 @@
 
 #include <rte_alarm.h>
 #include <rte_bitmap.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index b42102e84c..aafff60eeb 100644
@@ -15,7 +15,7 @@
 
 #include <rte_errno.h>
 #include <rte_string_fns.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <bus_auxiliary_driver.h>
 
 #include "mlx5_common.h"
drivers/common/mlx5/linux/mlx5_common_os.h +1 -1
index 479bb3c7cb..81702b8768 100644
@@ -9,7 +9,7 @@
 #include <malloc.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_debug.h>
 #include <rte_atomic.h>
 #include <rte_log.h>
drivers/common/mlx5/mlx5_common.h +1 -1
index 63f31437da..629a639a81 100644
@@ -8,7 +8,7 @@
 #include <stdio.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_debug.h>
 #include <rte_atomic.h>
 #include <rte_rwlock.h>
drivers/common/mlx5/mlx5_common_pci.c +2 -1
index 66626953f1..e82cb881bf 100644
@@ -9,7 +9,8 @@
 #include <rte_errno.h>
 #include <rte_class.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <rte_bus.h>
+#include <bus_pci_driver.h>
 
 #include "mlx5_common_log.h"
 #include "mlx5_common_private.h"
drivers/common/mlx5/windows/mlx5_common_os.c +1 -1
index f2fc7cd494..2b6058eb3e 100644
@@ -7,7 +7,7 @@
 #include <stdio.h>
 
 #include <rte_mempool.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
 
drivers/common/qat/qat_device.h +1 -1
index e1a32a7e87..d1512f3b89 100644
@@ -4,7 +4,7 @@
 #ifndef _QAT_DEVICE_H_
 #define _QAT_DEVICE_H_
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "qat_common.h"
 #include "qat_logs.h"
drivers/common/qat/qat_qp.c +1 -1
index 08ac91eac4..4a1be35b47 100644
@@ -8,7 +8,7 @@
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_atomic.h>
 #include <rte_prefetch.h>
 
drivers/common/sfc_efx/sfc_efx.h +1 -1
index c16eca60f3..d3ea586cb8 100644
@@ -10,7 +10,7 @@
 #ifndef _SFC_EFX_H_
 #define _SFC_EFX_H_
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "efx.h"
 #include "efsys.h"
drivers/compress/mlx5/mlx5_compress.c +1 -1
index d64a628c74..3d2c45fcee 100644
@@ -5,7 +5,7 @@
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_errno.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_spinlock.h>
 #include <rte_comp.h>
 #include <rte_compressdev.h>
drivers/compress/octeontx/otx_zip.h +1 -1
index 46c80c8dc2..cdef8cc6cb 100644
@@ -7,7 +7,7 @@
 
 #include <unistd.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_comp.h>
 #include <rte_compressdev.h>
 #include <rte_compressdev_pmd.h>
drivers/compress/qat/qat_comp.c +1 -1
index e8f57c3cc4..fe4a4999c6 100644
@@ -6,7 +6,7 @@
 #include <rte_mbuf.h>
 #include <rte_hexdump.h>
 #include <rte_comp.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 #include <rte_memcpy.h>
 #include <rte_common.h>
drivers/crypto/ccp/ccp_dev.h +1 -1
index 2a205cd446..9deaae7980 100644
@@ -10,7 +10,7 @@
 #include <stdint.h>
 #include <string.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_atomic.h>
 #include <rte_byteorder.h>
 #include <rte_io.h>
drivers/crypto/ccp/ccp_pci.h +1 -1
index 7ed3bac406..6736bf8ad3 100644
@@ -7,7 +7,7 @@
 
 #include <stdint.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
 #define PROC_MODULES "/proc/modules"
drivers/crypto/ccp/rte_ccp_pmd.c +1 -1
index a35a8cd775..4957f11e97 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_string_fns.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
drivers/crypto/cnxk/cn10k_cryptodev.c +1 -1
index 1e0a7b91c9..3fd9f3c426 100644
@@ -2,7 +2,7 @@
  * Copyright(C) 2021 Marvell.
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
drivers/crypto/cnxk/cn9k_cryptodev.c +1 -1
index 54cd77e575..bd425f95ff 100644
@@ -2,7 +2,7 @@
  * Copyright(C) 2021 Marvell.
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
drivers/crypto/mlx5/mlx5_crypto.c +1 -1
index eb7616257e..dc8e291f50 100644
@@ -7,7 +7,7 @@
 #include <rte_eal_paging.h>
 #include <rte_errno.h>
 #include <rte_log.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memory.h>
 
 #include <mlx5_glue.h>
drivers/crypto/nitrox/nitrox_device.h +1 -1
index 6b8095f42b..1ff7c59b63 100644
@@ -5,7 +5,7 @@
 #ifndef _NITROX_DEVICE_H_
 #define _NITROX_DEVICE_H_
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_cryptodev.h>
 
 struct nitrox_sym_device;
drivers/crypto/octeontx/otx_cryptodev.c +1 -1
index 337d06aab8..b5ab937c3a 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2018 Cavium, Inc
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <cryptodev_pmd.h>
 #include <rte_log.h>
drivers/crypto/octeontx/otx_cryptodev_ops.c +1 -1
index 7aee67ab09..11840f5ecf 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_alarm.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
drivers/crypto/qat/qat_sym.c +1 -1
index db6316fbe9..f3a99ae15c 100644
@@ -7,7 +7,7 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_crypto_sym.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 
 #include "qat_sym.h"
drivers/crypto/virtio/virtio_cryptodev.c +1 -1
index ed64866758..21bd996064 100644
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_errno.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_eal.h>
drivers/crypto/virtio/virtio_pci.c +0 -1
index ae069794a6..95a43c8801 100644
@@ -10,7 +10,6 @@
 #endif
 
 #include <rte_io.h>
-#include <rte_bus.h>
 
 #include "virtio_pci.h"
 #include "virtqueue.h"
drivers/crypto/virtio/virtio_pci.h +1 -1
index 0a7ea1bb64..41949c3d13 100644
@@ -9,7 +9,7 @@
 
 #include <rte_eal_paging.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_cryptodev.h>
 
 #include "virtio_crypto.h"
drivers/dma/cnxk/cnxk_dmadev.c +1 -2
index 2824c1b44f..9f0de60861 100644
@@ -5,8 +5,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <rte_bus.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
drivers/dma/hisilicon/hisi_dmadev.c +1 -1
index 9494b60779..0e11ca14cc 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_cycles.h>
 #include <rte_eal.h>
 #include <rte_io.h>
drivers/dma/idxd/idxd_pci.c +1 -1
index 2f8ec06d9e..781fa02db3 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2021 Intel Corporation
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_devargs.h>
 #include <rte_dmadev_pmd.h>
 #include <rte_malloc.h>
drivers/dma/ioat/ioat_dmadev.c +1 -1
index a230496b11..5906eb45aa 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2021 Intel Corporation
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_dmadev_pmd.h>
 #include <rte_malloc.h>
 #include <rte_prefetch.h>
drivers/event/dlb2/pf/dlb2_main.h +1 -1
index 9eeda482a3..5aa51b1616 100644
@@ -9,7 +9,7 @@
 #include <rte_log.h>
 #include <rte_spinlock.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_eal_paging.h>
 
 #include "base/dlb2_hw_types.h"
drivers/event/dlb2/pf/dlb2_pf.c +1 -1
index dd3f2b8ece..9f8c6cd8b8 100644
@@ -25,7 +25,7 @@
 #include <rte_cycles.h>
 #include <rte_io.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_eventdev.h>
 #include <eventdev_pmd.h>
 #include <eventdev_pmd_pci.h>
drivers/event/octeontx/ssovf_probe.c +1 -1
index 4da7d1ae45..2c9601a8ff 100644
@@ -7,7 +7,7 @@
 #include <rte_eal.h>
 #include <rte_io.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "octeontx_mbox.h"
 #include "ssovf_evdev.h"
drivers/event/octeontx/timvf_probe.c +1 -1
index 59bba31e8e..7ce3eddd7e 100644
@@ -5,7 +5,7 @@
 #include <rte_eal.h>
 #include <rte_io.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include <octeontx_mbox.h>
 
drivers/gpu/cuda/cuda.c +1 -1
index 664605d9fb..2be7b8d2df 100644
@@ -6,7 +6,7 @@
 
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_byteorder.h>
 #include <rte_dev.h>
 
drivers/mempool/cnxk/cnxk_mempool.c +1 -1
index 54a1a7d3ae..78caf987d0 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_atomic.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_eal.h>
drivers/mempool/octeontx/octeontx_fpavf.c +1 -1
index 8fd9edced2..1513c632c6 100644
@@ -13,7 +13,7 @@
 
 #include <rte_atomic.h>
 #include <rte_eal.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_malloc.h>
drivers/net/ark/ark_ethdev.c +1 -1
index e8e4092be6..c654a229f7 100644
@@ -6,7 +6,7 @@
 #include <sys/stat.h>
 #include <dlfcn.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_pci.h>
 #include <rte_kvargs.h>
 
drivers/net/avp/avp_ethdev.c +1 -1
index 7ac55584ff..7c0cb666fb 100644
@@ -16,7 +16,7 @@
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ether.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
drivers/net/bnx2x/bnx2x.h +1 -1
index d7e1729e68..89414ac88a 100644
@@ -16,7 +16,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_spinlock.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_io.h>
 
 #include "bnx2x_osal.h"
drivers/net/bnxt/bnxt.h +1 -1
index e86e51e1fa..c9aa45ed3b 100644
@@ -11,7 +11,7 @@
 #include <sys/queue.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_driver.h>
 #include <rte_memory.h>
 #include <rte_lcore.h>
drivers/net/bonding/rte_eth_bond_args.c +2 -1
index 5406e1c934..1a86eb3c00 100644
@@ -4,7 +4,8 @@
 
 #include <rte_devargs.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <rte_bus.h>
+#include <bus_pci_driver.h>
 #include <rte_kvargs.h>
 
 #include "rte_eth_bond.h"
drivers/net/cxgbe/base/adapter.h +1 -1
index 1c016a7115..16cbc1a345 100644
@@ -8,7 +8,7 @@
 #ifndef __T4_ADAPTER_H__
 #define __T4_ADAPTER_H__
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_mbuf.h>
 #include <rte_io.h>
 #include <rte_rwlock.h>
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index cf9a2fdc19..fd71a50a58 100644
@@ -20,7 +20,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_branch_prediction.h>
 #include <rte_memory.h>
 #include <rte_tailq.h>
drivers/net/e1000/em_ethdev.c +1 -1
index 794496abfc..409de50083 100644
@@ -13,7 +13,7 @@
 #include <rte_byteorder.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
drivers/net/e1000/em_rxtx.c +1 -1
index cea5b490ba..d48fd52404 100644
@@ -18,7 +18,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
drivers/net/e1000/igb_ethdev.c +1 -1
index a9c18b27e8..43979992d3 100644
@@ -15,7 +15,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
drivers/net/e1000/igb_pf.c +1 -1
index 3f3fd0d61e..c7588ea57e 100644
@@ -10,7 +10,7 @@
 #include <stdarg.h>
 #include <inttypes.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_interrupts.h>
 #include <rte_log.h>
 #include <rte_debug.h>
drivers/net/ena/ena_ethdev.h +1 -1
index 0db0918b43..4709675af8 100644
@@ -12,7 +12,7 @@
 #include <ethdev_pci.h>
 #include <rte_cycles.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_timer.h>
 #include <rte_dev.h>
 #include <rte_net.h>
drivers/net/enic/base/vnic_dev.h +1 -1
index 4b9f75b65f..44ca5c739f 100644
@@ -9,7 +9,7 @@
 #include <stdbool.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "enic_compat.h"
 #include "vnic_resource.h"
drivers/net/enic/enic_ethdev.c +1 -1
index a8d470e8ac..998436e5e8 100644
@@ -8,7 +8,7 @@
 
 #include <rte_dev.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_geneve.h>
drivers/net/enic/enic_main.c +1 -1
index 9f351de72e..19a99a82c5 100644
@@ -10,7 +10,7 @@
 #include <fcntl.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memzone.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
drivers/net/enic/enic_vf_representor.c +1 -1
index 1ad6ad3dfb..7312c411bd 100644
@@ -5,7 +5,7 @@
 #include <stdint.h>
 #include <stdio.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_dev.h>
 #include <ethdev_driver.h>
drivers/net/hinic/base/hinic_pmd_hwdev.c +1 -1
index 5eb022297e..818698dcb3 100644
@@ -3,7 +3,7 @@
  */
 
 #include<ethdev_driver.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_hash.h>
 #include <rte_jhash.h>
 
drivers/net/hinic/base/hinic_pmd_hwif.c +1 -1
index 26fa1e27d4..2d3f192b21 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2017 Huawei Technologies Co., Ltd
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "hinic_compat.h"
 #include "hinic_csr.h"
drivers/net/hinic/base/hinic_pmd_nicio.c +1 -1
index ad5db9f1de..4aa3fa6adc 100644
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2017 Huawei Technologies Co., Ltd
  */
-#include<rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "hinic_compat.h"
 #include "hinic_pmd_hwdev.h"
drivers/net/hinic/hinic_pmd_ethdev.c +1 -1
index 35788f46eb..7aa5e7d8e9 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_pci.h>
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
drivers/net/hns3/hns3_common.c +1 -1
index 424205356e..e8e5aa2c86 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_kvargs.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
 
drivers/net/hns3/hns3_ethdev.c +1 -1
index 6b1d1a5fb1..144daf1636 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_alarm.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_pci.h>
 
 #include "hns3_ethdev.h"
drivers/net/hns3/hns3_rxtx.c +1 -1
index 95f711e7eb..cd0c91f3a3 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_geneve.h>
drivers/net/i40e/i40e_ethdev.c +1 -1
index 67d79de08d..7bdc453ec1 100644
@@ -15,7 +15,7 @@
 #include <rte_eal.h>
 #include <rte_string_fns.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
drivers/net/i40e/i40e_vf_representor.c +1 -1
index 7f8e81858e..cc0f992453 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2018 Intel Corporation.
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ethdev.h>
 #include <rte_pci.h>
 #include <rte_malloc.h>
drivers/net/igc/igc_ethdev.c +1 -1
index 7f221a5d34..e3727b7b41 100644
@@ -7,7 +7,7 @@
 
 #include <rte_string_fns.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
drivers/net/ionic/ionic.h +1 -1
index 49b90d1b7c..a55202b178 100644
@@ -8,7 +8,7 @@
 #include <stdint.h>
 #include <inttypes.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "ionic_dev.h"
 #include "ionic_if.h"
drivers/net/ionic/ionic_ethdev.c +1 -1
index 28280c5377..d72033c32c 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ethdev.h>
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
drivers/net/ipn3ke/ipn3ke_ethdev.c +1 -1
index 2e39113941..70a06a3b15 100644
@@ -4,7 +4,7 @@
 
 #include <stdint.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ethdev.h>
 #include <rte_pci.h>
 #include <rte_malloc.h>
drivers/net/ipn3ke/ipn3ke_representor.c +1 -1
index 2f088d767f..2ef96a984a 100644
@@ -5,7 +5,7 @@
 #include <stdint.h>
 #include <unistd.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ethdev.h>
 #include <rte_pci.h>
 #include <rte_malloc.h>
drivers/net/ipn3ke/ipn3ke_tm.c +1 -1
index 2f242b678a..0260227900 100644
@@ -6,7 +6,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ethdev.h>
 #include <rte_pci.h>
 #include <rte_malloc.h>
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index f31bbb7895..552e41692c 100644
@@ -19,7 +19,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_branch_prediction.h>
 #include <rte_memory.h>
 #include <rte_kvargs.h>
drivers/net/ixgbe/ixgbe_ethdev.h +1 -1
index cc6049a66a..ff34fd1515 100644
@@ -20,7 +20,7 @@
 #include <rte_time.h>
 #include <rte_hash.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_tm_driver.h>
 
 /* need update link, bit flag */
drivers/net/mlx4/mlx4_ethdev.c +1 -1
index ce74c51ce2..bb1dd33e7c 100644
@@ -32,7 +32,7 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_errno.h>
 #include <ethdev_driver.h>
 #include <rte_ether.h>
drivers/net/mlx5/linux/mlx5_ethdev_os.c +1 -1
index aaf636aa0d..661d362dc0 100644
@@ -25,7 +25,7 @@
 #include <time.h>
 
 #include <ethdev_driver.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_mbuf.h>
 #include <rte_common.h>
 #include <rte_interrupts.h>
drivers/net/mlx5/linux/mlx5_os.c +2 -1
index c9ed38ef7c..efb262e368 100644
@@ -19,7 +19,8 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <rte_bus.h>
+#include <bus_pci_driver.h>
 #include <bus_auxiliary_driver.h>
 #include <rte_common.h>
 #include <rte_kvargs.h>
drivers/net/mlx5/mlx5.c +1 -1
index 998846adbe..30923b0732 100644
@@ -14,7 +14,7 @@
 #include <rte_malloc.h>
 #include <ethdev_driver.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_kvargs.h>
 #include <rte_rwlock.h>
drivers/net/mlx5/mlx5_ethdev.c +1 -1
index 05c919ed39..a5c7ca8c52 100644
@@ -11,7 +11,7 @@
 #include <errno.h>
 
 #include <ethdev_driver.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_mbuf.h>
 #include <rte_common.h>
 #include <rte_interrupts.h>
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index bee9363515..e122b39cb3 100644
@@ -15,7 +15,7 @@
 #include <rte_flow_driver.h>
 #include <rte_malloc.h>
 #include <rte_cycles.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_ip.h>
 #include <rte_gre.h>
 #include <rte_vxlan.h>
drivers/net/mlx5/mlx5_txq.c +1 -1
index 0140f8b3b2..9150ced72d 100644
@@ -13,7 +13,7 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <ethdev_driver.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_eal_paging.h>
 
drivers/net/netvsc/hn_vf.c +1 -1
index 62948bf889..cce0a79edb 100644
@@ -21,7 +21,7 @@
 #include <rte_memory.h>
 #include <rte_bus_vmbus.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
 #include <rte_alarm.h>
drivers/net/ngbe/base/ngbe_osdep.h +1 -1
index bf1fa30312..8783fce4dd 100644
@@ -19,7 +19,7 @@
 #include <rte_config.h>
 #include <rte_io.h>
 #include <rte_ether.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "../ngbe_logs.h"
 
drivers/net/ngbe/ngbe_pf.c +1 -1
index 12a18de31d..947ae7fe94 100644
@@ -6,7 +6,7 @@
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "base/ngbe.h"
 #include "ngbe_ethdev.h"
drivers/net/octeontx/base/octeontx_pkivf.c +1 -1
index 0ddff54886..6a48a22de6 100644
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_eal.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "../octeontx_logs.h"
 #include "octeontx_io.h"
drivers/net/octeontx/base/octeontx_pkovf.c +1 -1
index bf28bc7992..5d445dfb49 100644
@@ -10,7 +10,7 @@
 #include <rte_cycles.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_spinlock.h>
 
 #include "../octeontx_logs.h"
drivers/net/qede/base/bcm_osal.h +1 -1
index 9ea579bfc8..67e7f759fe 100644
@@ -20,7 +20,7 @@
 #include <rte_ether.h>
 #include <rte_io.h>
 #include <rte_version.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 /* Forward declaration */
 struct ecore_dev;
drivers/net/sfc/sfc.h +1 -1
index a0979618be..0a1e224fa2 100644
@@ -13,7 +13,7 @@
 #include <stdbool.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_spinlock.h>
drivers/net/sfc/sfc_ethdev.c +1 -1
index 39f85e8b84..506c62a726 100644
@@ -11,7 +11,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_ether.h>
drivers/net/sfc/sfc_sriov.c +1 -1
index 385b172e2e..009b884d8d 100644
@@ -8,7 +8,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "sfc.h"
 #include "sfc_log.h"
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index 262c024560..28183ec740 100644
@@ -32,7 +32,7 @@
 #include <rte_malloc.h>
 #include <rte_random.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
drivers/net/txgbe/txgbe_ethdev.h +1 -1
index 262dbb5e38..6fb22ca7d9 100644
@@ -20,7 +20,7 @@
 #include <rte_ethdev_core.h>
 #include <rte_hash.h>
 #include <rte_hash_crc.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_tm_driver.h>
 
 /* need update link, bit flag */
drivers/net/txgbe/txgbe_flow.c +1 -1
index d0093c0163..f19bdf36dc 100644
@@ -4,7 +4,7 @@
  */
 
 #include <sys/queue.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_malloc.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
drivers/net/txgbe/txgbe_pf.c +1 -1
index 0b82fb1a88..176f79005c 100644
@@ -20,7 +20,7 @@
 #include <rte_memcpy.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "base/txgbe.h"
 #include "txgbe_ethdev.h"
drivers/net/virtio/virtio_pci.h +1 -1
index 11e25a0142..6d4a8712c2 100644
@@ -9,7 +9,7 @@
 #include <stdbool.h>
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <ethdev_driver.h>
 
 #include "virtio.h"
drivers/net/virtio/virtio_pci_ethdev.c +1 -1
index 1f6bdeddda..2b9e35cef5 100644
@@ -11,7 +11,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_errno.h>
 
 #include <rte_memory.h>
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -1
index 2af67dc0a3..101b1cb500 100644
@@ -19,7 +19,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_branch_prediction.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
drivers/raw/cnxk_bphy/cnxk_bphy.c +1 -1
index 349d551839..db029cbf34 100644
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(C) 2021 Marvell.
  */
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_common.h>
 #include <rte_dev.h>
 #include <rte_eal.h>
drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c +1 -1
index 26def43564..2d8466ef91 100644
@@ -3,7 +3,7 @@
  */
 #include <string.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
 
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +1 -1
index bbe7f74def..b424d6127d 100644
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(C) 2021 Marvell.
  */
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_pci.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
drivers/raw/ifpga/afu_pmd_he_hssi.c +1 -1
index eca1edc270..859f28dcc1 100644
@@ -18,7 +18,7 @@
 #include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
drivers/raw/ifpga/afu_pmd_he_lpbk.c +1 -1
index da0aba6e00..c7c5cda48c 100644
@@ -18,7 +18,7 @@
 #include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
drivers/raw/ifpga/afu_pmd_he_mem.c +1 -1
index 3c41aa9ee8..a1db533eeb 100644
@@ -17,7 +17,7 @@
 #include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
drivers/raw/ifpga/afu_pmd_n3000.c +1 -1
index b7438bd372..67b3941265 100644
@@ -18,7 +18,7 @@
 #include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <bus_ifpga_driver.h>
 #include <rte_rawdev.h>
 
drivers/raw/ifpga/ifpga_rawdev.c +1 -1
index bd9966a6c3..d6106dd5da 100644
@@ -16,7 +16,7 @@
 #include <rte_devargs.h>
 #include <rte_memcpy.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_kvargs.h>
 #include <rte_alarm.h>
 #include <rte_interrupts.h>
drivers/raw/ifpga/rte_pmd_ifpga.c +1 -1
index 1ca248123b..a47d5a0350 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
 #include "rte_pmd_ifpga.h"
drivers/raw/ioat/idxd_pci.c +1 -1
index 13515dbc6c..90ec0222e6 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memzone.h>
 #include <rte_devargs.h>
 
drivers/raw/ioat/ioat_rawdev.c +1 -1
index 11341fcf5d..f58006bbda 100644
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cycles.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
 #include <rte_rawdev_pmd.h>
drivers/raw/ntb/ntb.c +1 -1
index f5e773c53b..76e98fe515 100644
@@ -13,7 +13,7 @@
 #include <rte_log.h>
 #include <rte_pci.h>
 #include <rte_mbuf.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_memzone.h>
 #include <rte_memcpy.h>
 #include <rte_rawdev.h>
drivers/raw/ntb/ntb_hw_intel.c +1 -1
index 20cdb761a3..9b4465176a 100644
@@ -8,7 +8,7 @@
 #include <rte_io.h>
 #include <rte_eal.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
 
drivers/regex/mlx5/mlx5_regex.c +1 -1
index 9f79c6907c..4c20daac94 100644
@@ -9,7 +9,7 @@
 #include <rte_regexdev.h>
 #include <rte_regexdev_core.h>
 #include <rte_regexdev_driver.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include <mlx5_common.h>
 #include <mlx5_common_mr.h>
drivers/regex/mlx5/mlx5_regex_fastpath.c +1 -1
index 9a2db7e43f..0a8c83fe14 100644
@@ -10,7 +10,7 @@
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_errno.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_pci.h>
 #include <rte_regexdev_driver.h>
 #include <rte_mbuf.h>
drivers/vdpa/ifc/base/ifcvf_osdep.h +1 -1
index 3d567695cc..6444d7f72c 100644
@@ -10,7 +10,7 @@
 
 #include <rte_cycles.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_log.h>
 #include <rte_io.h>
 
drivers/vdpa/ifc/ifcvf_vdpa.c +1 -1
index ac42de9c79..d5ac583589 100644
@@ -14,7 +14,7 @@
 #include <rte_eal_paging.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_vhost.h>
 #include <rte_vdpa.h>
 #include <vdpa_driver.h>
drivers/vdpa/mlx5/mlx5_vdpa.c +1 -1
index 91af792a3a..026daa3f24 100644
@@ -13,7 +13,7 @@
 #include <rte_log.h>
 #include <rte_errno.h>
 #include <rte_string_fns.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_eal_paging.h>
 
 #include <mlx5_glue.h>
drivers/vdpa/sfc/sfc_vdpa.h +1 -1
index daeb27d4cd..b25eb3a5fe 100644
@@ -8,7 +8,7 @@
 #include <stdint.h>
 #include <sys/queue.h>
 
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "sfc_efx.h"
 #include "sfc_efx_mcdi.h"
lib/ethdev/ethdev_pci.h +1 -1
index b4bb460dcb..b3ac509f36 100644
@@ -13,7 +13,7 @@ extern "C" {
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 #include <rte_config.h>
 #include <ethdev_driver.h>
 
lib/eventdev/eventdev_pmd_pci.h +1 -1
index 24b56faaa9..7bbec40c71 100644
@@ -23,7 +23,7 @@ extern "C" {
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_pci.h>
-#include <rte_bus_pci.h>
+#include <bus_pci_driver.h>
 
 #include "eventdev_pmd.h"
 
Signature · 1 line
2.36.1
Acked-by on v3 16/26
#90 lore raw

Re: [RFC v3 16/26] bus/pci: make driver-only headers private

Quoted 11 lines · David Marchand

The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

Quoted 6 lines

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

It's a bit harder to review squashed IMHO, but the changes probably do belong together.

Acked-by
#91 lore raw

Re: [RFC v3 16/26] bus/pci: make driver-only headers private

Quoted 19 lines · Bruce Richardson
Quoted 11 lines · David Marchand

The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

Quoted 6 lines

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

Quoted 4 lines

It's a bit harder to review squashed IMHO, but the changes probably do belong together.

Acked-by on v3 16/26
#92 lore raw

RE: [RFC v3 16/26] bus/pci: make driver-only headers private

In reply to David Marchand

Hi,

Quoted 70 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 23:27
To: [email protected]
Cc: Chautru, Nicolas <[email protected]>; Ray Kinsella <[email protected]>; Nithin Dabilpuram <[email protected]>; Kiran Kumar K <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Rao <[email protected]>; Matan Azrad <[email protected]>; Viacheslav Ovsiienko <[email protected]>; Zhang, Roy Fan <[email protected]>; Andrew Rybchenko <[email protected]>; Ashish Gupta <[email protected]>; Chandubabu Namburu <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nagadheeraj Rottela <[email protected]>; Srikanth Jampala <[email protected]>; Jay Zhou <[email protected]>; Radha Mohan Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Chengwen Feng <[email protected]>; Richardson, Bruce <[email protected]>; Laatz, Kevin <[email protected]>; Walsh, Conor <[email protected]>; McDaniel, Timothy <[email protected]>; Jerin Jacob <[email protected]>; Pavan Nikhilesh <[email protected]>; Elena Agostini <[email protected]>; Ashwin Sekhar T K <[email protected]>; Harman Kalra <[email protected]>; Shepard Siegel <[email protected]>; Ed Czeck <[email protected]>; John Miller <[email protected]>; Webster, Steven <[email protected]>; Peters, Matt <[email protected]>; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Ajit Khaparde <[email protected]>; Somnath Kotur <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Rahul Lakkireddy <[email protected]>; Su, Simei <[email protected]>; Wu, Wenjun1 <[email protected]>; Marcin Wojtas <[email protected]>; Michal Krawczyk <[email protected]>; Shai Brandes <[email protected]>; Evgeny Schemeilin <[email protected]>; Igor Chauskin <[email protected]>; Daley, John <[email protected]>; Hyong Youb Kim <[email protected]>; Ziyang Xuan <[email protected]>; Xiaoyun Wang <[email protected]>; Guoyang Zhou <[email protected]>; Dongdong Liu <[email protected]>; Yisen Zhuang <[email protected]>; Zhang, Yuying <[email protected]>; Xing, Beilei <[email protected]>; Guo, Junfeng <[email protected]>; Andrew Boyer <[email protected]>; Xu, Rosen <[email protected]>; Yang, Qiming <[email protected]>; Stephen Hemminger <[email protected]>; Long Li <[email protected]>; Jiawen Wu <[email protected]>; Devendra Singh Rawat <[email protected]>; Maciej Czekaj <[email protected]>; Jian Wang <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>; Jochen Behrens <[email protected]>; Jakub Palider <[email protected]>; Tomasz Duszynski <[email protected]>; Zhang, Tianfei <[email protected]>; Wu, Jingjing <[email protected]>; Ori Kam <[email protected]>; Wang, Xiao W <[email protected]>; Vijay Kumar Srivastava <[email protected]>; Thomas Monjalon <[email protected]>; Ferruh Yigit <[email protected]>
Subject: [RFC v3 16/26] bus/pci: make driver-only headers private

The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

Quoted 6 lines

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

#93 lore raw

RFC v3 17/26 bus/vdev: make driver-only headers private

In reply to David Marchand

The vdev bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 app/test/test_vdev.c                          |   2 +-
 doc/guides/rel_notes/release_22_11.rst        |   4 +-
 drivers/baseband/la12xx/bbdev_la12xx.c        |   2 +-
 drivers/baseband/null/bbdev_null.c            |   2 +-
 .../baseband/turbo_sw/bbdev_turbo_software.c  |   2 +-
 drivers/bus/vdev/bus_vdev_driver.h            | 151 ++++++++++++++++++
 drivers/bus/vdev/meson.build                  |   1 +
 drivers/bus/vdev/rte_bus_vdev.h               | 134 ----------------
 drivers/bus/vdev/vdev.c                       |   8 +-
 drivers/bus/vdev/vdev_params.c                |   1 -
 drivers/bus/vdev/version.map                  |   9 +-
 drivers/compress/isal/isal_compress_pmd.c     |   2 +-
 drivers/compress/zlib/zlib_pmd.c              |   2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |   2 +-
 drivers/crypto/bcmfs/bcmfs_device.h           |   2 +-
 drivers/crypto/caam_jr/caam_jr.c              |   2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.c    |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.h    |   2 +-
 drivers/crypto/ipsec_mb/pmd_kasumi.c          |   2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |   2 +-
 drivers/crypto/null/null_crypto_pmd.c         |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |   2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |   2 +-
 drivers/dma/skeleton/skeleton_dmadev.c        |   2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |   2 +-
 drivers/event/dpaa2/dpaa2_eventdev_selftest.c |   2 +-
 drivers/event/octeontx/ssovf_evdev.c          |   2 +-
 drivers/event/octeontx/ssovf_evdev_selftest.c |   2 +-
 drivers/event/opdl/opdl_evdev.c               |   2 +-
 drivers/event/opdl/opdl_evdev_init.c          |   2 +-
 drivers/event/opdl/opdl_test.c                |   2 +-
 drivers/event/skeleton/skeleton_eventdev.c    |   2 +-
 drivers/event/sw/sw_evdev.c                   |   2 +-
 drivers/event/sw/sw_evdev_selftest.c          |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c     |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |   2 +-
 drivers/net/bonding/rte_eth_bond_api.c        |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |   2 +-
 drivers/net/failsafe/failsafe.c               |   3 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h            |   2 +-
 drivers/net/kni/rte_eth_kni.c                 |   2 +-
 drivers/net/memif/memif_socket.c              |   2 +-
 drivers/net/memif/rte_eth_memif.c             |   2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |   2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |   2 +-
 drivers/net/null/rte_eth_null.c               |   2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |   2 +-
 drivers/net/pcap/pcap_ethdev.c                |   2 +-
 drivers/net/pfe/pfe_ethdev.c                  |   2 +-
 drivers/net/ring/rte_eth_ring.c               |   2 +-
 drivers/net/softnic/rte_eth_softnic.c         |   2 +-
 drivers/net/tap/rte_eth_tap.c                 |   2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c         |   2 +-
 drivers/net/vhost/rte_eth_vhost.c             |   2 +-
 drivers/net/virtio/virtio_user_ethdev.c       |   2 +-
 drivers/raw/cnxk_gpio/cnxk_gpio.c             |   2 +-
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c         |   2 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |   2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |   2 +-
 drivers/raw/skeleton/skeleton_rawdev_test.c   |   2 +-
 lib/ethdev/ethdev_vdev.h                      |   2 +-
 lib/eventdev/eventdev_pmd_vdev.h              |   2 +-
 63 files changed, 221 insertions(+), 200 deletions(-)
 create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
app/test/test_vdev.c +1 -1
index 5eeff3106d..3cc3abe70b 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_kvargs.h>
 #include <rte_bus.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "test.h"
 
doc/guides/rel_notes/release_22_11.rst +2 -2
index 79ec128533..f726a901e6 100644
@@ -84,8 +84,8 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
-* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``
-  buses has been marked as an internal API.
+* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
+  ``vdev`` buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
 
drivers/baseband/la12xx/bbdev_la12xx.c +1 -1
index 4d1bd16751..f0927d9fca 100644
@@ -10,7 +10,7 @@
 #include <dirent.h>
 
 #include <rte_common.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_ring.h>
 #include <rte_kvargs.h>
drivers/baseband/null/bbdev_null.c +1 -1
index 248e12987f..e76ef2313f 100644
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_ring.h>
 #include <rte_kvargs.h>
drivers/baseband/turbo_sw/bbdev_turbo_software.c +1 -1
index af7bc416f9..e8d0c43e6f 100644
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_ring.h>
 #include <rte_kvargs.h>
drivers/bus/vdev/bus_vdev_driver.h new file +151 -0

151 lines not on this page · raw message

drivers/bus/vdev/meson.build +1 -0
index 8adf674530..1532ed4f35 100644
@@ -6,5 +6,6 @@ sources = files(
         'vdev_params.c',
 )
 headers = files('rte_bus_vdev.h')
+driver_sdk_headers = files('bus_vdev_driver.h')
 
 deps += ['kvargs']
drivers/bus/vdev/rte_bus_vdev.h +0 -134

140 lines not on this page · raw message

drivers/bus/vdev/vdev.c +3 -5
index a8d8b2327e..7d78cf93bc 100644
@@ -21,7 +21,7 @@
 #include <rte_string_fns.h>
 #include <rte_errno.h>
 
-#include "rte_bus_vdev.h"
+#include "bus_vdev_driver.h"
 #include "vdev_logs.h"
 #include "vdev_private.h"
 
@@ -30,16 +30,14 @@
 /* Forward declare to access virtual bus name */
 static struct rte_bus rte_vdev_bus;
 
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
 
-static struct vdev_device_list vdev_device_list =
+static TAILQ_HEAD(, rte_vdev_device) vdev_device_list =
 	TAILQ_HEAD_INITIALIZER(vdev_device_list);
 /* The lock needs to be recursive because a vdev can manage another vdev. */
 static rte_spinlock_recursive_t vdev_device_list_lock =
 	RTE_SPINLOCK_RECURSIVE_INITIALIZER;
 
-static struct vdev_driver_list vdev_driver_list =
+static TAILQ_HEAD(, rte_vdev_driver) vdev_driver_list =
 	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
 
 struct vdev_custom_scan {
drivers/bus/vdev/vdev_params.c +0 -1
index 3969faf16d..2c72614776 100644
@@ -5,7 +5,6 @@
 #include <string.h>
 
 #include <rte_dev.h>
-#include <rte_bus.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
drivers/bus/vdev/version.map +7 -2
index 7cc3098a50..594c48c3db 100644
@@ -3,10 +3,15 @@ DPDK_23 {
 
 	rte_vdev_add_custom_scan;
 	rte_vdev_init;
-	rte_vdev_register;
 	rte_vdev_remove_custom_scan;
 	rte_vdev_uninit;
-	rte_vdev_unregister;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_vdev_register;
+	rte_vdev_unregister;
+};
drivers/compress/isal/isal_compress_pmd.c +1 -1
index b7ba61c434..cb23e929ed 100644
@@ -3,7 +3,7 @@
  */
 #include <isa-l.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_cpuflags.h>
 #include <rte_malloc.h>
drivers/compress/zlib/zlib_pmd.c +1 -1
index 0220c6d038..98abd41013 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2018 Cavium Networks
  */
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 
 #include "zlib_pmd_private.h"
drivers/crypto/armv8/rte_armv8_pmd.c +1 -1
index 32127a874c..5c060e71a3 100644
@@ -8,7 +8,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
drivers/crypto/bcmfs/bcmfs_device.h +1 -1
index 4901a6cfd9..610454dd5e 100644
@@ -9,7 +9,7 @@
 #include <sys/queue.h>
 
 #include <rte_spinlock.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "bcmfs_logs.h"
 #include "bcmfs_qp.h"
drivers/crypto/caam_jr/caam_jr.c +1 -1
index 8e9cfe73d8..8c0b4909cf 100644
@@ -12,7 +12,7 @@
 #include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_security_driver.h>
 #include <rte_hexdump.h>
drivers/crypto/ccp/rte_ccp_pmd.c +1 -1
index 4957f11e97..6c3e45e333 100644
@@ -4,7 +4,7 @@
 
 #include <rte_string_fns.h>
 #include <bus_pci_driver.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
drivers/crypto/ipsec_mb/ipsec_mb_private.c +1 -1
index aab42c360c..2e7347fa79 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2021 Intel Corporation
  */
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
 
drivers/crypto/ipsec_mb/ipsec_mb_private.h +1 -1
index e2c240dfc0..d0d4258ee1 100644
@@ -7,7 +7,7 @@
 
 #include <intel-ipsec-mb.h>
 #include <cryptodev_pmd.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #if defined(RTE_LIB_SECURITY)
 #define IPSEC_MB_DOCSIS_SEC_ENABLED 1
drivers/crypto/ipsec_mb/pmd_kasumi.c +1 -1
index c9d4f9d0ae..fba10b8cf4 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2016-2021 Intel Corporation
  */
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_cpuflags.h>
 #include <rte_cryptodev.h>
drivers/crypto/mvsam/rte_mrvl_pmd.c +1 -1
index 04efd9aaa8..c35876c8b4 100644
@@ -9,7 +9,7 @@
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_kvargs.h>
drivers/crypto/null/null_crypto_pmd.c +1 -1
index 9ecb434fd0..eab74ad45f 100644
@@ -4,7 +4,7 @@
 
 #include <rte_common.h>
 #include <cryptodev_pmd.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 
 #include "null_crypto_pmd_private.h"
drivers/crypto/openssl/rte_openssl_pmd.c +1 -1
index e01dacc98d..ed6d215f1b 100644
@@ -6,7 +6,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
drivers/crypto/scheduler/scheduler_pmd.c +1 -1
index dd198080bf..a15c02b4d8 100644
@@ -5,7 +5,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_reorder.h>
drivers/dma/skeleton/skeleton_dmadev.c +1 -1
index 82b4661323..09068a9521 100644
@@ -4,7 +4,7 @@
 
 #include <inttypes.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_cycles.h>
 #include <rte_eal.h>
 #include <rte_kvargs.h>
drivers/event/dpaa2/dpaa2_eventdev.c +1 -1
index 5de3e9e5f5..08df6e223a 100644
@@ -23,7 +23,7 @@
 #include <rte_memcpy.h>
 #include <rte_memory.h>
 #include <rte_pci.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <ethdev_driver.h>
 #include <cryptodev_pmd.h>
 #include <rte_event_eth_rx_adapter.h>
drivers/event/dpaa2/dpaa2_eventdev_selftest.c +1 -1
index 941fb8fc43..427aff4b11 100644
@@ -17,7 +17,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_test.h>
 #include <bus_fslmc_driver.h>
 
drivers/event/octeontx/ssovf_evdev.c +1 -1
index 9e14e35d10..fe157c59d5 100644
@@ -16,7 +16,7 @@
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
drivers/event/octeontx/ssovf_evdev_selftest.c +1 -1
index b55523632a..3dbf31efa9 100644
@@ -17,7 +17,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_test.h>
 
 #include "ssovf_evdev.h"
drivers/event/opdl/opdl_evdev.c +1 -1
index 8b6890b220..368e5a9657 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_lcore.h>
 #include <rte_memzone.h>
 #include <rte_kvargs.h>
drivers/event/opdl/opdl_evdev_init.c +1 -1
index 15aae47524..be3437fc2f 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_errno.h>
 #include <rte_cycles.h>
 #include <rte_memzone.h>
drivers/event/opdl/opdl_test.c +1 -1
index 24b92df476..50c12a18b0 100644
@@ -19,7 +19,7 @@
 #include <rte_ethdev.h>
 #include <rte_cycles.h>
 #include <rte_eventdev.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_pause.h>
 
 #include "opdl_evdev.h"
drivers/event/skeleton/skeleton_eventdev.c +1 -1
index bf3b01ebc8..6bd8fec6d4 100644
@@ -18,7 +18,7 @@
 #include <rte_malloc.h>
 #include <rte_memory.h>
 #include <rte_lcore.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "skeleton_eventdev.h"
 
drivers/event/sw/sw_evdev.c +1 -1
index f93313b31b..22cba1e74b 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_ring.h>
 #include <rte_errno.h>
drivers/event/sw/sw_evdev_selftest.c +1 -1
index cb97a4d615..59bcdf5734 100644
@@ -21,7 +21,7 @@
 #include <rte_pause.h>
 #include <rte_service.h>
 #include <rte_service_component.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "sw_evdev.h"
 
drivers/net/af_packet/rte_eth_af_packet.c +1 -1
index 1396f32c3d..e2771e6765 100644
@@ -12,7 +12,7 @@
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include <errno.h>
 #include <linux/if_ether.h>
drivers/net/af_xdp/rte_eth_af_xdp.c +1 -1
index fce649c2a1..fd7be47311 100644
@@ -20,7 +20,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_vdev.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_string_fns.h>
 #include <rte_branch_prediction.h>
 #include <rte_common.h>
drivers/net/bonding/rte_eth_bond_api.c +1 -1
index 4ac191c468..b44dd219cb 100644
@@ -8,7 +8,7 @@
 #include <rte_malloc.h>
 #include <ethdev_driver.h>
 #include <rte_tcp.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 
 #include "rte_eth_bond.h"
drivers/net/bonding/rte_eth_bond_pmd.c +1 -1
index 73e6972035..cd80a0af46 100644
@@ -15,7 +15,7 @@
 #include <rte_ip_frag.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_alarm.h>
 #include <rte_cycles.h>
 #include <rte_string_fns.h>
drivers/net/failsafe/failsafe.c +2 -1
index 05cf533896..5d4d52c341 100644
@@ -11,7 +11,8 @@
 #include <ethdev_vdev.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <rte_bus.h>
+#include <bus_vdev_driver.h>
 
 #include "failsafe_private.h"
 
drivers/net/ipn3ke/ipn3ke_ethdev.h +1 -1
index dbf57f9ba8..4b93d2649e 100644
@@ -19,7 +19,7 @@
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_spinlock.h>
 
drivers/net/kni/rte_eth_kni.c +1 -1
index 0532de5315..c0e1f8db40 100644
@@ -12,7 +12,7 @@
 #include <rte_kni.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 /* Only single queue supported */
 #define KNI_MAX_QUEUE_PER_PORT 1
drivers/net/memif/memif_socket.c +1 -1
index 7886644412..4700ce2e77 100644
@@ -17,7 +17,7 @@
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_hash.h>
 #include <rte_jhash.h>
 #include <rte_string_fns.h>
drivers/net/memif/rte_eth_memif.c +1 -1
index dd951b8296..a574bce49e 100644
@@ -21,7 +21,7 @@
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_string_fns.h>
 #include <rte_errno.h>
 #include <rte_memory.h>
drivers/net/mvneta/mvneta_ethdev.c +1 -1
index eef016aa0b..6a0dd6091d 100644
@@ -7,7 +7,7 @@
 #include <rte_string_fns.h>
 #include <ethdev_driver.h>
 #include <rte_kvargs.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include <stdio.h>
 #include <fcntl.h>
drivers/net/mvpp2/mrvl_ethdev.c +1 -1
index 735efb6cfc..310e3e5acf 100644
@@ -9,7 +9,7 @@
 #include <rte_kvargs.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include <fcntl.h>
 #include <linux/ethtool.h>
drivers/net/null/rte_eth_null.c +1 -1
index bb89c1abc4..a517376d40 100644
@@ -8,7 +8,7 @@
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_spinlock.h>
 
drivers/net/octeontx/octeontx_ethdev.c +1 -1
index 3aca53fb98..9ada22e2ff 100644
@@ -12,7 +12,7 @@
 #include <eventdev_pmd.h>
 #include <rte_alarm.h>
 #include <rte_branch_prediction.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
 #include <rte_dev.h>
drivers/net/pcap/pcap_ethdev.c +1 -1
index ec29fd6bc5..7fb4abb20b 100644
@@ -15,7 +15,7 @@
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_os_shim.h>
 
 #include "pcap_osdep.h"
drivers/net/pfe/pfe_ethdev.c +1 -1
index c2991ab1cc..0352a57950 100644
@@ -6,7 +6,7 @@
 #include <sys/epoll.h>
 #include <rte_kvargs.h>
 #include <ethdev_vdev.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_ether.h>
 #include <dpaa_of.h>
 
drivers/net/ring/rte_eth_ring.c +1 -1
index cfb81da5fe..37e7ccfda0 100644
@@ -8,7 +8,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
drivers/net/softnic/rte_eth_softnic.c +1 -1
index 8c098cad5b..fa89940735 100644
@@ -9,7 +9,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 #include <rte_ring.h>
drivers/net/tap/rte_eth_tap.c +1 -1
index 9e1032fe72..d047489e94 100644
@@ -10,7 +10,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_net.h>
 #include <rte_debug.h>
drivers/net/vdev_netvsc/vdev_netvsc.c +1 -1
index 2587195168..65043a04eb 100644
@@ -25,7 +25,7 @@
 
 #include <rte_alarm.h>
 #include <rte_bus.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
drivers/net/vhost/rte_eth_vhost.c +1 -1
index 7e512d94bf..6c81967c6f 100644
@@ -13,7 +13,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_net.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_vhost.h>
 #include <rte_spinlock.h>
drivers/net/virtio/virtio_user_ethdev.c +1 -1
index a7d7063c2a..3edfd7439e 100644
@@ -14,7 +14,7 @@
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
 #include <ethdev_vdev.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_alarm.h>
 #include <rte_cycles.h>
 
drivers/raw/cnxk_gpio/cnxk_gpio.c +1 -1
index d759ed82d4..e2907c18b5 100644
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_eal.h>
 #include <rte_kvargs.h>
 #include <rte_lcore.h>
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +1 -1
index c7bddbc6cc..aeee4ac289 100644
@@ -6,7 +6,7 @@
 #include <errno.h>
 #include <stdint.h>
 
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_atomic.h>
 #include <rte_interrupts.h>
 #include <rte_branch_prediction.h>
drivers/raw/ifpga/ifpga_rawdev.c +1 -1
index d6106dd5da..07e2252a07 100644
@@ -26,7 +26,7 @@
 #include <rte_memzone.h>
 #include <rte_eal.h>
 #include <rte_common.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_string_fns.h>
 #include <rte_pmd_i40e.h>
 
drivers/raw/skeleton/skeleton_rawdev.c +1 -1
index 16ecae3d92..19b523a815 100644
@@ -21,7 +21,7 @@
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_lcore.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include <rte_rawdev.h>
 #include <rte_rawdev_pmd.h>
drivers/raw/skeleton/skeleton_rawdev_test.c +1 -1
index 693b24c415..fc257c5f44 100644
@@ -8,7 +8,7 @@
 #include <rte_memcpy.h>
 #include <rte_dev.h>
 #include <rte_rawdev.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <rte_test.h>
 
 /* Using relative path as skeleton_rawdev is not part of exported headers */
lib/ethdev/ethdev_vdev.h +1 -1
index f5f536ce64..364f140f91 100644
@@ -12,7 +12,7 @@ extern "C" {
 
 #include <rte_config.h>
 #include <rte_malloc.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 #include <ethdev_driver.h>
 
 /**
lib/eventdev/eventdev_pmd_vdev.h +1 -1
index 77904910a2..cf2333cf41 100644
@@ -22,7 +22,7 @@ extern "C" {
 #include <rte_config.h>
 #include <rte_debug.h>
 #include <rte_eal.h>
-#include <rte_bus_vdev.h>
+#include <bus_vdev_driver.h>
 
 #include "eventdev_pmd.h"
 
Signature · 1 line
2.36.1
Acked-by on v3 17/26
#94 lore raw

RE: [RFC v3 17/26] bus/vdev: make driver-only headers private

Hi,

Quoted 116 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 23:27
To: [email protected]
Cc: Gagandeep Singh <[email protected]>; Hemant Agrawal <[email protected]>; Chautru, Nicolas <[email protected]>; Ray Kinsella <[email protected]>; Daly, Lee <[email protected]>; Zhang, Roy Fan <[email protected]>; Ashish Gupta <[email protected]>; Sunila Sahu <[email protected]>; Ruifeng Wang <[email protected]>; Ajit Khaparde <[email protected]>; Raveendra Padasalagi <[email protected]>; Vikas Gupta <[email protected]>; Chandubabu Namburu <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Michael Shamis <[email protected]>; Liron Himi <[email protected]>; Chengwen Feng <[email protected]>; Laatz, Kevin <[email protected]>; Richardson, Bruce <[email protected]>; Sachin Saxena <[email protected]>; Jerin Jacob <[email protected]>; Liang Ma <[email protected]>; Mccarthy, Peter <[email protected]>; Van Haaren, Harry <[email protected]>; John W. Linville <[email protected]>; Loftus, Ciara <[email protected]>; Zhang, Qi Z <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Gaetan Rivet <[email protected]>; Xu, Rosen <[email protected]>; Jakub Grajciar <[email protected]>; Zyta Szpak <[email protected]>; Tetsuya Mukawa <[email protected]>; Harman Kalra <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Matan Azrad <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>; Jakub Palider <[email protected]>; Tomasz Duszynski <[email protected]>; Zhang, Tianfei <[email protected]>; Thomas Monjalon <[email protected]>; Ferruh Yigit <[email protected]>; Andrew Rybchenko <[email protected]>
Subject: [RFC v3 17/26] bus/vdev: make driver-only headers private

The vdev bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 app/test/test_vdev.c                          |   2 +-
 doc/guides/rel_notes/release_22_11.rst        |   4 +-
 drivers/baseband/la12xx/bbdev_la12xx.c        |   2 +-
 drivers/baseband/null/bbdev_null.c            |   2 +-
 .../baseband/turbo_sw/bbdev_turbo_software.c  |   2 +-
 drivers/bus/vdev/bus_vdev_driver.h            | 151 ++++++++++++++++++
 drivers/bus/vdev/meson.build                  |   1 +
 drivers/bus/vdev/rte_bus_vdev.h               | 134 ----------------
 drivers/bus/vdev/vdev.c                       |   8 +-
 drivers/bus/vdev/vdev_params.c                |   1 -
 drivers/bus/vdev/version.map                  |   9 +-
 drivers/compress/isal/isal_compress_pmd.c     |   2 +-
 drivers/compress/zlib/zlib_pmd.c              |   2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |   2 +-
 drivers/crypto/bcmfs/bcmfs_device.h           |   2 +-
 drivers/crypto/caam_jr/caam_jr.c              |   2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.c    |   2 +-
 drivers/crypto/ipsec_mb/ipsec_mb_private.h    |   2 +-
 drivers/crypto/ipsec_mb/pmd_kasumi.c          |   2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |   2 +-
 drivers/crypto/null/null_crypto_pmd.c         |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |   2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |   2 +-
 drivers/dma/skeleton/skeleton_dmadev.c        |   2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |   2 +-
 drivers/event/dpaa2/dpaa2_eventdev_selftest.c |   2 +-
 drivers/event/octeontx/ssovf_evdev.c          |   2 +-
 drivers/event/octeontx/ssovf_evdev_selftest.c |   2 +-
 drivers/event/opdl/opdl_evdev.c               |   2 +-
 drivers/event/opdl/opdl_evdev_init.c          |   2 +-
 drivers/event/opdl/opdl_test.c                |   2 +-
 drivers/event/skeleton/skeleton_eventdev.c    |   2 +-
 drivers/event/sw/sw_evdev.c                   |   2 +-
 drivers/event/sw/sw_evdev_selftest.c          |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c     |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |   2 +-
 drivers/net/bonding/rte_eth_bond_api.c        |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |   2 +-
 drivers/net/failsafe/failsafe.c               |   3 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h            |   2 +-
 drivers/net/kni/rte_eth_kni.c                 |   2 +-
 drivers/net/memif/memif_socket.c              |   2 +-
 drivers/net/memif/rte_eth_memif.c             |   2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |   2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |   2 +-
 drivers/net/null/rte_eth_null.c               |   2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |   2 +-
 drivers/net/pcap/pcap_ethdev.c                |   2 +-
 drivers/net/pfe/pfe_ethdev.c                  |   2 +-
 drivers/net/ring/rte_eth_ring.c               |   2 +-
 drivers/net/softnic/rte_eth_softnic.c         |   2 +-
 drivers/net/tap/rte_eth_tap.c                 |   2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c         |   2 +-
 drivers/net/vhost/rte_eth_vhost.c             |   2 +-
 drivers/net/virtio/virtio_user_ethdev.c       |   2 +-
 drivers/raw/cnxk_gpio/cnxk_gpio.c             |   2 +-
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c         |   2 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |   2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |   2 +-
 drivers/raw/skeleton/skeleton_rawdev_test.c   |   2 +-
 lib/ethdev/ethdev_vdev.h                      |   2 +-
 lib/eventdev/eventdev_pmd_vdev.h              |   2 +-
 63 files changed, 221 insertions(+), 200 deletions(-)  create mode 100644
Quoted 1 line

drivers/bus/vdev/bus_vdev_driver.h

#95 lore raw

RFC v3 18/26 bus/vmbus: make driver-only headers private

In reply to David Marchand

The vmbus bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,

---
Changes since RFC v2:
- squashed cleanup for this bus code from other patches,
- updated release notes,

---
 doc/guides/rel_notes/release_22_11.rst |   2 +-
 drivers/bus/vmbus/bus_vmbus_driver.h   | 106 +++++++++++++++++++++++++
 drivers/bus/vmbus/linux/vmbus_uio.c    |   1 -
 drivers/bus/vmbus/meson.build          |   1 +
 drivers/bus/vmbus/private.h            |  20 ++++-
 drivers/bus/vmbus/rte_bus_vmbus.h      | 104 ------------------------
 drivers/bus/vmbus/version.map          |   9 ++-
 drivers/bus/vmbus/vmbus_bufring.c      |   1 -
 drivers/bus/vmbus/vmbus_channel.c      |   1 -
 drivers/bus/vmbus/vmbus_common.c       |   3 -
 drivers/bus/vmbus/vmbus_common_uio.c   |   1 -
 drivers/net/netvsc/hn_ethdev.c         |   3 +-
 drivers/net/netvsc/hn_nvs.c            |   2 +-
 drivers/net/netvsc/hn_rndis.c          |   2 +-
 drivers/net/netvsc/hn_rxtx.c           |   2 +-
 drivers/net/netvsc/hn_vf.c             |   2 +-
 16 files changed, 140 insertions(+), 120 deletions(-)
 create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
doc/guides/rel_notes/release_22_11.rst +1 -1
index f726a901e6..c55ee19bc2 100644
@@ -85,7 +85,7 @@ API Changes
    =======================================================
 
 * drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
-  ``vdev`` buses has been marked as an internal API.
+  ``vdev``, ``vmbus`` buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
 
drivers/bus/vmbus/bus_vmbus_driver.h new file +106 -0

106 lines not on this page · raw message

drivers/bus/vmbus/linux/vmbus_uio.c +0 -1
index 5db70f8e0d..26edef342d 100644
@@ -13,7 +13,6 @@
 
 #include <rte_eal.h>
 #include <rte_log.h>
-#include <rte_bus.h>
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
drivers/bus/vmbus/meson.build +1 -0
index 3892cbf67f..34988d1d84 100644
@@ -8,6 +8,7 @@ endif
 
 
 headers = files('rte_bus_vmbus.h','rte_vmbus_reg.h')
+driver_sdk_headers = files('bus_vmbus_driver.h')
 
 sources = files(
         'vmbus_bufring.c',
drivers/bus/vmbus/private.h +19 -1
index 658303bc27..3d233fa83c 100644
@@ -8,13 +8,31 @@
 
 #include <stdbool.h>
 #include <sys/uio.h>
+
+#include <rte_bus.h>
+#include <bus_vmbus_driver.h>
 #include <rte_log.h>
 #include <rte_eal_paging.h>
 #include <rte_vmbus_reg.h>
-#include <rte_bus_vmbus.h>
+
+/**
+ * Structure describing the VM bus
+ */
+struct rte_vmbus_bus {
+	struct rte_bus bus;               /**< Inherit the generic class */
+	RTE_TAILQ_HEAD(, rte_vmbus_device) device_list; /**< List of devices */
+	RTE_TAILQ_HEAD(, rte_vmbus_driver) driver_list; /**< List of drivers */
+};
 
 extern struct rte_vmbus_bus rte_vmbus_bus;
 
+/* VMBus iterators */
+#define FOREACH_DEVICE_ON_VMBUS(p)	\
+	RTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.device_list), next)
+
+#define FOREACH_DRIVER_ON_VMBUS(p)	\
+	RTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.driver_list), next)
+
 extern int vmbus_logtype_bus;
 #define VMBUS_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, vmbus_logtype_bus, "%s(): " fmt "\n", \
drivers/bus/vmbus/rte_bus_vmbus.h +0 -104

128 lines not on this page · raw message

drivers/bus/vmbus/version.map +7 -2
index 84db31b6e9..430781b29b 100644
@@ -16,13 +16,18 @@ DPDK_23 {
 	rte_vmbus_map_device;
 	rte_vmbus_max_channels;
 	rte_vmbus_probe;
-	rte_vmbus_register;
 	rte_vmbus_scan;
 	rte_vmbus_set_latency;
 	rte_vmbus_sub_channel_index;
 	rte_vmbus_subchan_open;
 	rte_vmbus_unmap_device;
-	rte_vmbus_unregister;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_vmbus_register;
+	rte_vmbus_unregister;
+};
drivers/bus/vmbus/vmbus_bufring.c +0 -1
index c4aa07b307..c78619dc44 100644
@@ -15,7 +15,6 @@
 #include <rte_tailq.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_bus.h>
 #include <rte_atomic.h>
 #include <rte_memory.h>
 #include <rte_pause.h>
drivers/bus/vmbus/vmbus_channel.c +0 -1
index 9bd01679c3..5549fd0944 100644
@@ -12,7 +12,6 @@
 #include <rte_tailq.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_bus.h>
 #include <rte_atomic.h>
 #include <rte_memory.h>
 #include <rte_bus_vmbus.h>
drivers/bus/vmbus/vmbus_common.c +0 -3
index 367727367e..03b39c82b7 100644
@@ -11,7 +11,6 @@
 #include <sys/mman.h>
 
 #include <rte_log.h>
-#include <rte_bus.h>
 #include <rte_eal.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
@@ -235,7 +234,6 @@ rte_vmbus_register(struct rte_vmbus_driver *driver)
 		"Registered driver %s", driver->driver.name);
 
 	TAILQ_INSERT_TAIL(&rte_vmbus_bus.driver_list, driver, next);
-	driver->bus = &rte_vmbus_bus;
 }
 
 /* unregister vmbus driver */
@@ -243,7 +241,6 @@ void
 rte_vmbus_unregister(struct rte_vmbus_driver *driver)
 {
 	TAILQ_REMOVE(&rte_vmbus_bus.driver_list, driver, next);
-	driver->bus = NULL;
 }
 
 /* Add a device to VMBUS bus */
drivers/bus/vmbus/vmbus_common_uio.c +0 -1
index 882a24f869..4d4613513c 100644
@@ -13,7 +13,6 @@
 #include <rte_tailq.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_bus.h>
 #include <rte_bus_vmbus.h>
 
 #include "private.h"
drivers/net/netvsc/hn_ethdev.c +2 -1
index 787139c0b2..188d92ffac 100644
@@ -31,7 +31,8 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_dev.h>
-#include <rte_bus_vmbus.h>
+#include <rte_bus.h>
+#include <bus_vmbus_driver.h>
 #include <rte_alarm.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_nvs.c +1 -1
index b90280c9ff..817fb06dfb 100644
@@ -29,7 +29,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_dev.h>
-#include <rte_bus_vmbus.h>
+#include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
 #include "hn_var.h"
drivers/net/netvsc/hn_rndis.c +1 -1
index 1b63b27e0c..20f75a17b0 100644
@@ -27,7 +27,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_dev.h>
-#include <rte_bus_vmbus.h>
+#include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
 #include "hn_var.h"
drivers/net/netvsc/hn_rxtx.c +1 -1
index 909c07a4ab..61cf374224 100644
@@ -27,7 +27,7 @@
 #include <rte_eal.h>
 #include <rte_dev.h>
 #include <rte_net.h>
-#include <rte_bus_vmbus.h>
+#include <bus_vmbus_driver.h>
 #include <rte_spinlock.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_vf.c +1 -1
index cce0a79edb..40981706d5 100644
@@ -19,7 +19,7 @@
 #include <ethdev_driver.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
-#include <rte_bus_vmbus.h>
+#include <bus_vmbus_driver.h>
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_log.h>
Signature · 1 line
2.36.1
#96 lore raw

RFC v3 19/26 bus: move IOVA definition from header

In reply to David Marchand

iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h. Fix existing code that was relying on these implicit inclusions.

---
 app/test-compress-perf/comp_perf_options.h   |  2 ++
 app/test-pmd/config.c                        |  1 +
 app/test-pmd/testpmd.c                       |  1 +
 drivers/compress/zlib/zlib_pmd_ops.c         |  1 +
 drivers/net/failsafe/failsafe_eal.c          |  1 +
 examples/multi_process/hotplug_mp/commands.c |  2 ++
 lib/compressdev/rte_compressdev.c            |  1 +
 lib/compressdev/rte_compressdev_pmd.c        |  1 +
 lib/cryptodev/cryptodev_pmd.c                |  2 ++
 lib/eal/common/eal_thread.h                  |  1 +
 lib/eal/common/hotplug_mp.c                  |  1 +
 lib/eal/include/rte_bus.h                    | 18 ++----------------
 lib/eal/include/rte_eal.h                    | 15 ++++++++++++++-
 lib/eal/include/rte_lcore.h                  |  2 ++
 lib/eal/windows/eal.c                        |  1 +
 lib/ethdev/rte_ethdev.c                      |  1 +
 lib/pcapng/rte_pcapng.c                      |  1 +
 17 files changed, 35 insertions(+), 17 deletions(-)
app/test-compress-perf/comp_perf_options.h +2 -0
index 0b777521c5..57dd146330 100644
@@ -5,6 +5,8 @@
 #ifndef _COMP_PERF_OPS_
 #define _COMP_PERF_OPS_
 
+#include <rte_dev.h>
+
 #define MAX_LIST		32
 #define MIN_COMPRESSED_BUF_SIZE 8
 #define EXPANSE_RATIO 1.1
app/test-pmd/config.c +1 -0
index bc73819183..d988429f24 100644
@@ -24,6 +24,7 @@
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
 #include <rte_launch.h>
+#include <rte_bus.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
app/test-pmd/testpmd.c +1 -0
index ee686393c5..510e0be624 100644
@@ -32,6 +32,7 @@
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_launch.h>
+#include <rte_bus.h>
 #include <rte_eal.h>
 #include <rte_alarm.h>
 #include <rte_per_lcore.h>
drivers/compress/zlib/zlib_pmd_ops.c +1 -0
index 0a73aed949..7d657d81bc 100644
@@ -4,6 +4,7 @@
 
 #include <string.h>
 
+#include <rte_dev.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 
drivers/net/failsafe/failsafe_eal.c +1 -0
index cb4a2abc02..130344dce2 100644
@@ -3,6 +3,7 @@
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
+#include <rte_bus.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
examples/multi_process/hotplug_mp/commands.c +2 -0
index 41ea265e45..da8b5e5924 100644
@@ -8,6 +8,8 @@
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
 #include <cmdline.h>
+
+#include <rte_bus.h>
 #include <rte_ethdev.h>
 
 /**********************************************************/
lib/compressdev/rte_compressdev.c +1 -0
index 12469042f7..7f6dedbc52 100644
@@ -9,6 +9,7 @@
 #include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
+#include <rte_dev.h>
 #include <rte_eal.h>
 #include <rte_memzone.h>
 
lib/compressdev/rte_compressdev_pmd.c +1 -0
index 7f500d76d4..9bfae077db 100644
@@ -5,6 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
+#include <rte_dev.h>
 #include <rte_eal.h>
 
 #include "rte_compressdev_internal.h"
lib/cryptodev/cryptodev_pmd.c +2 -0
index 1903ade388..75d0075b86 100644
@@ -3,6 +3,8 @@
  */
 
 #include <sys/queue.h>
+
+#include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
lib/eal/common/eal_thread.h +1 -0
index ca3378d463..e0240ccc60 100644
@@ -5,6 +5,7 @@
 #ifndef EAL_THREAD_H
 #define EAL_THREAD_H
 
+#include <rte_common.h>
 #include <rte_lcore.h>
 
 /**
lib/eal/common/hotplug_mp.c +1 -0
index bde0de196e..1614a57752 100644
@@ -3,6 +3,7 @@
  */
 #include <string.h>
 
+#include <rte_bus.h>
 #include <rte_eal.h>
 #include <rte_errno.h>
 #include <rte_alarm.h>
lib/eal/include/rte_bus.h +2 -16
index bbbb6efd28..17edaa37c9 100644
@@ -20,27 +20,13 @@ extern "C" {
 
 #include <stdio.h>
 
-#include <rte_log.h>
 #include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_log.h>
 
 /** Double linked list of buses */
 RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
 
-
-/**
- * IOVA mapping mode.
- *
- * IOVA mapping mode is iommu programming mode of a device.
- * That device (for example: IOMMU backed DMA device) based
- * on rte_iova_mode will generate physical or virtual address.
- *
- */
-enum rte_iova_mode {
-	RTE_IOVA_DC = 0,	/* Don't care mode */
-	RTE_IOVA_PA = (1 << 0), /* DMA using physical address */
-	RTE_IOVA_VA = (1 << 1)  /* DMA using virtual address */
-};
-
 /**
  * Bus specific scan for devices attached on the bus.
  * For each bus object, the scan would be responsible for finding devices and
lib/eal/include/rte_eal.h +14 -1
index 5dfc50e987..fd3d7c1da8 100644
@@ -17,7 +17,6 @@
 #include <rte_config.h>
 #include <rte_compat.h>
 #include <rte_per_lcore.h>
-#include <rte_bus.h>
 #include <rte_uuid.h>
 
 #include <rte_pci_dev_feature_defs.h>
@@ -458,6 +457,20 @@ static inline int rte_gettid(void)
 __rte_internal
 uint64_t rte_eal_get_baseaddr(void);
 
+/**
+ * IOVA mapping mode.
+ *
+ * IOVA mapping mode is iommu programming mode of a device.
+ * That device (for example: IOMMU backed DMA device) based
+ * on rte_iova_mode will generate physical or virtual address.
+ *
+ */
+enum rte_iova_mode {
+	RTE_IOVA_DC = 0,	/* Don't care mode */
+	RTE_IOVA_PA = (1 << 0), /* DMA using physical address */
+	RTE_IOVA_VA = (1 << 1)  /* DMA using virtual address */
+};
+
 /**
  * Get the iova mode
  *
lib/eal/include/rte_lcore.h +2 -0
index b598e1b9ec..4d3978512c 100644
@@ -11,6 +11,8 @@
  * API for lcore and socket manipulation
  *
  */
+#include <stdio.h>
+
 #include <rte_config.h>
 #include <rte_per_lcore.h>
 #include <rte_eal.h>
lib/eal/windows/eal.c +1 -0
index 122de2a319..79322d2ce9 100644
@@ -10,6 +10,7 @@
 #include <sys/stat.h>
 
 #include <rte_debug.h>
+#include <rte_bus.h>
 #include <rte_eal.h>
 #include <eal_memcfg.h>
 #include <rte_errno.h>
lib/ethdev/rte_ethdev.c +1 -0
index 1979dc0850..ebbe8cca3d 100644
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <sys/queue.h>
 
+#include <rte_bus.h>
 #include <rte_log.h>
 #include <rte_interrupts.h>
 #include <rte_memcpy.h>
lib/pcapng/rte_pcapng.c +1 -0
index 06ad712bd1..5b079cd14a 100644
@@ -11,6 +11,7 @@
 #include <time.h>
 #include <unistd.h>
 
+#include <rte_bus.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_dev.h>
Signature · 1 line
2.36.1
Acked-by on v3 19/26
#97 lore raw

Re: [RFC v3 19/26] bus: move IOVA definition from header

Quoted 7 lines · David Marchand

iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h. Fix existing code that was relying on these implicit inclusions.

---

#98 lore raw

RFC v3 20/26 bus: introduce accessors

In reply to David Marchand

Add helpers to get a rte_bus object details. This will be used externally.
Internal users may still dereference a rte_bus object.

---
Changes since RFC v1:
- changed approach: only external users are updated,

---
 app/test-pmd/config.c                        |  4 +--
 app/test-pmd/testpmd.c                       |  4 +--
 app/test/test_devargs.c                      |  4 +--
 examples/multi_process/hotplug_mp/commands.c |  4 +--
 lib/eal/common/eal_common_bus.c              | 26 ++++++++++++--------
 lib/eal/include/rte_bus.h                    | 14 +++++++++++
 lib/eal/version.map                          |  3 +++
 7 files changed, 41 insertions(+), 18 deletions(-)
app/test-pmd/config.c +2 -2
index d988429f24..7bd28ee3e8 100644
@@ -642,7 +642,7 @@ device_infos_display(const char *identifier)
 		if (identifier && da.bus != next)
 			continue;
 
-		snprintf(devstr, sizeof(devstr), "bus=%s", next->name);
+		snprintf(devstr, sizeof(devstr), "bus=%s", rte_bus_name(next));
 		RTE_DEV_FOREACH(dev, devstr, &dev_iter) {
 
 			if (!dev->driver)
@@ -653,7 +653,7 @@ device_infos_display(const char *identifier)
 				continue;
 			printf("\n%s Infos for device %s %s\n",
 			       info_border, dev->name, info_border);
-			printf("Bus name: %s", dev->bus->name);
+			printf("Bus name: %s", rte_bus_name(dev->bus));
 			printf("\nDriver name: %s", dev->driver->name);
 			printf("\nDevargs: %s",
 			       dev->devargs ? dev->devargs->args : "");
app/test-pmd/testpmd.c +2 -2
index 510e0be624..c7d1fa2719 100644
@@ -3507,9 +3507,9 @@ detach_devargs(char *identifier)
 		}
 	}
 
-	if (rte_eal_hotplug_remove(da.bus->name, da.name) != 0) {
+	if (rte_eal_hotplug_remove(rte_bus_name(da.bus), da.name) != 0) {
 		TESTPMD_LOG(ERR, "Failed to detach device %s(%s)\n",
-			    da.name, da.bus->name);
+			    da.name, rte_bus_name(da.bus));
 		rte_devargs_reset(&da);
 		return;
 	}
app/test/test_devargs.c +2 -2
index 16621285d2..ac5bc34c18 100644
@@ -98,9 +98,9 @@ test_valid_devargs_cases(const struct devargs_case *list, size_t n)
 			      list[i].bus_kv) != 0)
 			goto fail;
 		if (list[i].bus != NULL &&
-		    strcmp(da.bus->name, list[i].bus) != 0) {
+		    strcmp(rte_bus_name(da.bus), list[i].bus) != 0) {
 			printf("rte_devargs_parse(%s) bus name (%s) not expected (%s)\n",
-			       list[i].devargs, da.bus->name, list[i].bus);
+			       list[i].devargs, rte_bus_name(da.bus), list[i].bus);
 			goto fail;
 		}
 		if ((list[i].class_kv > 0 || list[i].class != NULL) &&
examples/multi_process/hotplug_mp/commands.c +2 -2
index da8b5e5924..88f44e00a0 100644
@@ -126,7 +126,7 @@ static void cmd_dev_attach_parsed(void *parsed_result,
 		return;
 	}
 
-	if (!rte_eal_hotplug_add(da.bus->name, da.name, da.args))
+	if (!rte_eal_hotplug_add(rte_bus_name(da.bus), da.name, da.args))
 		cmdline_printf(cl, "attached device %s\n", da.name);
 	else
 		cmdline_printf(cl, "failed to attached device %s\n",
@@ -173,7 +173,7 @@ static void cmd_dev_detach_parsed(void *parsed_result,
 	}
 
 	printf("detaching...\n");
-	if (!rte_eal_hotplug_remove(da.bus->name, da.name))
+	if (!rte_eal_hotplug_remove(rte_bus_name(da.bus), da.name))
 		cmdline_printf(cl, "detached device %s\n",
 			da.name);
 	else
lib/eal/common/eal_common_bus.c +16 -10
index baa5b532af..cbf382f967 100644
@@ -16,11 +16,17 @@
 static struct rte_bus_list rte_bus_list =
 	TAILQ_HEAD_INITIALIZER(rte_bus_list);
 
+const char *
+rte_bus_name(const struct rte_bus *bus)
+{
+	return bus->name;
+}
+
 void
 rte_bus_register(struct rte_bus *bus)
 {
 	RTE_VERIFY(bus);
-	RTE_VERIFY(bus->name && strlen(bus->name));
+	RTE_VERIFY(rte_bus_name(bus) && strlen(rte_bus_name(bus)));
 	/* A bus should mandatorily have the scan implemented */
 	RTE_VERIFY(bus->scan);
 	RTE_VERIFY(bus->probe);
@@ -29,14 +35,14 @@ rte_bus_register(struct rte_bus *bus)
 	RTE_VERIFY(!bus->plug || bus->unplug);
 
 	TAILQ_INSERT_TAIL(&rte_bus_list, bus, next);
-	RTE_LOG(DEBUG, EAL, "Registered [%s] bus.\n", bus->name);
+	RTE_LOG(DEBUG, EAL, "Registered [%s] bus.\n", rte_bus_name(bus));
 }
 
 void
 rte_bus_unregister(struct rte_bus *bus)
 {
 	TAILQ_REMOVE(&rte_bus_list, bus, next);
-	RTE_LOG(DEBUG, EAL, "Unregistered [%s] bus.\n", bus->name);
+	RTE_LOG(DEBUG, EAL, "Unregistered [%s] bus.\n", rte_bus_name(bus));
 }
 
 /* Scan all the buses for registered devices */
@@ -50,7 +56,7 @@ rte_bus_scan(void)
 		ret = bus->scan();
 		if (ret)
 			RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n",
-				bus->name);
+				rte_bus_name(bus));
 	}
 
 	return 0;
@@ -64,7 +70,7 @@ rte_bus_probe(void)
 	struct rte_bus *bus, *vbus = NULL;
 
 	TAILQ_FOREACH(bus, &rte_bus_list, next) {
-		if (!strcmp(bus->name, "vdev")) {
+		if (!strcmp(rte_bus_name(bus), "vdev")) {
 			vbus = bus;
 			continue;
 		}
@@ -72,14 +78,14 @@ rte_bus_probe(void)
 		ret = bus->probe();
 		if (ret)
 			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
-				bus->name);
+				rte_bus_name(bus));
 	}
 
 	if (vbus) {
 		ret = vbus->probe();
 		if (ret)
 			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
-				vbus->name);
+				rte_bus_name(vbus));
 	}
 
 	return 0;
@@ -92,7 +98,7 @@ bus_dump_one(FILE *f, struct rte_bus *bus)
 	int ret;
 
 	/* For now, dump only the bus name */
-	ret = fprintf(f, " %s\n", bus->name);
+	ret = fprintf(f, " %s\n", rte_bus_name(bus));
 
 	/* Error in case of inability in writing to stream */
 	if (ret < 0)
@@ -163,7 +169,7 @@ cmp_bus_name(const struct rte_bus *bus, const void *_name)
 {
 	const char *name = _name;
 
-	return strcmp(bus->name, name);
+	return strcmp(rte_bus_name(bus), name);
 }
 
 struct rte_bus *
@@ -213,7 +219,7 @@ rte_bus_get_iommu_class(void)
 
 		bus_iova_mode = bus->get_iommu_class();
 		RTE_LOG(DEBUG, EAL, "Bus %s wants IOVA as '%s'\n",
-			bus->name,
+			rte_bus_name(bus),
 			bus_iova_mode == RTE_IOVA_DC ? "DC" :
 			(bus_iova_mode == RTE_IOVA_PA ? "PA" : "VA"));
 		if (bus_iova_mode == RTE_IOVA_PA)
lib/eal/include/rte_bus.h +14 -0
index 17edaa37c9..3848b44db0 100644
@@ -266,6 +266,20 @@ struct rte_bus {
 
 };
 
+/**
+ * Retrieve a bus name.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * @param bus
+ *   A pointer to a rte_bus structure.
+ * @return
+ *   A pointer to the bus name string.
+ */
+__rte_experimental
+const char *rte_bus_name(const struct rte_bus *bus);
+
 /**
  * Register a Bus handler.
  *
lib/eal/version.map +3 -0
index 1f293e768b..aa53064db1 100644
@@ -424,6 +424,9 @@ EXPERIMENTAL {
 	rte_thread_self;
 	rte_thread_set_affinity_by_id;
 	rte_thread_set_priority;
+
+	# added in 22.11
+	rte_bus_name;
 };
 
 INTERNAL {
Signature · 1 line
2.36.1
#100 lore raw

RFC v3 21/26 bus: hide bus object

In reply to David Marchand

Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

Changes since RFC v1:
- update all existing users of the public header to use the internal one,

---
 app/test/test_devargs.c                  |   2 +-
 app/test/test_vdev.c                     |   2 +-
 doc/guides/rel_notes/deprecation.rst     |   6 -
 doc/guides/rel_notes/release_22_11.rst   |   6 +
 drivers/bus/auxiliary/auxiliary_common.c |   2 +-
 drivers/bus/auxiliary/auxiliary_params.c |   2 +-
 drivers/bus/auxiliary/private.h          |   2 +-
 drivers/bus/dpaa/dpaa_bus.c              |   2 +-
 drivers/bus/fslmc/fslmc_bus.c            |   2 +-
 drivers/bus/fslmc/private.h              |   2 +-
 drivers/bus/ifpga/ifpga_bus.c            |   2 +-
 drivers/bus/pci/linux/pci_vfio.c         |   2 +-
 drivers/bus/pci/pci_common.c             |   2 +-
 drivers/bus/pci/pci_params.c             |   2 +-
 drivers/bus/pci/private.h                |   2 +-
 drivers/bus/vdev/vdev.c                  |   2 +-
 drivers/bus/vmbus/private.h              |   2 +-
 drivers/common/mlx5/mlx5_common_pci.c    |   2 +-
 drivers/dma/idxd/idxd_bus.c              |   2 +-
 drivers/net/bonding/rte_eth_bond_args.c  |   2 +-
 drivers/net/failsafe/failsafe.c          |   2 +-
 drivers/net/failsafe/failsafe_eal.c      |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c         |   2 +-
 drivers/net/netvsc/hn_ethdev.c           |   2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c    |   2 +-
 drivers/net/virtio/virtio_pci.c          |   2 +-
 drivers/raw/ioat/idxd_bus.c              |   2 +-
 lib/eal/common/eal_common_bus.c          |   2 +-
 lib/eal/common/eal_common_dev.c          |   2 +-
 lib/eal/common/eal_common_devargs.c      |   2 +-
 lib/eal/common/hotplug_mp.c              |   2 +-
 lib/eal/include/bus_driver.h             | 296 +++++++++++++++++++++++
 lib/eal/include/meson.build              |   4 +
 lib/eal/include/rte_bus.h                | 278 +--------------------
 lib/eal/linux/eal_dev.c                  |   2 +-
 lib/eal/version.map                      |   8 +-
 lib/ethdev/rte_ethdev.c                  |   2 +-
 lib/pcapng/rte_pcapng.c                  |   2 +-
 38 files changed, 343 insertions(+), 319 deletions(-)
 create mode 100644 lib/eal/include/bus_driver.h
app/test/test_devargs.c +1 -1
index ac5bc34c18..0a4c34a1ad 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 
 #include "test.h"
app/test/test_vdev.c +1 -1
index 3cc3abe70b..c3a8ad64bb 100644
@@ -8,7 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_vdev_driver.h>
 
 #include "test.h"
doc/guides/rel_notes/deprecation.rst +0 -6
index dba252067c..3512f01539 100644
@@ -43,12 +43,6 @@ Deprecation Notices
 * mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
   will be removed in DPDK 22.11.
 
-* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
-  The goal is to remove it from the public ABI and make this object extendable.
-  As a side effect, registering a bus will be marked as an internal API:
-  external users may still register their bus using a new driver header
-  (see ``enable_driver_sdk`` meson option).
-
 * drivers: As a follow-up of the work on the ``rte_bus`` object,
   the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
   their bus-specific counterparts) will be made opaque in DPDK 22.11.
doc/guides/rel_notes/release_22_11.rst +6 -0
index c55ee19bc2..46bb35ad09 100644
@@ -84,6 +84,12 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* bus: Registering a bus has been marked as an internal API.
+  External users may still register their bus using the ``bus_driver.h``
+  driver header (see ``enable_driver_sdk`` meson option).
+  The ``rte_bus`` object is now opaque and must be manipulated through added
+  accessors.
+
 * drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
   ``vdev``, ``vmbus`` buses has been marked as an internal API.
   External users may still register their driver using the associated driver
drivers/bus/auxiliary/auxiliary_common.c +1 -1
index 6cf6c170ec..259ff152c4 100644
@@ -12,7 +12,7 @@
 #include <rte_errno.h>
 #include <rte_interrupts.h>
 #include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_per_lcore.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
drivers/bus/auxiliary/auxiliary_params.c +1 -1
index 0289777922..a889e392c6 100644
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_kvargs.h>
drivers/bus/auxiliary/private.h +1 -1
index 3f49f62493..3dee13e1d1 100644
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <sys/queue.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 
 #include "bus_auxiliary_driver.h"
 
drivers/bus/dpaa/dpaa_bus.c +1 -1
index 1ac6aa314f..682427ba2c 100644
@@ -29,7 +29,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_ring.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_mbuf_pool_ops.h>
 #include <rte_mbuf_dyn.h>
 
drivers/bus/fslmc/fslmc_bus.c +1 -1
index b9b0981329..8503004e3d 100644
@@ -9,7 +9,7 @@
 #include <stdbool.h>
 
 #include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_malloc.h>
 #include <rte_devargs.h>
 #include <rte_memcpy.h>
drivers/bus/fslmc/private.h +1 -1
index 60d68155e1..6f14085d98 100644
@@ -5,7 +5,7 @@
 #ifndef BUS_FSLMC_PRIVATE_H
 #define BUS_FSLMC_PRIVATE_H
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 
 #include <bus_fslmc_driver.h>
 
drivers/bus/ifpga/ifpga_bus.c +1 -1
index 27e2de7072..bb943b58b5 100644
@@ -14,7 +14,7 @@
 #include <fcntl.h>
 
 #include <rte_errno.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_per_lcore.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
drivers/bus/pci/linux/pci_vfio.c +1 -1
index cd0d0b1670..fab3483d9f 100644
@@ -18,7 +18,7 @@
 #include <rte_malloc.h>
 #include <rte_vfio.h>
 #include <rte_eal.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_spinlock.h>
 #include <rte_tailq.h>
 
drivers/bus/pci/pci_common.c +1 -1
index 0d61d49287..c26aacd364 100644
@@ -13,7 +13,7 @@
 #include <rte_errno.h>
 #include <rte_interrupts.h>
 #include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_lcore.h>
drivers/bus/pci/pci_params.c +1 -1
index 61a868707f..39d702a418 100644
@@ -4,7 +4,7 @@
 
 #include <sys/queue.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_bus_pci.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
drivers/bus/pci/private.h +1 -1
index 4e40a2ed85..fddf49251d 100644
@@ -8,7 +8,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_pci_driver.h>
 #include <rte_os_shim.h>
 #include <rte_pci.h>
drivers/bus/vdev/vdev.c +1 -1
index 7d78cf93bc..809a8bb08f 100644
@@ -12,7 +12,7 @@
 
 #include <rte_eal.h>
 #include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_memory.h>
drivers/bus/vmbus/private.h +1 -1
index 3d233fa83c..e33424675c 100644
@@ -9,7 +9,7 @@
 #include <stdbool.h>
 #include <sys/uio.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_vmbus_driver.h>
 #include <rte_log.h>
 #include <rte_eal_paging.h>
drivers/common/mlx5/mlx5_common_pci.c +1 -1
index e82cb881bf..73178ce0f3 100644
@@ -9,7 +9,7 @@
 #include <rte_errno.h>
 #include <rte_class.h>
 #include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_pci_driver.h>
 
 #include "mlx5_common_log.h"
drivers/dma/idxd/idxd_bus.c +1 -1
index 13cb967f6d..e30dcfc281 100644
@@ -8,7 +8,7 @@
 #include <sys/mman.h>
 #include <libgen.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_devargs.h>
 #include <rte_eal.h>
 #include <rte_log.h>
drivers/net/bonding/rte_eth_bond_args.c +1 -1
index 1a86eb3c00..6553166f5c 100644
@@ -4,7 +4,7 @@
 
 #include <rte_devargs.h>
 #include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_pci_driver.h>
 #include <rte_kvargs.h>
 
drivers/net/failsafe/failsafe.c +1 -1
index 5d4d52c341..32811403b4 100644
@@ -11,7 +11,7 @@
 #include <ethdev_vdev.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_vdev_driver.h>
 
 #include "failsafe_private.h"
drivers/net/failsafe/failsafe_eal.c +1 -1
index 130344dce2..d71b512f81 100644
@@ -3,7 +3,7 @@
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
drivers/net/mlx5/linux/mlx5_os.c +1 -1
index efb262e368..4f0a6f4d55 100644
@@ -19,7 +19,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_pci_driver.h>
 #include <bus_auxiliary_driver.h>
 #include <rte_common.h>
drivers/net/netvsc/hn_ethdev.c +1 -1
index 188d92ffac..ccc06bdda6 100644
@@ -31,7 +31,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_vmbus_driver.h>
 #include <rte_alarm.h>
 
drivers/net/vdev_netvsc/vdev_netvsc.c +1 -1
index 65043a04eb..dc90569df1 100644
@@ -24,7 +24,7 @@
 #include <unistd.h>
 
 #include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <bus_vdev_driver.h>
 #include <rte_common.h>
 #include <rte_dev.h>
drivers/net/virtio/virtio_pci.c +1 -1
index 632451dcbe..9cf4d760b4 100644
@@ -9,7 +9,7 @@
 #endif
 
 #include <rte_io.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 
 #include "virtio_pci.h"
 #include "virtio_logs.h"
drivers/raw/ioat/idxd_bus.c +1 -1
index 539f51b1b1..f32d811055 100644
@@ -10,7 +10,7 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
 #include "ioat_private.h"
lib/eal/common/eal_common_bus.c +1 -1
index cbf382f967..be64d31b0f 100644
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <sys/queue.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_debug.h>
 #include <rte_string_fns.h>
 #include <rte_errno.h>
lib/eal/common/eal_common_dev.c +1 -1
index b6f0392f30..62a598957c 100644
@@ -7,7 +7,7 @@
 #include <string.h>
 #include <sys/queue.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 #include <rte_dev.h>
 #include <rte_devargs.h>
lib/eal/common/eal_common_devargs.c +1 -1
index d5833af373..03e6e59baf 100644
@@ -10,7 +10,7 @@
 #include <string.h>
 #include <stdarg.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 #include <rte_dev.h>
 #include <rte_devargs.h>
lib/eal/common/hotplug_mp.c +1 -1
index 1614a57752..5202bd5658 100644
@@ -3,7 +3,7 @@
  */
 #include <string.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_eal.h>
 #include <rte_errno.h>
 #include <rte_alarm.h>
lib/eal/include/bus_driver.h new file +296 -0

296 lines not on this page · raw message

lib/eal/include/meson.build +4 -0
index fd6e844224..77d8621a51 100644
@@ -55,6 +55,10 @@ headers += files(
         'rte_vfio.h',
 )
 
+driver_sdk_headers = files(
+        'bus_driver.h',
+)
+
 # special case install the generic headers, since they go in a subdir
 generic_headers = files(
         'generic/rte_atomic.h',
lib/eal/include/rte_bus.h +2 -276

303 lines not on this page · raw message

lib/eal/linux/eal_dev.c +1 -1
index 02ae1cde29..098a2c3076 100644
@@ -13,7 +13,7 @@
 #include <rte_dev.h>
 #include <rte_interrupts.h>
 #include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_spinlock.h>
 #include <rte_errno.h>
 
lib/eal/version.map +3 -5
index aa53064db1..6ec15f1147 100644
@@ -12,10 +12,9 @@ DPDK_23 {
 	rte_bus_find_by_device;
 	rte_bus_find_by_name;
 	rte_bus_get_iommu_class;
+	rte_bus_name;
 	rte_bus_probe;
-	rte_bus_register;
 	rte_bus_scan;
-	rte_bus_unregister;
 	rte_calloc;
 	rte_calloc_socket;
 	rte_cpu_get_flag_enabled;
@@ -424,14 +423,13 @@ EXPERIMENTAL {
 	rte_thread_self;
 	rte_thread_set_affinity_by_id;
 	rte_thread_set_priority;
-
-	# added in 22.11
-	rte_bus_name;
 };
 
 INTERNAL {
 	global:
 
+	rte_bus_register;
+	rte_bus_unregister;
 	rte_eal_get_baseaddr;
 	rte_firmware_read;
 	rte_intr_allow_others;
lib/ethdev/rte_ethdev.c +1 -1
index ebbe8cca3d..9eba97f2d2 100644
@@ -11,7 +11,7 @@
 #include <string.h>
 #include <sys/queue.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_log.h>
 #include <rte_interrupts.h>
 #include <rte_memcpy.h>
lib/pcapng/rte_pcapng.c +1 -1
index 5b079cd14a..72aabd4dd0 100644
@@ -11,7 +11,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_dev.h>
Signature · 1 line
2.36.1
Acked-by on v3 21/26
#101 lore raw

Re: [RFC v3 21/26] bus: hide bus object

Quoted 9 lines · David Marchand

Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.

Quoted 9 lines

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

Changes since RFC v1:
- update all existing users of the public header to use the internal one,

One small comment below...

Quoted 2 lines
---
 app/test/test_devargs.c                  |   2 +-

<snip>

Quoted 9 lines
 lib/pcapng/rte_pcapng.c                  |   2 +-
 38 files changed, 343 insertions(+), 319 deletions(-)
 create mode 100644 lib/eal/include/bus_driver.h
app/test/test_devargs.c +0 -0
index ac5bc34c18..0a4c34a1ad 100644

app/test/test_devargs.c line 14

Quoted 7 lines
app/test/test_devargs.c +1 -1
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 

This seems a strange file to need to access bus internals. Maybe something to investigate in future.

#102 lore raw

Re: [RFC v3 21/26] bus: hide bus object

Quoted 32 lines · Bruce Richardson
Quoted 9 lines · David Marchand

Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.

Quoted 9 lines

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

Changes since RFC v1:
- update all existing users of the public header to use the internal one,

One small comment below...

Quoted 2 lines
---
 app/test/test_devargs.c                  |   2 +-

<snip>

Quoted 4 lines
 lib/pcapng/rte_pcapng.c                  |   2 +-
 38 files changed, 343 insertions(+), 319 deletions(-)
 create mode 100644 lib/eal/include/bus_driver.h
Quoted 15 lines

app/test/test_devargs.c line 14

Quoted 12 lines
app/test/test_devargs.c +1 -1
index ac5bc34c18..0a4c34a1ad 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 

This seems a strange file to need to access bus internals. Maybe something to investigate in future.

Yeah... I am not sure it is worth fixing.

This code dereferences a bus object to check the ring driver registered (by calling vdev_bus->parse()).
We could make it possible to list the drivers (maybe per bus, or even globally). Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name().

But I did not find applications needing this so I let the code as is.

Signature · 1 line
David Marchand
#103 lore raw

Re: [RFC v3 21/26] bus: hide bus object

Quoted 50 lines · David Marchand
Quoted 32 lines · Bruce Richardson
Quoted 9 lines · David Marchand

Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.

Quoted 9 lines

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

Changes since RFC v1:
- update all existing users of the public header to use the internal one,

One small comment below...

Quoted 2 lines
---
 app/test/test_devargs.c                  |   2 +-

<snip>

Quoted 4 lines
 lib/pcapng/rte_pcapng.c                  |   2 +-
 38 files changed, 343 insertions(+), 319 deletions(-)
 create mode 100644 lib/eal/include/bus_driver.h
Quoted 15 lines

app/test/test_devargs.c line 14

Quoted 12 lines
app/test/test_devargs.c +1 -1
index ac5bc34c18..0a4c34a1ad 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
 #include <rte_class.h>
 

This seems a strange file to need to access bus internals. Maybe something to investigate in future.

Quoted 9 lines

Yeah... I am not sure it is worth fixing.

This code dereferences a bus object to check the ring driver registered (by calling vdev_bus->parse()).
We could make it possible to list the drivers (maybe per bus, or even globally). Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name().

But I did not find applications needing this so I let the code as is.

Agree it may not be worth fixing.

However, if we do look to fix, how about just dropping the runtime check completely and just using a build-time one for the RTE_NET_RING macro. I don't consider it valid for the tests to run with some of the built drivers deleted. If it was enabled in the build, I think the tests are ok to assume it is present at runtime.

/Bruce

#104 lore raw

Re: [RFC v3 21/26] bus: hide bus object

Quoted 5 lines · Bruce Richardson

However, if we do look to fix, how about just dropping the runtime check completely and just using a build-time one for the RTE_NET_RING macro. I don't consider it valid for the tests to run with some of the built drivers deleted. If it was enabled in the build, I think the tests are ok to assume it is present at runtime.

The build time check is likely enough, added to my todolist..

Signature · 1 line
David Marchand
#105 lore raw

RFC v3 22/26 dev: introduce driver accessors

In reply to David Marchand

Prepare for making the driver object opaque by adding accessors. Update existing "external" users.
Internal users may still dereference a rte_driver object.

---
 app/test-pmd/config.c           |  2 +-
 lib/eal/common/eal_common_dev.c |  6 ++++++
 lib/eal/include/rte_dev.h       | 15 +++++++++++++++
 lib/eal/version.map             |  3 +++
 lib/ethdev/rte_ethdev.h         |  2 +-
 5 files changed, 26 insertions(+), 2 deletions(-)
app/test-pmd/config.c +1 -1
index 7bd28ee3e8..6510f29c76 100644
@@ -654,7 +654,7 @@ device_infos_display(const char *identifier)
 			printf("\n%s Infos for device %s %s\n",
 			       info_border, dev->name, info_border);
 			printf("Bus name: %s", rte_bus_name(dev->bus));
-			printf("\nDriver name: %s", dev->driver->name);
+			printf("\nDriver name: %s", rte_driver_name(dev->driver));
 			printf("\nDevargs: %s",
 			       dev->devargs ? dev->devargs->args : "");
 			printf("\nConnect to socket: %d", dev->numa_node);
lib/eal/common/eal_common_dev.c +6 -0
index 62a598957c..16c5aef1d8 100644
@@ -19,6 +19,12 @@
 #include "eal_private.h"
 #include "hotplug_mp.h"
 
+const char *
+rte_driver_name(const struct rte_driver *driver)
+{
+	return driver->name;
+}
+
 /**
  * The device event callback description.
  *
lib/eal/include/rte_dev.h +15 -0
index 24f9122558..fedf67fba1 100644
@@ -62,6 +62,21 @@ struct rte_driver {
 	const char *alias;              /**< Driver alias. */
 };
 
+/**
+ * Retrieve a driver name.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * @param driver
+ *   A pointer to a driver structure.
+ * @return
+ *   A pointer to the driver name string.
+ */
+__rte_experimental
+const char *
+rte_driver_name(const struct rte_driver *driver);
+
 /*
  * Internal identifier length
  * Sufficiently large to allow for UUID or PCI address
lib/eal/version.map +3 -0
index 6ec15f1147..d10fd89458 100644
@@ -423,6 +423,9 @@ EXPERIMENTAL {
 	rte_thread_self;
 	rte_thread_set_affinity_by_id;
 	rte_thread_set_priority;
+
+	# added in 22.11
+	rte_driver_name;
 };
 
 INTERNAL {
lib/ethdev/rte_ethdev.h +1 -1
index de9e970d4d..e9574f646f 100644
@@ -3380,7 +3380,7 @@ int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
  * exists for the device and the rte_eth_dev 'dev' has been populated
  * successfully with a call to it:
  *
- * driver_name = dev->device->driver->name
+ * driver_name = rte_driver_name(dev->device->driver)
  * nb_rx_queues = dev->data->nb_rx_queues
  * nb_tx_queues = dev->data->nb_tx_queues
  * dev_flags = &dev->data->dev_flags
Signature · 1 line
2.36.1
#107 lore raw

RFC v3 23/26 dev: hide driver object

In reply to David Marchand

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark this object's accessors as stable.

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

---
 doc/guides/rel_notes/release_22_11.rst        |  2 ++
 drivers/baseband/acc100/rte_acc100_pmd.c      |  2 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  2 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |  2 +-
 drivers/bus/auxiliary/auxiliary_params.c      |  2 +-
 drivers/bus/auxiliary/bus_auxiliary_driver.h  |  2 +-
 drivers/bus/dpaa/bus_dpaa_driver.h            |  2 +-
 drivers/bus/fslmc/bus_fslmc_driver.h          |  2 +-
 drivers/bus/fslmc/fslmc_vfio.c                |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpci.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dprc.c      |  2 +-
 drivers/bus/pci/bus_pci_driver.h              |  2 +-
 drivers/bus/pci/pci_params.c                  |  2 +-
 drivers/bus/vdev/bus_vdev_driver.h            |  2 +-
 drivers/bus/vdev/vdev.c                       |  2 +-
 drivers/bus/vdev/vdev_params.c                |  2 +-
 drivers/bus/vmbus/bus_vmbus_driver.h          |  2 +-
 drivers/common/qat/dev/qat_dev_gen4.c         |  2 +-
 drivers/common/qat/qat_qp.c                   |  2 +-
 drivers/compress/zlib/zlib_pmd_ops.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_qp.c               |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/dma/idxd/idxd_bus.c                   |  1 +
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dlb2/pf/dlb2_pf.c               |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/dpaa2/dpaa2_hw_dpcon.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/skeleton/skeleton_eventdev.c    |  2 +-
 drivers/gpu/cuda/cuda.c                       |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_global.h                  |  2 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_common.h              |  2 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c               |  2 +-
 drivers/net/cxgbe/base/t4_hw.c                |  2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |  2 +-
 drivers/net/cxgbe/cxgbe_main.c                |  2 +-
 drivers/net/cxgbe/sge.c                       |  2 +-
 drivers/net/dpaa2/base/dpaa2_hw_dpni.c        |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/dpaa2/dpaa2_recycle.c             |  2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |  2 +-
 drivers/net/dpaa2/dpaa2_sparser.c             |  2 +-
 drivers/net/e1000/em_ethdev.c                 |  2 +-
 drivers/net/e1000/igb_ethdev.c                |  2 +-
 drivers/net/e1000/igb_flow.c                  |  2 +-
 drivers/net/ena/ena_ethdev.h                  |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/enic/enic_vf_representor.c        |  2 +-
 drivers/net/failsafe/failsafe_private.h       |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  2 +-
 drivers/net/i40e/i40e_ethdev.c                |  2 +-
 drivers/net/iavf/iavf_ethdev.c                |  2 +-
 drivers/net/iavf/iavf_vchnl.c                 |  2 +-
 drivers/net/ice/ice_dcf.c                     |  2 +-
 drivers/net/ice/ice_dcf_ethdev.c              |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  2 +-
 drivers/net/ixgbe/ixgbe_flow.c                |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  2 +-
 drivers/net/netvsc/hn_nvs.c                   |  2 +-
 drivers/net/netvsc/hn_rndis.c                 |  2 +-
 drivers/net/netvsc/hn_rxtx.c                  |  2 +-
 drivers/net/nfp/nfp_common.c                  |  2 +-
 drivers/net/nfp/nfp_ethdev.c                  |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  2 +-
 drivers/net/qede/qede_ethdev.h                |  2 +-
 drivers/net/sfc/sfc_ethdev.c                  |  2 +-
 drivers/net/sfc/sfc_sw_stats.c                |  2 +-
 drivers/net/sfc/sfc_sw_stats.h                |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  2 +-
 drivers/net/virtio/virtio_pci_ethdev.c        |  2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy.c             |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/raw/skeleton/skeleton_rawdev_test.c   |  2 +-
 drivers/regex/mlx5/mlx5_regex_control.c       |  2 +-
 lib/compressdev/rte_compressdev.c             |  2 +-
 lib/compressdev/rte_compressdev_pmd.c         |  2 +-
 lib/compressdev/rte_compressdev_pmd.h         |  1 +
 lib/cryptodev/cryptodev_pmd.c                 |  2 +-
 lib/cryptodev/cryptodev_pmd.h                 |  1 +
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/dmadev/rte_dmadev_pmd.h                   |  2 +-
 lib/eal/common/eal_common_dev.c               |  2 +-
 lib/eal/include/dev_driver.h                  | 28 +++++++++++++++++++
 lib/eal/include/meson.build                   |  1 +
 lib/eal/include/rte_dev.h                     | 15 ++--------
 lib/eal/version.map                           |  4 +--
 lib/ethdev/ethdev_driver.h                    |  1 +
 lib/eventdev/eventdev_pmd.h                   |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_event_eth_rx_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/gpudev/gpudev_driver.h                    |  2 +-
 lib/mempool/rte_mempool_ops.c                 |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 lib/rawdev/rte_rawdev.c                       |  2 +-
 lib/rawdev/rte_rawdev_pmd.h                   |  2 +-
 lib/security/rte_security.c                   |  2 +-
 115 files changed, 144 insertions(+), 122 deletions(-)
 create mode 100644 lib/eal/include/dev_driver.h
doc/guides/rel_notes/release_22_11.rst +2 -0
index 46bb35ad09..ff1a2d6543 100644
@@ -94,6 +94,8 @@ API Changes
   ``vdev``, ``vmbus`` buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
+  The ``rte_driver`` object is now opaque and must be manipulated through added
+  accessors.
 
 * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
 
drivers/baseband/acc100/rte_acc100_pmd.c +1 -1
index 801e8920df..e2d9409185 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_byteorder.h>
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +1 -1
index c1d877c87f..51dd090c1b 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +1 -1
index f16814e241..036579e3ec 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
drivers/bus/auxiliary/auxiliary_params.c +1 -1
index a889e392c6..e4c7ee0c3b 100644
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_kvargs.h>
 
drivers/bus/auxiliary/bus_auxiliary_driver.h +1 -1
index 1c2d2c04af..58fb7c7f69 100644
@@ -25,7 +25,7 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #define RTE_BUS_AUXILIARY_NAME "auxiliary"
drivers/bus/dpaa/bus_dpaa_driver.h +1 -1
index cf66fc0c53..26a83b2cdf 100644
@@ -7,7 +7,7 @@
 #define BUS_DPAA_DRIVER_H
 
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_mbuf_dyn.h>
 #include <rte_mempool.h>
 
drivers/bus/fslmc/bus_fslmc_driver.h +1 -1
index 798ddebf3a..7ac5fe6ff1 100644
@@ -29,7 +29,7 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
 #include <rte_mbuf.h>
drivers/bus/fslmc/fslmc_vfio.c +1 -1
index 8604e43947..5966776a85 100644
@@ -28,7 +28,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal_memconfig.h>
 
 #include "private.h"
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +1 -1
index cfe4280f87..d7f6e45b7d 100644
@@ -18,7 +18,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_mbuf_pool_ops.h>
 
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +1 -1
index b7d81b518c..07256ed7ec 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 
 #include <fslmc_logs.h>
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +1 -1
index 071b0d297d..4aec7b2cd8 100644
@@ -30,7 +30,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <fslmc_logs.h>
 #include <bus_fslmc_driver.h>
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c +1 -1
index 223e34bcba..65e2d799c3 100644
@@ -10,7 +10,7 @@
 #include <errno.h>
 
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "private.h"
 #include <fslmc_logs.h>
drivers/bus/pci/bus_pci_driver.h +1 -1
index b5c7dee617..0f2f9b5101 100644
@@ -11,7 +11,7 @@ extern "C" {
 #endif
 
 #include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_compat.h>
 
 /** Pathname of PCI devices directory. */
drivers/bus/pci/pci_params.c +1 -1
index 39d702a418..d24cc201b8 100644
@@ -6,7 +6,7 @@
 
 #include <bus_driver.h>
 #include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_kvargs.h>
 #include <rte_devargs.h>
drivers/bus/vdev/bus_vdev_driver.h +1 -1
index 36748cdfae..bc7e30d7c6 100644
@@ -11,7 +11,7 @@ extern "C" {
 
 #include <rte_bus_vdev.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 
 struct rte_vdev_device {
drivers/bus/vdev/vdev.c +1 -1
index 809a8bb08f..b176b658fc 100644
@@ -11,7 +11,7 @@
 #include <sys/queue.h>
 
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_devargs.h>
drivers/bus/vdev/vdev_params.c +1 -1
index 2c72614776..2d10a1e8ad 100644
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
drivers/bus/vmbus/bus_vmbus_driver.h +1 -1
index 3424e791c9..e2475a642d 100644
@@ -12,7 +12,7 @@ extern "C" {
 
 #include <rte_bus_vmbus.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 struct vmbus_channel;
 struct vmbus_mon_page;
drivers/common/qat/dev/qat_dev_gen4.c +1 -1
index 7ffde5f4c8..85d6ddfcf4 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2021 Intel Corporation
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "qat_device.h"
drivers/common/qat/qat_qp.c +1 -1
index 4a1be35b47..e58e4ceec0 100644
@@ -4,7 +4,7 @@
 
 #include <rte_common.h>
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_pci.h>
drivers/compress/zlib/zlib_pmd_ops.c +1 -1
index 7d657d81bc..445a3baa67 100644
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 
drivers/crypto/bcmfs/bcmfs_qp.c +1 -1
index 61d457f4e0..d1ede5e990 100644
@@ -8,7 +8,7 @@
 #include <rte_atomic.h>
 #include <rte_bitmap.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_prefetch.h>
drivers/crypto/bcmfs/bcmfs_sym_pmd.c +1 -1
index bc7fb67218..78272d616c 100644
@@ -4,7 +4,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
 #include <cryptodev_pmd.h>
drivers/crypto/ccp/rte_ccp_pmd.c +1 -1
index 6c3e45e333..013f3be1e6 100644
@@ -9,7 +9,7 @@
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 
 #include "ccp_crypto.h"
drivers/crypto/cnxk/cn10k_cryptodev.c +1 -1
index 3fd9f3c426..db11ac7444 100644
@@ -7,7 +7,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "cn10k_cryptodev.h"
drivers/crypto/cnxk/cn9k_cryptodev.c +1 -1
index bd425f95ff..4cfc1f2150 100644
@@ -7,7 +7,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "cn9k_cryptodev.h"
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +1 -1
index 0cce861899..3b13578de0 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <bus_fslmc_driver.h>
drivers/crypto/dpaa_sec/dpaa_sec.c +1 -1
index 7e554cb2b1..c6bd785262 100644
@@ -19,7 +19,7 @@
 #include <rte_security_driver.h>
 #endif
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_io.h>
 #include <rte_ip.h>
 #include <rte_kvargs.h>
drivers/crypto/scheduler/scheduler_pmd_ops.c +1 -1
index f3a1bd626c..971f82897c 100644
@@ -5,7 +5,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_reorder.h>
drivers/dma/idxd/idxd_bus.c +1 -0
index e30dcfc281..9b7b16c6e3 100644
@@ -9,6 +9,7 @@
 #include <libgen.h>
 
 #include <bus_driver.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_eal.h>
 #include <rte_log.h>
drivers/event/dlb2/dlb2.c +1 -1
index 5a443acff8..759578378f 100644
@@ -17,7 +17,7 @@
 #include <rte_config.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_eventdev.h>
 #include <eventdev_pmd.h>
drivers/event/dlb2/pf/dlb2_pf.c +1 -1
index 9f8c6cd8b8..71ac141b66 100644
@@ -15,7 +15,7 @@
 
 #include <rte_debug.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_mbuf.h>
 #include <rte_ring.h>
drivers/event/dpaa/dpaa_eventdev.c +1 -1
index aa403f9e06..8e470584ea 100644
@@ -14,7 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_log.h>
drivers/event/dpaa2/dpaa2_eventdev.c +1 -1
index 08df6e223a..1001297cda 100644
@@ -14,7 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <bus_fslmc_driver.h>
 #include <rte_lcore.h>
drivers/event/dpaa2/dpaa2_hw_dpcon.c +1 -1
index 3882a9cf1d..a68d3ac154 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 
 #include <bus_fslmc_driver.h>
drivers/event/octeontx/ssovf_evdev.c +1 -1
index fe157c59d5..99fa326ad5 100644
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <cryptodev_pmd.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <ethdev_driver.h>
 #include <rte_event_eth_rx_adapter.h>
drivers/event/skeleton/skeleton_eventdev.c +1 -1
index 6bd8fec6d4..8513b9a013 100644
@@ -12,7 +12,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
drivers/gpu/cuda/cuda.c +1 -1
index 2be7b8d2df..a552aabeb8 100644
@@ -8,7 +8,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <gpudev_driver.h>
 
drivers/mempool/dpaa2/dpaa2_hw_mempool.c +1 -1
index 56c629c681..84371d5d1a 100644
@@ -20,7 +20,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include "rte_dpaa2_mempool.h"
 
 #include "fslmc_vfio.h"
drivers/net/af_xdp/rte_eth_af_xdp.c +1 -1
index fd7be47311..9957de2314 100644
@@ -24,7 +24,7 @@
 #include <rte_string_fns.h>
 #include <rte_branch_prediction.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
 #include <rte_lcore.h>
drivers/net/ark/ark_global.h +1 -1
index 748db590c1..71d0b53e03 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_version.h>
 
 #include "ark_pktdir.h"
drivers/net/avp/avp_ethdev.c +1 -1
index 7c0cb666fb..b2a08f5635 100644
@@ -22,7 +22,7 @@
 #include <rte_cycles.h>
 #include <rte_spinlock.h>
 #include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_io.h>
drivers/net/axgbe/axgbe_common.h +1 -1
index b9ebf64fb8..a5d11c5832 100644
@@ -33,7 +33,7 @@
 #include <rte_memzone.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_pci.h>
 #include <rte_common.h>
drivers/net/bnx2x/bnx2x_ethdev.c +1 -1
index f36ad30e17..4448cf2de2 100644
@@ -9,7 +9,7 @@
 #include "bnx2x_rxtx.h"
 
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_alarm.h>
 
drivers/net/bnxt/bnxt_ethdev.c +1 -1
index e275d3a53f..1460dce2ab 100644
@@ -6,7 +6,7 @@
 #include <inttypes.h>
 #include <stdbool.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
drivers/net/bnxt/rte_pmd_bnxt.c +1 -1
index 77ecbef04c..fd1506ddd4 100644
@@ -7,7 +7,7 @@
 #include <stdbool.h>
 #include <unistd.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cycles.h>
drivers/net/cxgbe/base/t4_hw.c +1 -1
index 384080e6d3..bed755f5d9 100644
@@ -18,7 +18,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_byteorder.h>
 
 #include "common.h"
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index fd71a50a58..45bbeaef0c 100644
@@ -31,7 +31,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "cxgbe.h"
 #include "cxgbe_pfvf.h"
drivers/net/cxgbe/cxgbe_main.c +1 -1
index 3c02c98b3d..f8dd833032 100644
@@ -31,7 +31,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #include "base/common.h"
drivers/net/cxgbe/sge.c +1 -1
index 5d91355c9a..5b13cb5c94 100644
@@ -30,7 +30,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "base/common.h"
 #include "base/t4_regs.h"
drivers/net/dpaa2/base/dpaa2_hw_dpni.c +1 -1
index 9509f6e8a3..4d33b51fea 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <dpaa2_pmd_logs.h>
 #include <dpaa2_hw_pvt.h>
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index f876f4790c..37a8b43114 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 #include "rte_dpaa2_mempool.h"
drivers/net/dpaa2/dpaa2_recycle.c +1 -1
index 932570c6e0..fbfdf360d1 100644
@@ -14,7 +14,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 
drivers/net/dpaa2/dpaa2_rxtx.c +1 -1
index 7b9c528d13..9436a95ac8 100644
@@ -13,7 +13,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hexdump.h>
 
 #include <bus_fslmc_driver.h>
drivers/net/dpaa2/dpaa2_sparser.c +1 -1
index ba0d500f74..63463c4fbf 100644
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <fslmc_logs.h>
 #include <fslmc_vfio.h>
drivers/net/e1000/em_ethdev.c +1 -1
index 409de50083..8ee9be12ad 100644
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
drivers/net/e1000/igb_ethdev.c +1 -1
index 43979992d3..d6bcc5bf58 100644
@@ -22,7 +22,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
drivers/net/e1000/igb_flow.c +1 -1
index e46697b6a1..b775310651 100644
@@ -21,7 +21,7 @@
 #include <rte_eal.h>
 #include <rte_atomic.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
 
drivers/net/ena/ena_ethdev.h +1 -1
index 4709675af8..4d27fba585 100644
@@ -14,7 +14,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_net.h>
 
 #include "ena_com.h"
drivers/net/enic/enic_ethdev.c +1 -1
index 998436e5e8..cdf0915591 100644
@@ -6,7 +6,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <ethdev_driver.h>
drivers/net/enic/enic_vf_representor.c +1 -1
index 7312c411bd..46f85964e9 100644
@@ -7,7 +7,7 @@
 
 #include <bus_pci_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_flow_driver.h>
drivers/net/failsafe/failsafe_private.h +1 -1
index a80f5e2caf..53a451c1b1 100644
@@ -11,7 +11,7 @@
 #include <pthread.h>
 
 #include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_devargs.h>
 #include <rte_flow.h>
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 8bbd8b445d..7adb20bff9 100644
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_spinlock.h>
 #include <rte_kvargs.h>
 #include <rte_vect.h>
drivers/net/i40e/i40e_ethdev.c +1 -1
index 7bdc453ec1..67111ac251 100644
@@ -23,7 +23,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_tailq.h>
 #include <rte_hash_crc.h>
 #include <rte_bitmap.h>
drivers/net/iavf/iavf_ethdev.c +1 -1
index 506fcff6e3..ef2ab06475 100644
@@ -24,7 +24,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "iavf.h"
 #include "iavf_rxtx.h"
drivers/net/iavf/iavf_vchnl.c +1 -1
index 21bd1e2193..15f695682d 100644
@@ -19,7 +19,7 @@
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "iavf.h"
 #include "iavf_rxtx.h"
drivers/net/ice/ice_dcf.c +1 -1
index 885d58c0f4..1c3d22ae0f 100644
@@ -21,7 +21,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "ice_dcf.h"
 #include "ice_rxtx.h"
drivers/net/ice/ice_dcf_ethdev.c +1 -1
index 0da267db1f..dee712af98 100644
@@ -18,7 +18,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <iavf_devids.h>
 
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index 552e41692c..04c9ce78a2 100644
@@ -30,7 +30,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hash_crc.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
drivers/net/ixgbe/ixgbe_flow.c +1 -1
index 368342872a..67373a7b78 100644
@@ -27,7 +27,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hash_crc.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
drivers/net/mlx4/mlx4.c +1 -1
index 910b76a92c..7e7e1824ef 100644
@@ -31,7 +31,7 @@
 #endif
 
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
drivers/net/netvsc/hn_ethdev.c +1 -1
index ccc06bdda6..d0bbc0a4c0 100644
@@ -30,7 +30,7 @@
 #include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_driver.h>
 #include <bus_vmbus_driver.h>
 #include <rte_alarm.h>
drivers/net/netvsc/hn_nvs.c +1 -1
index 817fb06dfb..7db82af9f3 100644
@@ -28,7 +28,7 @@
 #include <rte_cycles.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_rndis.c +1 -1
index 20f75a17b0..e6f1f28768 100644
@@ -26,7 +26,7 @@
 #include <rte_cycles.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_rxtx.c +1 -1
index 61cf374224..bc6f60c64a 100644
@@ -25,7 +25,7 @@
 #include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_net.h>
 #include <bus_vmbus_driver.h>
 #include <rte_spinlock.h>
drivers/net/nfp/nfp_common.c +1 -1
index 0e55f0c792..eaafe11fb9 100644
@@ -19,7 +19,7 @@
 #include <rte_debug.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ether.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
drivers/net/nfp/nfp_ethdev.c +1 -1
index 5cdd34e588..47359501bc 100644
@@ -16,7 +16,7 @@
 #include <rte_common.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ether.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
drivers/net/octeontx/octeontx_ethdev.c +1 -1
index 9ada22e2ff..0eee191566 100644
@@ -15,7 +15,7 @@
 #include <bus_vdev_driver.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
drivers/net/qede/qede_ethdev.h +1 -1
index a38b701183..b781bcdcfd 100644
@@ -13,7 +13,7 @@
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ip.h>
 
 /* ecore includes */
drivers/net/sfc/sfc_ethdev.c +1 -1
index 506c62a726..2ec743ebce 100644
@@ -7,7 +7,7 @@
  * for Solarflare) and Solarflare Communications, Inc.
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
drivers/net/sfc/sfc_sw_stats.c +1 -1
index 81f5aa3cc4..3ae5023b6f 100644
@@ -2,7 +2,7 @@
  *
  * Copyright(c) 2021 Xilinx, Inc.
  */
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_bitmap.h>
 
 #include "sfc.h"
drivers/net/sfc/sfc_sw_stats.h +1 -1
index 1abded8018..d9738e5214 100644
@@ -5,7 +5,7 @@
 #ifndef _SFC_SW_STATS_H
 #define _SFC_SW_STATS_H
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "sfc.h"
 
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index 28183ec740..9f57cb1a20 100644
@@ -20,7 +20,7 @@
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
 #include <ethdev_driver.h>
drivers/net/vdev_netvsc/vdev_netvsc.c +1 -1
index dc90569df1..c3e045d892 100644
@@ -27,7 +27,7 @@
 #include <bus_driver.h>
 #include <bus_vdev_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
drivers/net/virtio/virtio_ethdev.c +1 -1
index d180162abd..edf3becd32 100644
@@ -24,7 +24,7 @@
 #include <rte_memory.h>
 #include <rte_eal_paging.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 
drivers/net/virtio/virtio_pci_ethdev.c +1 -1
index 2b9e35cef5..abc63b0935 100644
@@ -16,7 +16,7 @@
 
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #include "virtio.h"
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -1
index 101b1cb500..fd946dec5c 100644
@@ -30,7 +30,7 @@
 #include <ethdev_pci.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "base/vmxnet3_defs.h"
 
drivers/raw/cnxk_bphy/cnxk_bphy.c +1 -1
index db029cbf34..909fb8faab 100644
@@ -3,7 +3,7 @@
  */
 #include <bus_pci_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_pci.h>
drivers/raw/skeleton/skeleton_rawdev.c +1 -1
index 19b523a815..a06b724866 100644
@@ -13,7 +13,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_kvargs.h>
 #include <rte_log.h>
drivers/raw/skeleton/skeleton_rawdev_test.c +1 -1
index fc257c5f44..8ef7a6b127 100644
@@ -6,7 +6,7 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_rawdev.h>
 #include <bus_vdev_driver.h>
 #include <rte_test.h>
drivers/regex/mlx5/mlx5_regex_control.c +1 -1
index 6ab62a12fc..92cf5f495e 100644
@@ -11,7 +11,7 @@
 #include <rte_regexdev.h>
 #include <rte_regexdev_core.h>
 #include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <mlx5_common.h>
 #include <mlx5_glue.h>
lib/compressdev/rte_compressdev.c +1 -1
index 7f6dedbc52..639a0d66ca 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_memzone.h>
 
lib/compressdev/rte_compressdev_pmd.c +1 -1
index 9bfae077db..41f1415bea 100644
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 
 #include "rte_compressdev_internal.h"
lib/compressdev/rte_compressdev_pmd.h +1 -0
index 9fabc399c5..72e52f876f 100644
@@ -19,6 +19,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <dev_driver.h>
 
 #include "rte_compressdev.h"
 #include "rte_compressdev_internal.h"
lib/cryptodev/cryptodev_pmd.c +1 -1
index 75d0075b86..f07b92dfd7 100644
@@ -4,7 +4,7 @@
 
 #include <sys/queue.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
lib/cryptodev/cryptodev_pmd.h +1 -0
index 3dcc3cb7ed..96d7e225b0 100644
@@ -19,6 +19,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_common.h>
lib/cryptodev/rte_cryptodev.c +1 -1
index 42f3221052..1dad092317 100644
@@ -13,7 +13,7 @@
 
 #include <rte_log.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
lib/dmadev/rte_dmadev_pmd.h +1 -1
index 82ab7a8cc7..acd7f71cd1 100644
@@ -14,7 +14,7 @@
  * by any application.
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_dmadev.h"
 
lib/eal/common/eal_common_dev.c +1 -1
index 16c5aef1d8..98f3c78795 100644
@@ -9,7 +9,7 @@
 
 #include <bus_driver.h>
 #include <rte_class.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_errno.h>
 #include <rte_log.h>
lib/eal/include/dev_driver.h new file +28 -0
new file mode 100644
index 0000000000..015188abd5
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+	RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+	const char *name;                   /**< Driver name. */
+	const char *alias;              /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
lib/eal/include/meson.build +1 -0
index 77d8621a51..cfcd40aaed 100644
@@ -57,6 +57,7 @@ headers += files(
 
 driver_sdk_headers = files(
         'bus_driver.h',
+        'dev_driver.h',
 )
 
 # special case install the generic headers, since they go in a subdir
lib/eal/include/rte_dev.h +2 -13
index fedf67fba1..38057cc0ef 100644
@@ -23,6 +23,8 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_log.h>
 
+struct rte_driver;
+
 /**
  * The device event type.
  */
@@ -53,27 +55,14 @@ struct rte_mem_resource {
 	void *addr;         /**< Virtual address, NULL when not mapped. */
 };
 
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
-	RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
-	const char *name;                   /**< Driver name. */
-	const char *alias;              /**< Driver alias. */
-};
-
 /**
  * Retrieve a driver name.
  *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param driver
  *   A pointer to a driver structure.
  * @return
  *   A pointer to the driver name string.
  */
-__rte_experimental
 const char *
 rte_driver_name(const struct rte_driver *driver);
 
lib/eal/version.map +1 -3
index d10fd89458..8b53a1d258 100644
@@ -37,6 +37,7 @@ DPDK_23 {
 	rte_devargs_parsef;
 	rte_devargs_remove;
 	rte_devargs_type_count;
+	rte_driver_name;
 	rte_dump_physmem_layout;
 	rte_dump_stack;
 	rte_dump_tailq;
@@ -423,9 +424,6 @@ EXPERIMENTAL {
 	rte_thread_self;
 	rte_thread_set_affinity_by_id;
 	rte_thread_set_priority;
-
-	# added in 22.11
-	rte_driver_name;
 };
 
 INTERNAL {
lib/ethdev/ethdev_driver.h +1 -0
index 5101868ea7..47a55a419e 100644
@@ -19,6 +19,7 @@ extern "C" {
  *
  */
 
+#include <dev_driver.h>
 #include <rte_ethdev.h>
 
 /**
lib/eventdev/eventdev_pmd.h +1 -1
index 69402668d8..def6cd0876 100644
@@ -22,7 +22,7 @@ extern "C" {
 #include <rte_common.h>
 #include <rte_compat.h>
 #include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
lib/eventdev/rte_event_crypto_adapter.c +1 -1
index 7c695176f4..5bc10312fc 100644
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <stdbool.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
lib/eventdev/rte_event_eth_rx_adapter.c +1 -1
index bf8741d2ea..4f4efdae9f 100644
@@ -9,7 +9,7 @@
 
 #include <rte_cycles.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_driver.h>
 #include <rte_log.h>
lib/eventdev/rte_eventdev.c +1 -1
index 1dc4f966be..54abee2b3f 100644
@@ -12,7 +12,7 @@
 
 #include <rte_string_fns.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memzone.h>
 #include <rte_eal.h>
 #include <rte_common.h>
lib/gpudev/gpudev_driver.h +1 -1
index 0e55b00bfe..23972b3dbd 100644
@@ -14,7 +14,7 @@
 #include <stdint.h>
 #include <sys/queue.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_gpudev.h"
 
lib/mempool/rte_mempool_ops.c +1 -1
index d60235a7e3..058ad147a5 100644
@@ -10,7 +10,7 @@
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_mempool_trace.h"
 
lib/pcapng/rte_pcapng.c +1 -1
index 72aabd4dd0..af2b814251 100644
@@ -14,7 +14,7 @@
 #include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
lib/rawdev/rte_rawdev.c +1 -1
index 2f0a4f132e..bc51258143 100644
@@ -12,7 +12,7 @@
 
 #include <rte_string_fns.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_telemetry.h>
lib/rawdev/rte_rawdev_pmd.h +1 -1
index 3b7be57d3e..a51944c8ff 100644
@@ -19,7 +19,7 @@ extern "C" {
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_common.h>
lib/security/rte_security.c +1 -1
index 046b6496d2..d036ed33f6 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_telemetry.h>
 #include "rte_security.h"
 #include "rte_security_driver.h"
Signature · 1 line
2.36.1
Acked-by on v3 23/26
#108 lore raw

Re: [RFC v3 23/26] dev: hide driver object

Quoted 11 lines · David Marchand

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark this object's accessors as stable.

---

Acked-by
#109 lore raw

Re: [RFC v3 23/26] dev: hide driver object

Quoted 8 lines · Bruce Richardson
Quoted 6 lines · David Marchand

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition. Update drivers and library to use the internal header.

Quoted 6 lines
Quoted 5 lines

Some applications may have been dereferencing rte_driver objects, mark this object's accessors as stable.

---

Acked-by on v3 23/26
#110 lore raw

RE: [RFC v3 23/26] dev: hide driver object

In reply to David Marchand

Looks good to me.

Quoted 1,715 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Thursday, July 28, 2022 8:57 PM
To: [email protected]
Cc: Chautru, Nicolas <[email protected]>; Parav Pandit <[email protected]>; Xueming Li <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; Stephen Hemminger <[email protected]>; Long Li <[email protected]>; Zhang, Roy Fan <[email protected]>; Sunila Sahu <[email protected]>; Ashish Gupta <[email protected]>; Ajit Khaparde <[email protected]>; Raveendra Padasalagi <[email protected]>; Vikas Gupta <[email protected]>; Chandubabu Namburu <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Gagandeep Singh <[email protected]>; Richardson, Bruce <[email protected]>; Laatz, Kevin <[email protected]>; McDaniel, Timothy <[email protected]>; Jerin Jacob <[email protected]>; Elena Agostini <[email protected]>; Loftus, Ciara <[email protected]>; Zhang, Qi Z <[email protected]>; Shepard Siegel <[email protected]>; Ed Czeck <[email protected]>; John Miller <[email protected]>; Webster, Steven <[email protected]>; Peters, Matt <[email protected]>; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Somnath Kotur <[email protected]>; Rahul Lakkireddy <[email protected]>; Su, Simei <[email protected]>; Wu, Wenjun1 <[email protected]>; Marcin Wojtas <[email protected]>; Michal Krawczyk <[email protected]>; Shai Brandes <[email protected]>; Evgeny Schemeilin <[email protected]>; Igor Chauskin <[email protected]>; Daley, John <[email protected]>; Hyong Youb Kim <[email protected]>; Gaetan Rivet <[email protected]>; Wang, Xiao W <[email protected]>; Zhang, Yuying <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Matan Azrad <[email protected]>; Viacheslav Ovsiienko <[email protected]>; Chaoyong He <[email protected]>; Niklas Soderlund <[email protected]>; Harman Kalra <[email protected]>; Devendra Singh Rawat <[email protected]>; Andrew Rybchenko <[email protected]>; Maciej Czekaj <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>; Jochen Behrens <[email protected]>; Jakub Palider <[email protected]>; Tomasz Duszynski <[email protected]>; Ori Kam <[email protected]>; Akhil Goyal <[email protected]>; Chengwen Feng <[email protected]>; Ray Kinsella <[email protected]>; Thomas Monjalon <[email protected]>; Ferruh Yigit <[email protected]>; Gujjar, Abhinandan S <[email protected]>; Jayatheerthan, Jay <[email protected]>; Matz, Olivier <[email protected]>; Pattan, Reshma <[email protected]>
Subject: [RFC v3 23/26] dev: hide driver object

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition. Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark this object's accessors as stable.

---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,

---
 doc/guides/rel_notes/release_22_11.rst        |  2 ++
 drivers/baseband/acc100/rte_acc100_pmd.c      |  2 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  2 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |  2 +-
 drivers/bus/auxiliary/auxiliary_params.c      |  2 +-
 drivers/bus/auxiliary/bus_auxiliary_driver.h  |  2 +-
 drivers/bus/dpaa/bus_dpaa_driver.h            |  2 +-
 drivers/bus/fslmc/bus_fslmc_driver.h          |  2 +-
 drivers/bus/fslmc/fslmc_vfio.c                |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpci.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dprc.c      |  2 +-
 drivers/bus/pci/bus_pci_driver.h              |  2 +-
 drivers/bus/pci/pci_params.c                  |  2 +-
 drivers/bus/vdev/bus_vdev_driver.h            |  2 +-
 drivers/bus/vdev/vdev.c                       |  2 +-
 drivers/bus/vdev/vdev_params.c                |  2 +-
 drivers/bus/vmbus/bus_vmbus_driver.h          |  2 +-
 drivers/common/qat/dev/qat_dev_gen4.c         |  2 +-
 drivers/common/qat/qat_qp.c                   |  2 +-
 drivers/compress/zlib/zlib_pmd_ops.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_qp.c               |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/dma/idxd/idxd_bus.c                   |  1 +
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dlb2/pf/dlb2_pf.c               |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/dpaa2/dpaa2_hw_dpcon.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/skeleton/skeleton_eventdev.c    |  2 +-
 drivers/gpu/cuda/cuda.c                       |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_global.h                  |  2 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_common.h              |  2 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c               |  2 +-
 drivers/net/cxgbe/base/t4_hw.c                |  2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |  2 +-
 drivers/net/cxgbe/cxgbe_main.c                |  2 +-
 drivers/net/cxgbe/sge.c                       |  2 +-
 drivers/net/dpaa2/base/dpaa2_hw_dpni.c        |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/dpaa2/dpaa2_recycle.c             |  2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |  2 +-
 drivers/net/dpaa2/dpaa2_sparser.c             |  2 +-
 drivers/net/e1000/em_ethdev.c                 |  2 +-
 drivers/net/e1000/igb_ethdev.c                |  2 +-
 drivers/net/e1000/igb_flow.c                  |  2 +-
 drivers/net/ena/ena_ethdev.h                  |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/enic/enic_vf_representor.c        |  2 +-
 drivers/net/failsafe/failsafe_private.h       |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  2 +-
 drivers/net/i40e/i40e_ethdev.c                |  2 +-
 drivers/net/iavf/iavf_ethdev.c                |  2 +-
 drivers/net/iavf/iavf_vchnl.c                 |  2 +-
 drivers/net/ice/ice_dcf.c                     |  2 +-
 drivers/net/ice/ice_dcf_ethdev.c              |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  2 +-
 drivers/net/ixgbe/ixgbe_flow.c                |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  2 +-
 drivers/net/netvsc/hn_nvs.c                   |  2 +-
 drivers/net/netvsc/hn_rndis.c                 |  2 +-
 drivers/net/netvsc/hn_rxtx.c                  |  2 +-
 drivers/net/nfp/nfp_common.c                  |  2 +-
 drivers/net/nfp/nfp_ethdev.c                  |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  2 +-
 drivers/net/qede/qede_ethdev.h                |  2 +-
 drivers/net/sfc/sfc_ethdev.c                  |  2 +-
 drivers/net/sfc/sfc_sw_stats.c                |  2 +-
 drivers/net/sfc/sfc_sw_stats.h                |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  2 +-
 drivers/net/virtio/virtio_pci_ethdev.c        |  2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  2 +-
 drivers/raw/cnxk_bphy/cnxk_bphy.c             |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/raw/skeleton/skeleton_rawdev_test.c   |  2 +-
 drivers/regex/mlx5/mlx5_regex_control.c       |  2 +-
 lib/compressdev/rte_compressdev.c             |  2 +-
 lib/compressdev/rte_compressdev_pmd.c         |  2 +-
 lib/compressdev/rte_compressdev_pmd.h         |  1 +
 lib/cryptodev/cryptodev_pmd.c                 |  2 +-
 lib/cryptodev/cryptodev_pmd.h                 |  1 +
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/dmadev/rte_dmadev_pmd.h                   |  2 +-
 lib/eal/common/eal_common_dev.c               |  2 +-
 lib/eal/include/dev_driver.h                  | 28 +++++++++++++++++++
 lib/eal/include/meson.build                   |  1 +
 lib/eal/include/rte_dev.h                     | 15 ++--------
 lib/eal/version.map                           |  4 +--
 lib/ethdev/ethdev_driver.h                    |  1 +
 lib/eventdev/eventdev_pmd.h                   |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_event_eth_rx_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/gpudev/gpudev_driver.h                    |  2 +-
 lib/mempool/rte_mempool_ops.c                 |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 lib/rawdev/rte_rawdev.c                       |  2 +-
 lib/rawdev/rte_rawdev_pmd.h                   |  2 +-
 lib/security/rte_security.c                   |  2 +-
 115 files changed, 144 insertions(+), 122 deletions(-)
 create mode 100644 lib/eal/include/dev_driver.h
doc/guides/rel_notes/release_22_11.rst +2 -0
index 46bb35ad09..ff1a2d6543 100644
@@ -94,6 +94,8 @@ API Changes
   ``vdev``, ``vmbus`` buses has been marked as an internal API.
   External users may still register their driver using the associated driver
   headers (see ``enable_driver_sdk`` meson option).
+  The ``rte_driver`` object is now opaque and must be manipulated through added
+  accessors.
 
 * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
 
drivers/baseband/acc100/rte_acc100_pmd.c +1 -1
index 801e8920df..e2d9409185 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_byteorder.h>
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +1 -1
index c1d877c87f..51dd090c1b 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +1 -1
index f16814e241..036579e3ec 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
drivers/bus/auxiliary/auxiliary_params.c +1 -1
index a889e392c6..e4c7ee0c3b 100644
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_kvargs.h>
 
drivers/bus/auxiliary/bus_auxiliary_driver.h +1 -1
index 1c2d2c04af..58fb7c7f69 100644
@@ -25,7 +25,7 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #define RTE_BUS_AUXILIARY_NAME "auxiliary"
drivers/bus/dpaa/bus_dpaa_driver.h +1 -1
index cf66fc0c53..26a83b2cdf 100644
@@ -7,7 +7,7 @@
 #define BUS_DPAA_DRIVER_H
 
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_mbuf_dyn.h>
 #include <rte_mempool.h>
 
drivers/bus/fslmc/bus_fslmc_driver.h +1 -1
index 798ddebf3a..7ac5fe6ff1 100644
@@ -29,7 +29,7 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
 #include <rte_mbuf.h>
drivers/bus/fslmc/fslmc_vfio.c +1 -1
index 8604e43947..5966776a85 100644
@@ -28,7 +28,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal_memconfig.h>
 
 #include "private.h"
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +1 -1
index cfe4280f87..d7f6e45b7d 100644
@@ -18,7 +18,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_mbuf_pool_ops.h>
 
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +1 -1
index b7d81b518c..07256ed7ec 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 
 #include <fslmc_logs.h>
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +1 -1
index 071b0d297d..4aec7b2cd8 100644
@@ -30,7 +30,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <fslmc_logs.h>
 #include <bus_fslmc_driver.h>
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c +1 -1
index 223e34bcba..65e2d799c3 100644
@@ -10,7 +10,7 @@
 #include <errno.h>
 
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "private.h"
 #include <fslmc_logs.h>
drivers/bus/pci/bus_pci_driver.h +1 -1
index b5c7dee617..0f2f9b5101 100644
@@ -11,7 +11,7 @@ extern "C" {
 #endif
 
 #include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_compat.h>
 
 /** Pathname of PCI devices directory. */
drivers/bus/pci/pci_params.c +1 -1
index 39d702a418..d24cc201b8 100644
@@ -6,7 +6,7 @@
 
 #include <bus_driver.h>
 #include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_kvargs.h>
 #include <rte_devargs.h>
drivers/bus/vdev/bus_vdev_driver.h +1 -1
index 36748cdfae..bc7e30d7c6 100644
@@ -11,7 +11,7 @@ extern "C" {
 
 #include <rte_bus_vdev.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 
 struct rte_vdev_device {
drivers/bus/vdev/vdev.c +1 -1
index 809a8bb08f..b176b658fc 100644
@@ -11,7 +11,7 @@
 #include <sys/queue.h>
 
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_devargs.h>
drivers/bus/vdev/vdev_params.c +1 -1
index 2c72614776..2d10a1e8ad 100644
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
drivers/bus/vmbus/bus_vmbus_driver.h +1 -1
index 3424e791c9..e2475a642d 100644
@@ -12,7 +12,7 @@ extern "C" {
 
 #include <rte_bus_vmbus.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 struct vmbus_channel;
 struct vmbus_mon_page;
drivers/common/qat/dev/qat_dev_gen4.c +1 -1
index 7ffde5f4c8..85d6ddfcf4 100644
@@ -2,7 +2,7 @@
  * Copyright(c) 2021 Intel Corporation
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "qat_device.h"
drivers/common/qat/qat_qp.c +1 -1
index 4a1be35b47..e58e4ceec0 100644
@@ -4,7 +4,7 @@
 
 #include <rte_common.h>
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_pci.h>
drivers/compress/zlib/zlib_pmd_ops.c +1 -1
index 7d657d81bc..445a3baa67 100644
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 
drivers/crypto/bcmfs/bcmfs_qp.c +1 -1
index 61d457f4e0..d1ede5e990 100644
@@ -8,7 +8,7 @@
 #include <rte_atomic.h>
 #include <rte_bitmap.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_prefetch.h>
drivers/crypto/bcmfs/bcmfs_sym_pmd.c +1 -1
index bc7fb67218..78272d616c 100644
@@ -4,7 +4,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
 #include <cryptodev_pmd.h>
drivers/crypto/ccp/rte_ccp_pmd.c +1 -1
index 6c3e45e333..013f3be1e6 100644
@@ -9,7 +9,7 @@
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 
 #include "ccp_crypto.h"
drivers/crypto/cnxk/cn10k_cryptodev.c +1 -1
index 3fd9f3c426..db11ac7444 100644
@@ -7,7 +7,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "cn10k_cryptodev.h"
drivers/crypto/cnxk/cn9k_cryptodev.c +1 -1
index bd425f95ff..4cfc1f2150 100644
@@ -7,7 +7,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 
 #include "cn9k_cryptodev.h"
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +1 -1
index 0cce861899..3b13578de0 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <bus_fslmc_driver.h>
drivers/crypto/dpaa_sec/dpaa_sec.c +1 -1
index 7e554cb2b1..c6bd785262 100644
@@ -19,7 +19,7 @@
 #include <rte_security_driver.h>
 #endif
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_io.h>
 #include <rte_ip.h>
 #include <rte_kvargs.h>
drivers/crypto/scheduler/scheduler_pmd_ops.c +1 -1
index f3a1bd626c..971f82897c 100644
@@ -5,7 +5,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
 #include <rte_reorder.h>
drivers/dma/idxd/idxd_bus.c +1 -0
index e30dcfc281..9b7b16c6e3 100644
@@ -9,6 +9,7 @@
 #include <libgen.h>
 
 #include <bus_driver.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_eal.h>
 #include <rte_log.h>
drivers/event/dlb2/dlb2.c +1 -1
index 5a443acff8..759578378f 100644
@@ -17,7 +17,7 @@
 #include <rte_config.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_eventdev.h>
 #include <eventdev_pmd.h>
drivers/event/dlb2/pf/dlb2_pf.c +1 -1
index 9f8c6cd8b8..71ac141b66 100644
@@ -15,7 +15,7 @@
 
 #include <rte_debug.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_mbuf.h>
 #include <rte_ring.h>
drivers/event/dpaa/dpaa_eventdev.c +1 -1
index aa403f9e06..8e470584ea 100644
@@ -14,7 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_log.h>
drivers/event/dpaa2/dpaa2_eventdev.c +1 -1
index 08df6e223a..1001297cda 100644
@@ -14,7 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <bus_fslmc_driver.h>
 #include <rte_lcore.h>
drivers/event/dpaa2/dpaa2_hw_dpcon.c +1 -1
index 3882a9cf1d..a68d3ac154 100644
@@ -17,7 +17,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 
 #include <bus_fslmc_driver.h>
drivers/event/octeontx/ssovf_evdev.c +1 -1
index fe157c59d5..99fa326ad5 100644
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <cryptodev_pmd.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <ethdev_driver.h>
 #include <rte_event_eth_rx_adapter.h>
drivers/event/skeleton/skeleton_eventdev.c +1 -1
index 6bd8fec6d4..8513b9a013 100644
@@ -12,7 +12,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
drivers/gpu/cuda/cuda.c +1 -1
index 2be7b8d2df..a552aabeb8 100644
@@ -8,7 +8,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <gpudev_driver.h>
 
drivers/mempool/dpaa2/dpaa2_hw_mempool.c +1 -1
index 56c629c681..84371d5d1a 100644
@@ -20,7 +20,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include "rte_dpaa2_mempool.h"
 
 #include "fslmc_vfio.h"
drivers/net/af_xdp/rte_eth_af_xdp.c +1 -1
index fd7be47311..9957de2314 100644
@@ -24,7 +24,7 @@
 #include <rte_string_fns.h>
 #include <rte_branch_prediction.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
 #include <rte_lcore.h>
drivers/net/ark/ark_global.h +1 -1
index 748db590c1..71d0b53e03 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_version.h>
 
 #include "ark_pktdir.h"
drivers/net/avp/avp_ethdev.c +1 -1
index 7c0cb666fb..b2a08f5635 100644
@@ -22,7 +22,7 @@
 #include <rte_cycles.h>
 #include <rte_spinlock.h>
 #include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_io.h>
drivers/net/axgbe/axgbe_common.h +1 -1
index b9ebf64fb8..a5d11c5832 100644
@@ -33,7 +33,7 @@
 #include <rte_memzone.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_pci.h>
 #include <rte_common.h>
drivers/net/bnx2x/bnx2x_ethdev.c +1 -1
index f36ad30e17..4448cf2de2 100644
@@ -9,7 +9,7 @@
 #include "bnx2x_rxtx.h"
 
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_alarm.h>
 
drivers/net/bnxt/bnxt_ethdev.c +1 -1
index e275d3a53f..1460dce2ab 100644
@@ -6,7 +6,7 @@
 #include <inttypes.h>
 #include <stdbool.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
drivers/net/bnxt/rte_pmd_bnxt.c +1 -1
index 77ecbef04c..fd1506ddd4 100644
@@ -7,7 +7,7 @@
 #include <stdbool.h>
 #include <unistd.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_cycles.h>
drivers/net/cxgbe/base/t4_hw.c +1 -1
index 384080e6d3..bed755f5d9 100644
@@ -18,7 +18,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_byteorder.h>
 
 #include "common.h"
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index fd71a50a58..45bbeaef0c 100644
@@ -31,7 +31,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "cxgbe.h"
 #include "cxgbe_pfvf.h"
drivers/net/cxgbe/cxgbe_main.c +1 -1
index 3c02c98b3d..f8dd833032 100644
@@ -31,7 +31,7 @@
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #include "base/common.h"
drivers/net/cxgbe/sge.c +1 -1
index 5d91355c9a..5b13cb5c94 100644
@@ -30,7 +30,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "base/common.h"
 #include "base/t4_regs.h"
drivers/net/dpaa2/base/dpaa2_hw_dpni.c +1 -1
index 9509f6e8a3..4d33b51fea 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <dpaa2_pmd_logs.h>
 #include <dpaa2_hw_pvt.h>
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index f876f4790c..37a8b43114 100644
@@ -15,7 +15,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 #include "rte_dpaa2_mempool.h"
drivers/net/dpaa2/dpaa2_recycle.c +1 -1
index 932570c6e0..fbfdf360d1 100644
@@ -14,7 +14,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_fslmc_driver.h>
 #include <rte_flow_driver.h>
 
drivers/net/dpaa2/dpaa2_rxtx.c +1 -1
index 7b9c528d13..9436a95ac8 100644
@@ -13,7 +13,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hexdump.h>
 
 #include <bus_fslmc_driver.h>
drivers/net/dpaa2/dpaa2_sparser.c +1 -1
index ba0d500f74..63463c4fbf 100644
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <fslmc_logs.h>
 #include <fslmc_vfio.h>
drivers/net/e1000/em_ethdev.c +1 -1
index 409de50083..8ee9be12ad 100644
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
drivers/net/e1000/igb_ethdev.c +1 -1
index 43979992d3..d6bcc5bf58 100644
@@ -22,7 +22,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "e1000_logs.h"
 #include "base/e1000_api.h"
drivers/net/e1000/igb_flow.c +1 -1
index e46697b6a1..b775310651 100644
@@ -21,7 +21,7 @@
 #include <rte_eal.h>
 #include <rte_atomic.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
 
drivers/net/ena/ena_ethdev.h +1 -1
index 4709675af8..4d27fba585 100644
@@ -14,7 +14,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_net.h>
 
 #include "ena_com.h"
drivers/net/enic/enic_ethdev.c +1 -1
index 998436e5e8..cdf0915591 100644
@@ -6,7 +6,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <ethdev_driver.h>
drivers/net/enic/enic_vf_representor.c +1 -1
index 7312c411bd..46f85964e9 100644
@@ -7,7 +7,7 @@
 
 #include <bus_pci_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_flow_driver.h>
drivers/net/failsafe/failsafe_private.h +1 -1
index a80f5e2caf..53a451c1b1 100644
@@ -11,7 +11,7 @@
 #include <pthread.h>
 
 #include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <rte_devargs.h>
 #include <rte_flow.h>
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 8bbd8b445d..7adb20bff9 100644
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_spinlock.h>
 #include <rte_kvargs.h>
 #include <rte_vect.h>
drivers/net/i40e/i40e_ethdev.c +1 -1
index 7bdc453ec1..67111ac251 100644
@@ -23,7 +23,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_tailq.h>
 #include <rte_hash_crc.h>
 #include <rte_bitmap.h>
drivers/net/iavf/iavf_ethdev.c +1 -1
index 506fcff6e3..ef2ab06475 100644
@@ -24,7 +24,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "iavf.h"
 #include "iavf_rxtx.h"
drivers/net/iavf/iavf_vchnl.c +1 -1
index 21bd1e2193..15f695682d 100644
@@ -19,7 +19,7 @@
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "iavf.h"
 #include "iavf_rxtx.h"
drivers/net/ice/ice_dcf.c +1 -1
index 885d58c0f4..1c3d22ae0f 100644
@@ -21,7 +21,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "ice_dcf.h"
 #include "ice_rxtx.h"
drivers/net/ice/ice_dcf_ethdev.c +1 -1
index 0da267db1f..dee712af98 100644
@@ -18,7 +18,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <iavf_devids.h>
 
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index 552e41692c..04c9ce78a2 100644
@@ -30,7 +30,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hash_crc.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
drivers/net/ixgbe/ixgbe_flow.c +1 -1
index 368342872a..67373a7b78 100644
@@ -27,7 +27,7 @@
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_hash_crc.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
drivers/net/mlx4/mlx4.c +1 -1
index 910b76a92c..7e7e1824ef 100644
@@ -31,7 +31,7 @@
 #endif
 
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
drivers/net/netvsc/hn_ethdev.c +1 -1
index ccc06bdda6..d0bbc0a4c0 100644
@@ -30,7 +30,7 @@
 #include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_driver.h>
 #include <bus_vmbus_driver.h>
 #include <rte_alarm.h>
drivers/net/netvsc/hn_nvs.c +1 -1
index 817fb06dfb..7db82af9f3 100644
@@ -28,7 +28,7 @@
 #include <rte_cycles.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_rndis.c +1 -1
index 20f75a17b0..e6f1f28768 100644
@@ -26,7 +26,7 @@
 #include <rte_cycles.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <bus_vmbus_driver.h>
 
 #include "hn_logs.h"
drivers/net/netvsc/hn_rxtx.c +1 -1
index 61cf374224..bc6f60c64a 100644
@@ -25,7 +25,7 @@
 #include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_net.h>
 #include <bus_vmbus_driver.h>
 #include <rte_spinlock.h>
drivers/net/nfp/nfp_common.c +1 -1
index 0e55f0c792..eaafe11fb9 100644
@@ -19,7 +19,7 @@
 #include <rte_debug.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ether.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
drivers/net/nfp/nfp_ethdev.c +1 -1
index 5cdd34e588..47359501bc 100644
@@ -16,7 +16,7 @@
 #include <rte_common.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ether.h>
 #include <rte_malloc.h>
 #include <rte_memzone.h>
drivers/net/octeontx/octeontx_ethdev.c +1 -1
index 9ada22e2ff..0eee191566 100644
@@ -15,7 +15,7 @@
 #include <bus_vdev_driver.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
drivers/net/qede/qede_ethdev.h +1 -1
index a38b701183..b781bcdcfd 100644
@@ -13,7 +13,7 @@
 #include <rte_ether.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_ip.h>
 
 /* ecore includes */
drivers/net/sfc/sfc_ethdev.c +1 -1
index 506c62a726..2ec743ebce 100644
@@ -7,7 +7,7 @@
  * for Solarflare) and Solarflare Communications, Inc.
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
 #include <rte_pci.h>
drivers/net/sfc/sfc_sw_stats.c +1 -1
index 81f5aa3cc4..3ae5023b6f 100644
@@ -2,7 +2,7 @@
  *
  * Copyright(c) 2021 Xilinx, Inc.
  */
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_bitmap.h>
 
 #include "sfc.h"
drivers/net/sfc/sfc_sw_stats.h +1 -1
index 1abded8018..d9738e5214 100644
@@ -5,7 +5,7 @@
 #ifndef _SFC_SW_STATS_H
 #define _SFC_SW_STATS_H
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "sfc.h"
 
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index 28183ec740..9f57cb1a20 100644
@@ -20,7 +20,7 @@
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
 #include <ethdev_driver.h>
drivers/net/vdev_netvsc/vdev_netvsc.c +1 -1
index dc90569df1..c3e045d892 100644
@@ -27,7 +27,7 @@
 #include <bus_driver.h>
 #include <bus_vdev_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
drivers/net/virtio/virtio_ethdev.c +1 -1
index d180162abd..edf3becd32 100644
@@ -24,7 +24,7 @@
 #include <rte_memory.h>
 #include <rte_eal_paging.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 
drivers/net/virtio/virtio_pci_ethdev.c +1 -1
index 2b9e35cef5..abc63b0935 100644
@@ -16,7 +16,7 @@
 
 #include <rte_memory.h>
 #include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_kvargs.h>
 
 #include "virtio.h"
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -1
index 101b1cb500..fd946dec5c 100644
@@ -30,7 +30,7 @@
 #include <ethdev_pci.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "base/vmxnet3_defs.h"
 
drivers/raw/cnxk_bphy/cnxk_bphy.c +1 -1
index db029cbf34..909fb8faab 100644
@@ -3,7 +3,7 @@
  */
 #include <bus_pci_driver.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_pci.h>
drivers/raw/skeleton/skeleton_rawdev.c +1 -1
index 19b523a815..a06b724866 100644
@@ -13,7 +13,7 @@
 #include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_kvargs.h>
 #include <rte_log.h>
drivers/raw/skeleton/skeleton_rawdev_test.c +1 -1
index fc257c5f44..8ef7a6b127 100644
@@ -6,7 +6,7 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_rawdev.h>
 #include <bus_vdev_driver.h>
 #include <rte_test.h>
drivers/regex/mlx5/mlx5_regex_control.c +1 -1
index 6ab62a12fc..92cf5f495e 100644
@@ -11,7 +11,7 @@
 #include <rte_regexdev.h>
 #include <rte_regexdev_core.h>
 #include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include <mlx5_common.h>
 #include <mlx5_glue.h>
lib/compressdev/rte_compressdev.c +1 -1
index 7f6dedbc52..639a0d66ca 100644
@@ -9,7 +9,7 @@
 #include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 #include <rte_memzone.h>
 
lib/compressdev/rte_compressdev_pmd.c +1 -1
index 9bfae077db..41f1415bea 100644
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_eal.h>
 
 #include "rte_compressdev_internal.h"
lib/compressdev/rte_compressdev_pmd.h +1 -0
index 9fabc399c5..72e52f876f 100644
@@ -19,6 +19,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <dev_driver.h>
 
 #include "rte_compressdev.h"
 #include "rte_compressdev_internal.h"
lib/cryptodev/cryptodev_pmd.c +1 -1
index 75d0075b86..f07b92dfd7 100644
@@ -4,7 +4,7 @@
 
 #include <sys/queue.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
lib/cryptodev/cryptodev_pmd.h +1 -0
index 3dcc3cb7ed..96d7e225b0 100644
@@ -19,6 +19,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_common.h>
lib/cryptodev/rte_cryptodev.c +1 -1
index 42f3221052..1dad092317 100644
@@ -13,7 +13,7 @@
 
 #include <rte_log.h>
 #include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memory.h>
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
lib/dmadev/rte_dmadev_pmd.h +1 -1
index 82ab7a8cc7..acd7f71cd1 100644
@@ -14,7 +14,7 @@
  * by any application.
  */
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_dmadev.h"
 
lib/eal/common/eal_common_dev.c +1 -1
index 16c5aef1d8..98f3c78795 100644
@@ -9,7 +9,7 @@
 
 #include <bus_driver.h>
 #include <rte_class.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_devargs.h>
 #include <rte_errno.h>
 #include <rte_log.h>
lib/eal/include/dev_driver.h new file +28 -0
new file mode 100644
index 0000000000..015188abd5
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+	RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+	const char *name;                   /**< Driver name. */
+	const char *alias;              /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
lib/eal/include/meson.build +1 -0
index 77d8621a51..cfcd40aaed 100644
@@ -57,6 +57,7 @@ headers += files(
 
 driver_sdk_headers = files(
         'bus_driver.h',
+        'dev_driver.h',
 )
 
 # special case install the generic headers, since they go in a subdir
lib/eal/include/rte_dev.h +2 -13
index fedf67fba1..38057cc0ef 100644
@@ -23,6 +23,8 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_log.h>
 
+struct rte_driver;
+
 /**
  * The device event type.
  */
@@ -53,27 +55,14 @@ struct rte_mem_resource {
 	void *addr;         /**< Virtual address, NULL when not mapped. */
 };
 
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
-	RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
-	const char *name;                   /**< Driver name. */
-	const char *alias;              /**< Driver alias. */
-};
-
 /**
  * Retrieve a driver name.
  *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param driver
  *   A pointer to a driver structure.
  * @return
  *   A pointer to the driver name string.
  */
-__rte_experimental
 const char *
 rte_driver_name(const struct rte_driver *driver);
 
lib/eal/version.map +1 -3
index d10fd89458..8b53a1d258 100644
@@ -37,6 +37,7 @@ DPDK_23 {
 	rte_devargs_parsef;
 	rte_devargs_remove;
 	rte_devargs_type_count;
+	rte_driver_name;
 	rte_dump_physmem_layout;
 	rte_dump_stack;
 	rte_dump_tailq;
@@ -423,9 +424,6 @@ EXPERIMENTAL {
 	rte_thread_self;
 	rte_thread_set_affinity_by_id;
 	rte_thread_set_priority;
-
-	# added in 22.11
-	rte_driver_name;
 };
 
 INTERNAL {
lib/ethdev/ethdev_driver.h +1 -0
index 5101868ea7..47a55a419e 100644
@@ -19,6 +19,7 @@ extern "C" {
  *
  */
 
+#include <dev_driver.h>
 #include <rte_ethdev.h>
 
 /**
lib/eventdev/eventdev_pmd.h +1 -1
index 69402668d8..def6cd0876 100644
@@ -22,7 +22,7 @@ extern "C" {
 #include <rte_common.h>
 #include <rte_compat.h>
 #include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
lib/eventdev/rte_event_crypto_adapter.c +1 -1
index 7c695176f4..5bc10312fc 100644
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <stdbool.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
 #include <cryptodev_pmd.h>
lib/eventdev/rte_event_eth_rx_adapter.c +1 -1
index bf8741d2ea..4f4efdae9f 100644
@@ -9,7 +9,7 @@
 
 #include <rte_cycles.h>
 #include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <ethdev_driver.h>
 #include <rte_log.h>
lib/eventdev/rte_eventdev.c +1 -1
index 1dc4f966be..54abee2b3f 100644
@@ -12,7 +12,7 @@
 
 #include <rte_string_fns.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_memzone.h>
 #include <rte_eal.h>
 #include <rte_common.h>
lib/gpudev/gpudev_driver.h +1 -1
index 0e55b00bfe..23972b3dbd 100644
@@ -14,7 +14,7 @@
 #include <stdint.h>
 #include <sys/queue.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_gpudev.h"
 
lib/mempool/rte_mempool_ops.c +1 -1
index d60235a7e3..058ad147a5 100644
@@ -10,7 +10,7 @@
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 
 #include "rte_mempool_trace.h"
 
lib/pcapng/rte_pcapng.c +1 -1
index 72aabd4dd0..af2b814251 100644
@@ -14,7 +14,7 @@
 #include <bus_driver.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
lib/rawdev/rte_rawdev.c +1 -1
index 2f0a4f132e..bc51258143 100644
@@ -12,7 +12,7 @@
 
 #include <rte_string_fns.h>
 #include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_telemetry.h>
lib/rawdev/rte_rawdev_pmd.h +1 -1
index 3b7be57d3e..a51944c8ff 100644
@@ -19,7 +19,7 @@ extern "C" {
 
 #include <string.h>
 
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_malloc.h>
 #include <rte_log.h>
 #include <rte_common.h>
lib/security/rte_security.c +1 -2
index 046b6496d2..d036ed33f6 100644
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
 #include <rte_telemetry.h>
 #include "rte_security.h"
 #include "rte_security_driver.h"
--

2.36.1