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 3B1B2A0547; Fri, 28 May 2021 03:42:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2C9940150; Fri, 28 May 2021 03:42:43 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id D77A240040 for ; Fri, 28 May 2021 03:42:42 +0200 (CEST) IronPort-SDR: PSzDxTGIpxKTvp6uoxIcuKCGkz6obFDJniOzXHbHaPAOtAfmuVITkwDvaX0h80GVFTPNt98yP9 YIffQsETgYeg== X-IronPort-AV: E=McAfee;i="6200,9189,9997"; a="266759997" X-IronPort-AV: E=Sophos;i="5.83,228,1616482800"; d="scan'208";a="266759997" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2021 18:42:40 -0700 IronPort-SDR: Rbfxz3OmGfTMYE9wi0aQXsBQFcgPr4FGjV221ZwtfgrJ/8jyImjETzvDbKSrZKK8FbG2ffy9qi /jCQVvEpy2FA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,228,1616482800"; d="scan'208";a="477732975" Received: from npg_dpdk_virtio_jiayuhu_07.sh.intel.com ([10.67.118.193]) by orsmga001.jf.intel.com with ESMTP; 27 May 2021 18:42:38 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, yinan.wang@intel.com, Jiayu Hu Date: Fri, 28 May 2021 04:11:01 -0400 Message-Id: <1622189463-392610-1-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/2] provide thread unsafe async registration functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Lock protection is needed during the vhost notifies the application of device readiness, so the first patch is to add lock protection. After performing locking, existed async vhost registration functions will cause deadlock, as they acquire lock too. So the second patch is to provide unsafe registration functions to support calling within vhost callback functions. Jiayu Hu (2): vhost: fix lock on device readiness notification vhost: add thread unsafe async registration functions doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 42 ++++++++++ lib/vhost/version.map | 4 + lib/vhost/vhost.c | 161 +++++++++++++++++++++++++++--------- lib/vhost/vhost_user.c | 5 +- 5 files changed, 180 insertions(+), 44 deletions(-) -- 2.7.4