From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57E54A0A0F for ; Mon, 5 Jul 2021 14:31:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1333A4003C; Mon, 5 Jul 2021 14:31:30 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5BE484003C for ; Mon, 5 Jul 2021 14:31:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625488287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0+RaB0KFabz8q5PRVYr/UepDTtU5PLmaMJWuini7Zwo=; b=eZEZkbfLWl5HcHTi5PRKeSG7pSQJHhg4grQnIt23SeNnWeB/v+e8S3Rs59L8Zf9aJ9UO1N 9klalcuXj8gMMV0P0zh0WXvF7LxTz6tzsHmh+BpV50uXwwWU9RZhC41Cff9ThUMdZeLnb1 5vqxSFWgmSbDNPHl0m0YspT8d3YkXKg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-Lruq7nmeNQyhJS1IT-Ny8Q-1; Mon, 05 Jul 2021 08:31:26 -0400 X-MC-Unique: Lruq7nmeNQyhJS1IT-Ny8Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96A2D804140; Mon, 5 Jul 2021 12:31:25 +0000 (UTC) Received: from [10.36.110.36] (unknown [10.36.110.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5D1C17C5F; Mon, 5 Jul 2021 12:31:18 +0000 (UTC) To: Jiayu Hu , stable@dpdk.org Cc: chenbo.xia@intel.com References: <1625490536-284749-1-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: <11627f10-3d0e-7a48-fa35-2dcaa1ec817d@redhat.com> Date: Mon, 5 Jul 2021 14:31:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1625490536-284749-1-git-send-email-jiayu.hu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] vhost: prevent async register X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 > --- > 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 Thanks, Maxime