Lines Matching refs:addr

26 check_mem(void *addr, rte_iova_t *iova, size_t pgsz, int n_pages)  in check_mem()  argument
34 void *cur = RTE_PTR_ADD(addr, pgsz * i); in check_mem()
50 if (ms->addr != cur) { in check_mem()
64 test_malloc_invalid_param(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_malloc_invalid_param() argument
99 if (rte_malloc_heap_memory_add(name, addr, len, in test_malloc_invalid_param()
105 if (rte_malloc_heap_memory_remove(name, addr, len) >= 0 || in test_malloc_invalid_param()
112 if (rte_malloc_heap_memory_attach(name, addr, len) >= 0 || in test_malloc_invalid_param()
118 if (rte_malloc_heap_memory_detach(name, addr, len) >= 0 || in test_malloc_invalid_param()
142 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
148 if (rte_malloc_heap_memory_remove(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
155 if (rte_malloc_heap_memory_attach(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
161 if (rte_malloc_heap_memory_detach(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
176 if (rte_malloc_heap_memory_add(valid_name, addr, 0, in test_malloc_invalid_param()
183 if (rte_malloc_heap_memory_remove(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
190 if (rte_malloc_heap_memory_attach(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
196 if (rte_malloc_heap_memory_detach(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
234 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
240 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
247 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
269 test_malloc_basic(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_malloc_basic() argument
301 if (rte_malloc_heap_memory_add(heap_name, addr, len, in test_malloc_basic()
309 if (check_mem(addr, iova, pgsz, n_pages) < 0) in test_malloc_basic()
321 if (ptr < addr || ptr >= RTE_PTR_ADD(addr, len)) { in test_malloc_basic()
328 if (rte_malloc_heap_memory_remove(heap_name, addr, len) >= 0 || in test_malloc_basic()
370 if (rte_malloc_heap_memory_remove(heap_name, addr, len) != 0) { in test_malloc_basic()
387 rte_malloc_heap_memory_remove(heap_name, addr, len); in test_malloc_basic()
394 test_extmem_invalid_param(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_extmem_invalid_param() argument
398 if (rte_extmem_unregister(addr, len) >= 0 || in test_extmem_invalid_param()
405 if (rte_extmem_attach(addr, len) >= 0 || in test_extmem_invalid_param()
411 if (rte_extmem_attach(addr, len) >= 0 || in test_extmem_invalid_param()
419 if (rte_extmem_register(addr, 0, NULL, 0, pgsz) >= 0 || in test_extmem_invalid_param()
426 if (rte_extmem_unregister(addr, 0) >= 0 || in test_extmem_invalid_param()
433 if (rte_extmem_attach(addr, 0) >= 0 || in test_extmem_invalid_param()
439 if (rte_extmem_attach(addr, 0) >= 0 || in test_extmem_invalid_param()
477 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
483 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
490 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
503 test_extmem_basic(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_extmem_basic() argument
507 if (rte_extmem_register(addr, len, iova, n_pages, pgsz) != 0) { in test_extmem_basic()
514 if (check_mem(addr, iova, pgsz, n_pages) < 0) in test_extmem_basic()
517 if (rte_extmem_unregister(addr, len) != 0) { in test_extmem_basic()
526 rte_extmem_unregister(addr, len); in test_extmem_basic()
538 void *addr; in test_external_mem() local
544 addr = mmap(NULL, len, PROT_WRITE | PROT_READ, in test_external_mem()
546 if (addr == MAP_FAILED) { in test_external_mem()
558 ret = test_malloc_invalid_param(addr, len, pgsz, iova, n_pages); in test_external_mem()
559 ret |= test_malloc_basic(addr, len, pgsz, iova, n_pages); in test_external_mem()
561 ret |= test_malloc_invalid_param(addr, len, pgsz, NULL, n_pages); in test_external_mem()
562 ret |= test_malloc_basic(addr, len, pgsz, NULL, n_pages); in test_external_mem()
565 ret |= test_extmem_invalid_param(addr, len, pgsz, iova, n_pages); in test_external_mem()
566 ret |= test_extmem_basic(addr, len, pgsz, iova, n_pages); in test_external_mem()
568 ret |= test_extmem_invalid_param(addr, len, pgsz, NULL, n_pages); in test_external_mem()
569 ret |= test_extmem_basic(addr, len, pgsz, NULL, n_pages); in test_external_mem()
571 munmap(addr, len); in test_external_mem()