From: Jiayu Hu <jiayu.hu@intel.com>
To: stable@dpdk.org
Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com,
Jiayu Hu <jiayu.hu@intel.com>
Subject: [dpdk-stable] [PATCH] vhost: prevent async register
Date: Mon, 5 Jul 2021 09:08:56 -0400 [thread overview]
Message-ID: <1625490536-284749-1-git-send-email-jiayu.hu@intel.com> (raw)
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>
---
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
next reply other threads:[~2021-07-05 6:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 13:08 Jiayu Hu [this message]
2021-07-05 12:31 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1625490536-284749-1-git-send-email-jiayu.hu@intel.com \
--to=jiayu.hu@intel.com \
--cc=chenbo.xia@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).