env: move struct spdk_pci_device to public headers
In order to populate our PCI device list with devices located behind the VMD, we'll need to fill out those device structures from within a special VMD driver. That driver will base on PCI configuration and BAR accesses, but definitely not on DPDK. We want to put the VMD driver outside of the env lib, so we provide it with a direct access to the device struct. Change-Id: Iabddf361a805e69d7e857c2d07ceaed36aca261d Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/435800 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
df4d03f107
commit
ac9895f768
@ -40,6 +40,7 @@
|
||||
#define SPDK_ENV_H
|
||||
|
||||
#include "spdk/stdinc.h"
|
||||
#include "spdk/queue.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -66,8 +67,6 @@ extern "C" {
|
||||
*/
|
||||
#define SPDK_MEMZONE_NO_IOVA_CONTIG 0x00100000 /**< no iova contiguity */
|
||||
|
||||
struct spdk_pci_device;
|
||||
|
||||
/**
|
||||
* \brief Environment initialization options
|
||||
*/
|
||||
@ -595,6 +594,19 @@ struct spdk_pci_id {
|
||||
uint16_t subdevice_id;
|
||||
};
|
||||
|
||||
struct spdk_pci_device {
|
||||
void *dev_handle;
|
||||
struct spdk_pci_addr addr;
|
||||
struct spdk_pci_id id;
|
||||
int socket_id;
|
||||
|
||||
struct _spdk_pci_device_internal {
|
||||
struct spdk_pci_driver *driver;
|
||||
bool attached;
|
||||
TAILQ_ENTRY(spdk_pci_device) tailq;
|
||||
} internal;
|
||||
};
|
||||
|
||||
typedef int (*spdk_pci_enum_cb)(void *enum_ctx, struct spdk_pci_device *pci_dev);
|
||||
|
||||
/**
|
||||
|
@ -78,19 +78,6 @@ __attribute__((constructor)) static void pci_drv ## _register(void) \
|
||||
spdk_pci_driver_register(&pci_drv); \
|
||||
}
|
||||
|
||||
struct spdk_pci_device {
|
||||
void *dev_handle;
|
||||
struct spdk_pci_addr addr;
|
||||
struct spdk_pci_id id;
|
||||
int socket_id;
|
||||
|
||||
struct _spdk_pci_device_internal {
|
||||
struct spdk_pci_driver *driver;
|
||||
bool attached;
|
||||
TAILQ_ENTRY(spdk_pci_device) tailq;
|
||||
} internal;
|
||||
};
|
||||
|
||||
struct spdk_pci_driver {
|
||||
struct rte_pci_driver driver;
|
||||
spdk_pci_enum_cb cb_fn;
|
||||
|
Loading…
Reference in New Issue
Block a user