patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 20.11] vhost: prevent async register
@ 2022-08-18  0:57 Jiayu Hu
  0 siblings, 0 replies; only message in thread
From: Jiayu Hu @ 2022-08-18  0:57 UTC (permalink / raw)
  To: stable; +Cc: weix.ling, xingguang.he, Jiayu Hu

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@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.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 b83cf63..530a960 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1608,6 +1608,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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-18  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  0:57 [PATCH 20.11] vhost: prevent async register Jiayu Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).