env_dpdk: create dpdk_bus_probe and dpdk_bus_scan
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I514b99e0cc887ca9243ccf212d0b7a0304bed45a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14568 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
34ff0cb6aa
commit
89e56a49d3
@ -71,6 +71,8 @@ int dpdk_pci_driver_register(struct spdk_pci_driver *driver,
|
||||
int dpdk_pci_device_enable_interrupt(struct rte_pci_device *rte_dev);
|
||||
int dpdk_pci_device_disable_interrupt(struct rte_pci_device *rte_dev);
|
||||
int dpdk_pci_device_get_interrupt_efd(struct rte_pci_device *rte_dev);
|
||||
void dpdk_bus_scan(void);
|
||||
int dpdk_bus_probe(void);
|
||||
|
||||
int pci_device_init(struct rte_pci_driver *driver, struct rte_pci_device *device);
|
||||
int pci_device_fini(struct rte_pci_device *device);
|
||||
@ -510,7 +512,7 @@ scan_pci_bus(bool delay_init)
|
||||
struct rte_device *rte_dev;
|
||||
uint64_t now;
|
||||
|
||||
rte_bus_scan();
|
||||
dpdk_bus_scan();
|
||||
now = spdk_get_ticks();
|
||||
|
||||
if (!TAILQ_FIRST(&g_pci_drivers)) {
|
||||
@ -709,7 +711,7 @@ spdk_pci_enumerate(struct spdk_pci_driver *driver,
|
||||
driver->cb_fn = enum_cb;
|
||||
driver->cb_arg = enum_ctx;
|
||||
|
||||
if (rte_bus_probe() != 0) {
|
||||
if (dpdk_bus_probe() != 0) {
|
||||
driver->cb_arg = NULL;
|
||||
driver->cb_fn = NULL;
|
||||
return -1;
|
||||
@ -1340,3 +1342,15 @@ dpdk_pci_device_get_interrupt_efd(struct rte_pci_device *rte_dev)
|
||||
return rte_intr_fd_get(rte_dev->intr_handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
dpdk_bus_probe(void)
|
||||
{
|
||||
return rte_bus_probe();
|
||||
}
|
||||
|
||||
void
|
||||
dpdk_bus_scan(void)
|
||||
{
|
||||
rte_bus_scan();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user