Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-16 Thread Ilya Maximets
On 1/16/23 14:41, David Marchand wrote: > On Fri, Jan 13, 2023 at 4:57 PM Ilya Maximets wrote: > @@ -5766,6 +5804,7 @@ static const struct netdev_class dpdk_vhost_class = > { > static const struct netdev_class dpdk_vhost_client_class = { > .type = "dpdkvhostuserclient",

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-16 Thread David Marchand
On Fri, Jan 13, 2023 at 4:57 PM Ilya Maximets wrote: > >>> @@ -5766,6 +5804,7 @@ static const struct netdev_class dpdk_vhost_class = > >>> { > >>> static const struct netdev_class dpdk_vhost_client_class = { > >>> .type = "dpdkvhostuserclient", > >>> NETDEV_DPDK_CLASS_COMMON, > >>> +

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-13 Thread Ilya Maximets
On 1/13/23 14:30, David Marchand wrote: > On Fri, Jan 13, 2023 at 1:58 PM Ilya Maximets wrote: >> >> On 1/12/23 21:55, David Marchand wrote: >>> As Ilya reported, we have a ABBA deadlock between DPDK vq->access_lock >>> and OVS dev->mutex when OVS main thread refreshes statistics, while a >>>

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-13 Thread David Marchand
On Fri, Jan 13, 2023 at 1:58 PM Ilya Maximets wrote: > > On 1/12/23 21:55, David Marchand wrote: > > As Ilya reported, we have a ABBA deadlock between DPDK vq->access_lock > > and OVS dev->mutex when OVS main thread refreshes statistics, while a > > vring state change event is being processed for

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-13 Thread Ilya Maximets
On 1/12/23 21:55, David Marchand wrote: > As Ilya reported, we have a ABBA deadlock between DPDK vq->access_lock > and OVS dev->mutex when OVS main thread refreshes statistics, while a > vring state change event is being processed for a same vhost port. > > To break from this situation, move

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-13 Thread David Marchand
On Fri, Jan 13, 2023 at 10:19 AM Maxime Coquelin wrote: > > +static void > > +netdev_dpdk_vhost_run(const struct netdev_class *netdev_class OVS_UNUSED) > > +{ > > +struct mpsc_queue_node *node; > > + > > +mpsc_queue_acquire(_state_change_queue); > > +MPSC_QUEUE_FOR_EACH_POP (node,

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-13 Thread Maxime Coquelin
Hi David, On 1/12/23 21:55, David Marchand wrote: As Ilya reported, we have a ABBA deadlock between DPDK vq->access_lock and OVS dev->mutex when OVS main thread refreshes statistics, while a vring state change event is being processed for a same vhost port. To break from this situation, move

[ovs-dev] [PATCH] netdev-dpdk: Fix deadlock due to virtqueue stats retrieval.

2023-01-12 Thread David Marchand
As Ilya reported, we have a ABBA deadlock between DPDK vq->access_lock and OVS dev->mutex when OVS main thread refreshes statistics, while a vring state change event is being processed for a same vhost port. To break from this situation, move vring state change notifications handling from the