{
struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
struct malloc_heap *heap = NULL;
+ struct rte_memseg_list *msl;
unsigned int n;
int ret;
}
n = len / page_sz;
+ msl = malloc_heap_create_external_seg(va_addr, iova_addrs, n, page_sz,
+ heap_name, heap->socket_id);
+ if (msl == NULL) {
+ ret = -1;
+ goto unlock;
+ }
+
rte_spinlock_lock(&heap->lock);
- ret = malloc_heap_add_external_memory(heap, va_addr, iova_addrs, n,
- page_sz);
+ ret = malloc_heap_add_external_memory(heap, msl);
rte_spinlock_unlock(&heap->lock);
unlock: