Commit 1042d663 authored by Konrad Sztyber's avatar Konrad Sztyber
Browse files

env_dpdk: align dpdk headers with upstream



A recent commit in dpdk, 719834a6849e ("use C linkage where appropriate
in headers") changed the scope of the extern "C", such that it didn't
include #include directives.  Since we never pull those headers from c++
code, add patch files to make scripts/env_dpdk/check_dpdk_pci_api.sh
happy.

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


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent f417ec25
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
8,13d7
< #include <rte_bus.h>
< #include <rte_compat.h>
< #include <rte_dev.h>
< #include <rte_eal.h>
< #include <rte_tailq.h>
< 
16a11,16
> 
> #include "rte_bus.h"
> #include <rte_compat.h>
> #include "rte_dev.h"
> #include <rte_eal.h>
> #include <rte_tailq.h>
+10 −0
Original line number Diff line number Diff line
9,12d8
< #include <rte_bus_pci.h>
< #include <dev_driver.h>
< #include <rte_compat.h>
< 
15a12,15
> 
> #include "rte_bus_pci.h"
> #include "dev_driver.h"
> #include <rte_compat.h>
+14 −0
Original line number Diff line number Diff line
7a8,11
> #ifdef __cplusplus
> extern "C" {
> #endif
> 
9c13
< #include <rte_dev.h>
---
> #include "rte_dev.h"
31a36,39
> 
> #ifdef __cplusplus
> }
> #endif
+10 −0
Original line number Diff line number Diff line
17,20d16
< #include <stdio.h>
< 
< #include <rte_eal.h>
< 
23a20,23
> 
> #include <stdio.h>
> 
> #include <rte_eal.h>
+139 −0
Original line number Diff line number Diff line
13a14,17
> #ifdef __cplusplus
> extern "C" {
> #endif
> 
26,29d29
< #ifdef __cplusplus
< extern "C" {
< #endif
< 
72,125d71
<  * 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);
< 
< /**
142c88
< 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);
156,173c102
< int rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable);
< 
< /**
<  * Enable/Disable PASID (Process Address Space ID).
<  *
<  * @param dev
<  *   A pointer to a rte_pci_device structure.
<  * @param offset
<  *   Offset of the PASID external capability structure.
<  * @param enable
<  *   Flag to enable or disable PASID.
<  *
<  * @return
<  *   0 on success, -1 on error in PCI config space read/write.
<  */
< __rte_internal
< int rte_pci_pasid_set_state(const struct rte_pci_device *dev,
< 		off_t offset, bool enable);
---
> int rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable);
207,254d135
< 		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,
Loading