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 020D0A0C47; Tue, 6 Jul 2021 10:36:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE4614123F; Tue, 6 Jul 2021 10:36:10 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 352604123F for ; Tue, 6 Jul 2021 10:36:09 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10036"; a="209032793" X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="209032793" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 01:36:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="647204359" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP; 06 Jul 2021 01:36:04 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 6 Jul 2021 01:36:04 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 6 Jul 2021 16:36:02 +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.2242.008; Tue, 6 Jul 2021 16:36:02 +0800 From: "Hu, Jiayu" To: Maxime Coquelin , "dev@dpdk.org" CC: "Xia, Chenbo" , "Wang, Yinan" Thread-Topic: [PATCH 2/2] vhost: add thread unsafe async registration functions Thread-Index: AQHXU2LCaigAABhgMkGatSzZJoTVJKszyxkAgAIRhPA= Date: Tue, 6 Jul 2021 08:36:02 +0000 Message-ID: <53ef07bdb99847359b150836bff36af2@intel.com> References: <1622189463-392610-1-git-send-email-jiayu.hu@intel.com> <1622189463-392610-3-git-send-email-jiayu.hu@intel.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 2/2] vhost: add 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" DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTWF4aW1lIENvcXVlbGlu IDxtYXhpbWUuY29xdWVsaW5AcmVkaGF0LmNvbT4NCj4gU2VudDogTW9uZGF5LCBKdWx5IDUsIDIw MjEgNDo1OSBQTQ0KPiBUbzogSHUsIEppYXl1IDxqaWF5dS5odUBpbnRlbC5jb20+OyBkZXZAZHBk ay5vcmcNCj4gQ2M6IFhpYSwgQ2hlbmJvIDxjaGVuYm8ueGlhQGludGVsLmNvbT47IFdhbmcsIFlp bmFuDQo+IDx5aW5hbi53YW5nQGludGVsLmNvbT4NCj4gU3ViamVjdDogUmU6IFtQQVRDSCAyLzJd IHZob3N0OiBhZGQgdGhyZWFkIHVuc2FmZSBhc3luYyByZWdpc3RyYXRpb24NCj4gZnVuY3Rpb25z DQo+IE9uIDU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