Lines Matching refs:addr

38 check_mem(void *addr, rte_iova_t *iova, size_t pgsz, int n_pages)  in check_mem()  argument
46 void *cur = RTE_PTR_ADD(addr, pgsz * i); in check_mem()
62 if (ms->addr != cur) { in check_mem()
76 test_malloc_invalid_param(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_malloc_invalid_param() argument
111 if (rte_malloc_heap_memory_add(name, addr, len, in test_malloc_invalid_param()
117 if (rte_malloc_heap_memory_remove(name, addr, len) >= 0 || in test_malloc_invalid_param()
124 if (rte_malloc_heap_memory_attach(name, addr, len) >= 0 || in test_malloc_invalid_param()
130 if (rte_malloc_heap_memory_detach(name, addr, len) >= 0 || in test_malloc_invalid_param()
154 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
160 if (rte_malloc_heap_memory_remove(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
167 if (rte_malloc_heap_memory_attach(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
173 if (rte_malloc_heap_memory_detach(valid_name, addr, len) >= 0 || in test_malloc_invalid_param()
188 if (rte_malloc_heap_memory_add(valid_name, addr, 0, in test_malloc_invalid_param()
195 if (rte_malloc_heap_memory_remove(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
202 if (rte_malloc_heap_memory_attach(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
208 if (rte_malloc_heap_memory_detach(valid_name, addr, 0) >= 0 || in test_malloc_invalid_param()
246 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
252 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
259 if (rte_malloc_heap_memory_add(valid_name, addr, len, in test_malloc_invalid_param()
281 test_malloc_basic(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_malloc_basic() argument
313 if (rte_malloc_heap_memory_add(heap_name, addr, len, in test_malloc_basic()
321 if (check_mem(addr, iova, pgsz, n_pages) < 0) in test_malloc_basic()
333 if (ptr < addr || ptr >= RTE_PTR_ADD(addr, len)) { in test_malloc_basic()
340 if (rte_malloc_heap_memory_remove(heap_name, addr, len) >= 0 || in test_malloc_basic()
382 if (rte_malloc_heap_memory_remove(heap_name, addr, len) != 0) { in test_malloc_basic()
399 rte_malloc_heap_memory_remove(heap_name, addr, len); in test_malloc_basic()
406 test_extmem_invalid_param(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_extmem_invalid_param() argument
410 if (rte_extmem_unregister(addr, len) >= 0 || in test_extmem_invalid_param()
417 if (rte_extmem_attach(addr, len) >= 0 || in test_extmem_invalid_param()
423 if (rte_extmem_attach(addr, len) >= 0 || in test_extmem_invalid_param()
431 if (rte_extmem_register(addr, 0, NULL, 0, pgsz) >= 0 || in test_extmem_invalid_param()
438 if (rte_extmem_unregister(addr, 0) >= 0 || in test_extmem_invalid_param()
445 if (rte_extmem_attach(addr, 0) >= 0 || in test_extmem_invalid_param()
451 if (rte_extmem_attach(addr, 0) >= 0 || in test_extmem_invalid_param()
489 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
495 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
502 if (rte_extmem_register(addr, len, in test_extmem_invalid_param()
515 test_extmem_basic(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, in test_extmem_basic() argument
519 if (rte_extmem_register(addr, len, iova, n_pages, pgsz) != 0) { in test_extmem_basic()
526 if (check_mem(addr, iova, pgsz, n_pages) < 0) in test_extmem_basic()
529 if (rte_extmem_unregister(addr, len) != 0) { in test_extmem_basic()
538 rte_extmem_unregister(addr, len); in test_extmem_basic()
550 void *addr; in test_external_mem() local
556 addr = mmap(NULL, len, PROT_WRITE | PROT_READ, in test_external_mem()
558 if (addr == MAP_FAILED) { in test_external_mem()
570 ret = test_malloc_invalid_param(addr, len, pgsz, iova, n_pages); in test_external_mem()
571 ret |= test_malloc_basic(addr, len, pgsz, iova, n_pages); in test_external_mem()
573 ret |= test_malloc_invalid_param(addr, len, pgsz, NULL, n_pages); in test_external_mem()
574 ret |= test_malloc_basic(addr, len, pgsz, NULL, n_pages); in test_external_mem()
577 ret |= test_extmem_invalid_param(addr, len, pgsz, iova, n_pages); in test_external_mem()
578 ret |= test_extmem_basic(addr, len, pgsz, iova, n_pages); in test_external_mem()
580 ret |= test_extmem_invalid_param(addr, len, pgsz, NULL, n_pages); in test_external_mem()
581 ret |= test_extmem_basic(addr, len, pgsz, NULL, n_pages); in test_external_mem()
583 munmap(addr, len); in test_external_mem()