patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Jiayu Hu <jiayu.hu@intel.com>, stable@dpdk.org
Cc: chenbo.xia@intel.com
Subject: Re: [dpdk-stable] [PATCH] vhost: prevent async register
Date: Mon, 5 Jul 2021 14:31:16 +0200	[thread overview]
Message-ID: <11627f10-3d0e-7a48-fa35-2dcaa1ec817d@redhat.com> (raw)
In-Reply-To: <1625490536-284749-1-git-send-email-jiayu.hu@intel.com>



On 7/5/21 3:08 PM, Jiayu Hu wrote:
> 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)) {
> 

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


      reply	other threads:[~2021-07-05 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 13:08 Jiayu Hu
2021-07-05 12:31 ` Maxime Coquelin [this message]

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=11627f10-3d0e-7a48-fa35-2dcaa1ec817d@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=jiayu.hu@intel.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).