Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Maxime Coquelin
On 09/08/2017 11:21 AM, Yuanhan Liu wrote: On Fri, Sep 08, 2017 at 10:50:49AM +0200, Maxime Coquelin wrote: +{ + struct vhost_iotlb_entry *node, *temp_node; + + rte_rwlock_write_lock(&vq->iotlb_lock); + + TAILQ_FOREACH_SAFE(node, &vq->iotlb_list, next, temp_node) { +

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Yuanhan Liu
On Fri, Sep 08, 2017 at 10:50:49AM +0200, Maxime Coquelin wrote: > +{ > + struct vhost_iotlb_entry *node, *temp_node; > + > + rte_rwlock_write_lock(&vq->iotlb_lock); > + > + TAILQ_FOREACH_SAFE(node, &vq->iotlb_list, next, temp_node) { > + TAILQ_REMOVE(&vq->iotlb_

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Maxime Coquelin
On 09/08/2017 10:36 AM, Yuanhan Liu wrote: On Fri, Sep 08, 2017 at 10:24:58AM +0200, Maxime Coquelin wrote: On 09/08/2017 10:08 AM, Yuanhan Liu wrote: On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c new file

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Yuanhan Liu
On Fri, Sep 08, 2017 at 10:24:58AM +0200, Maxime Coquelin wrote: > > > On 09/08/2017 10:08 AM, Yuanhan Liu wrote: > >On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: > >>diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c > >>new file mode 100644 > >>index 0..

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Maxime Coquelin
On 09/08/2017 10:08 AM, Yuanhan Liu wrote: On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c new file mode 100644 index 0..1b739dae5 --- /dev/null +++ b/lib/librte_vhost/iotlb.c @@ -0,0 +1,231 @@ +/*- + *

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-08 Thread Yuanhan Liu
On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: > diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c > new file mode 100644 > index 0..1b739dae5 > --- /dev/null > +++ b/lib/librte_vhost/iotlb.c > @@ -0,0 +1,231 @@ > +/*- > + * BSD LICENSE > + * > + * Copyr

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-05 Thread Maxime Coquelin
On 09/05/2017 08:02 AM, Tiwei Bie wrote: On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: [...] + +#define IOTLB_CACHE_SIZE 1024 + +static void vhost_user_iotlb_cache_remove_all(struct vhost_virtqueue *vq) +{ + struct vhost_iotlb_entry *node, *temp_node; + + rte_rwl

Re: [dpdk-dev] [PATCH 07/21] vhost: add iotlb helper functions

2017-09-04 Thread Tiwei Bie
On Thu, Aug 31, 2017 at 11:50:09AM +0200, Maxime Coquelin wrote: [...] > + > +#define IOTLB_CACHE_SIZE 1024 > + > +static void vhost_user_iotlb_cache_remove_all(struct vhost_virtqueue *vq) > +{ > + struct vhost_iotlb_entry *node, *temp_node; > + > + rte_rwlock_write_lock(&vq->iotlb_lock); >