Re: [dpdk-dev] [PATCH] vhost: fix race condition in fdset_add

2018-12-14 Thread Matthias Gatto
On Fri, Dec 14, 2018 at 10:53 AM Maxime Coquelin wrote: > > > > On 12/14/18 10:51 AM, Maxime Coquelin wrote: > > > > > > On 12/14/18 10:32 AM, Matthias Gatto wrote: > >> On Tue, Dec 11, 2018 at 7:11 PM Maxime Coquelin > >> wrote: > >>>

Re: [dpdk-dev] [PATCH] vhost: fix race condition in fdset_add

2018-12-14 Thread Matthias Gatto
On Tue, Dec 11, 2018 at 7:11 PM Maxime Coquelin wrote: > > Hi Matthias, > > On 12/6/18 5:00 PM, Matthias Gatto wrote: > > fdset_add can call fdset_shrink_nolock which call fdset_move > > concurrently to poll that is call in fdset_event_dispatch. > > > > This pa

[dpdk-dev] [PATCH] vhost: fix race condition in fdset_add

2018-12-06 Thread Matthias Gatto
fdset_add can call fdset_shrink_nolock which call fdset_move concurrently to poll that is call in fdset_event_dispatch. This patch add a mutex to protect poll from been call at the same time fdset_add call fdset_shrink_nolock. Signed-off-by: Matthias Gatto --- lib/librte_vhost/fd_man.c | 4

Re: [dpdk-dev] [PATCH] vhost: try to shrink pfdset when fdset_add fails

2017-02-22 Thread Matthias Gatto
On Wed, Feb 22, 2017 at 2:59 AM, Yuanhan Liu wrote: > > On Tue, Feb 21, 2017 at 03:25:30PM +0100, Matthias Gatto wrote: > > fdset_add increment pfdset->num, but fdset_del doesn't decrement > > pfdset->num, > > so if we call fdset_add then fdset_del in a loop

[dpdk-dev] [PATCH] vhost: try to shrink pfdset when fdset_add fails

2017-02-21 Thread Matthias Gatto
n it exceed MAX_FDS. Because fdset_shrink and fdset_add locks pfdset->fd_mutex we can't call fdset_shrink inside fdset_add because that would cause a dead lock, so this patch split fdset_shrink in two, fdset_shrink amd fdset_shrink_nolock. Signed-off-by: Matthias Gatto --- lib/librte_

[dpdk-dev] [PATCH] virtio: remove obsolete comment

2016-09-05 Thread Matthias Gatto
On Mon, Sep 5, 2016 at 4:25 AM, Yuanhan Liu wrote: > On Fri, Sep 02, 2016 at 05:05:21PM +0200, Matthias Gatto wrote: >> As new_device and destroy_device use an int instead of a "struct virtio_net >> *", >> The comment about setting VIRTIO_DEV_RUNNING doesn't

[dpdk-dev] [PATCH] virtio: remove obsolete comment

2016-09-02 Thread Matthias Gatto
ss that this comment is obsolet and I've remove it. Signed-off-by: Matthias Gatto --- lib/librte_vhost/rte_virtio_net.h | 4 1 file changed, 4 deletions(-) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 9caa622..a88aecd 100644 --- a/lib/libr