X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_mempool%2Frte_mempool.h;h=e0aa6988af5cfc94b5a0e25417f7e0a8d5f0ba49;hb=aab4f62d6c1c9e3c33ef6d5f20666e9d319e287e;hp=3e458b89f0949358dfe1645709533257cf9fce9f;hpb=593a084afc2b441895aeca78a2c4465e450d0ef5;p=dpdk.git diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 3e458b89f0..e0aa6988af 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -1150,19 +1150,10 @@ rte_mempool_empty(const struct rte_mempool *mp) static inline phys_addr_t rte_mempool_virt2phy(__rte_unused const struct rte_mempool *mp, const void *elt) { - if (rte_eal_has_hugepages()) { - const struct rte_mempool_objhdr *hdr; - hdr = (const struct rte_mempool_objhdr *)RTE_PTR_SUB(elt, - sizeof(*hdr)); - return hdr->physaddr; - } else { - /* - * If huge pages are disabled, we cannot assume the - * memory region to be physically contiguous. - * Lookup for each element. - */ - return rte_mem_virt2phy(elt); - } + const struct rte_mempool_objhdr *hdr; + hdr = (const struct rte_mempool_objhdr *)RTE_PTR_SUB(elt, + sizeof(*hdr)); + return hdr->physaddr; } /**