From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 37608B6AB for ; Mon, 18 May 2015 10:58:55 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 18 May 2015 01:58:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,452,1427785200"; d="scan'208";a="494965138" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by FMSMGA003.fm.intel.com with ESMTP; 18 May 2015 01:58:52 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 18 May 2015 16:58:51 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.94]) by SHSMSX101.ccr.corp.intel.com ([10.239.4.153]) with mapi id 14.03.0224.002; Mon, 18 May 2015 16:58:50 +0800 From: "Jiajia, SunX" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: =?utf-8?B?W2R0c10gW+KAmGR0cy12MeKAmSAxLzldIEFic3RyYWN0IHRoZSBOSUMgZGV2?= =?utf-8?Q?ice_as_the_single_class_NetDevice?= Thread-Index: AQHQkSiS71vZazlmDkWssXfyBWuucp2A1R8AgACVx6A= Date: Mon, 18 May 2015 08:58:49 +0000 Message-ID: References: <1431925646-1314-1-git-send-email-sunx.jiajia@intel.com> <1431925646-1314-2-git-send-email-sunx.jiajia@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: BFmk B0TN CR8q CbMt Ek2/ FtoX GFCk GJfV GXra GsUl H1zR Ief+ Iwwe I5Hd JB80 JMBF; 1; ZAB0AHMAQABkAHAAZABrAC4AbwByAGcA; Sosha1_v1; 7; {C3080289-D255-47F6-8E60-12EC44E756AF}; cwB1AG4AeAAuAGoAaQBhAGoAaQBhAEAAaQBuAHQAZQBsAC4AYwBvAG0A; Mon, 18 May 2015 08:58:47 GMT; UgBFADoAIABbAGQAdABzAF0AIABbABggZAB0AHMALQB2ADEAGSAgADEALwA5AF0AIABBAGIAcwB0AHIAYQBjAHQAIAB0AGgAZQAgAE4ASQBDACAAZABlAHYAaQBjAGUAIABhAHMAIAB0AGgAZQAgAHMAaQBuAGcAbABlACAAYwBsAGEAcwBzACAATgBlAHQARABlAHYAaQBjAGUA x-cr-puzzleid: {C3080289-D255-47F6-8E60-12EC44E756AF} 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+KAmGR0cy12MeKAmSAxLzldIEFic3RyYWN0IHRoZSBOSUMg?= =?utf-8?q?device_as_the_single_class_NetDevice?= 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 08:58:56 -0000 SGkgSHVpbG9uZywNCg0KUGxlYXNlIHNlZSBteSBjb21tZW50cyBhcyBiZWxvdy4NCg0KPiAtLS0t LU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBYdSwgSHVpbG9uZ1gNCj4gU2VudDogTW9u ZGF5LCBNYXkgMTgsIDIwMTUgMzo0NyBQTQ0KPiBUbzogSmlhamlhLCBTdW5YOyBkdHNAZHBkay5v cmcNCj4gU3ViamVjdDogUkU6IFtkdHNdIFvigJhkdHMtdjHigJkgMS85XSBBYnN0cmFjdCB0aGUg TklDIGRldmljZSBhcyB0aGUgc2luZ2xlDQo+IGNsYXNzIE5ldERldmljZQ0KPiANCj4gSGkgSmlh amlhLA0KPiBJIGhhdmUgdHdvIGNvbW1lbnRzIGluIHRoaXMgcGF0Y2gsDQo+IFdvdWxkIHlvdSBj aG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ArICAgICAgICBHZXQgdGhlIHBjaSBpZCBvZiBzcGVjaWZpZWQgcGNpIGRldmljZSBvbiBsaW51 eC4NCj4gICAgICAgICAgIiIiDQo+IC0gICAgICAgIG91dCA9IHNlbGYuc2VuZF9leHBlY3QoJ2lm Y29uZmlnICVzJyAlIGludGYsICcjICcpDQo+IC0gICAgICAgIHJleHAgPSByImV0aGVyIChbXGRh LWY6XSopIg0KPiArICAgICAgICBvdXQgPSBzZWxmLnNlbmRfZXhwZWN0KCJjYXQNCj4gL3N5cy9i dXMvcGNpL2RldmljZXMvMDAwMFw6JXNcOiVzL3VldmVudCIgJQ0KPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChidXNfaWQsIGRldmZ1bl9pZCksICIjICIsDQo+IGFsdF9zZXNzaW9u PVRydWUpDQo+ICsgICAgICAgIHJleHAgPSByIlBDSV9JRD0oLispIg0KPiAgICAgICAgICBwYXR0 ZXJuID0gcmUuY29tcGlsZShyZXhwKQ0KPiAtICAgICAgICBtYXRjaCA9IHBhdHRlcm4uZmluZGFs bChvdXQpDQo+IC0gICAgICAgIHJldHVybiBtYXRjaFswXQ0KPiArICAgICAgICBtYXRjaCA9IHJl LnNlYXJjaChvdXQpDQo+ICsgICAgICAgIGlmIG5vdCBtYXRjaDoNCj4gKyAgICAgICAgICAgIHJl dHVybiBOb25lDQo+ICsgICAgICAgIHJldHVybiBtYXRjaC5ncm91cCgxKQ0KPiANCj4gICAgICBk ZWYgZ2V0X2RldmljZV9udW1hKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkKToNCj4gICAgICAgICAg IiIiDQo+IC0gICAgICAgIEdldCBudW1hIGlkIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlDQo+ICsg ICAgICAgIEdldCBudW1hIG51bWJlciBvZiBzcGVjaWZpZWQgcGNpIGRldmljZS4NCj4gKyAgICAg ICAgIiIiDQo+ICsgICAgICAgIGdldF9kZXZpY2VfbnVtYSA9IGdldGF0dHIoDQo+ICs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+ICAgICAgICAg IGlmIHNlbGYucG9ydHNfbWFwIGlzIE5vbmUgb3IgbGVuKHNlbGYucG9ydHNfbWFwKSA9PSAwOg0K PiAgICAgICAgICAgICAgcmFpc2UgVmFsdWVFcnJvcigicG9ydHNfbWFwIHNob3VsZCBub3QgYmUg ZW1wdHksIHBsZWFzZQ0KPiBjaGVjayBhbGwgbGlua3MiKQ0KPiANCj4gKyAgICAgICAgIyBpbml0 aWFsaXplIHZpcnR1YWxpemF0aW9uIHJlc291cmNlIHBvb2wNCj4gKyAgICAgICAgc2VsZi52aXJ0 X3Bvb2wgPSBWaXJ0UmVzb3VyY2Uoc2VsZikNCj4gKw0KPiAgICAgIGRlZiByZXN0b3JlX2ludGVy ZmFjZXMoc2VsZik6DQo+ICAgICAgICAgICIiIg0KPiAgICAgICAgICBSZXN0b3JlIGFsbCBwb3J0 cydzIGludGVyZmFjZXMuDQo+IEBAIC0xOTUsMjAgKzIyMywyMiBAQCBjbGFzcyBEdXQoQ3JiKToN Cj4gICAgICAgICAgICAgIHBjaV9idXMgPSBwb3J0WydwY2knXQ0KPiAgICAgICAgICAgICAgcGNp X2lkID0gcG9ydFsndHlwZSddDQo+ICAgICAgICAgICAgICAjIGdldCBkZXZpY2UgZHJpdmVyDQo+ IC0gICAgICAgICAgICBkcml2ZXIgPSBkdHMuZ2V0X25pY19kcml2ZXIocGNpX2lkKQ0KPiArICAg ICAgICAgICAgZHJpdmVyID0gc2V0dGluZ3MuZ2V0X25pY19kcml2ZXIocGNpX2lkKQ0KPiAgICAg ICAgICAgICAgaWYgZHJpdmVyIGlzIG5vdCBOb25lOg0KPiAgICAgICAgICAgICAgICAgICMgdW5i aW5kIGRldmljZSBkcml2ZXINCj4gICAgICAgICAgICAgICAgICBhZGRyX2FycmF5ID0gcGNpX2J1 cy5zcGxpdCgnOicpDQo+ICAgICAgICAgICAgICAgICAgYnVzX2lkID0gYWRkcl9hcnJheVswXQ0K PiAgICAgICAgICAgICAgICAgIGRldmZ1bl9p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BpbiBzZWxmLnBvcnRzX2luZm86DQo+ICsgICAgICAgICAgICBpZiBwY2lf YnVzID09IHBvcnRfaW5mb1sncGNpJ106DQo+ICsgICAgICAgICAgICAgICAgcG9ydCA9IHBvcnRf aW5mb1sncG9ydCddDQo+ICsgICAgICAgICAgICAgICAgYnJlYWsNCj4gKyAgICAgICAgaWYgcG9y dCBhbmQgcG9ydC5nZXRfaXB2NF9hZGRyKCkgPT0gY3Jic1snSVAnXS5zdHJpcCgpOg0KPiArICAg ICAgICAgICAgcmV0dXJuIFRydWUNCj4gKyAgICAgICAgZWxzZToNCj4gKyAgICAgICAgICAgIHJl dHVybiBGYWxzZQ0KPiArDQo+ICAgICAgZGVmIGJpbmRfaW50ZXJmYWNlc19saW51eChzZWxmLCBk cml2ZXI9J2lnYl91aW8nLA0KPiBuaWNzX3RvX2JpbmQ9Tm9uZSk6DQo+ICAgICAgICAgICIiIg0K PiAgICAgICAgICBCaW5kIHRoZSBpbnRlcmZhY2VzIHRvIHRoZSBzZWxlY3RlZCBkcml2ZXIuIG5p Y3NfdG9fYmluZCBjYW4NCj4gYmUgTm9uZQ0KPiBAQCAtMjc1LDEyICszMjIsMTcgQEAgY2xhc3Mg RHV0KENyYik6DQo+IA0KPiAgICAgICAgICBjdXJyZW50X25pYyA9IDANCj4gICAgICAgICAgZm9y IChwY2lfYnVzLCBwY2lfaWQpIGluIHNlbGYucGNpX2RldmljZXNfaW5mbzoNCj4gLSAgICAgICAg ICAgIGlmIGR0cy5hY2NlcHRlZF9uaWMocGNpX2lkKToNCj4gKyAgICAgICAgICAgIGlmIHNldHRp bmdzLmFjY2VwdGVkX25pYyhwY2lfaWQpOg0KPiArICAgICAgICAgICAgICAgIGlmIHNlbGYuaXNf c3NoX3Nlc3Npb25fcG9ydChwY2lfYnVzKToNCj4gKyAgICAgICAgICAgICAgICAgICAgY29udGlu dWUNCj4gDQo+ICAgICAgICAgICAgICAgICAgaWYgbmljc190b19iaW5kIGlzIE5vbmUgb3IgY3Vy cmVudF9uaWMgaW4gbmljc190b19iaW5kOg0KPiAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5n X2xpc3QgKz0gJyVzICcgJSAocGNpX2J1cykNCj4gDQo+ICAgICAgICAgICAgICAgICAgY3VycmVu dF9uaWMgKz0gMQ0KPiArICAgICAgICBpZiBjdXJyZW50X25pYyA9PSAwOg0KPiArICAgICAgICAg ICAgc2VsZi5sb2dnZXIuaW5mbygiTm90IG5pYyBuZWVkIGJpbmQgZHJpdmVyOiAlcyIgJSBkcml2 ZXIpDQo+ICsgICAgICAgICAgICByZXR1cm4NCj4gDQo+ICAgICAgICAgIHNlbGYuc2VuZF9leHBl Y3QoJ3Rvb2xzL2RwZGtfbmljX2JpbmQucHkgJXMnICUgYmluZGluZ19saXN0LA0KPiAnIyAnKQ0K PiANCj4gQEAgLTI5MywxMyArMzQ1LDE5IEBAIGNsYXNzIER1dChDcmIpOg0KPiANCj4gICAgICAg ICAgY3VycmVudF9uaWMgPSAwDQo+ICAgICAgICAgIGZvciAocGNpX2J1cywgcGNpX2lkKSBpbiBz ZWxmLnBjaV9kZXZpY2VzX2luZm86DQo+IC0gICAgICAgICAgICBpZiBkdHMuYWNjZXB0ZWRfbmlj KHBjaV9pZCk6DQo+ICsgICAgICAgICAgICBpZiBzZXR0aW5ncy5hY2NlcHRlZF9uaWMocGNpX2lk KToNCj4gKyAgICAgICAgICAgICAgICBpZiBzZWxmLmlzX3NzaF9zZXNzaW9uX3BvcnQocGNpX2J1 cyk6DQo+ICsgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlDQo+IA0KPiAgICAgICAgICAgICAg ICAgIGlmIG5pY3NfdG9fYmluZCBpcyBOb25lIG9yIGN1cnJlbnRfbmljIGluIG5pY3NfdG9fYmlu ZDoNCj4gICAgICAgICAgICAgICAgICAgICAgYmluZGluZ19saXN0ICs9ICclcyAnICUgKHBjaV9i dXMpDQo+IA0KPiAgICAgICAgICAgICAgICAgIGN1cnJlbnRfbmljICs9IDENC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cG9ydHMuYXBwZW5kKHBvcnRpZCkNCj4gKyAgICAgICAgICAg ICAgICAgICAgaWYgKHNvY2tldCBpcyBOb25lIG9yDQo+ICsgICAgICAgICAgICAgICAgICAgICAg ICBzZWxmLnBvcnRzX2luZm9bcG9ydGlkXVsnbnVtYSddID09IC0xIG9yDQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgc29ja2V0ID09IHNlbGYucG9ydHNfaW5mb1twb3J0aWRdWydudW1h J10pOg0KPiArICAgICAgICAgICAgICAgICAgICAgICAgcG9ydHMuYXBwZW5kKHBvcnRpZCkNCj4g ICAgICAgICAgICAgIHJldHVybiBwb3J0cw0KPiAgICAgICAgICBlbHNlOg0KPiAgICAgICAgICAg ICAgZm9yIHBvcnRpZCBpbiByYW5nZShsZW4oc2VsZi5wb3J0c19pbmZvKSk6DQo+IEBAIC00NDAs MzYgKzUwMSwzOCBAQCBjbGFzcyBEdXQoQ3JiKToNCj4gICAgICAgICAgQ2hlY2sgdGhhdCB3aGV0 aGVyIGF1dG8gc2Nhbm5lZCBwb3J0cyByZWFkeSB0byB1c2UNCj4gICAgICAgICAgIiIiDQo+ICAg ICAgICAgIHBjaV9hZGRyID0gIiVzOiVzIiAlIChwY2lfYnVzLCBwY2lfaWQpDQo+IC0gICAgICAg IGlmIHNlbGYubmljID09ICdhbnknOg0KPiArICAgICAgICBpZiBzZWxmLm5pY190eXBlID09ICdh bnknOg0KPiAgICAgICAgICAgICAgcmV0dXJuIFRydWUNCj4gLSAgICAgICAgZWxpZiBzZWxmLm5p YyA9PSAnY2ZnJzoNCj4gKyAgICAgICAgZWxpZiBzZWxmLm5pY190eXBlID09ICdjZmcnOg0KPiAg ICAgICAgICAgICAgaWYgc2VsZi5jb25mLmNoZWNrX3BvcnRfYXZhaWxhYmxlKHBjaV9idXMpIGlz IFRydWU6DQo+ICAgICAgICAgICAgICAgICAgcmV0dXJuIFRydWUNCj4gLSAgICAgICAgZWxpZiBz ZWxmLm5pYyBub3QgaW4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CwgJ251bWEnOg0KPiBu dW1hfSkNCj4gDQo+ICAgICAgZGVmIHNjYW5fcG9ydHNfdW5jYWNoZWRfZnJlZWJzZChzZWxmKToN Cj4gICAgICAgICAgIiIiDQo+IEBAIC01MjgsMTYgKzYwOSwxNyBAQCBjbGFzcyBEdXQoQ3JiKToN Cj4gICAgICAgICAgIiIiDQo+ICAgICAgICAgIHNlbGYucG9ydHNfaW5mbyA9IFtdDQo+IA0KPiAt ICAgICAgICBza2lwcGVkID0gZHRzLlJFRCgnU2tpcHBlZDogVW5rbm93bi9ub3Qgc2VsZWN0ZWQn KQ0KPiArICAgICAgICBza2lwcGVkID0gUkVEKCdTa2lwcGVkOiBVbmtub3duL25vdCBzZWxlY3Rl ZCcpDQo+IA0KPiAgICAgICAgICBmb3IgKHBjaV9idXMsIHBjaV9pZCkgaW4gc2VsZi5wY2lfZGV2 aWNlc19pbmZvOg0KPiANCj4gLSAgICAgICAgICAgIGlmIG5vdCBkdHMuYWNjZXB0ZWRfbmljKHBj aV9pZCk6DQo+ICsgICAgICAgICAgICBpZiBub3Qgc2V0dHRpbmdzLmFjY2VwdGVkX25pYyhwY2lf aWQpOg0KPiAgICAgICAgICAgICAgICAgIHNlbGYubG9nZ2VyLmluZm8oIkRVVDogWyVzICVzXSAl cyIgJSAocGNpX2J1cywgcGNpX2lkLA0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc2tpcHBlZCkpDQo+ICAgICAgICAgICAgICAgICAgY29u dGludWUNCj4gDQo+IC0gICAgICAgICAgICBpbnRmID0gc2VsZi5nZXRfaW50ZXJmYWNlX25hbWUo cGNpX2J1cykNCj4gKyAgICAgICAgICAgIHBvcnQgPSBOZXREZXZpY2Uoc2VsZiwgcGNpX2J1cywg JycpDQo+ICsgICAgICAgICAgICBpbnRmID0gcG9ydC5nZXRfaW50ZXJmYWNlX25hbWUocGNpX2J1 cykNCj4gDQo+ICAgICAgICAgICAgICBtYW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ZWQgcGNpIGRldmljZSBvbiBsaW51eC4NCj4gKyAgICAgICAgIiIi DQo+ICsgICAgICAgIHRyeToNCj4gKyAgICAgICAgICAgIGdldF9tYWNfYWRkcl9saW51eCA9IGdl dGF0dHIoDQo+ICsgICAgICAgICAgICAgICAgc2VsZiwNCj4gKyAgICAgICAgICAgICAgICAnZ2V0 X21hY19hZGRyX2xpbnV4XyVzJyAlDQo+ICsgICAgICAgICAgICAgICAgZHJpdmVyKQ0KPiArICAg ICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6DQo+ICsgICAgICAgICAgICBnZW5lcmljX2RyaXZl ciA9ICdnZW5lcmljJw0KPiArICAgICAgICAgICAgZ2V0X21hY19hZGRyX2xpbnV4ID0gZ2V0YXR0 cigNCj4gKyAgICAgICAgICAgICAgICBzZWxmLA0KPiArICAgICAgICAgICAgICAgICdnZXRfbWFj X2FkZHJfbGludXhfJXMnICUNCj4gKyAgICAgICAgICAgICAgICBnZW5lcmljX2RyaXZlcikNCj4g Kw0KPiArICAgICAgICByZXR1cm4gZ2V0X21hY19hZGRyX2xpbnV4KGludGYsIGJ1c19pZCwgZGV2 ZnVuX2lkLCBkcml2ZXIpDQo+ICsNCj4gKyAgICBkZWYgZ2V0X3BjaV9pZChzZWxmLCBidXNfaWQs IGRldmZ1bl9pZCk6DQo+ICsgICAgICAgIGNvbW1hbmQgPSAoJ2NhdCAvc3lzL2J1cy9wY2kvZGV2 aWNlcy8wMDAwXDolc1w6JXMvdmVuZG9yJyAlDQo+ICsgICAgICAgICAgICAgICAgICAgKGJ1c19p ZCwgZGV2ZnVuX2lkKSkNCj4gKyAgICAgICAgb3V0ID0gc2VsZi5fX3NlbmRfZXhwZWN0KGNvbW1h bmQsICcjICcpDQo+ICsgICAgICAgIHZlbmRlciA9IG91dFsyOl0NCj4gKyAgICAgICAgY29tbWFu ZCA9ICgnY2F0IC9zeXMvYnVzL3BjaS9kZXZpY2VzLzAwMDBcOiVzXDolcy9kZXZpY2UnICUNC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AgICAgICAgIiIiDQo+ICsgICAgICAgIEdldCBJ UHY0IGFkZHJlc3MgYnkgdGhlIGRlZmF1bHQgd2F5IG9uIGxpbnV4Lg0KPiArICAgICAgICAiIiIN Cj4gKyAgICAgICAgb3V0ID0gc2VsZi5fX3NlbmRfZXhwZWN0KCJpcCAtZmFtaWx5IGluZXQgYWRk cmVzcyBzaG93IGRldiAlcw0KPiB8IGF3ayAnL2luZXQvIHsgcHJpbnQgJDIgfSciDQo+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAlIGludGYsICIjICIpDQo+ICsgICAgICAgIHJl dHVybiBvdXQuc3BsaXQoJy8nKVswXQ0KPiArDQo+ICsgICAgZGVmIGdldF9pcHY0X2FkZHJfZnJl ZWJzZChzZWxmLCBpbnRmLCBkcml2ZXIpOg0KPiArICAgICAgICAiIiINCj4gKyAgICAgICAgR2V0 IGlwdjQgYWRkcmVzcyBvZiBzcGVjaWZpZWQgcGNpIGRldmljZSBvbiBGcmVlYnNkLg0KPiArICAg ICAgICAiIiINCj4gKyAgICAgICAgdHJ5Og0KPiArICAgICAgICAgICAgZ2V0X2lwdjRfYWRkcl9m cmVlYnNkID0gZ2V0YXR0cigNCj4gKyAgICAgICAgICAgICAgICBzZWxmLA0KPiArICAgICAgICAg ICAgICAgICdnZXRfaXB2NF9hZGRyX2ZyZWVic2RfJXMnICUNCj4gKyAgICAgICAgICAgICAgICBk cml2ZXIpDQo+ICsgICAgICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToNCj4gKyAgICAgICAgICAg IGdlbmVyaWNfZHJpdmVyID0gJ2dlbmVyaWMnDQo+ICsgICAgICAgICAgICBnZXRfaXB2NF9hZGRy X2ZyZWVic2QgPSBnZXRhdHRyKA0KPiArICAgICAgICAgICAgICAgIHNlbGYsDQo+ICsgICAgICAg ICAgICAgICAgJ2dldF9pcHY0X2FkZHJfZnJlZWJzZF8lcycgJQ0KPiArICAgICAgICAgICAgICAg IGdlbmVyaWNfZHJp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j4gfCBhd2sgJy9pbmV0Ni8geyBwcmludCAkMiB9JyINCj4gKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICUgaW50ZiwgIiMgIikNCj4gKyAgICAgICAgcmV0 dXJuIG91dC5zcGxpdCgnLycpWzBdDQo+ICsNCj4gKyAgICBkZWYgZ2V0X2lwdjZfYWRkcl9mcmVl YnNkKHNlbGYsIGludGYsIGRyaXZlcik6DQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBHZXQg aXB2NiBhZGRyZXNzIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlIG9uIEZyZWVic2QuDQo+ICsgICAg ICAgICIiIg0KPiArICAgICAgICB0cnk6DQo+ICsgICAgICAgICAgICBnZXRfaXB2Nl9hZGRyX2Zy ZWVic2QgPSBnZXRhdHRyKA0KPiArICAgICAgICAgICAgICAgIHNlbGYsDQo+ICsgICAgICAgICAg ICAgICAgJ2dldF9pcHY2X2FkZHJfZnJlZWJzZF8lcycgJQ0KPiArICAgICAgICAgICAgICAgIGRy aXZlcikNCj4gKyAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0KPiArICAgICAgICAgICAg Z2VuZXJpY19kcml2ZXIgPSAnZ2VuZXJpYycNCj4gKyAgICAgICAgICAgIGdldF9pcHY2X2FkZHJf ZnJlZWJzZCA9IGdldGF0dHIoDQo+ICsgICAgICAgICAgICAgICAgc2VsZiwNCj4gKyAgICAgICAg ICAgICAgICAnZ2V0X2lwdjZfYWRkcl9mcmVlYnNkXyVzJyAlDQo+ICsgICAgICAgICAgICAgICAg Z2VuZXJpY19kcml2ZXIpDQo+ICsNCj4gKyAgICAgICAgcmV0dXJuIGdldF9pcHY2X2FkZHJfZnJl ZWJzZChpbnRmKQ0KPiArDQo+ICsgICAgZGVmIGdldF9pcHY2X2FkZHJfZnJlZWJzZF9nZW5lcmlj KHNlbGYsIGludGYpOg0KPiArICAgICAgICAiIiINCj4gKyAgICAgICAgR2V0IHRoZSBJUHY2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mRfZXhwZWN0KA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgImNhdCAlcyIgJQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgb3MucGF0 aC5qb2luKHZpcnRmbiwgInVldmVudCIpLCAiIyAiKQ0KPiArICAgICAgICAgICAgICAgICAgICB2 Zl9wY2kgPSByZS5zZWFyY2goDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICByIlBDSV9TTE9U X05BTUU9MDAwMDooWzAtOWEtZl0rOlswLTlhLWZdK1wuWzAtDQo+IDlhLWZdKykiLA0KPiArICAg ICAgICAgICAgICAgICAgICAgICAgdmZfdWV2ZW50KS5ncm91cCgxKQ0KPiArICAgICAgICAgICAg ICAgICAgICBzcmlvdl92ZnNfcGNpLmFwcGVuZCh2Zl9wY2kpDQo+ICsgICAgICAgICAgICBleGNl cHQgRXhjZXB0aW9uIGFzIGU6DQo+ICsgICAgICAgICAgICAgICAgcHJpbnQgIlNjYW4gbGludXgg cG9ydCBbMDAwMDolcy4lc10gc3Jpb3YgdmYNCj4gZmFpbGVkOiAlcyIgJSAoYnVzX2lkLCBkZXZm dW5faWQsIGUpDQo+ICsNCj4gKyAgICAgICAgcmV0dXJuIHNyaW92X3Zmc19wY2kNCj4gKw0KPiAr ICAgIEBuaWNfaGFzX2RyaXZlcg0KPiArICAgIGRlZiBnZW5lcmF0ZV9zcmlvdl92ZnMoc2VsZiwg dmZfbnVtKToNCj4gKyAgICAgICAgIiIiDQo+ICsgICAgICAgIEdlbmVyYXRlIHNvbWUgbnVtYmVy cyBvZiBTUklPViBWRi4NCj4gKyAgICAgICAgIiIiDQo+ICsgICAgICAgIGlmIHZmX251bSA9PSAw Og0KPiArICAgICAgICAgICAgc2VsZi5iaW5kX3ZmX2RyaXZlcigpDQo+ICsgICAgICAgIGdlbmVy YXRlX3NyaW92X3ZmcyA9IGdldGF0dHIoDQo+ICsgICAgICAgICAgICBzZWxmLCAnZ2VuZXJhdGVf c3Jpb3ZfdmZzXyVzJyAl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ICAgIHJl dHVybg0KPiArICAgICAgICAgICAgZHJpdmVyID0gc2VsZi5kZWZhdWx0X2RyaXZlcg0KPiArICAg ICAgICByZXQgPSBiaW5kX2RyaXZlcihzZWxmLmJ1c19pZCwgc2VsZi5kZXZmdW5faWQsIGRyaXZl cikNCj4gKyAgICAgICAgdGltZS5zbGVlcCgxKQ0KPiArICAgICAgICByZXR1cm4gcmV0DQo+ICsN Cj4gKyAgICBkZWYgYmluZF9kcml2ZXJfbGludXgoc2VsZiwgYnVzX2lkLCBkZXZmdW5faWQsIGRy aXZlcik6DQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBCaW5kIE5JQyBwb3J0IHRvIHNwZWNp ZmllZCBkcml2ZXIgb24gbGludXguDQo+ICsgICAgICAgICIiIg0KPiArICAgICAgICBkcml2ZXJf YWxpYXMgPSBkcml2ZXIucmVwbGFjZSgnLScsICdfJykNCj4gKyAgICAgICAgdHJ5Og0KPiArICAg ICAgICAgICAgYmluZF9kcml2ZXJfbGludXggPSBnZXRhdHRyKA0KPiArICAgICAgICAgICAgICAg IHNlbGYsDQo+ICsgICAgICAgICAgICAgICAgJ2JpbmRfZHJpdmVyX2xpbnV4XyVzJyAlDQo+ICsg ICAgICAgICAgICAgICAgZHJpdmVyX2FsaWFzKQ0KPiArICAgICAgICAgICAgcmV0dXJuIGJpbmRf ZHJpdmVyX2xpbnV4KGJ1c19pZCwgZGV2ZnVuX2lkKQ0KPiArICAgICAgICBleGNlcHQgRXhjZXB0 aW9uIGFzIGU6DQo+ICsgICAgICAgICAgICBkcml2ZXJfYWxpYXMgPSAnZ2VuZXJpYycNCj4gKyAg ICAgICAgICAgIGJpbmRfZHJpdmVyX2xpbnV4ID0gZ2V0YXR0cigNCj4gKyAgICAgICAgICAgICAg ICBzZWxmLA0KPiArICAgICAgICAgICAgICAgICdiaW5kX2RyaXZlcl9saW51eF8lcycgJQ0KPiAr ICAgICAgICAgICAgICAgIGRyaXZlcl9hbGlhcykNCj4gKyAgICAgICA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CkNCj4gKw0KPiArICAgICAgICAgICAgaXB2NiA9IHBvcnQuZ2V0X2lw djZfYWRkcigpDQo+IA0KPiAgICAgICAgICAgICAgIyBzdG9yZSB0aGUgcG9ydCBpbmZvIHRvIHBv cnQgbWFwcGluZw0KPiAtICAgICAgICAgICAgc2VsZi5wb3J0c19pbmZvLmFwcGVuZCh7J3BjaSc6 IHBjaV9idXMsDQo+ICsgICAgICAgICAgICBzZWxmLnBvcnRzX2luZm8uYXBwZW5kKHsncG9ydCc6 IHBvcnQsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAncGNpJzogcGNp X2J1cywNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogcGNp X2lkLA0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2ludGYnOiBpbnRm LA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hYyc6IG1hY2FkZHJ9 KQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hYyc6IG1hY2FkZHIs DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaXB2Nic6IGlwdjZ9KQ0K PiANCj4gICAgICBkZWYgc2VuZF9waW5nNihzZWxmLCBsb2NhbFBvcnQsIGlwdjYsIG1hYyk6DQo+ ICAgICAgICAgICIiIg0KPiAtLQ0KPiAxLjkuMA0KDQo=