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 3E43BC314 for ; Mon, 18 May 2015 16:00:11 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 18 May 2015 07:00:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,453,1427785200"; d="scan'208";a="495066074" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by FMSMGA003.fm.intel.com with ESMTP; 18 May 2015 07:00:08 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 18 May 2015 22:00:07 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.23]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.50]) with mapi id 14.03.0224.002; Mon, 18 May 2015 22:00:05 +0800 From: "Liu, Yong" To: "Jiajia, SunX" , "dts@dpdk.org" Thread-Topic: =?utf-8?B?W2R0c10gW+KAmGR0cy12MeKAmSA1LzldIEFkZCBxZW11LWFnZW50LWd1ZXN0?= =?utf-8?Q?_for_QEMU_VM?= Thread-Index: AQHQkSiiDnvdH2k7cU+TFxK4TH2pNZ2Bw2Ug Date: Mon, 18 May 2015 14:00:05 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10DE4D38@SHSMSX103.ccr.corp.intel.com> References: <1431925646-1314-1-git-send-email-sunx.jiajia@intel.com> <1431925646-1314-6-git-send-email-sunx.jiajia@intel.com> In-Reply-To: <1431925646-1314-6-git-send-email-sunx.jiajia@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dts] =?utf-8?b?W+KAmGR0cy12MeKAmSA1LzldIEFkZCBxZW11LWFnZW50LWd1?= =?utf-8?q?est_for_QEMU_VM?= X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 14:00:14 -0000 TmVlZCBjaGVjayBjb3B5cmlnaHQgd2hldGhlciBxZW11LWFnZW50IGNhbiBiZSB1c2VkIGhlcmUu DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogZHRzIFttYWlsdG86ZHRz LWJvdW5jZXNAZHBkay5vcmddIE9uIEJlaGFsZiBPZiBzamlhamlheA0KPiBTZW50OiBNb25kYXks IE1heSAxOCwgMjAxNSAxOjA3IFBNDQo+IFRvOiBkdHNAZHBkay5vcmcNCj4gU3ViamVjdDogW2R0 c10gW+KAmGR0cy12MeKAmSA1LzldIEFkZCBxZW11LWFnZW50LWd1ZXN0IGZvciBRRU1VIFZNDQo+ IA0KPiBTaWduZWQtb2ZmLWJ5OiBzamlhamlheCA8c3VueC5qaWFqaWFAaW50ZWwuY29tPg0KPiAt LS0NCj4gIGRlcC9RTVAvcWVtdS1nYS1jbGllbnQgfCAyOTkNCj4gKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKw0KPiAgZGVwL1FNUC9xbXAucHkgICAgICAg ICB8IDE5MyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrDQo+ICAyIGZpbGVzIGNoYW5n ZWQsIDQ5MiBpbnNlcnRpb25zKCspDQo+ICBjcmVhdGUgbW9kZSAxMDA2NDQgZGVwL1FNUC9xZW11 LWdhLWNsaWVudA0KPiAgY3JlYXRlIG1vZGUgMTAwNjQ0IGRlcC9RTVAvcW1wLnB5DQo+IA0KPiBk aWZmIC0tZ2l0IGEvZGVwL1FNUC9xZW11LWdhLWNsaWVudCB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zZWxmLCBwcmVmaXhsZW4pOg0KPiArICAgICAgICBtYXNrID0g aW50KCcxJyAqIHByZWZpeGxlbiArICcwJyAqICgzMiAtIHByZWZpeGxlbiksIDIpDQo+ICsgICAg ICAgIHJldHVybiAnLicuam9pbihbc3RyKG1hc2sgPj4gMjQpLA0KPiArICAgICAgICAgICAgICAg ICAgICAgICAgIHN0cigobWFzayA+PiAxNikgJiAweGZmKSwNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgICBzdHIoKG1hc2sgPj4gOCkgJiAweGZmKSwNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICBzdHIobWFzayAmIDB4ZmYpXSkNCj4gKw0KPiArICAgIGRlZiBpZmNvbmZpZyhzZWxmKToN Cj4gKyAgICAgICAgbmlmcyA9IHNlbGYucWdhLm5ldHdvcmtfZ2V0X2ludGVyZmFjZXMoKQ0KPiAr DQo+ICsgICAgICAgIG1zZ3MgPSBbXQ0KPiArICAgICAgICBmb3IgbmlmIGluIG5pZnM6DQo+ICsg ICAgICAgICAgICBtc2dzLmFwcGVuZChuaWZbJ25hbWUnXSArICc6JykNCj4gKyAgICAgICAgICAg IGlmICdpcC1hZGRyZXNzZXMnIGluIG5pZjoNCj4gKyAgICAgICAgICAgICAgICBmb3IgaXBhZGRy IGluIG5pZlsnaXAtYWRkcmVzc2VzJ106DQo+ICsgICAgICAgICAgICAgICAgICAgIGlmIGlwYWRk clsnaXAtYWRkcmVzcy10eXBlJ10gPT0gJ2lwdjQnOg0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgYWRkciA9IGlwYWRkclsnaXAtYWRkcmVzcyddDQo+ICsgICAgICAgICAgICAgICAgICAgICAg ICBtYXNrID0NCj4gc2VsZi5fX2dlbl9pcHY0X25ldG1hc2soaW50KGlwYWRkclsncHJlZml4J10p KQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgbXNncy5hcHBlbmQoIlx0aW5ldCAlcyAgbmV0 bWFzayAlcyIgJSAoYWRkciwNCj4gb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GEgUU1QIGNvbW1h bmQgYW5kIHNlbmQgaXQgdG8gdGhlIFFNUCBNb25pdG9yLg0KPiArDQo+ICsgICAgICAgIEBwYXJh bSBuYW1lOiBjb21tYW5kIG5hbWUgKHN0cmluZykNCj4gKyAgICAgICAgQHBhcmFtIGFyZ3M6IGNv bW1hbmQgYXJndW1lbnRzIChkaWN0KQ0KPiArICAgICAgICBAcGFyYW0gaWQ6IGNvbW1hbmQgaWQg KGRpY3QsIGxpc3QsIHN0cmluZyBvciBpbnQpDQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBx bXBfY21kID0geyAnZXhlY3V0ZSc6IG5hbWUgfQ0KPiArICAgICAgICBpZiBhcmdzOg0KPiArICAg ICAgICAgICAgcW1wX2NtZFsnYXJndW1lbnRzJ10gPSBhcmdzDQo+ICsgICAgICAgIGlmIGlkOg0K PiArICAgICAgICAgICAgcW1wX2NtZFsnaWQnXSA9IGlkDQo+ICsgICAgICAgIHJldHVybiBzZWxm LmNtZF9vYmoocW1wX2NtZCkNCj4gKw0KPiArICAgIGRlZiBjb21tYW5kKHNlbGYsIGNtZCwgKipr d2RzKToNCj4gKyAgICAgICAgcmV0ID0gc2VsZi5jbWQoY21kLCBrd2RzKQ0KPiArICAgICAgICBp ZiBub3QgcmV0Og0KPiArICAgICAgICAgICAgcmV0dXJuDQo+ICsgICAgICAgIGVsc2U6DQo+ICsg ICAgICAgICAgICBpZiByZXQuaGFzX2tleSgnZXJyb3InKToNCj4gKyAgICAgICAgICAgICAgICBy YWlzZSBFeGNlcHRpb24ocmV0WydlcnJvciddWydkZXNjJ10pDQo+ICsgICAgICAgICAgICByZXR1 cm4gcmV0WydyZXR1cm4nXQ0KPiArDQo+ICsgICAgZGVmIHB1bGxfZXZlbnQoc2VsZiwgd2FpdD1G YWxzZSk6DQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBHZXQgYW5kIGRlbGV0ZSB0aGUgZmly c3QgYXZhaWxhYmxlIFFNUCBldmVudC4NCj4gKw0KPiArICAgICAgICBAcGFyYW0gd2FpdDogYmxv Y2sgdW50aWwgYW4gZXZlbnQgaXMgYXZhaWxhYmxlIChib29sKQ0KPiArICAgICAgICAiIiINCj4g KyAgICAgICAgc2VsZi5fX3NvY2suc2V0YmxvY2tpbmcoMCkNCj4gKyAgICAgICAgdHJ5Og0KPiAr ICAgICAgICAgICAgc2VsZi5fX2pzb25fcmVhZCgpDQo+ICsgICAgICAgIGV4Y2VwdCBzb2NrZXQu ZXJyb3IsIGVycjoNCj4gKyAgICAgICAgICAgIGlmIGVyclswXSA9PSBlcnJuby5FQUdBSU46DQo+ ICsgICAgICAgICAgICAgICAgIyBObyBkYXRhIGF2YWlsYWJsZQ0KPiArICAgICAgICAgICAgICAg IHBhc3MNCj4gKyAgICAgICAgc2VsZi5fX3NvY2suc2V0YmxvY2tpbmcoMSkNCj4gKyAgICAgICAg aWYgbm90IHNlbGYuX19ldmVudHMgYW5kIHdhaXQ6DQo+ICsgICAgICAgICAgICBzZWxmLl9fanNv bl9yZWFkKG9ubHlfZXZlbnQ9VHJ1ZSkNCj4gKyAgICAgICAgZXZlbnQgPSBzZWxmLl9fZXZlbnRz WzBdDQo+ICsgICAgICAgIGRlbCBzZWxmLl9fZXZlbnRzWzBdDQo+ICsgICAgICAgIHJldHVybiBl dmVudA0KPiArDQo+ICsgICAgZGVmIGdldF9ldmVudHMoc2VsZiwgd2FpdD1GYWxzZSk6DQo+ICsg ICAgICAgICIiIg0KPiArICAgICAgICBHZXQgYSBsaXN0IG9mIGF2YWlsYWJsZSBRTVAgZXZlbnRz Lg0KPiArDQo+ICsgICAgICAgIEBwYXJhbSB3YWl0OiBibG9jayB1bnRpbCBhbiBldmVudCBpcyBh dmFpbGFibGUgKGJvb2wpDQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBzZWxmLl9fc29jay5z ZXRibG9ja2luZygwKQ0KPiArICAgICAgICB0cnk6DQo+ICsgICAgICAgICAgICBzZWxmLl9fanNv bl9yZWFkKCkNCj4gKyAgICAgICAgZXhjZXB0IHNvY2tldC5lcnJvciwgZXJyOg0KPiArICAgICAg ICAgICAgaWYgZXJyWzBdID09IGVycm5vLkVBR0FJTjoNCj4gKyAgICAgICAgICAgICAgICAjIE5v IGRhdGEgYXZhaWxhYmxlDQo+ICsgICAgICAgICAgICAgICAgcGFzcw0KPiArICAgICAgICBzZWxm Ll9fc29jay5zZXRibG9ja2luZygxKQ0KPiArICAgICAgICBpZiBub3Qgc2VsZi5fX2V2ZW50cyBh bmQgd2FpdDoNCj4gKyAgICAgICAgICAgIHNlbGYuX19qc29uX3JlYWQob25seV9ldmVudD1UcnVl KQ0KPiArICAgICAgICByZXR1cm4gc2VsZi5fX2V2ZW50cw0KPiArDQo+ICsgICAgZGVmIGNsZWFy X2V2ZW50cyhzZWxmKToNCj4gKyAgICAgICAgIiIiDQo+ICsgICAgICAgIENsZWFyIGN1cnJlbnQg bGlzdCBvZiBwZW5kaW5nIGV2ZW50cy4NCj4gKyAgICAgICAgIiIiDQo+ICsgICAgICAgIHNlbGYu X19ldmVudHMgPSBbXQ0KPiArDQo+ICsgICAgZGVmIGNsb3NlKHNlbGYpOg0KPiArICAgICAgICBz ZWxmLl9fc29jay5jbG9zZSgpDQo+ICsgICAgICAgIHNlbGYuX19zb2NrZmlsZS5jbG9zZSgpDQo+ ICsNCj4gKyAgICB0aW1lb3V0ID0gc29ja2V0LnRpbWVvdXQNCj4gKw0KPiArICAgIGRlZiBzZXR0 aW1lb3V0KHNlbGYsIHRpbWVvdXQpOg0KPiArICAgICAgICBzZWxmLl9fc29jay5zZXR0aW1lb3V0 KHRpbWVvdXQpDQo+IC0tDQo+IDEuOS4wDQoNCg==