From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0A7FDA0679 for ; Wed, 3 Apr 2019 16:13:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5392C5F44; Wed, 3 Apr 2019 16:13:30 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 4132F5A6E for ; Wed, 3 Apr 2019 16:13:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2019 07:13:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,304,1549958400"; d="scan'208";a="139808392" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 03 Apr 2019 07:13:27 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 3 Apr 2019 07:13:27 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.142]) by FMSMSX155.amr.corp.intel.com ([169.254.5.16]) with mapi id 14.03.0415.000; Wed, 3 Apr 2019 07:13:25 -0700 From: "Wiles, Keith" To: "Bie, Tiwei" CC: dpdk-dev , "Liang, Cunming" , "Richardson, Bruce" , "alejandro.lucero@netronome.com" Thread-Topic: [dpdk-dev] [RFC 3/3] bus/pci: add mdev support Thread-Index: AQHU6e2/WQO/CGKAnEap/6qdh00Z1aYq8EkA Date: Wed, 3 Apr 2019 14:13:25 +0000 Message-ID: <055CA897-B4BA-446F-BE9B-620DAEAB02EC@intel.com> References: <20190403071844.21126-1-tiwei.bie@intel.com> <20190403071844.21126-4-tiwei.bie@intel.com> In-Reply-To: <20190403071844.21126-4-tiwei.bie@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.102.28] Content-Type: text/plain; charset="UTF-8" Content-ID: <9B4810F5810292419C064B01837BDDFA@intel.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC 3/3] bus/pci: add mdev support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190403141325.VqnMjp8iyxNBAc0hGXkBTbGJYgxZtdqjlTPMVZQNdlY@z> U29tZSBtaW5vciBuaXRzLg0KDQo+IE9uIEFwciAzLCAyMDE5LCBhdCAyOjE4IEFNLCBUaXdlaSBC aWUgPHRpd2VpLmJpZUBpbnRlbC5jb20+IHdyb3RlOg0KPiANCj4gVGhpcyBwYXRjaCBhZGRzIHRo ZSBtZGV2IHN1cHBvcnQgaW4gUENJIGJ1cyBkcml2ZXIuIEEgbWRldg0KPiBkcml2ZXIgaXMgaW50 cm9kdWNlZCB0byBwcm9iZSB0aGUgbWRldiBkZXZpY2VzIHdob3NlIGRldmljZQ0KPiBBUEkgaXMg InZmaW8tcGNpIiBvbiB0aGUgbWRldiBidXMuDQo+IA0KPiBQUy4gVGhlcmUgYXJlIHNvbWUgaGFj a3MgaW4gdGhpcyBwYXRjaCBmb3Igbm93Lg0KPiANCj4gU2lnbmVkLW9mZi1ieTogQ3VubWluZyBM aWFuZyA8Y3VubWluZy5saWFuZ0BpbnRlbC5jb20+DQo+IFNpZ25lZC1vZmYtYnk6IFRpd2VpIEJp ZSA8dGl3ZWkuYmllQGludGVsLmNvbT4NCj4gLS0tDQo+IGRyaXZlcnMvYnVzL3BjaS9NYWtlZmls ZSAgICAgICAgICAgICAgfCAgID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