[dpdk-stable] [PATCH] vhost: prevent async register
    Jiayu Hu 
    jiayu.hu at intel.com
       
    Mon Jul  5 15:08:56 CEST 2021
    
    
  
Deadlock may occur if async register function is called inside
vhost callback functions. This patch disables async datapath
by preventing async vhost register.
Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
---
 lib/librte_vhost/vhost.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index b97dcf6..cea7c36 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1618,6 +1618,11 @@ int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
 		ops->transfer_data == NULL))
 		return -1;
 
+	VHOST_LOG_CONFIG(ERR, "async vhost is not supported by 20.11 LTS, "
+			"as deadlock may occur if this function is called "
+			"inside vhost callback functions.");
+	return -1;
+
 	rte_spinlock_lock(&vq->access_lock);
 
 	if (unlikely(vq->async_registered)) {
-- 
2.7.4
    
    
More information about the stable
mailing list