| 378 | } |
| 379 | |
| 380 | void * |
| 381 | rte_mem_iova2virt(rte_iova_t iova) |
| 382 | { |
| 383 | struct virtiova vi; |
| 384 | const struct internal_config *internal_conf = |
| 385 | eal_get_internal_configuration(); |
| 386 | |
| 387 | memset(&vi, 0, sizeof(vi)); |
| 388 | |
| 389 | vi.iova = iova; |
| 390 | /* for legacy mem, we can get away with scanning VA-contiguous segments, |
| 391 | * as we know they are PA-contiguous as well |
| 392 | */ |
| 393 | if (internal_conf->legacy_mem) |
| 394 | rte_memseg_contig_walk(find_virt_legacy, &vi); |
| 395 | else |
| 396 | rte_memseg_walk(find_virt, &vi); |
| 397 | |
| 398 | return vi.virt; |
| 399 | } |
| 400 | |
| 401 | struct rte_memseg * |
| 402 | rte_mem_virt2memseg(const void *addr, const struct rte_memseg_list *msl) |
no test coverage detected