lib/env_dpdk: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: I20fddc974cdbd7763e7f148f060ddb76d59e0923 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1709 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
229ef16bb9
commit
15d0ae628d
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
||||
|
2
test/env/memory/memory_ut.c
vendored
2
test/env/memory/memory_ut.c
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user