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 8395DA0C49; Wed, 14 Jul 2021 08:50:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F32D840140; Wed, 14 Jul 2021 08:50:25 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C5D874003E for ; Wed, 14 Jul 2021 08:50:23 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="210113231" X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="210113231" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2021 23:50:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="494324826" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 13 Jul 2021 23:50:22 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 13 Jul 2021 23:50:21 -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.2242.10; Wed, 14 Jul 2021 14:50:19 +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.010; Wed, 14 Jul 2021 14:50:19 +0800 From: "Hu, Jiayu" To: Maxime Coquelin , "Ma, WenwuX" , "dev@dpdk.org" CC: "Xia, Chenbo" , "Jiang, Cheng1" , "Wang, YuanX" Thread-Topic: [PATCH v5 3/4] vhost: support async dequeue for split ring Thread-Index: AQHXcWWjCKg5mPXiy0mE3SmriPkkYqtAfkSAgAGFJVA= Date: Wed, 14 Jul 2021 06:50:19 +0000 Message-ID: References: <20210602083110.5530-1-yuanx.wang@intel.com> <20210705181151.141752-1-wenwux.ma@intel.com> <20210705181151.141752-4-wenwux.ma@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 v5 3/4] vhost: support async dequeue for split ring 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" SGkgTWF4aW1lLA0KDQpUaGFua3MgZm9yIHlvdXIgY29tbWVudHMuIEFwcGxpZXMgYXJlIGlubGlu ZS4NCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBNYXhpbWUgQ29xdWVs aW4gPG1heGltZS5jb3F1ZWxpbkByZWRoYXQuY29tPg0KPiBTZW50OiBUdWVzZGF5LCBKdWx5IDEz LCAyMDIxIDEwOjMwIFBNDQo+IFRvOiBNYSwgV2Vud3VYIDx3ZW53dXgubWFAaW50ZWwuY29tPjsg ZGV2QGRwZGsub3JnDQo+IENjOiBYaWEsIENoZW5ibyA8Y2hlbmJvLnhpYUBpbnRlbC5jb20+OyBK aWFuZywgQ2hlbmcxDQo+IDxjaGVuZzEuamlhbmdAaW50ZWwuY29tPjsgSHUs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