34 #ifndef _RTE_MEMORY_H_
35 #define _RTE_MEMORY_H_
52 #include <rte_config.h>
56 RTE_PGSIZE_4K = 1ULL << 12,
57 RTE_PGSIZE_64K = 1ULL << 16,
58 RTE_PGSIZE_256K = 1ULL << 18,
59 RTE_PGSIZE_2M = 1ULL << 21,
60 RTE_PGSIZE_16M = 1ULL << 24,
61 RTE_PGSIZE_256M = 1ULL << 28,
62 RTE_PGSIZE_512M = 1ULL << 29,
63 RTE_PGSIZE_1G = 1ULL << 30,
64 RTE_PGSIZE_4G = 1ULL << 32,
65 RTE_PGSIZE_16G = 1ULL << 34,
68 #define SOCKET_ID_ANY -1
69 #define RTE_CACHE_LINE_MASK (RTE_CACHE_LINE_SIZE-1)
71 #define RTE_CACHE_LINE_ROUNDUP(size) \
72 (RTE_CACHE_LINE_SIZE * ((size + RTE_CACHE_LINE_SIZE - 1) / RTE_CACHE_LINE_SIZE))
76 #if RTE_CACHE_LINE_SIZE == 64
77 #define RTE_CACHE_LINE_SIZE_LOG2 6
78 #elif RTE_CACHE_LINE_SIZE == 128
79 #define RTE_CACHE_LINE_SIZE_LOG2 7
81 #error "Unsupported cache line size"
84 #define RTE_CACHE_LINE_MIN_SIZE 64
89 #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
94 #define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE)
97 #define RTE_BAD_PHYS_ADDR ((phys_addr_t)-1)
106 #define RTE_BAD_IOVA ((rte_iova_t)-1)
213 int rte_eal_check_dma_mask(uint8_t maskbits);
unsigned rte_memory_get_nchannel(void)
const struct rte_memseg * rte_eal_get_physmem_layout(void)
int rte_eal_using_phys_addrs(void)
int rte_mem_lock_page(const void *virt)
unsigned rte_memory_get_nrank(void)
phys_addr_t rte_mem_virt2phy(const void *virt)
uint64_t rte_eal_get_physmem_size(void)
void rte_dump_physmem_layout(FILE *f)
rte_iova_t rte_mem_virt2iova(const void *virt)