From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E3BB8160 for ; Mon, 18 Dec 2017 18:09:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2017 09:09:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,422,1508828400"; d="scan'208";a="159819736" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 18 Dec 2017 09:09:23 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 18 Dec 2017 09:09:11 -0800 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.21]) by fmsmsx122.amr.corp.intel.com ([169.254.5.176]) with mapi id 14.03.0319.002; Mon, 18 Dec 2017 09:04:24 -0800 From: "Wiles, Keith" To: Adrien Mazarguil CC: "Yigit, Ferruh" , "dev@dpdk.org" , Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v1 2/3] net/hyperv: implement core functionality Thread-Index: AQHTeB/faMALlTGZEkWU+e8tKrmfGaNJ2luA Date: Mon, 18 Dec 2017 17:04:23 +0000 Message-ID: References: <20171124172132.GW4062@6wind.com> <20171218162443.12971-1-adrien.mazarguil@6wind.com> <20171218162443.12971-3-adrien.mazarguil@6wind.com> In-Reply-To: <20171218162443.12971-3-adrien.mazarguil@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.72.149] Content-Type: text/plain; charset="utf-8" Content-ID: <547E46EC813E8E40BEC6718B10276360@intel.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 2/3] net/hyperv: implement core functionality 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: Mon, 18 Dec 2017 17:09:26 -0000 DQoNCj4gT24gRGVjIDE4LCAyMDE3LCBhdCAxMDo0NiBBTSwgQWRyaWVuIE1hemFyZ3VpbCA8YWRy aWVuLm1hemFyZ3VpbEA2d2luZC5jb20+IHdyb3RlOg0KPiANCj4gQXMgZGVzY3JpYmVkIGluIG1v cmUgZGV0YWlscyBpbiB0aGUgYXR0YWNoZWQgZG9jdW1lbnRhdGlvbiAoc2VlIHBhdGNoDQo+IGNv bnRlbnRzKSwgdGhpcyB2aXJ0dWFsIGRldmljZSBkcml2ZXIgbWFuYWdlcyBOZXRWU0MgaW50ZXJm YWNlcyBpbiB2aXJ0dWFsDQo+IG1hY2hpbmVzIGhvc3RlZCBieSBIeXBlci1WL0F6dXJlIHBsYXRm b3Jtcy4NCj4gDQo+IFRoaXMgZHJpdmVyIGRvZXMgbm90IG1hbmFnZSB0cmFmZmljIG5vciBFdGhl cm5ldCBkZXZpY2VzIGRpcmVjdGx5OyBpdCBhY3RzDQo+IGFzIGEgdGhpbiBjb25maWd1cmF0aW9u IGxheWVyIHRoYXQgYXV0b21hdGljYWxseSBpbnN0YW50aWF0ZXMgYW5kIGNvbnRyb2xzDQo+IGZh aWwtc2FmZSBQTUQgaW5zdGFuY2VzIGNvbWJpbmluZyB0YXAgYW5kIFBDSSBzdWItZGV2aWNlcywg c28gdGhhdCBlYWNoDQo+IE5ldFZTQyBpbnRlcmZhY2UgaXMgZXhwb3NlZCBhcyBhIHNpbmdsZSBj b25zb2xpZGF0ZWQgcG9ydCB0byBEUERLDQo+IGFwcGxpY2F0aW9ucy4NCj4gDQo+IFBDSSBzdWIt ZGV2aWNlcyBiZWluZyBob3QtcGx1Z2dhYmxlIChlLm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