From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from jaguar.aricent.com (jaguar.aricent.com [121.241.96.11]) by dpdk.org (Postfix) with ESMTP id CE73D5320 for ; Wed, 29 Jan 2014 09:55:10 +0100 (CET) Received: from jaguar.aricent.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id B1EB236B38; Wed, 29 Jan 2014 14:26:08 +0530 (IST) Received: from GUREXHT01.ASIAN.AD.ARICENT.COM (gurexht01.asian.ad.aricent.com [10.203.171.136]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by jaguar.aricent.com (Postfix) with ESMTP id 9608136B36; Wed, 29 Jan 2014 14:26:08 +0530 (IST) Received: from GUREXMB01.asian.ad.aricent.com ([10.203.171.134]) by GUREXHT01.ASIAN.AD.ARICENT.COM ([10.203.171.136]) with mapi; Wed, 29 Jan 2014 14:26:08 +0530 From: Prashant Upadhyaya To: "pshelar@nicira.com" , "dev@openvswitch.org" , "dev@dpdk.org" , "dpdk-ovs@lists.01.org" Date: Wed, 29 Jan 2014 14:26:05 +0530 Thread-Topic: [dpdk-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports. Thread-Index: Ac8bywpk60zUHcRzTku0aWDsNH3ngABA3mJw Message-ID: References: <1390873715-26714-1-git-send-email-pshelar@nicira.com> In-Reply-To: <1390873715-26714-1-git-send-email-pshelar@nicira.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-TM-AS-MML: No Cc: Gerald Rogers Subject: Re: [dpdk-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jan 2014 08:55:12 -0000 S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ZGsNCisNCisgICAgRFBE S19JTkNMVURFPSRSVEVfU0RLL2luY2x1ZGUNCisgICAgRFBES19MSUJfRElSPSRSVEVfU0RLL2xp Yg0KKyAgICBEUERLX0xJQlM9IiREUERLX0xJQl9ESVIvbGliZXRoZGV2LmEgXA0KKyAgICAgICAg ICAgICAgJERQREtfTElCX0RJUi9saWJydGVfY21kbGluZS5hIFwNCisgICAgICAgICAgICAgICRE UERLX0xJQl9ESVIvbGlicnRlX2hhc2guYSBcDQorICAgICAgICAgICAgICAkRFBES19MSUJfRElS L2xpYnJ0ZV9scG0uYSBcDQorICAgICAgICAgICAgICAkRFBES19MSUJfRElSL2xpYnJ0ZV9tYnVm LmEgXA0KKyAgICAgICAgICAgICAgJERQREtfTElCX0RJUi9saWJydGVfbWVtcG9vbC5hIFwNCisg ICAgICAgICAgICAgICREUERLX0xJQl9ESVIvbGlicnRlX2VhbC5hIFwNCisgICAgICAgICAgICAg ICREUERLX0xJQl9ESVIvbGlicnRlX3BtZF9yaW5nLmEgXA0KKyAgICAgICAgICAgICAgJERQREtf TElCX0RJUi9saWJydGVfbWFsbG9jLmEgXA0KKyAgICAgICAgICAgICAgJERQREtfTElCX0RJUi9s aWJydGVfcG1kX2l4Z2JlLmEgXA0KKyAgICAgICAgICAgICAgJERQREtfTElCX0RJUi9saWJydGVf cG1kX2UxMDAwLmEgXA0KKyAgICAgICAgICAgICAgJERQREtfTElCX0RJUi9saWJydGVfcG1kX3Zp cnRpby5hIFwNCisgICAgICAgICAgICAgICREUERLX0xJQl9ESVIvbGlicnRlX3JpbmcuYSINCisN CisgICAgTElCUz0iJERQREtfTElCUyAkTElCUyINCisgICAgQ1BQRkxBR1M9Ii1JJERQREtfSU5D TFVERSAkQ1BQRkxBR1MiDQorICAgIFNMSUNFX1NJWkU9IjQxOTQzMDQiDQorICAgIFNMSUNFX1NJ WkVfTUFYPSIxMDczNzQxODI0Ig0KKyAgICBMREZMQUdTPSIkTERGTEFHUyAtV2wsLWh1Z2V0bG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igiJXM6IGNhbm5vdCByZWNlaXZlIHBhY2tldHMgb24gdGhpcyBuZXR3b3JrIGRldmljZSAo JXMpIiwNCisgICAgICAgICAgICAgICAgICAgICBkZXZuYW1lLCBvdnNfc3RyZXJyb3IoZXJybm8p KTsNCisgICAgICAgICAgICBuZXRkZXZfY2xvc2UobmV0ZGV2KTsNCisgICAgICAgICAgICByZXR1 cm4gZXJyb3I7DQorICAgICAgICB9DQogICAgIH0NCg0KICAgICBlcnJvciA9IG5ldGRldl90dXJu X2ZsYWdzX29uKG5ldGRldiwgTkVUREVWX1BST01JU0MsICZzZik7DQogICAgIGlmIChlcnJvcikg ew0KLSAgICAgICAgbmV0ZGV2X3J4X2Nsb3NlKHJ4KTsNCisgICAgICAgIGZvciAoaSA9IDA7IGkg PCBuZXRkZXZfbnJfcngobmV0ZGV2KTsgaSsrKSB7DQorICAgICAgICAgICAgbmV0ZGV2X3J4X2Ns b3NlKHBvcnQtPnJ4W2ldKTsNCisgICAgICAgIH0NCiAgICAgICAgIG5ldGRldl9jbG9zZShuZXRk ZXYpOw0KKyAgICAgICAgZnJlZShwb3J0LT5yeCk7DQorICAgICAgICBmcmVlKHBvcnQpOw0KICAg ICAgICAgcmV0dXJuIGVycm9yOw0KICAgICB9DQotDQotICAgIHBvcnQgPSB4bWFsbG9jKHNpemVv ZiAqcG9ydCk7DQotICAgIHBvcnQtPnBvcnRfbm8gPSBwb3J0X25vOw0KLSAgICBwb3J0LT5uZXRk ZXYgPSBuZXRkZXY7DQogICAgIHBvcnQtPnNmID0gc2Y7DQotICAgIHBvcnQtPnJ4ID0gcng7DQot ICAgIHBvcnQtPnR5cGUgPSB4c3RyZHVwKHR5cGUpOw0KKw0KKyAgICBpZiAobmV0ZGV2X2lzX3Bt ZChuZXRkZXYpKSB7DQorICAgICAgICBkcC0+cG1kX2NvdW50Kys7DQorICAgICAgICBkcF9uZXRk ZXZfc2V0X3BtZF90aHJlYWRzKGRwLCBOUl9USFJFQURTKTsNCisgICAgICAg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SAoIWxhdGNoX2lzX3NldCgmZHAtPmV4aXRf bGF0Y2gpKSB7DQotICAgICAgICBib29sIHJlY2VpdmVkX2FueXRoaW5nOw0KLSAgICAgICAgaW50 IGk7DQorICAgIGZyZWUocG9sbF9saXN0KTsNCisgICAgcG9sbF9jbnQgPSAwOw0KKyAgICBpbmRl eCA9IDA7DQorDQorICAgIEhNQVBfRk9SX0VBQ0ggKHBvcnQsIG5vZGUsICZmLT5kcC0+cG9ydHMp IHsNCisgICAgICAgIGlmIChuZXRkZXZfaXNfcG1kKHBvcnQtPm5ldGRldikpIHsNCisgICAgICAg ICAgICBmb3IgKGkgPSAwOyBpIDwgbmV0ZGV2X25yX3J4KHBvcnQtPm5ldGRldik7IGkrKykgew0K DQotICAgICAgICBvdnNfcndsb2NrX3JkbG9jaygmZHAtPnBvcnRfcndsb2NrKTsNCi0gICAgICAg IGZvciAoaSA9IDA7IGkgPCA1MDsgaSsrKSB7DQotICAgICAgICAgICAgc3RydWN0IGRwX25ldGRl dl9wb3J0ICpwb3J0Ow0KLQ0KLSAgICAgICAgICAgIHJlY2VpdmVkX2FueXRoaW5nID0gZmFsc2U7 DQotICAgICAgICAgICAgSE1BUF9GT1JfRUFDSCAocG9ydCwgbm9kZSwgJmYtPmRwLT5wb3J0cykg ew0KLSAgICAgICAgICAgICAgICBpZiAocG9ydC0+cngNCi0gICAgICAgICAgICAgICAgICAgICYm IHBvcnQtPm5vZGUuaGFzaCA+PSBmLT5taW5faGFzaA0KLSAgICAgICAgICAgICAgICAgICAgJiYg cG9ydC0+bm9kZS5oYXNoIDw9IGYtPm1heF9oYXNoKSB7DQotICAgICAgICAgICAgICAgICAgICBp bnQgYnVmX3NpemU7DQotICAgICAgICAgICAgICAgICAgICBpbnQgZXJyb3I7DQotICAgICAgICAg ICAgICAgICAgICBpbnQgbXR1Ow0KLQ0KLSAgICAgICAgICAgICAgICAgICAgaWYgKG5ldGRldl9n ZXRfbXR1KHBvcnQtPm5ldGRldiwgJm10dSkpIHsNCi0gICAgICAgICAgICAgICAgICAgICAgICBt dHUgPSBFVEhfUEFZTE9BRF9NQVg7DQotICAgICAgICAgICAgICAgICAgICB9DQotICAgICAgICAg ICAgICAgICAgICBidWZfc2l6ZSA9IERQX05FVERFVl9IRUFEUk9PTSArIFZMQU5fRVRIX0hFQURF Ul9MRU4gKyBtdHU7DQotDQotICAgICAgICAgICAgICAgICAgICBvZnBidWZfY2xlYXIoJnBhY2tl dCk7DQotICAgICAgICAgICAgICAgICAgICBvZnBidWZfcmVzZXJ2ZV93aXRoX3RhaWxyb29tKCZw YWNrZXQsIERQX05FVERFVl9IRUFEUk9PTSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYnVmX3NpemUpOw0KLQ0KLSAgICAgICAgICAgICAgICAgICAg ZXJyb3IgPSBuZXRkZXZfcnhfcmVjdihwb3J0LT5yeCwgJnBhY2tldCk7DQotICAgICAgICAgICAg ICAgICAgICBpZiAoIWVycm9yKSB7DQotICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHBr dF9tZXRhZGF0YSBtZA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA9IFBLVF9NRVRBREFU QV9JTklUSUFMSVpFUihwb3J0LT5wb3J0X25vKTsNCi0gICAgICAgICAgICAgICAgICAgICAgICBk cF9uZXRkZXZfcG9ydF9pbnB1dChkcCwgJnBhY2tldCwgJm1kKTsNCi0NCi0gICAgICAgICAgICAg ICAgICAgICAgICByZWNlaXZlZF9hbnl0aGluZyA9IHRydWU7DQotICAgICAgICAgICAgICAgICAg ICB9IGVsc2UgaWYgKGVycm9yICE9IEVBR0FJTiAmJiBlcnJvciAhPSBFT1BOT1RTVVBQKSB7DQot ICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljIHN0cnVjdCB2bG9nX3JhdGVfbGltaXQgcmwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPSBWTE9HX1JBVEVfTElNSVRfSU5JVCgxLCA1 KTsNCi0NCi0gICAgICAgICAgICAgICAgICAgICAgICBWTE9HX0VSUl9STCgmcmwsICJlcnJvciBy ZWNlaXZpbmcgZGF0YSBmcm9tICVzOiAlcyIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbmV0ZGV2X2dldF9uYW1lKHBvcnQtPm5ldGRldiksDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgb3ZzX3N0cmVycm9yKGVycm9yKSk7DQotICAgICAgICAgICAg ICAgICAgICB9DQorICAgICAgICAgICAgICAgIGlmICgoaW5kZXggJSBkcC0+bl9wbWRfdGhyZWFk cykgPT0gcWlkKSB7DQorICAgICAgICAgICAgICAgICAgICBwb3J0X3JlZihwb3J0KTsNCisgICAg ICAgICAgICAgICAgICAgIHBvbGxfY250Kys7DQogICAgICAgICAgICAgICAgIH0NCisgICAgICAg ICAgICAgICAgaW5kZXgrKzsNCiAgICAgICAgICAgICB9DQorICAgICAgICB9DQorICAgIH0NCg0K LSAgICAgICAgICAgIGlmICghcmVjZWl2ZWRfYW55dGhpbmcpIHsNCi0gICAgICAgICAgICAgICAg YnJlYWs7DQorICAgIHBvbGxfbGlzdCA9IHh6YWxsb2Moc2l6ZW9mICpwb2xsX2xpc3QgKiBwb2xs X2NudCk7DQorICAgIHBvbGxfY250ID0gMDsNCisgICAgaW5kZXggPSAwOw0KKw0KKyAgICBITUFQ X0ZPUl9FQUNIIChwb3J0LCBub2RlLCAmZi0+ZHAtPnBvcnRzKSB7DQorICAgICAgICBpZiAobmV0 ZGV2X2lzX3BtZChwb3J0LT5uZXRkZXYpKSB7DQorICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8 IG5ldGRldl9ucl9yeChwb3J0LT5uZXRkZXYpOyBpKyspIHsNCisNCisgICAgICAgICAgICAgICAg aWYgKChpbmRleCAlIGRwLT5uX3BtZF90aHJlYWRzKSA9PSBxaWQpIHsNCisgICAgICAgICAgICAg ICAgICAgIHBvbGxfbGlzdFtwb2xsX2NudF0ucG9ydCA9IHBvcnQ7DQorICAgICAgICAgICAgICAg ICAgICBwb2xsX2xpc3RbcG9sbF9jbnRdLnJ4ID0gcG9ydC0+cnhbaV07DQorICAgICAgICAgICAg ICAgICAgICBwb2xsX2NudCsrOw0KKyAgICAgICAgICAgICAgICAgICAgVkxPR19JTkZPKCJwb2xs X2NudCAlZCBwb3J0ID0gJWQgaSA9ICVkIixwb2xsX2NudCxwb3J0LT5wb3J0X25vLCBpKTsNCisg ICAgICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgICAgICBpbmRleCsrOw0KICAgICAgICAgICAg IH0NCiAgICAgICAgIH0NCisgICAgfQ0KDQotICAgICAgICBpZiAocmVjZWl2ZWRfYW55dGhpbmcp IHsNCi0gICAgICAgICAgICBwb2xsX2ltbWVkaWF0ZV93YWtlKCk7DQotICAgICAgICB9IGVsc2Ug ew0KLSAgICAgICAgICAgIHN0cnVjdCBkcF9uZXRkZXZfcG9ydCAqcG9ydDsNCisgICAgb3ZzX3J3 bG9ja191bmxvY2soJmRwLT5wb3J0X3J3bG9jayk7DQoNCi0gICAgICAgICAgICBITUFQX0ZPUl9F QUNIIChwb3J0LCBub2RlLCAmZi0+ZHAtPnBvcnRzKQ0KLSAgICAgICAgICAgICAgICBpZiAocG9y dC0+cngNCi0gICAgICAgICAgICAgICAgICAgICYmIHBvcnQtPm5vZGUuaGFzaCA+PSBmLT5taW5f aGFzaA0KLSAgICAgICAgICAgICAgICAgICAgJiYgcG9ydC0+bm9kZS5oYXNoIDw9IGYtPm1heF9o YXNoKSB7DQotICAgICAgICAgICAgICAgICAgICBuZXRkZXZfcnhfd2FpdChwb3J0LT5yeCk7DQot ICAgICAgICAgICAgICAgIH0NCi0gICAgICAgICAgICBzZXFfd2FpdChkcC0+cG9ydF9zZXEsIHNl cV9yZWFkKGRwLT5wb3J0X3NlcSkpOw0KLSAgICAgICAgICAgIGxhdGNoX3dhaXQoJmRwLT5leGl0 X2xhdGNoKTsNCisg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jZGVmaW5lIFJYX1dUSFJF U0ggOCAvKiBEZWZhdWx0IHZhbHVlcyBvZiBSWCB3cml0ZS1iYWNrIHRocmVzaG9sZCByZWcuICov DQorDQorI2RlZmluZSBUWF9QVEhSRVNIIDM2IC8qIERlZmF1bHQgdmFsdWVzIG9mIFRYIHByZWZl dGNoIHRocmVzaG9sZCByZWcuICovDQorI2RlZmluZSBUWF9IVEhSRVNIIDAgIC8qIERlZmF1bHQg dmFsdWVzIG9mIFRYIGhvc3QgdGhyZXNob2xkIHJlZy4gKi8NCisjZGVmaW5lIFRYX1dUSFJFU0gg MCAgLyogRGVmYXVsdCB2YWx1ZXMgb2YgVFggd3JpdGUtYmFjayB0aHJlc2hvbGQgcmVnLiAqLw0K Kw0KK3N0YXRpYyBjb25zdCBzdHJ1Y3QgcnRlX2V0aF9jb25mIHBvcnRfY29uZiA9IHsNCisgICAg ICAgIC5yeG1vZGUgPSB7DQorICAgICAgICAgICAgICAgIC5tcV9tb2RlID0gRVRIX01RX1JYX1JT UywNCisgICAgICAgICAgICAgICAgLnNwbGl0X2hkcl9zaXplID0gMCwNCisgICAgICAgICAgICAg ICAgLmhlYWRlcl9zcGxpdCAgID0gMCwgLyogSGVhZGVyIFNwbGl0IGRpc2FibGVkICovDQorICAg ICAgICAgICAgICAgIC5od19pcF9jaGVja3N1bSA9IDAsIC8qIElQIGNoZWNrc3VtIG9mZmxvYWQg ZW5hYmxlZCAqLw0KKyAgICAgICAgICAgICAgICAuaHdfdmxhbl9maWx0ZXIgPSAwLCAvKiBWTEFO IGZpbHRlcmluZyBkaXNhYmxlZCAqLw0KKyAgICAgICAgICAgICAgICAuanVtYm9fZnJhbWUgICAg PSAwLCAvKiBKdW1ibyBGcmFtZSBTdXBwb3J0IGRpc2FibGVkICovDQorICAgICAgICAgICAgICAg IC5od19zdHJpcF9jcmMgICA9IDAsIC8qIENSQyBzdHJpcHBlZCBieSBoYXJkd2FyZSAqLw0KKyAg ICAgICAgfSwNCisgICAgICAgIC5yeF9hZHZfY29uZiA9IHsNCisgICAgICAgICAgICAgICAgLnJz c19jb25mID0gew0KKyAgICAgICAgICAgICAgICAgICAgICAgIC5yc3Nfa2V5ID0gTlVMTCwNCisg ICAgICAgICAgICAgICAgICAgICAgICAucnNzX2hmID0gRVRIX1JTU19JUFY0X1RDUCB8IEVUSF9S U1NfSVBWNCB8IEVUSF9SU1NfSVBWNiwNCisgICAgICAgICAgICAgICAgfSwNCisgICAgICAgIH0s DQorICAgICAgICAudHhtb2RlID0gew0KKyAgICAgICAgICAgICAgICAubXFfbW9kZSA9IEVUSF9N UV9UWF9OT05FLA0KKyAgICAgICAgfSwNCit9Ow0KKw0KK3N0YXRpYyBjb25zdCBzdHJ1Y3QgcnRl X2V0aF9yeGNvbmYgcnhfY29uZiA9IHsNCisgICAgICAgIC5yeF90aHJlc2ggPSB7DQorICAgICAg ICAgICAgICAgIC5wdGhyZXNoID0gUlhfUFRIUkVTSCwNCisgICAgICAgICAgICAgICAgLmh0aHJl c2ggPSBSWF9IVEhSRVNILA0KKyAgICAgICAgICAgICAgICAud3RocmVzaCA9IFJYX1dUSFJFU0gs DQorICAgICAgICB9LA0KK307DQorDQorc3RhdGljIGNvbnN0IHN0cnVjdCBydGVfZXRoX3R4Y29u ZiB0eF9jb25mID0gew0KKyAgICAgICAgLnR4X3RocmVzaCA9IHsNCisgICAgICAgICAgICAgICAg LnB0aHJlc2ggPSBUWF9QVEhSRVNILA0KKyAgICAgICAgICAgICAgICAuaHRocmVzaCA9IFRYX0hU SFJFU0gsDQorICAgICAgICAgICAgICAgIC53dGhyZXNoID0gVFhfV1RIUkVTSCwNCisgICAgICAg IH0sDQorICAgICAgICAudHhfZnJlZV90aHJlc2ggPSAwLCAvKiBVc2UgUE1EIGRlZmF1bHQgdmFs dWVzICovDQorICAgICAgICAudHhfcnNfdGhyZXNoID0gMCwgLyogVXNlIFBNRCBkZWZhdWx0IHZh bHVlcyAqLw0KK307DQorDQorZW51bSB7IE1BWF9SWF9RVUV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c3RhdGljIHZvaWQgKmRwZGtfcnRlX216YWxs b2Moc2l6ZV90IHN6KQ0KK3sNCisgICAgdm9pZCAqcHRyOw0KKw0KKyAgICBwdHIgPSBydGVfem1h bGxvYyhPVlNfVlBPUlRfRFBESywgc3osIE9WU19DQUNIRV9MSU5FX1NJWkUpOw0KKyAgICBpZiAo cHRyID09IE5VTEwpIHsNCisgICAgICAgIG91dF9vZl9tZW1vcnkoKTsNCisgICAgfQ0KKyAgICBy ZXR1cm4gcHRyOw0KK30NCisNCitzdGF0aWMgc3RydWN0IGRwZGtfbXAgKg0KK2RwZGtfbXBfZ2V0 KGludCBzb2NrZXRfaWQsIGludCBtdHUpDQorew0KKyAgICBzdHJ1Y3QgZHBka19tcCAqZG1wID0g TlVMTDsNCisgICAgY2hhciBtcF9uYW1lW1JURV9NRU1QT09MX05BTUVTSVpFXTsNCisNCisgICAg TElTVF9GT1JfRUFDSCAoZG1wLCBsaXN0X25vZGUsICZkcGRrX21wX2xpc3QpIHsNCisgICAgICAg IGlmIChkbXAtPnNvY2tldF9pZCA9PSBzb2NrZXRfaWQgJiYgZG1wLT5tdHUgPT0gbXR1KSB7DQor ICAgICAgICAgICAgZG1wLT5yZWZjb3VudCsrOw0KKyAgICAgICAgICAgIHJldHVybiBkbXA7DQor ICAgICAgICB9DQorICAgIH0NCisNCisgICAgZG1wID0gZHBka19ydGVfbXphbGxvYyhzaXplb2Yg KmRtcCk7DQorICAgIGRtcC0+c29ja2V0X2lkID0gc29ja2V0X2lkOw0KKyAgICBkbXAtPm10dSA9 IG10dTsNCisgICAgZG1wLT5yZWZjb3VudCA9IDE7DQorDQorICAgIHNucHJpbnRmKG1wX25hbWUs IFJURV9NRU1QT09MX05BTUVTSVpFLCAib3ZzX21wXyVkIiwgZG1wLT5tdHUpOw0KKyAgICBkbXAt Pm1wID0gcnRlX21lbXBvb2xfY3JlYXRlKG1wX25hbWUsIE5CX01CVUYsIE1CVUZfU0laRShtdHUp LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1QX0NBQ0hFX1NaLA0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZihzdHJ1Y3QgcnRlX3BrdG1idWZfcG9v bF9wcml2YXRlKSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydGVfcGt0bWJ1 Zl9wb29sX2luaXQsIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnRl X3BrdG1idWZfaW5pdCwgTlVMTCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz b2NrZXRfaWQsIDApOw0KKw0KKyAgICBpZiAoZG1wLT5tcCA9PSBOVUxMKSB7DQorICAgICAgICBy ZXR1cm4gTlVMTDsNCisgICAgfQ0KKw0KKyAgICBsaXN0X3B1c2hfYmFjaygmZHBka19tcF9saXN0 LCAmZG1wLT5saXN0X25vZGUpOw0KKyAgICByZXR1cm4gZG1wOw0KK30NCisNCitzdGF0aWMgdm9p ZA0KK2RwZGtfbXBfcHV0KHN0cnVjdCBkcGRrX21wICpkbXApDQorew0KKw0KKyAgICBpZiAoIWRt cCkgew0KKyAgICAgICAgcmV0dXJuOw0KKyAgICB9DQorDQorICAgIGRtcC0+cmVmY291bnQtLTsN CisgICAgb3ZzX2Fzc2VydChkbXAtPnJlZmNvdW50ID49IDApOw0KKw0KKyNpZiAwDQorICAgIC8q IEkgY291bGQgbm90IGZpbmQgYW55IEFQSSB0byBkZXN0cm95IG1wLiAqLw0KKyAgICBpZiAoZG1w LT5yZWZjb3VudCA9PSAwKSB7DQorICAgICAgICBsaXN0X2RlbGV0ZShkbXAtPmxpc3Rfbm9kZSk7 DQorICAgICAgICAvKiBkZXN0cm95IG1wLXBvb2wuICovDQorICAgIH0NCisjZW5kaWYNCit9DQor DQorc3RhdGljIHZvaWQNCitsc2lfZXZlbnRfY2FsbGJhY2sodWludDhfdCBwb3J0X2lkLCBlbnVt IHJ0ZV9ldGhfZXZlbnRfdHlwZSB0eXBlLCB2b2lkICpwYXJhbSkNCit7DQorICAgIHN0cnVjdCBu ZXRkZXZfZHBkayAqZGV2ID0gKHN0cnVjdCBuZXRkZXZfZHBkayAqKSBwYXJhbTsNCisNCisgICAg VkxPR19EQkcoIkV2ZW50IHR5cGU6ICVzXG4iLCB0eXBlID09IFJURV9FVEhfRVZFTlRfSU5UUl9M U0MgPyAiTFNDIGludGVycnVwdCIgOiAidW5rbm93biBldmVudCIpOw0KKw0KKyAgICBydGVfc3Bp bmxvY2tfbG9jaygmZGV2LT5sc2lfbG9jayk7DQorICAgIHJ0ZV9ldGhfbGlua19nZXRfbm93YWl0 KHBvcnRfaWQsICZkZXYtPmxpbmspOw0KKyAgICBkZXYtPmxpbmtfcmVzZXRfY250Kys7DQorICAg IHJ0ZV9zcGlubG9ja191bmxvY2soJmRldi0+bHNpX2xvY2spOw0KKw0KKyAgICBpZiAoZGV2LT5s aW5rLmxpbmtfc3RhdHVzKSB7DQorICAgICAgICBWTE9HX0RCRygiUG9ydCAlZCBMaW5rIFVwIC0g c3BlZWQgJXUgTWJwcyAtICVzXG4iLA0KKyAgICAgICAgICAgICAgICAgcG9ydF9pZCwgKHVuc2ln bmVkKWRldi0+bGluay5saW5rX3NwZWVkLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGRl di0+bGluay5saW5rX2R1cGxleCA9PSBFVEhfTElOS19GVUxMX0RVUExFWCkgPw0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgKCJmdWxsLWR1cGxleCIpIDogKCJoYWxmLWR1cGxleCIpKTsNCisg ICAgfSBlbHNlIHsNCisgICAgICAgIFZMT0dfREJHKCJQb3J0ICVkIExpbmsgRG93blxuXG4iLCBw b3J0X2lkKTsNCisgICAgfQ0KK30NCisNCitzdGF0aWMgaW50DQorZHBka19ldGhfZGV2X2luaXQo c3RydWN0IG5ldGRldl9kcGRrICpkZXYpDQorew0KKyAgICBzdHJ1Y3QgcnRlX3BrdG1idWZfcG9v bF9wcml2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AgICAgaWYgKGRpYWcpIHsNCisg ICAgICAgICAgICBWTE9HX0VSUigiZXRoIGRldiByeCBxdWV1ZSBzZXR1cCBlcnJvciAlZFxuIixk aWFnKTsNCisgICAgICAgICAgICByZXR1cm4gZGlhZzsNCisgICAgICAgIH0NCisgICAgfQ0KKw0K KyAgICBydGVfZXRoX2Rldl9jYWxsYmFja19yZWdpc3RlcihkZXYtPnBvcnRfaWQsIFJURV9FVEhf RVZFTlRfSU5UUl9MU0MsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzaV9l dmVudF9jYWxsYmFjaywgZGV2KTsNCisNCisgICAgZGlhZyA9IHJ0ZV9ldGhfZGV2X3N0YXJ0KGRl di0+cG9ydF9pZCk7DQorICAgIGlmIChkaWFnKSB7DQorICAgICAgICBWTE9HX0VSUigiZXRoIGRl diBzdGFydCBlcnJvciAlZFxuIixkaWFnKTsNCisgICAgICAgIHJldHVybiBkaWFnOw0KKyAgICB9 DQorDQorICAgIHJ0ZV9ldGhfcHJvbWlzY3VvdXNfZW5hYmxlKGRldi0+cG9ydF9pZCk7DQorICAg IHJ0ZV9ldGhfYWxsbXVsdGljYXN0X2VuYWJsZShkZXYtPnBvcnRfaWQpOw0KKw0KKyAgICBtZW1z ZXQoJmV0aF9hZGRyLCAweDAsIHNpemVvZihldGhfYWRkcikpOw0KKyAgICBydGVfZXRoX21hY2Fk ZHJfZ2V0KGRldi0+cG9ydF9pZCwgJmV0aF9hZGRyKTsNCisgICAgVkxPR19JTkZPKCJQb3J0ICVk OiAlMDJYOiUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWFxuIixkZXYtPnBvcnRfaWQsDQorICAgICAg ICAgICAgICBldGhfYWRkci5hZGRyX2J5dGVzWzBdLA0KKyAgICAgICAgICAgICAgZXRoX2FkZHIu YWRkcl9ieXRlc1sxXSwNCisgICAgICAgICAgICAgIGV0aF9hZGRyLmFkZHJfYnl0ZXNbMl0sDQor ICAgICAgICAgICAgICBldGhfYWR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IGludA0KK25ldGRldl9kcGRrX3Nl dF9tdHUoY29uc3Qgc3RydWN0IG5ldGRldiAqbmV0ZGV2LCBpbnQgbXR1KQ0KK3sNCisgICAgc3Ry dWN0IG5ldGRldl9kcGRrICpkZXYgPSBuZXRkZXZfZHBka19jYXN0KG5ldGRldik7DQorICAgIGlu dCBvbGRfbXR1LCBlcnI7DQorICAgIHN0cnVjdCBkcGRrX21wICpvbGRfbXA7DQorICAgIHN0cnVj dCBkcGRrX21wICptcDsNCisNCisgICAgb3ZzX211dGV4X2xvY2soJmRwZGtfbXV0ZXgpOw0KKyAg ICBvdnNfbXV0ZXhfbG9jaygmZGV2LT5tdXRleCk7DQorICAgIGlmIChkZXYtPm10dSA9PSBtdHUp IHsNCisgICAgICAgIGVyciA9IDA7DQorICAgICAgICBnb3RvIG91dDsNCisgICAgfQ0KKw0KKyAg ICBtcCA9IGRwZGtfbXBfZ2V0KGRldi0+c29ja2V0X2lkLCBkZXYtPm10dSk7DQorICAgIGlmICgh bXApIHsNCisgICAgICAgIGVyciA9IEVOT01FTTsNCisgICAgICAgIGdvdG8gb3V0Ow0KKyAgICB9 DQorDQorICAgIHJ0ZV9ldGhfZGV2X3N0b3AoZGV2LT5wb3J0X2lkKTsNCisNCisgICAgb2xkX210 dSA9IGRldi0+bXR1Ow0KKyAgICBvbGRfbXAgPSBkZXYtPmRwZGtfbXA7DQorICAgIGRldi0+ZHBk a19tcCA9IG1wOw0KKyAgICBkZXYtPm10dSA9IG10dTsNCisgICAgZGV2LT5tYXhfcGFja2V0X2xl biA9IE1UVV9UT19NQVhfTEVOKGRldi0+bXR1KTsNCisNCisgICAgZXJyID0gZHBka19ldGhfZGV2 X2luaXQoZGV2KTsNCisgICAgaWYgKGVycikgew0KKw0KKyAgICAgICAgZHBka19tcF9wdXQobXAp Ow0KKyAgICAgICAgZGV2LT5tdHUgPSBvbGRfbXR1Ow0KKyAgICAgICAgZGV2LT5kcGRrX21wID0g b2xkX21wOw0KKyAgICAgICAgZG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NCisgICAgc3RydWN0IHJ0ZV9ldGhfbGluayBsaW5rOw0KKw0KKyAgICBydGVfc3BpbmxvY2tf bG9jaygmZGV2LT5sc2lfbG9jayk7DQorICAgIGxpbmsgPSBkZXYtPmxpbms7DQorICAgIHJ0ZV9z cGlubG9ja191bmxvY2soJmRldi0+bHNpX2xvY2spOw0KKw0KKyAgICBpZiAobGluay5saW5rX2R1 cGxleCA9PSBFVEhfTElOS19BVVRPTkVHX0RVUExFWCkgew0KKyAgICAgICAgaWYgKGxpbmsubGlu a19zcGVlZCA9PSBFVEhfTElOS19TUEVFRF9BVVRPTkVHKSB7DQorICAgICAgICAgICAgKmN1cnJl bnQgPSBORVRERVZfRl9BVVRPTkVHOw0KKyAgICAgICAgfQ0KKyAgICB9IGVsc2UgaWYgKGxpbmsu bGlua19kdXBsZXggPT0gRVRIX0xJTktfSEFMRl9EVVBMRVgpIHsNCisgICAgICAgIGlmIChsaW5r Lmxpbmtfc3BlZWQgPT0gRVRIX0xJTktfU1BFRURfMTApIHsNCisgICAgICAgICAgICAqY3VycmVu dCA9IE5FVERFVl9GXzEwTUJfSEQ7DQorICAgICAgICB9DQorICAgICAgICBpZiAobGluay5saW5r X3NwZWVkID09IEVUSF9MSU5LX1NQRUVEXzEwMCkgew0KKyAgICAgICAgICAgICpjdXJyZW50ID0g TkVUREVWX0ZfMTAwTUJfSEQ7DQorICAgICAgICB9DQorICAgICAgICBpZiAobGluay5saW5rX3Nw ZWVkID09IEVUSF9MSU5LX1NQRUVEXzEwMDApIHsNCisgICAgICAgICAgICAqY3VycmVudCA9IE5F VERFVl9GXzFHQl9IRDsNCisgICAgICAgIH0NCisgICAgfSBlbHNlIGlmIChsaW5rLmxpbmtfZHVw bGV4ID09IEVUSF9MSU5LX0ZVTExfRFVQTEVYKSB7DQorICAgICAgICBpZiAobGluay5saW5rX3Nw ZWVkID09IEVUSF9MSU5LX1NQRUVEXzEwKSB7DQorICAgICAgICAgICAgKmN1cnJlbnQgPSBORVRE RVZfRl8xME1CX0ZEOw0KKyAgICAgICAgfQ0KKyAgICAgICAgaWYgKGxpbmsubGlua19zcGVlZCA9 PSBFVEhfTElOS19TUEVFRF8xMDApIHsNCisgICAgICAgICAgICAqY3VycmVudCA9IE5FVERFVl9G XzEwME1CX0ZEOw0KKyAgICAgICAgfQ0KKyAgICAgICAgaWYgKGxpbmsubGlua19zcGVlZCA9PSBF VEhfTElOS19TUEVFRF8xMDAwKSB7DQorICAgICAgICAgICAgKmN1cnJlbnQgPSBORVRERVZfRl8x R0JfRkQ7DQorICAgICAgICB9DQorICAgICAgICBpZiAobGluay5saW5rX3NwZWVkID09IEVUSF9M SU5LX1NQRUVEXzEwMDAwKSB7DQorICAgICAgICAgICAgKmN1cnJlbnQgPSBORVRERVZfRl8xMEdC X0ZEOw0KKyAgICAgICAgfQ0KKyAgICB9DQorDQorICAgIHJldHVybiAwOw0KK30NCisNCitzdGF0 aWMgaW50DQorbmV0ZGV2X2RwZGtfZ2V0X2lmaW5kZXgoY29uc3Qgc3RydWN0IG5ldGRldiAqbmV0 ZGV2KQ0KK3sNCisgICAgc3RydWN0IG5ldGRldl9kcGRrICpkZXYgPSBuZXRkZXZfZHBka19jYXN0 KG5ldGRldik7DQorICAgIGludCBpZmluZGV4Ow0KKw0KKyAgICBvdnNfbXV0ZXhfbG9jaygmZGV2 LT5tdXRleCk7DQorICAgIGlmaW5kZXggPSBkZXYtPnBvcnRfaWQ7DQorICAgIG92c19tdXRleF91 bmxvY2soJmRldi0+bXV0ZXgpOw0KKw0KKyAgICByZXR1cm4gaWZpbmRleDsNCit9DQorDQorc3Rh dGljIGludA0KK25ldGRldl9kcGRrX2dldF9jYXJyaWVyKGNvbnN0IHN0cnVjdCBuZXRkZXYgKm5l dGRldl8sIGJvb2wgKmNhcnJpZXIpDQorew0KKyAgICBzdHJ1Y3QgbmV0ZGV2X2RwZGsgKmRldiA9 IG5ldGRldl9kcGRrX2Nhc3QobmV0ZGV2Xyk7DQorDQorICAgIHJ0ZV9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0cnVjdCBuZXRkZXYgKm5l dGRldiA9IG5ldGRldl9mcm9tX25hbWUoYXJndlsxXSk7DQorICAgICAgICBpZiAobmV0ZGV2ICYm IGlzX2RwZGtfY2xhc3MobmV0ZGV2LT5uZXRkZXZfY2xhc3MpKSB7DQorICAgICAgICAgICAgc3Ry dWN0IG5ldGRldl9kcGRrICpkcGRrX2RldiA9IG5ldGRldl9kcGRrX2Nhc3QobmV0ZGV2KTsNCisN CisgICAgICAgICAgICBvdnNfbXV0ZXhfbG9jaygmZHBka19kZXYtPm11dGV4KTsNCisgICAgICAg ICAgICBuZXRkZXZfZHBka19zZXRfYWRtaW5fc3RhdGVfXyhkcGRrX2RldiwgdXApOw0KKyAgICAg ICAgICAgIG92c19tdXRleF91bmxvY2soJmRwZGtfZGV2LT5tdXRleCk7DQorDQorICAgICAgICAg ICAgbmV0ZGV2X2Nsb3NlKG5ldGRldik7DQorICAgICAgICB9IGVsc2Ugew0KKyAgICAgICAgICAg IHVuaXhjdGxfY29tbWFuZF9yZXBseV9lcnJvcihjb25uLCAiVW5rbm93biBEdW1teSBJbnRlcmZh Y2UiKTsNCisgICAgICAgICAgICBuZXRkZXZfY2xvc2UobmV0ZGV2KTsNCisgICAgICAgICAgICBy ZXR1cm47DQorICAgICAgICB9DQorICAgIH0gZWxzZSB7DQorICAgICAgICBzdHJ1Y3QgbmV0ZGV2 X2RwZGsgKm5ldGRldjsNCisNCisgICAgICAgIG92c19tdXRleF9sb2NrKCZkcGRrX211dGV4KTsN CisgICAgICAgIExJU1RfRk9SX0VBQ0ggKG5ldGRldiwgbGlzdF9ub2RlLCAmZHBka19saXN0KSB7 DQorICAgICAgICAgICAgb3ZzX211dGV4X2xvY2soJm5ldGRldi0+bXV0ZXgpOw0KKyAgICAgICAg ICAgIG5ldGRldl9kcGRrX3NldF9hZG1pbl9zdGF0ZV9fKG5ldGRldiwgdXApOw0KKyAgICAgICAg ICAgIG92c19tdXRleF91bmxvY2soJm5ldGRldi0+bXV0ZXgpOw0KKyAgICAgICAgfQ0KKyAgICAg ICAgb3ZzX211dGV4X3VubG9jaygmZHBka19tdXRleCk7DQorICAgIH0NCisgICAgdW5peGN0bF9j b21tYW5kX3JlcGx5KGNvbm4sICJPSyIpOw0KK30NCisNCitzdGF0aWMgaW50DQorZHBka19jbGFz c19pbml0KHZvaWQpDQorew0KKyAgICBpbnQgcmVzdWx0Ow0KKw0KKyAgICBpZiAocnRlX2VhbF9p bml0X3JldCkgew0KKyAgICAgICAgcmV0dXJuIDA7DQorICAgIH0NCisNCisgICAgcmVzdWx0ID0g cnRlX3BtZF9pbml0X2FsbCgpOw0KKyAgICBpZiAocmVzdWx0KSB7DQorICAgICAgICBWTE9HX0VS UigiQ2Fubm90IGluaXQgeG5pYyBQTURcbiIpOw0KKyAgICAgICAgcmV0dXJuIHJlc3VsdDsNCisg ICAgfQ0KKw0KKyAgICByZXN1bHQgPSBydGVfZWFsX3BjaV9wcm9iZSgpOw0KKyAgICBpZiAocmVz dWx0KSB7DQorICAgICAgICBWTE9HX0VSUigiQ2Fubm90IHByb2JlIFBDSVxuIik7DQorICAgICAg ICByZXR1cm4gcmVzdWx0Ow0KKyAgICB9DQorDQorICAgIGlmIChydGVfZXRoX2Rldl9jb3VudCgp IDwgMSkgew0KKyAgICAgICAgVkxPR19FUlIoIk5vIEV0aGVybmV0IGRldmljZXMgZm91bmQuIFRy eSBhc3NpZ25pbmcgcG9ydHMgdG8gVUlPLlxuIik7DQorICAgIH0NCisNCisgICAgVkxPR19JTkZP KCJFdGhlcm5ldCBEZXZpY2UgQ291bnQ6ICVkXG4iLCAoaW50KXJ0ZV9ldGhfZGV2X2NvdW50KCkp Ow0KKw0KKyAgICBsaXN0X2luaXQoJmRwZGtfbGlzdCk7DQorICAgIGxpc3RfaW5pdCgmZHBka19t cF9saXN0KTsNCisNCisgICAgdW5peGN0bF9jb21tYW5kX3JlZ2lzdGVyKCJuZXRkZXYtZHBkay9z ZXQtYWRtaW4tc3RhdGUiLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIltuZXRkZXZd IHVwfGRvd24iLCAxLCAyLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZGV2X2Rw ZGtfc2V0X2FkbWluX3N0YXRlLCBOVUxMKTsNCisNCisgICAgcmV0dXJuIDA7DQorfQ0KKw0KK3N0 YXRpYyB2b2lkDQorZHBka19jbGFzc19zZXR1cF90aHJlYWQoaW50IHRpZCkNCit7DQorICAgIGNw dV9zZXRfdCBjcHVzZXQ7DQorICAgIGludCBlcnI7DQorDQorICAgIC8qIFNldHVwIHRocmVhZCBm b3IgRFBESyBsaWJyYXJ5LiAqLw0KKyAgICBSVEVfUEVSX0xDT1JFKF9sY29yZV9pZCkgPSB0aWQg JSBOUl9RVUVVRTsNCisNCisgICAgQ1BVX1pFUk8oJmNwdXNldCk7DQorICAgIENQVV9TRVQocnRl X2xjb3JlX2lkKCksICZjcHVzZXQpOw0KKyAgICBlcnIgPSBwdGhyZWFkX3NldGFmZmluaXR5X25w KHB0aHJlYWRfc2VsZigpLCBzaXplb2YoY3B1X3NldF90KSwgJmNwdXNldCk7DQorICAgIGlmIChl cnIpIHsNCisgICAgICAgIFZMT0dfRVJSKCJ0aHJlYWQgYWZmaW5pdHkgZXJyb3IgJWRcbiIsZXJy KTsNCisgICAgfQ0KK30NCisNCitzdGF0aWMgc3RydWN0IG5ldGRldl9jbGFzcyBuZXRkZXZfZHBk a19jbGFzcyA9IHsNCisgICAgImRwZGsiLA0KKyAgICBkcGRrX2NsYXNzX2luaXQsICAgICAgICAg ICAgLyogaW5pdCAqLw0KKyAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgICAgLyogbmV0ZGV2 X2RwZGtfcnVuICovDQorICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgICAvKiBuZXRkZXZf ZHBka193YWl0ICovDQorDQorICAgIG5ldGRldl9kcGRrX2FsbG9jLA0KKyAgICBuZXRkZXZfZHBk a19jb25zdHJ1Y3QsDQorICAgIG5ldGRldl9kcGRrX2Rlc3RydWN0LA0KKyAgICBuZXRkZXZfZHBk a19kZWFsbG9jLA0KKyAgICBkcGRrX2NsYXNzX3NldHVwX3RocmVhZCwNCisgICAgbmV0ZGV2X2Rw ZGtfZ2V0X2NvbmZpZywNCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIG5ldGRl dl9kcGRrX3NldF9jb25maWcgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8q IGdldF90dW5uZWxfY29uZmlnICovDQorDQorICAgIG5ldGRldl9kcGRrX3NlbmQsICAgICAgICAg ICAvKiBzZW5kICovDQorICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgICAvKiBzZW5kX3dh aXQgKi8NCisNCisgICAgbmV0ZGV2X2RwZGtfc2V0X2V0aGVyYWRkciwNCisgICAgbmV0ZGV2X2Rw ZGtfZ2V0X2V0aGVyYWRkciwNCisgICAgbmV0ZGV2X2RwZGtfZ2V0X210dSwNCisgICAgbmV0ZGV2 X2RwZGtfc2V0X210dSwNCisgICAgbmV0ZGV2X2RwZGtfZ2V0X2lmaW5kZXgsDQorICAgIG5ldGRl dl9kcGRrX2dldF9jYXJyaWVyLA0KKyAgICBuZXRkZXZfZHBka19nZXRfY2Fycmllcl9yZXNldHMs DQorICAgIG5ldGRldl9kcGRrX3NldF9taWltb24sDQorICAgIG5ldGRldl9kcGRrX2dldF9zdGF0 cywNCisgICAgbmV0ZGV2X2RwZGtfc2V0X3N0YXRzLA0KKyAgICBuZXRkZXZfZHBka19nZXRfZmVh dHVyZXMsDQorICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgICAvKiBzZXRfYWR2ZXJ0aXNl bWVudHMgKi8NCisNCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIHNldF9wb2xp Y2luZyAqLw0KKyAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgICAgLyogZ2V0X3Fvc190eXBl cyAqLw0KKyAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgICAgLyogZ2V0X3Fvc19jYXBhYmls aXRpZXMgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldF9xb3MgKi8N CisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIHNldF9xb3MgKi8NCisgICAgTlVM TCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldF9xdWV1ZSAqLw0KKyAgICBOVUxMLCAgICAg ICAgICAgICAgICAgICAgICAgLyogc2V0X3F1ZXVlICovDQorICAgIE5VTEwsICAgICAgICAgICAg ICAgICAgICAgICAvKiBkZWxldGVfcXVldWUgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAg ICAgICAgIC8qIGdldF9xdWV1ZV9zdGF0cyAqLw0KKyAgICBOVUxMLCAgICAgICAgICAgICAgICAg ICAgICAgLyogcXVldWVfZHVtcF9zdGFydCAqLw0KKyAgICBOVUxMLCAgICAgICAgICAgICAgICAg ICAgICAgLyogcXVldWVfZHVtcF9uZXh0ICovDQorICAgIE5VTEwsICAgICAgICAgICAgICAgICAg ICAgICAvKiBxdWV1ZV9kdW1wX2RvbmUgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAg ICAgIC8qIGR1bXBfcXVldWVfc3RhdHMgKi8NCisNCisgICAgTlVMTCwgICAgICAgICAgICAgICAg ICAgICAgIC8qIGdldF9pbjQgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8q IHNldF9pbjQgKi8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldF9pbjYg Ki8NCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGFkZF9yb3V0ZXIgKi8NCisg ICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldF9uZXh0X2hvcCAqLw0KKyAgICBu ZXRkZXZfZHBka19nZXRfc3RhdHVzLA0KKyAgICBOVUxMLCAg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hbGxlciBpcyBub3QNCiAgKiBleHBlY3RlZCB0byBkbyBh ZGRpdGlvbmFsIHF1ZXVpbmcgb2YgcGFja2V0cy4gKi8NCiBzdGF0aWMgaW50DQotbmV0ZGV2X2xp bnV4X3NlbmQoc3RydWN0IG5ldGRldiAqbmV0ZGV2XywgY29uc3Qgdm9pZCAqZGF0YSwgc2l6ZV90 IHNpemUpDQorbmV0ZGV2X2xpbnV4X3NlbmQoc3RydWN0IG5ldGRldiAqbmV0ZGV2Xywgc3RydWN0 IG9mcGJ1ZiAqcGt0LCBib29sIG1heV9zdGVhbCBPVlNfVU5VU0VEKQ0KIHsNCisgICAgY29uc3Qg dm9pZCAqZGF0YSA9IHBrdC0+ZGF0YTsNCisgICAgc2l6ZV90IHNpemUgPSBwa3QtPnNpemU7DQor DQogICAgIGZvciAoOzspIHsNCiAgICAgICAgIHNzaXplX3QgcmV0dmFsOw0KDQpAQCAtMjY3Nyw2 ICsyNjk5LDcgQEAgbmV0ZGV2X2xpbnV4X3VwZGF0ZV9mbGFncyhzdHJ1Y3QgbmV0ZGV2ICpuZXRk ZXZfLCBlbnVtIG5ldGRldl9mbGFncyBvZmYsDQogICAgIENPTlNUUlVDVCwgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwNCiAgICAgbmV0ZGV2X2xpbnV4 X2Rlc3RydWN0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KICAgICBu ZXRkZXZfbGludXhfZGVhbGxvYywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBcDQorICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgICAvKiBzZXR1cF90aHJlYWQgKi8g ICAgICAgICAgICAgIFwNCiAgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldF9j b25maWcgKi8gICAgICAgICAgICAgICAgXA0KICAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAg ICAgLyogc2V0X2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rKyBiL2xpYi9u ZXRkZXYtdnBvcnQuYw0KQEAgLTY4Niw2ICs2ODYsNyBAQCBnZXRfc3RhdHMoY29uc3Qgc3RydWN0 IG5ldGRldiAqbmV0ZGV2LCBzdHJ1Y3QgbmV0ZGV2X3N0YXRzICpzdGF0cykNCiAgICAgbmV0ZGV2 X3Zwb3J0X2NvbnN0cnVjdCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcDQogICAg IG5ldGRldl92cG9ydF9kZXN0cnVjdCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg XA0KICAgICBuZXRkZXZfdnBvcnRfZGVhbGxvYywgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFwNCisgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAgIC8qIHNldHVwX3RocmVh ZCAqLyAgICAgICAgICBcDQogICAgIEdFVF9DT05GSUcsICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXA0KICAgICBTRVRfQ09ORklHLCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwNCiAgICAgR0VUX1RVTk5FTF9DT05GSUcsICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcDQpkaWZmIC0tZ2l0IGEvbGliL25l dGRldi5jIGIvbGliL25ldGRldi5jDQppbmRleCA4ZTYyNDIxLi5mNjg4YzVjIDEwMDY0NA0KLS0t IGEvbGliL25ldGRldi5jDQorKysgYi9saWIvbmV0ZGV2LmMNCkBAIC05MSw2ICs5MSwxMSBAQCBz dGF0aWMgc3RydWN0IHZsb2dfcmF0ZV9saW1pdCBybCA9IFZMT0dfUkFURV9MSU1JVF9JTklUKDUs IDIwKTsNCiBzdGF0aWMgdm9pZCByZXN0b3JlX2FsbF9mbGFncyh2b2lkICphdXggT1ZTX1VOVVNF RCk7DQogdm9pZCB1cGRhdGVfZGV2aWNlX2FyZ3Moc3RydWN0IG5ldGRldiAqLCBj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LA0KICAgICAg ICAge05VTEwsIDAsIE5VTEwsIDB9LA0KICAgICB9Ow0KICAgICBjaGFyICpzaG9ydF9vcHRpb25z ID0gbG9uZ19vcHRpb25zX3RvX3Nob3J0X29wdGlvbnMobG9uZ19vcHRpb25zKTsNCkBAIC0yMTAs NiArMjE5LDkgQEAgcGFyc2Vfb3B0aW9ucyhpbnQgYXJnYywgY2hhciAqYXJndltdLCBjaGFyICoq dW5peGN0bF9wYXRocCkNCiAgICAgICAgIGNhc2UgJz8nOg0KICAgICAgICAgICAgIGV4aXQoRVhJ VF9GQUlMVVJFKTsNCg0KKyAgICAgICAgY2FzZSBPUFRfRFBESzoNCisgICAgICAgICAgICBicmVh azsNCisNCiAgICAgICAgIGRlZmF1bHQ6DQogICAgICAgICAgICAgYWJvcnQoKTsNCiAgICAgICAg IH0NCi0tDQoxLjcuOS41DQoNCg0KDQoNCg0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUGxlYXNl IHJlZmVyIHRvIGh0dHA6Ly93d3cuYXJpY2VudC5jb20vbGVnYWwvZW1haWxfZGlzY2xhaW1lci5o dG1sDQpmb3IgaW1wb3J0YW50IGRpc2Nsb3N1cmVzIHJlZ2FyZGluZyB0aGlzIGVsZWN0cm9uaWMg Y29tbXVuaWNhdGlvbi4NCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCg==