[v6,03/27] raw/ifpga: remove PCI bus accessor

Message ID 20220914075841.51555-4-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Bus and device cleanup for 22.11 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Sept. 14, 2022, 7:58 a.m. UTC
  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.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
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(-)
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..dba252067c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..3cea3aa8eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -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
 -----------
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 8c05302a65..78a7123528 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -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)
 {
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 4c191190ca..0fb66cbaae 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -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);
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
index 23146432c2..1ca248123b 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.c
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
@@ -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)
 {
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.h b/drivers/raw/ifpga/rte_pmd_ifpga.h
index 3fa5d3435a..791543f2cd 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.h
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.h
@@ -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
  *
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index f5c3959b7f..916da8a4f2 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -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;