Commit 04934c10 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

env_dpdk: align rte_bus_pci.h with upstream DPDK



These changes have been introduced by two commits: a10b6e53fef
("bus/pci: find PCI capability") and bd75b496e80 ("bus/pci: add const to
some experimental API").  Neither affect us, so just add a patch that
reverts these changes to keep the test passing on v23.11.

Change-Id: I403589dc86e8d006c8fce39249d420d3f0999e91
Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20328


Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent cda2f63c
Loading
Loading
Loading
Loading
+134 −0
Original line number Diff line number Diff line
@@ -68,60 +68,6 @@ void rte_pci_unmap_device(struct rte_pci_device *dev);
  */
 void rte_pci_dump(FILE *f);
 
-/**
- * Check whether this device has a PCI capability list.
- *
- *  @param dev
- *    A pointer to rte_pci_device structure.
- *
- *  @return
- *    true/false
- */
-__rte_experimental
-bool rte_pci_has_capability_list(const struct rte_pci_device *dev);
-
-/**
- * Find device's PCI capability.
- *
- *  @param dev
- *    A pointer to rte_pci_device structure.
- *
- *  @param cap
- *    Capability to be found, which can be any from
- *    RTE_PCI_CAP_ID_*, defined in librte_pci.
- *
- *  @return
- *  > 0: The offset of the next matching capability structure
- *       within the device's PCI configuration space.
- *  < 0: An error in PCI config space read.
- *  = 0: Device does not support it.
- */
-__rte_experimental
-off_t rte_pci_find_capability(const struct rte_pci_device *dev, uint8_t cap);
-
-/**
- * Find device's PCI capability starting from a previous offset in PCI
- * configuration space.
- *
- *  @param dev
- *    A pointer to rte_pci_device structure.
- *
- *  @param cap
- *    Capability to be found, which can be any from
- *    RTE_PCI_CAP_ID_*, defined in librte_pci.
- *  @param offset
- *    An offset in the PCI configuration space from which the capability is
- *    looked for.
- *
- *  @return
- *  > 0: The offset of the next matching capability structure
- *       within the device's PCI configuration space.
- *  < 0: An error in PCI config space read.
- *  = 0: Device does not support it.
- */
-__rte_experimental
-off_t rte_pci_find_next_capability(const struct rte_pci_device *dev, uint8_t cap, off_t offset);
-
 /**
  * Find device's extended PCI capability.
  *
@@ -139,7 +85,7 @@ off_t rte_pci_find_next_capability(const struct rte_pci_device *dev, uint8_t cap
  *  = 0: Device does not support it.
  */
 __rte_experimental
-off_t rte_pci_find_ext_capability(const struct rte_pci_device *dev, uint32_t cap);
+off_t rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t cap);
 
 /**
  * Enables/Disables Bus Master for device's PCI command register.
@@ -153,7 +99,7 @@ off_t rte_pci_find_ext_capability(const struct rte_pci_device *dev, uint32_t cap
  *  0 on success, -1 on error in PCI config space read/write.
  */
 __rte_experimental
-int rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable);
+int rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable);
 
 /**
  * Read PCI config space.
@@ -189,54 +135,6 @@ int rte_pci_read_config(const struct rte_pci_device *device,
 int rte_pci_write_config(const struct rte_pci_device *device,
 		const void *buf, size_t len, off_t offset);
 
-/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
- * Read from a MMIO PCI resource.
- *
- * @param device
- *   A pointer to a rte_pci_device structure describing the device
- *   to use.
- * @param bar
- *   Index of the IO PCI resource we want to access.
- * @param buf
- *   A data buffer where the bytes should be read into.
- * @param len
- *   The length of the data buffer.
- * @param offset
- *   The offset into MMIO space described by @bar.
- * @return
- *   Number of bytes read on success, negative on error.
- */
-__rte_experimental
-int rte_pci_mmio_read(const struct rte_pci_device *device, int bar,
-		void *buf, size_t len, off_t offset);
-
-/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
- * Write to a MMIO PCI resource.
- *
- * @param device
- *   A pointer to a rte_pci_device structure describing the device
- *   to use.
- * @param bar
- *   Index of the IO PCI resource we want to access.
- * @param buf
- *   A data buffer containing the bytes should be written.
- * @param len
- *   The length of the data buffer.
- * @param offset
- *   The offset into MMIO space described by @bar.
- * @return
- *   Number of bytes written on success, negative on error.
- */
-__rte_experimental
-int rte_pci_mmio_write(const struct rte_pci_device *device, int bar,
-		const void *buf, size_t len, off_t offset);
-
 /**
  * Initialize a rte_pci_ioport object for a pci device io resource.
  *