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 E0259A0547; Mon, 19 Apr 2021 11:02:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BADEE4123B; Mon, 19 Apr 2021 11:02:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 8098440040 for ; Mon, 19 Apr 2021 11:02:48 +0200 (CEST) IronPort-SDR: es60p902DHi462SfOglKfvwqgJ/xwwz5C1SxJfViAo3DnuwVZ6cgX5/PPu8k8QPqWYkgBhjfc/ SpIXw+tBf46w== X-IronPort-AV: E=McAfee;i="6200,9189,9958"; a="194851228" X-IronPort-AV: E=Sophos;i="5.82,233,1613462400"; d="scan'208";a="194851228" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 02:02:47 -0700 IronPort-SDR: WKEGaEY9accahrn5+sSCjxK4gsJFUkGH459ZZ/u1qSyNiwz5XCC6TKSFoAAOZhVtnKT3EKt7UY LbIC+yobW5Og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,233,1613462400"; d="scan'208";a="462672838" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 19 Apr 2021 02:02:47 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Apr 2021 02:02:46 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Apr 2021 17:02:44 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.2106.013; Mon, 19 Apr 2021 17:02:44 +0800 From: "Hu, Jiayu" To: Maxime Coquelin , "dev@dpdk.org" CC: "Xia, Chenbo" , "Wang, Yinan" , "Pai G, Sunil" , "Jiang, Cheng1" Thread-Topic: [PATCH v2 3/4] vhost: avoid deadlock on async register Thread-Index: AQHXJ4o3TGFQBWTUf0K5gqJ5ckYjX6qx3F2AgAFn1ECAABLyAIABfNQg///jRICAAJEZwIAA98YAgACUNCD//4z1gIAE36lQ///A2QAAFBmNQA== Date: Mon, 19 Apr 2021 09:02:44 +0000 Message-ID: References: <1615985773-406787-1-git-send-email-jiayu.hu@intel.com> <1617368642-131298-1-git-send-email-jiayu.hu@intel.com> <1617368642-131298-4-git-send-email-jiayu.hu@intel.com> <0b974e3cd6534947ba6568d93d9431ab@intel.com> <9eb47884f1254cc98b9f1c60dfe9714c@intel.com> <4fc5b419864e4b829623099cd31de9aa@intel.com> <07eb8178-9523-6db3-1056-e96b48e65139@redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/4] vhost: avoid deadlock on async register 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" DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTWF4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