Re: [dpdk-dev] [PATCH] lib/librte_vhost: remove redundant logic judgement

2018-01-03 Thread Yang, Zhiyong
> -Original Message- > From: Yuanhan Liu [mailto:y...@fridaylinux.org] > Sent: Wednesday, December 27, 2017 10:29 PM > To: Yang, Zhiyong > Cc: dev@dpdk.org; maxime.coque...@redhat.com > Subject: Re: [PATCH] lib/librte_vhost: remove redundant logic judgement > > On Mon, Dec 25, 2017 at 0

Re: [dpdk-dev] [PATCH] lib/librte_vhost: remove redundant logic judgement

2017-12-27 Thread Yuanhan Liu
On Mon, Dec 25, 2017 at 05:16:17PM +0800, Zhiyong Yang wrote: > At the beginning of vring_translate, the code > if(!(dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) already judges > if IOMMU_PLATFORM is supported. The function vhost_iova_to_vva always > repeats the logic, __vhost_iova_to_vva ca

[dpdk-dev] [PATCH] lib/librte_vhost: remove redundant logic judgement

2017-12-25 Thread Zhiyong Yang
At the beginning of vring_translate, the code if(!(dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) already judges if IOMMU_PLATFORM is supported. The function vhost_iova_to_vva always repeats the logic, __vhost_iova_to_vva can be used directly to avoid it here. Signed-off-by: Zhiyong Yang ---