From 89e56a49d39b6f10fcbd27c4b215c874b6c31dc4 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 19 Sep 2022 18:58:19 +0000 Subject: [PATCH] env_dpdk: create dpdk_bus_probe and dpdk_bus_scan Signed-off-by: Jim Harris Change-Id: I514b99e0cc887ca9243ccf212d0b7a0304bed45a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14568 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Konrad Sztyber --- lib/env_dpdk/pci.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 87e3a163e..35b7c97d0 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -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(); +}