Home
last modified time | relevance | path

Searched refs:align (Results 1 – 25 of 102) sorted by relevance

12345

/dpdk/lib/eal/common/
H A Drte_malloc.c60 if (size == 0 || (align && !rte_is_power_of_2(align))) in malloc_socket()
73 align == 0 ? 1 : align, 0, false); in malloc_socket()
87 return malloc_socket(type, size, align, socket_arg, true); in rte_malloc_socket()
100 rte_malloc(const char *type, size_t size, unsigned align) in rte_malloc() argument
111 void *ptr = rte_malloc_socket(type, size, align, socket); in rte_zmalloc_socket()
158 return rte_zmalloc(type, num * size, align); in rte_calloc()
170 return rte_malloc_socket(NULL, size, align, socket); in rte_realloc_socket()
180 size = RTE_CACHE_LINE_ROUNDUP(size), align = RTE_CACHE_LINE_ROUNDUP(align); in rte_realloc_socket()
187 RTE_PTR_ALIGN(ptr, align) == ptr && in rte_realloc_socket()
189 rte_eal_trace_mem_realloc(size, align, socket, ptr); in rte_realloc_socket()
[all …]
H A Dmalloc_heap.c201 align); in find_biggest_element()
208 align); in find_biggest_element()
239 align = RTE_CACHE_LINE_ROUNDUP(align); in heap_alloc()
264 align = RTE_CACHE_LINE_ROUNDUP(align); in heap_alloc_biggest()
476 req.alloc_req.align = align; in try_expand_heap_secondary()
616 align, bound, contig)) in alloc_more_mem_on_socket()
635 align, bound, contig)) in alloc_more_mem_on_socket()
657 align = align == 0 ? 1 : align; in malloc_heap_alloc_on_heap_id()
731 if (size == 0 || (align && !rte_is_power_of_2(align))) in malloc_heap_alloc()
777 align = align == 0 ? 1 : align; in heap_alloc_biggest_on_heap_id()
[all …]
H A Deal_common_memzone.c66 int socket_id, unsigned int flags, unsigned int align, in memzone_reserve_aligned_thread_unsafe() argument
106 if (align && !rte_is_power_of_2(align)) { in memzone_reserve_aligned_thread_unsafe()
108 align); in memzone_reserve_aligned_thread_unsafe()
114 if (align < RTE_CACHE_LINE_SIZE) in memzone_reserve_aligned_thread_unsafe()
115 align = RTE_CACHE_LINE_SIZE; in memzone_reserve_aligned_thread_unsafe()
158 align, contig); in memzone_reserve_aligned_thread_unsafe()
164 flags, align, bound, contig); in memzone_reserve_aligned_thread_unsafe()
216 name, len, socket_id, flags, align, bound); in rte_memzone_reserve_thread_safe()
236 align, bound); in rte_memzone_reserve_bounded()
245 unsigned flags, unsigned align) in rte_memzone_reserve_aligned() argument
[all …]
H A Dmalloc_elem.c33 malloc_elem_find_max_iova_contig(struct malloc_elem *elem, size_t align) in malloc_elem_find_max_iova_contig() argument
47 contig_seg_start = RTE_PTR_ALIGN_CEIL(data_start, align); in malloc_elem_find_max_iova_contig()
88 contig_seg_start = RTE_PTR_ALIGN(cur_page, align); in malloc_elem_find_max_iova_contig()
219 elem_start_pt(struct malloc_elem *elem, size_t size, unsigned align, in elem_start_pt() argument
233 align); in elem_start_pt()
240 align); in elem_start_pt()
266 elem_size -= align; in elem_start_pt()
280 malloc_elem_can_hold(struct malloc_elem *elem, size_t size, unsigned align, in malloc_elem_can_hold() argument
283 return elem_start_pt(elem, size, align, bound, contig) != NULL; in malloc_elem_can_hold()
428 malloc_elem_alloc(struct malloc_elem *elem, size_t size, unsigned align, in malloc_elem_alloc() argument
[all …]
H A Dmalloc_mp.h36 size_t align; member
80 int socket, unsigned int flags, size_t align, size_t bound,
H A Dmalloc_heap.h38 size_t align, size_t bound, bool contig);
42 size_t align, bool contig);
/dpdk/drivers/net/mlx4/
H A Dmlx4_utils.c66 size_t align = (uintptr_t)vec[i].align; in mlx4_mallocv_inline() local
68 if (!align) { in mlx4_mallocv_inline()
69 align = sizeof(double); in mlx4_mallocv_inline()
70 } else if (!rte_is_power_of_2(align)) { in mlx4_mallocv_inline()
74 if (least < align) in mlx4_mallocv_inline()
75 least = align; in mlx4_mallocv_inline()
76 align = RTE_ALIGN_CEIL(size, align); in mlx4_mallocv_inline()
77 size = align + vec[i].size; in mlx4_mallocv_inline()
79 *vec[i].addr = data + align; in mlx4_mallocv_inline()
/dpdk/drivers/bus/dpaa/base/qbman/
H A Ddpaa_alloc.c13 int bman_alloc_bpid_range(u32 *result, u32 count, u32 align, int partial) in bman_alloc_bpid_range() argument
15 return process_alloc(dpaa_id_bpid, result, count, align, partial); in bman_alloc_bpid_range()
28 int qman_alloc_fqid_range(u32 *result, u32 count, u32 align, int partial) in qman_alloc_fqid_range() argument
30 return process_alloc(dpaa_id_fqid, result, count, align, partial); in qman_alloc_fqid_range()
43 int qman_alloc_pool_range(u32 *result, u32 count, u32 align, int partial) in qman_alloc_pool_range() argument
45 return process_alloc(dpaa_id_qpool, result, count, align, partial); in qman_alloc_pool_range()
58 int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial) in qman_alloc_cgrid_range() argument
60 return process_alloc(dpaa_id_cgrid, result, count, align, partial); in qman_alloc_cgrid_range()
/dpdk/lib/eal/include/
H A Drte_malloc.h57 rte_malloc(const char *type, size_t size, unsigned align)
84 rte_zmalloc(const char *type, size_t size, unsigned align)
111 rte_calloc(const char *type, size_t num, size_t size, unsigned align)
135 rte_realloc(void *ptr, size_t size, unsigned int align)
161 rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket)
188 rte_malloc_socket(const char *type, size_t size, unsigned align, int socket)
217 rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)
246 rte_calloc_socket(const char *type, size_t num, size_t size, unsigned align, int socket)
H A Drte_common.h322 #define RTE_PTR_ALIGN_FLOOR(ptr, align) \ argument
323 ((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)ptr, align))
331 #define RTE_ALIGN_FLOOR(val, align) \ argument
340 #define RTE_PTR_ALIGN_CEIL(ptr, align) \ argument
341 RTE_PTR_ALIGN_FLOOR((typeof(ptr))RTE_PTR_ADD(ptr, (align) - 1), align)
349 #define RTE_ALIGN_CEIL(val, align) \ argument
350 RTE_ALIGN_FLOOR(((val) + ((typeof(val)) (align) - 1)), align)
359 #define RTE_PTR_ALIGN(ptr, align) RTE_PTR_ALIGN_CEIL(ptr, align) argument
368 #define RTE_ALIGN(val, align) RTE_ALIGN_CEIL(val, align) argument
410 rte_is_aligned(void *ptr, unsigned align) in rte_is_aligned() argument
[all …]
H A Drte_eal_trace.h199 RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
203 rte_trace_point_emit_u32(align);
210 RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
214 rte_trace_point_emit_u32(align);
221 RTE_TRACE_POINT_ARGS(size_t size, unsigned int align, int socket,
224 rte_trace_point_emit_u32(align);
239 unsigned int flags, unsigned int align, unsigned int bound,
245 rte_trace_point_emit_u32(align);
H A Drte_memzone.h195 unsigned flags, unsigned align);
267 unsigned flags, unsigned align, unsigned bound);
/dpdk/drivers/common/mlx5/
H A Dmlx5_malloc.c149 mlx5_alloc_align(size_t size, unsigned int align, unsigned int zero) in mlx5_alloc_align() argument
153 buf = mlx5_os_malloc(align, size); in mlx5_alloc_align()
156 size, align); in mlx5_alloc_align()
165 mlx5_malloc(uint32_t flags, size_t size, unsigned int align, int socket) in mlx5_malloc() argument
182 addr = rte_zmalloc_socket(NULL, size, align, socket); in mlx5_malloc()
184 addr = rte_malloc_socket(NULL, size, align, socket); in mlx5_malloc()
194 if (align > MLX5_MALLOC_ALIGNMENT) in mlx5_malloc()
195 addr = mlx5_alloc_align(size, align, !!(flags & MLX5_MEM_ZERO)); in mlx5_malloc()
217 return mlx5_malloc(flags, size, align, socket); in mlx5_realloc()
232 new_addr = rte_realloc_socket(addr, size, align, socket); in mlx5_realloc()
[all …]
H A Dmlx5_malloc.h66 void *mlx5_malloc(uint32_t flags, size_t size, unsigned int align, int socket);
90 void *mlx5_realloc(void *addr, uint32_t flags, size_t size, unsigned int align,
/dpdk/lib/mbuf/
H A Drte_mbuf_dyn.c63 size_t off, align, size, i; in process_score() local
85 for (align = 1; in process_score()
86 (off % (align << 1)) == 0 && (align << 1) <= size; in process_score()
87 align <<= 1) in process_score()
91 for (i = off; i < off + align; i++) in process_score()
94 off += align; in process_score()
148 if ((offset & (align - 1)) != 0) in check_offset()
214 if (params1->align != params2->align) in mbuf_dynfield_cmp()
263 params->align) == 0 && in __rte_mbuf_dynfield_register_offset()
332 if (!rte_is_power_of_2(params->align)) { in rte_mbuf_dynfield_register_offset()
[all …]
/dpdk/drivers/net/virtio/
H A Dvirtio_ring.h132 vring_size(struct virtio_hw *hw, unsigned int num, unsigned long align) in vring_size() argument
139 size = RTE_ALIGN_CEIL(size, align); in vring_size()
146 size = RTE_ALIGN_CEIL(size, align); in vring_size()
152 vring_init_split(struct vring *vr, uint8_t *p, unsigned long align, in vring_init_split() argument
160 RTE_ALIGN_CEIL((uintptr_t)(&vr->avail->ring[num]), align); in vring_init_split()
164 vring_init_packed(struct vring_packed *vr, uint8_t *p, unsigned long align, in vring_init_packed() argument
173 sizeof(struct vring_packed_desc_event)), align); in vring_init_packed()
/dpdk/app/test/
H A Dtest_malloc.c62 is_aligned(void *p, int align) in is_aligned() argument
65 unsigned mask = align - 1; in is_aligned()
273 int align = 1024; in test_multi_alloc_statistics() local
315 align = 0; in test_multi_alloc_statistics()
705 mem_size, align); in test_random_alloc_free()
835 unsigned align = RTE_CACHE_LINE_SIZE; in test_malloc_bad_params() local
848 align = 17; in test_malloc_bad_params()
851 bad_ptr = rte_malloc(type, size, align); in test_malloc_bad_params()
864 align = RTE_CACHE_LINE_SIZE; in test_malloc_bad_params()
867 bad_ptr = rte_malloc(type, size, align); in test_malloc_bad_params()
[all …]
H A Dtest_memzone.c508 align = RTE_CACHE_LINE_ROUNDUP(align); in find_max_block_free_size()
509 overhead += align; in find_max_block_free_size()
580 minlen = find_max_block_free_size(align, socket); in test_memzone_reserve_max_aligned()
585 align); in test_memzone_reserve_max_aligned()
591 0, socket, 0, align); in test_memzone_reserve_max_aligned()
599 if (mz->addr != RTE_PTR_ALIGN(mz->addr, align)) { in test_memzone_reserve_max_aligned()
601 align); in test_memzone_reserve_max_aligned()
609 " biggest block\n", align); in test_memzone_reserve_max_aligned()
782 align, bound)) == NULL) { in check_memzone_bounded()
788 if ((mz->iova & ((rte_iova_t)align - 1)) != 0) { in check_memzone_bounded()
[all …]
/dpdk/drivers/crypto/bcmfs/
H A Dbcmfs_qp.c29 uint32_t align) in bcmfs_qp_check_queue_alignment() argument
31 if (((align - 1) & phys_addr) != 0) in bcmfs_qp_check_queue_alignment()
66 int socket_id, unsigned int align) in queue_dma_zone_reserve() argument
91 socket_id, RTE_MEMZONE_IOVA_CONTIG, align); in queue_dma_zone_reserve()
102 unsigned int align; in bcmfs_queue_create() local
108 align = 1U << FS_RING_BD_ALIGN_ORDER; in bcmfs_queue_create()
116 align = 1U << FS_RING_CMPL_ALIGN_ORDER; in bcmfs_queue_create()
137 0, align); in bcmfs_queue_create()
143 if (bcmfs_qp_check_queue_alignment(qp_mz->iova, align)) { in bcmfs_queue_create()
/dpdk/drivers/common/mlx5/windows/
H A Dmlx5_common_os.h37 mlx5_os_malloc(size_t align, size_t size) in mlx5_os_malloc() argument
39 if (align < MLX5_MALLOC_ALIGNMENT) in mlx5_os_malloc()
40 align = MLX5_MALLOC_ALIGNMENT; in mlx5_os_malloc()
41 return _aligned_malloc(size, align); in mlx5_os_malloc()
/dpdk/drivers/crypto/virtio/
H A Dvirtio_ring.h101 vring_size(unsigned int num, unsigned long align) in vring_size() argument
107 size = RTE_ALIGN_CEIL(size, align); in vring_size()
115 unsigned long align) in vring_init() argument
122 RTE_ALIGN_CEIL((uintptr_t)(&vr->avail->ring[num]), align); in vring_init()
/dpdk/lib/mempool/
H A Drte_mempool_ops_default.c13 size_t *min_chunk_size, size_t *align) in rte_mempool_op_calc_mem_size_helper() argument
63 *align = RTE_MEMPOOL_ALIGN; in rte_mempool_op_calc_mem_size_helper()
71 size_t *min_chunk_size, size_t *align) in rte_mempool_op_calc_mem_size_default() argument
74 0, min_chunk_size, align); in rte_mempool_op_calc_mem_size_default()
/dpdk/app/test-gpudev/
H A Dmain.c71 unsigned int align = 4096; in alloc_gpu_memory() local
86 ptr_2 = rte_gpu_mem_alloc(gpu_id, buf_bytes, align); in alloc_gpu_memory()
94 if (((uintptr_t)ptr_2) % align) { in alloc_gpu_memory()
95 fprintf(stderr, "Memory address 0x%p is not aligned to %u\n", ptr_2, align); in alloc_gpu_memory()
194 unsigned int align = 4096; in gpu_mem_cpu_map() local
200 ptr_gpu = rte_gpu_mem_alloc(gpu_id, buf_bytes, align); in gpu_mem_cpu_map()
/dpdk/drivers/common/cnxk/
H A Droc_platform.h160 #define plt_zmalloc(sz, align) rte_zmalloc("cnxk", sz, align) argument
184 #define plt_memzone_reserve_aligned(name, len, flags, align) \ argument
185 rte_memzone_reserve_aligned((name), (len), 0, (flags), (align))
279 plt_lmt_region_reserve_aligned(const char *name, size_t len, uint32_t align) in plt_lmt_region_reserve_aligned() argument
286 align, RTE_PGSIZE_2M); in plt_lmt_region_reserve_aligned()
/dpdk/drivers/mempool/bucket/
H A Drte_mempool_bucket.c376 uintptr_t align; in count_underfilled_buckets() local
379 align = (uintptr_t)RTE_PTR_ALIGN_CEIL(memhdr->addr, bucket_page_sz) - in count_underfilled_buckets()
382 for (iter = (uint8_t *)memhdr->addr + align; in count_underfilled_buckets()
567 size_t *align) in bucket_calc_mem_size() argument
576 *align = bucket_page_sz; in bucket_calc_mem_size()
597 uintptr_t align; in bucket_populate() local
605 align = RTE_PTR_ALIGN_CEIL((uintptr_t)vaddr, bucket_page_sz) - in bucket_populate()
610 iova += align + bucket_header_sz; in bucket_populate()
612 for (iter = (uint8_t *)vaddr + align, n_objs = 0; in bucket_populate()

12345