On Thu, Jul 11, 2024 at 7:46 PM Srujana Challa <scha...@marvell.com> wrote: > > -virtio_user_iova2virt(rte_iova_t iova) > > +virtio_user_iova2virt(struct virtio_user_dev *dev, rte_iova_t iova) > > > > > { > > > - if (rte_eal_iova_mode() == RTE_IOVA_VA) > > > - return (void *)(uintptr_t)iova; > > > - else > > > + if (rte_eal_iova_mode() == RTE_IOVA_PA && !use_va) > > > return rte_mem_iova2virt(iova); > > > + else > > > + return (void *)(uintptr_t)iova; > > > > Why do we need to invert this test? > Made this change to ensure that rte_mem_iova2virt() is not called when the > IOVA mode is RTE_IOVA_DC > by any chance.
Just repeating what I replied in the other thread as I see it was suggested by Jerin. It is not possible iova mode == RTE_IOVA_DC. -- David Marchand