MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_iova

Function get_iova

dpdk/lib/mempool/rte_mempool.c:384–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384static rte_iova_t
385get_iova(void *addr)
386{
387 struct rte_memseg *ms;
388
389 /* try registered memory first */
390 ms = rte_mem_virt2memseg(addr, NULL);
391 if (ms == NULL || ms->iova == RTE_BAD_IOVA)
392 /* fall back to actual physical address */
393 return rte_mem_virt2iova(addr);
394 return ms->iova + RTE_PTR_DIFF(addr, ms->addr);
395}
396
397/* Populate the mempool with a virtual area. Return the number of
398 * objects added, or a negative value on error.

Callers 1

Calls 2

rte_mem_virt2memsegFunction · 0.85
rte_mem_virt2iovaFunction · 0.50

Tested by

no test coverage detected