From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 79C5F1B117 for ; Wed, 12 Dec 2018 07:51:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2018 22:51:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,343,1539673200"; d="scan'208";a="117916196" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 11 Dec 2018 22:51:31 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 11 Dec 2018 22:51:30 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 11 Dec 2018 22:51:30 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.201]) by shsmsx102.ccr.corp.intel.com ([169.254.2.182]) with mapi id 14.03.0415.000; Wed, 12 Dec 2018 14:51:28 +0800 From: "Wang, Xiao W" To: "Bie, Tiwei" CC: "maxime.coquelin@redhat.com" , "dev@dpdk.org" , "Wang, Zhihong" , "Ye, Xiaolong" Thread-Topic: [PATCH 2/9] vhost: provide helpers for virtio ring relay Thread-Index: AQHUhwC1vh0++Ujj+UWp0gldVdzC3aVtn2eAgA0IHWA= Date: Wed, 12 Dec 2018 06:51:28 +0000 Message-ID: References: <20181128094607.106173-1-xiao.w.wang@intel.com> <20181128094607.106173-3-xiao.w.wang@intel.com> <20181204062241.GA19852@btwcube1> In-Reply-To: <20181204062241.GA19852@btwcube1> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWExM2I4OTAtODFjNi00ZTI3LTg5ODQtZDY2MThmNjJjNDZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiKzJGbVwva1NiUHBrc2NsVWYyXC9lK2xqcUhtdWVMM2l4V2pDMVJzUnVMSjltQzdtWlFJN3Nmc2NtdXoxWG9OK3k4In0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/9] vhost: provide helpers for virtio ring relay X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 06:51:33 -0000 SGksDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQmllLCBUaXdlaQ0K PiBTZW50OiBNb25kYXksIERlY2VtYmVyIDMsIDIwMTggMTA6MjMgUE0NCj4gVG86IFdhbmcsIFhp YW8gVyA8eGlhby53LndhbmdAaW50ZWwuY29tPg0KPiBDYzogbWF4aW1lLmNvcXVlbGluQHJlZGhh dC5jb207IGRldkBkcGRrLm9yZzsgV2FuZywgWmhpaG9uZw0KPiA8emhpaG9uZy53YW5nQGlud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