Hi David,

On 1/17/23 09:04, 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 vring state change notifications
handling from the vhost-events DPDK thread to a dedicated thread
using a lockless queue.

Besides, for the case when a bogus/malicious guest is sending continuous
updates, add a counter of pending updates in the queue and warn if a
threshold of 1000 entries is reached.

Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-dev/2023-January/401101.html
Fixes: 3b29286db1c5 ("netdev-dpdk: Add per virtqueue statistics.")
Signed-off-by: David Marchand <[email protected]>
---
Changes since v1:
- moved handling of events to a dedicated thread,
- added a warning if a fair number of updates is pending,

---
  lib/netdev-dpdk.c | 122 ++++++++++++++++++++++++++++++++++++++--------
  1 file changed, 102 insertions(+), 20 deletions(-)


Reviewed-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to