diff --git a/lib/env_dpdk/env_internal.h b/lib/env_dpdk/env_internal.h index 2a525a3ae..75e5ecc61 100644 --- a/lib/env_dpdk/env_internal.h +++ b/lib/env_dpdk/env_internal.h @@ -62,7 +62,7 @@ #define SPDK_PMD_REGISTER_PCI(pci_drv) \ __attribute__((constructor)) static void pci_drv ## _register(void) \ { \ - spdk_pci_driver_register(&pci_drv); \ + pci_driver_register(&pci_drv); \ } struct spdk_pci_driver { @@ -73,27 +73,27 @@ struct spdk_pci_driver { TAILQ_ENTRY(spdk_pci_driver) tailq; }; -void spdk_pci_driver_register(struct spdk_pci_driver *driver); -int spdk_pci_device_init(struct rte_pci_driver *driver, struct rte_pci_device *device); -int spdk_pci_device_fini(struct rte_pci_device *device); +void pci_driver_register(struct spdk_pci_driver *driver); +int pci_device_init(struct rte_pci_driver *driver, struct rte_pci_device *device); +int pci_device_fini(struct rte_pci_device *device); -void spdk_pci_init(void); -void spdk_pci_fini(void); -int spdk_mem_map_init(bool legacy_mem); -int spdk_vtophys_init(void); +void pci_init(void); +void pci_fini(void); +int mem_map_init(bool legacy_mem); +int vtophys_init(void); /** * Report a DMA-capable PCI device to the vtophys translation code. * Increases the refcount of active DMA-capable devices managed by SPDK. * This must be called after a `rte_pci_device` is created. */ -void spdk_vtophys_pci_device_added(struct rte_pci_device *pci_device); +void vtophys_pci_device_added(struct rte_pci_device *pci_device); /** * Report the removal of a DMA-capable PCI device to the vtophys translation code. * Decreases the refcount of active DMA-capable devices managed by SPDK. * This must be called before a `rte_pci_device` is destroyed. */ -void spdk_vtophys_pci_device_removed(struct rte_pci_device *pci_device); +void vtophys_pci_device_removed(struct rte_pci_device *pci_device); #endif diff --git a/lib/env_dpdk/init.c b/lib/env_dpdk/init.c index e6366d145..f40c03673 100644 --- a/lib/env_dpdk/init.c +++ b/lib/env_dpdk/init.c @@ -499,15 +499,15 @@ spdk_env_dpdk_post_init(bool legacy_mem) { int rc; - spdk_pci_init(); + pci_init(); - rc = spdk_mem_map_init(legacy_mem); + rc = mem_map_init(legacy_mem); if (rc < 0) { fprintf(stderr, "Failed to allocate mem_map\n"); return rc; } - rc = spdk_vtophys_init(); + rc = vtophys_init(); if (rc < 0) { fprintf(stderr, "Failed to initialize vtophys\n"); return rc; @@ -519,7 +519,7 @@ spdk_env_dpdk_post_init(bool legacy_mem) void spdk_env_dpdk_post_fini(void) { - spdk_pci_fini(); + pci_fini(); spdk_free_args(g_eal_cmdline, g_eal_cmdline_argcount); } diff --git a/lib/env_dpdk/memory.c b/lib/env_dpdk/memory.c index ccc6cda09..1688dc475 100644 --- a/lib/env_dpdk/memory.c +++ b/lib/env_dpdk/memory.c @@ -724,7 +724,7 @@ memory_iter_cb(const struct rte_memseg_list *msl, #endif int -spdk_mem_map_init(bool legacy_mem) +mem_map_init(bool legacy_mem) { g_legacy_mem = legacy_mem; @@ -1306,7 +1306,7 @@ spdk_vtophys_iommu_init(void) #endif void -spdk_vtophys_pci_device_added(struct rte_pci_device *pci_device) +vtophys_pci_device_added(struct rte_pci_device *pci_device) { struct spdk_vtophys_pci_device *vtophys_dev; @@ -1352,7 +1352,7 @@ spdk_vtophys_pci_device_added(struct rte_pci_device *pci_device) } void -spdk_vtophys_pci_device_removed(struct rte_pci_device *pci_device) +vtophys_pci_device_removed(struct rte_pci_device *pci_device) { struct spdk_vtophys_pci_device *vtophys_dev; @@ -1400,7 +1400,7 @@ spdk_vtophys_pci_device_removed(struct rte_pci_device *pci_device) } int -spdk_vtophys_init(void) +vtophys_init(void) { const struct spdk_mem_map_ops vtophys_map_ops = { .notify_cb = spdk_vtophys_notify, diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 1cb270251..3717b2ed2 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -173,7 +173,7 @@ spdk_detach_rte(struct spdk_pci_device *dev) } void -spdk_pci_driver_register(struct spdk_pci_driver *driver) +pci_driver_register(struct spdk_pci_driver *driver) { TAILQ_INSERT_TAIL(&g_pci_drivers, driver, tailq); } @@ -238,7 +238,7 @@ cleanup_pci_devices(void) continue; } - spdk_vtophys_pci_device_removed(dev->dev_handle); + vtophys_pci_device_removed(dev->dev_handle); TAILQ_REMOVE(&g_pci_devices, dev, internal.tailq); free(dev); } @@ -247,7 +247,7 @@ cleanup_pci_devices(void) TAILQ_FOREACH_SAFE(dev, &g_pci_hotplugged_devices, internal.tailq, tmp) { TAILQ_REMOVE(&g_pci_hotplugged_devices, dev, internal.tailq); TAILQ_INSERT_TAIL(&g_pci_devices, dev, internal.tailq); - spdk_vtophys_pci_device_added(dev->dev_handle); + vtophys_pci_device_added(dev->dev_handle); } pthread_mutex_unlock(&g_pci_mutex); } @@ -259,7 +259,7 @@ _get_alarm_thread_cb(void *unused) } void -spdk_pci_init(void) +pci_init(void) { #if RTE_VERSION >= RTE_VERSION_NUM(18, 11, 0, 0) struct spdk_pci_driver *driver; @@ -298,7 +298,7 @@ spdk_pci_init(void) } void -spdk_pci_fini(void) +pci_fini(void) { struct spdk_pci_device *dev; char bdf[32]; @@ -319,8 +319,8 @@ spdk_pci_fini(void) } int -spdk_pci_device_init(struct rte_pci_driver *_drv, - struct rte_pci_device *_dev) +pci_device_init(struct rte_pci_driver *_drv, + struct rte_pci_device *_dev) { struct spdk_pci_driver *driver = (struct spdk_pci_driver *)_drv; struct spdk_pci_device *dev; @@ -378,7 +378,7 @@ spdk_pci_device_init(struct rte_pci_driver *_drv, } int -spdk_pci_device_fini(struct rte_pci_device *_dev) +pci_device_fini(struct rte_pci_device *_dev) { struct spdk_pci_device *dev; diff --git a/lib/env_dpdk/pci_ioat.c b/lib/env_dpdk/pci_ioat.c index 8ca25d04b..74875557b 100644 --- a/lib/env_dpdk/pci_ioat.c +++ b/lib/env_dpdk/pci_ioat.c @@ -93,8 +93,8 @@ static struct spdk_pci_driver g_ioat_pci_drv = { .driver = { .drv_flags = RTE_PCI_DRV_NEED_MAPPING, .id_table = ioat_driver_id, - .probe = spdk_pci_device_init, - .remove = spdk_pci_device_fini, + .probe = pci_device_init, + .remove = pci_device_fini, .driver.name = "spdk_ioat", }, diff --git a/lib/env_dpdk/pci_nvme.c b/lib/env_dpdk/pci_nvme.c index 7be843c64..a21b242e7 100644 --- a/lib/env_dpdk/pci_nvme.c +++ b/lib/env_dpdk/pci_nvme.c @@ -54,8 +54,8 @@ static struct spdk_pci_driver g_nvme_pci_drv = { #endif , .id_table = nvme_pci_driver_id, - .probe = spdk_pci_device_init, - .remove = spdk_pci_device_fini, + .probe = pci_device_init, + .remove = pci_device_fini, .driver.name = "spdk_nvme", }, diff --git a/lib/env_dpdk/pci_virtio.c b/lib/env_dpdk/pci_virtio.c index 38bfbc30e..6672fabec 100644 --- a/lib/env_dpdk/pci_virtio.c +++ b/lib/env_dpdk/pci_virtio.c @@ -49,8 +49,8 @@ static struct spdk_pci_driver g_virtio_pci_drv = { #endif , .id_table = virtio_pci_driver_id, - .probe = spdk_pci_device_init, - .remove = spdk_pci_device_fini, + .probe = pci_device_init, + .remove = pci_device_fini, .driver.name = "spdk_virtio", }, diff --git a/lib/env_dpdk/pci_vmd.c b/lib/env_dpdk/pci_vmd.c index 8168e1238..331e24718 100644 --- a/lib/env_dpdk/pci_vmd.c +++ b/lib/env_dpdk/pci_vmd.c @@ -48,8 +48,8 @@ static struct spdk_pci_driver g_vmd_pci_drv = { #endif , .id_table = vmd_pci_driver_id, - .probe = spdk_pci_device_init, - .remove = spdk_pci_device_fini, + .probe = pci_device_init, + .remove = pci_device_fini, .driver.name = "spdk_vmd", }, diff --git a/test/env/memory/memory_ut.c b/test/env/memory/memory_ut.c index cf8a8b637..3c15b8120 100644 --- a/test/env/memory/memory_ut.c +++ b/test/env/memory/memory_ut.c @@ -503,7 +503,7 @@ main(int argc, char **argv) g_page_array = spdk_bit_array_create(PAGE_ARRAY_SIZE); /* Initialize the memory map */ - if (spdk_mem_map_init(false) < 0) { + if (mem_map_init(false) < 0) { return CUE_NOMEMORY; }