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 B203DA00C4 for ; Thu, 18 Aug 2022 02:57:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8406A410E7; Thu, 18 Aug 2022 02:57:41 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D2F4740DDA for ; Thu, 18 Aug 2022 02:57:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660784260; x=1692320260; h=from:to:cc:subject:date:message-id; bh=LFCBFgZvLAsucpI9lZs42S1HEB7h3an4YqD4j5e6wME=; b=gLcD5/l6HKeEAsRy2jOhfSKm3XN6XUw+vykmirYCR4ccV6vFuh03QwMQ uPSouw9a4YFlsahdhDzDzbUjNfyCthkwCHVWW/tQAIU/gY6FJOEiXXXy3 obRazNKhSGYR10pGp8wqso45ECCyNFxDxmA3cei6BzMhM5Y7nNg4mf1E+ yQPVK6S+RBk59I1K5W4pDRfY9GqEV/a1A4CIa9F7hAjJ+5uGiIuZhJXDG hjzT3jhmTFicU1dmw+BC1PbKBfdjxUuucwynI6SAHOJKUEYoMBSOkppu6 71bUIPeqYV7YEce5BgvJFaYgDym8DT2Nc7tUJTQ29kdof5XN8Ov5XqMr4 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10442"; a="291390683" X-IronPort-AV: E=Sophos;i="5.93,244,1654585200"; d="scan'208";a="291390683" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 17:57:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,244,1654585200"; d="scan'208";a="583990773" Received: from npg_dpdk_virtio_jiayuhu_07.sh.intel.com ([10.67.118.151]) by orsmga006.jf.intel.com with ESMTP; 17 Aug 2022 17:57:37 -0700 From: Jiayu Hu To: stable@dpdk.org Cc: weix.ling@intel.com, xingguang.he@intel.com, Jiayu Hu Subject: [PATCH 20.11] vhost: prevent async register Date: Wed, 17 Aug 2022 20:57:32 -0400 Message-Id: <1660784252-230296-1-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 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 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 Acked-by: Maxime Coquelin --- 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