Loading include/spdk/vtophys.h +2 −2 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ extern "C" { #endif #define VTOPHYS_ERROR (0xFFFFFFFFFFFFFFFFULL) #define SPDK_VTOPHYS_ERROR (0xFFFFFFFFFFFFFFFFULL) uint64_t vtophys(void *buf); uint64_t spdk_vtophys(void *buf); #ifdef __cplusplus } Loading lib/ioat/ioat_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ ioat_zmalloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) /** * Return the physical address for the specified virtual address. */ #define ioat_vtophys(buf) vtophys(buf) #define ioat_vtophys(buf) spdk_vtophys(buf) /** * Delay us. Loading lib/memory/vtophys.c +7 −7 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ struct map_2mb { }; /* Second-level map table indexed by bits [21..29] of the virtual address. * Each entry contains the 2MB physical page frame number or VTOPHYS_ERROR for entries that haven't * Each entry contains the 2MB physical page frame number or SPDK_VTOPHYS_ERROR for entries that haven't * been retrieved yet. */ struct map_1gb { Loading Loading @@ -109,7 +109,7 @@ vtophys_get_map(uint64_t vfn_2mb) if (!map_1gb) { map_1gb = malloc(sizeof(struct map_1gb)); if (map_1gb) { /* initialize all entries to all 0xFF (VTOPHYS_ERROR) */ /* initialize all entries to all 0xFF (SPDK_VTOPHYS_ERROR) */ memset(map_1gb, 0xFF, sizeof(struct map_1gb)); vtophys_map_128tb.map[idx_128tb] = map_1gb; } Loading Loading @@ -157,7 +157,7 @@ vtophys_get_pfn_2mb(uint64_t vfn_2mb) } uint64_t vtophys(void *buf) spdk_vtophys(void *buf) { struct map_2mb *map_2mb; uint64_t vfn_2mb, pfn_2mb; Loading @@ -167,14 +167,14 @@ vtophys(void *buf) map_2mb = vtophys_get_map(vfn_2mb); if (!map_2mb) { return VTOPHYS_ERROR; return SPDK_VTOPHYS_ERROR; } pfn_2mb = map_2mb->pfn_2mb; if (pfn_2mb == VTOPHYS_ERROR) { if (pfn_2mb == SPDK_VTOPHYS_ERROR) { pfn_2mb = vtophys_get_pfn_2mb(vfn_2mb); if (pfn_2mb == VTOPHYS_ERROR) { return VTOPHYS_ERROR; if (pfn_2mb == SPDK_VTOPHYS_ERROR) { return SPDK_VTOPHYS_ERROR; } map_2mb->pfn_2mb = pfn_2mb; } Loading lib/nvme/nvme_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ nvme_malloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) /** * Return the physical address for the specified virtual address. */ #define nvme_vtophys(buf) vtophys(buf) #define NVME_VTOPHYS_ERROR VTOPHYS_ERROR #define nvme_vtophys(buf) spdk_vtophys(buf) #define NVME_VTOPHYS_ERROR SPDK_VTOPHYS_ERROR extern struct rte_mempool *request_mempool; Loading test/lib/memory/vtophys.c +2 −2 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ vtophys_negative_test(void) if (p == NULL) continue; if (vtophys(p) != VTOPHYS_ERROR) { if (spdk_vtophys(p) != SPDK_VTOPHYS_ERROR) { rc = -1; printf("Err: VA=%p is mapped to a huge_page,\n", p); free(p); Loading Loading @@ -94,7 +94,7 @@ vtophys_positive_test(void) if (p == NULL) continue; if (vtophys(p) == VTOPHYS_ERROR) { if (spdk_vtophys(p) == SPDK_VTOPHYS_ERROR) { rc = -1; printf("Err: VA=%p is not mapped to a huge_page,\n", p); rte_free(p); Loading Loading
include/spdk/vtophys.h +2 −2 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ extern "C" { #endif #define VTOPHYS_ERROR (0xFFFFFFFFFFFFFFFFULL) #define SPDK_VTOPHYS_ERROR (0xFFFFFFFFFFFFFFFFULL) uint64_t vtophys(void *buf); uint64_t spdk_vtophys(void *buf); #ifdef __cplusplus } Loading
lib/ioat/ioat_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ ioat_zmalloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) /** * Return the physical address for the specified virtual address. */ #define ioat_vtophys(buf) vtophys(buf) #define ioat_vtophys(buf) spdk_vtophys(buf) /** * Delay us. Loading
lib/memory/vtophys.c +7 −7 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ struct map_2mb { }; /* Second-level map table indexed by bits [21..29] of the virtual address. * Each entry contains the 2MB physical page frame number or VTOPHYS_ERROR for entries that haven't * Each entry contains the 2MB physical page frame number or SPDK_VTOPHYS_ERROR for entries that haven't * been retrieved yet. */ struct map_1gb { Loading Loading @@ -109,7 +109,7 @@ vtophys_get_map(uint64_t vfn_2mb) if (!map_1gb) { map_1gb = malloc(sizeof(struct map_1gb)); if (map_1gb) { /* initialize all entries to all 0xFF (VTOPHYS_ERROR) */ /* initialize all entries to all 0xFF (SPDK_VTOPHYS_ERROR) */ memset(map_1gb, 0xFF, sizeof(struct map_1gb)); vtophys_map_128tb.map[idx_128tb] = map_1gb; } Loading Loading @@ -157,7 +157,7 @@ vtophys_get_pfn_2mb(uint64_t vfn_2mb) } uint64_t vtophys(void *buf) spdk_vtophys(void *buf) { struct map_2mb *map_2mb; uint64_t vfn_2mb, pfn_2mb; Loading @@ -167,14 +167,14 @@ vtophys(void *buf) map_2mb = vtophys_get_map(vfn_2mb); if (!map_2mb) { return VTOPHYS_ERROR; return SPDK_VTOPHYS_ERROR; } pfn_2mb = map_2mb->pfn_2mb; if (pfn_2mb == VTOPHYS_ERROR) { if (pfn_2mb == SPDK_VTOPHYS_ERROR) { pfn_2mb = vtophys_get_pfn_2mb(vfn_2mb); if (pfn_2mb == VTOPHYS_ERROR) { return VTOPHYS_ERROR; if (pfn_2mb == SPDK_VTOPHYS_ERROR) { return SPDK_VTOPHYS_ERROR; } map_2mb->pfn_2mb = pfn_2mb; } Loading
lib/nvme/nvme_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ nvme_malloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) /** * Return the physical address for the specified virtual address. */ #define nvme_vtophys(buf) vtophys(buf) #define NVME_VTOPHYS_ERROR VTOPHYS_ERROR #define nvme_vtophys(buf) spdk_vtophys(buf) #define NVME_VTOPHYS_ERROR SPDK_VTOPHYS_ERROR extern struct rte_mempool *request_mempool; Loading
test/lib/memory/vtophys.c +2 −2 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ vtophys_negative_test(void) if (p == NULL) continue; if (vtophys(p) != VTOPHYS_ERROR) { if (spdk_vtophys(p) != SPDK_VTOPHYS_ERROR) { rc = -1; printf("Err: VA=%p is mapped to a huge_page,\n", p); free(p); Loading Loading @@ -94,7 +94,7 @@ vtophys_positive_test(void) if (p == NULL) continue; if (vtophys(p) == VTOPHYS_ERROR) { if (spdk_vtophys(p) == SPDK_VTOPHYS_ERROR) { rc = -1; printf("Err: VA=%p is not mapped to a huge_page,\n", p); rte_free(p); Loading