pci: remove unneeded includes in public header file
[dpdk.git] / drivers / bus / ifpga / rte_bus_ifpga.h
index d53c0f4..a6eeaaf 100644 (file)
 
 #ifdef __cplusplus
 extern "C" {
-#endif
+#endif /* __cplusplus */
 
 #include <rte_bus.h>
 #include <rte_pci.h>
+#include <rte_interrupts.h>
+#include <rte_spinlock.h>
 
 /** Name of Intel FPGA Bus */
 #define IFPGA_BUS_NAME ifpga
@@ -60,6 +62,11 @@ struct rte_afu_pr_conf {
 
 #define AFU_PRI_STR_SIZE (PCI_PRI_STR_SIZE + 8)
 
+struct rte_afu_shared {
+       rte_spinlock_t lock;
+       void *data;
+};
+
 /**
  * A structure describing a AFU device.
  */
@@ -71,6 +78,7 @@ struct rte_afu_device {
        uint32_t num_region;   /**< number of regions found */
        struct rte_mem_resource mem_resource[PCI_MAX_RESOURCE];
                                                /**< AFU Memory Resource */
+       struct rte_afu_shared shared;
        struct rte_intr_handle intr_handle;     /**< Interrupt handle */
        struct rte_afu_driver *driver;          /**< Associated driver */
        char path[IFPGA_BUS_BITSTREAM_PATH_MAX_LEN];
@@ -112,6 +120,15 @@ rte_ifpga_device_name(const struct rte_afu_device *afu)
        return NULL;
 }
 
+/**
+ * Find AFU by AFU name.
+ *
+ * @param name
+ *   A pointer to AFU name string.
+ */
+struct rte_afu_device *
+rte_ifpga_find_afu_by_name(const char *name);
+
 /**
  * Register a ifpga afu device driver.
  *
@@ -143,4 +160,8 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
 #define RTE_PMD_REGISTER_AFU_ALIAS(nm, alias)\
 static const char *afudrvinit_ ## nm ## _alias = RTE_STR(alias)
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* _RTE_BUS_IFPGA_H_ */