From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B8CE43005 for ; Fri, 27 Feb 2015 13:22:16 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 27 Feb 2015 04:22:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,659,1418112000"; d="scan'208,217";a="672629272" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by fmsmga001.fm.intel.com with ESMTP; 27 Feb 2015 04:22:09 -0800 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.195.1; Fri, 27 Feb 2015 20:22:08 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.62]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0195.001; Fri, 27 Feb 2015 20:22:07 +0800 From: "Liang, Cunming" To: David Marchand Thread-Topic: [PATCH v6 4/8] eal/linux: add per rx queue interrupt handling based on VFIO Thread-Index: AQHQUknOQ3MHRChp+UyMD7WQ/m/TEZ0DxxqAgACXEnA= Date: Fri, 27 Feb 2015 12:22:08 +0000 Message-ID: References: <1424710542-14637-1-git-send-email-danny.zhou@intel.com> <1425012976-10173-1-git-send-email-cunming.liang@intel.com> <1425012976-10173-5-git-send-email-cunming.liang@intel.com> In-Reply-To: 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] MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v6 4/8] eal/linux: add per rx queue interrupt handling based on VFIO 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: Fri, 27 Feb 2015 12:22:17 -0000 SGksDQoNCkZyb206IERhdmlkIE1hcmNoYW5kIFttYWlsdG86ZGF2aWQubWFyY2hhbmRANndpbmQu Y29tXQ0KU2VudDogRnJpZGF5LCBGZWJydWFyeSAyNywgMjAxNSA2OjM0IFBNDQpUbzogTGlhbmcs IEN1bm1pbmcNCkNjOiBkZXZAZHBkay5vcmc7IFN0ZXBoZW4gSGVtbWluZ2VyOyBUaG9tYXMgTW9u amFsb247IFpob3UsIERhbm55DQpTdWJqZWN0OiBSZTogW1BBVENIIHY2IDQvOF0gZWFsL2xpbnV4 OiBhZGQgcGVyIHJ4IHF1ZXVlIGludGVycnVwdCBoYW5kbGluZyBiYXNlZCBvbiBWRklPDQoNCkkg YW0gbm90IHJlYWxseSBjb21mb3J0YWJsZSB3aXRoIHRoaXMgYXBpLg0KDQpUaGlzIGlzIGp1c3Qg Y3JlYXRpbmcgc29tZXRoaW5nIG9uIHRvcCBvZiB0aGUgc3RhbmRhcmQgZXBvbGwgYXBpIHdpdGgg bGltaXRhdGlvbnMuDQpJbiB0aGUgZW5kLCB3ZSBjb3VsZCBqdXN0IHVzZSBhbiBleHRlcm5hbCBs aWIgdGhhdCBkb2VzIHRoaXMgYWxyZWFkeS4NCltMaWFuZywgQ3VubWluZ10gTm90IHJlYWxseSwg SSB0aGluay4gV2UgdHJ5IHRvIHByb3RlY3QgdGhlIGRhdGEgaW5zaWRlIOKAmHJ0ZV9pbnRyX2hh bmRsZeKAmSwgaXQgZG9lc27igJl0IGV4cGVjdCB1c2VyIHRvIHVuZGVyc3RhbmQgdGhlIHRoaW5n cyBkZWZpbmVkIGluc2lkZSDigJhydGVfaW50cl9oYW5kbGXigJkuDQpJdOKAmXMgYmV0dGVyIHR5 cGVkZWYg4oCYcnRlX2ludHJfaGFuZGxl4oCZIGFzIGEgcmF3IGludGV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DQorICAgICAgICAgICAgICAgLyogc2V0 IHRoZSBsZW5ndGggdG8gYmUgcmVhZCBmb3IgZGlmZmVyZW50IGhhbmRsZSB0eXBlICovDQorICAg ICAgICAgICAgICAgc3dpdGNoIChpbnRyX2hhbmRsZS0+dHlwZSkgew0KKyAgICAgICAgICAgICAg IGNhc2UgUlRFX0lOVFJfSEFORExFX1VJTzoNCisgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVz X3JlYWQgPSBzaXplb2YoYnVmLnVpb19pbnRyX2NvdW50KTsNCisgICAgICAgICAgICAgICAgICAg ICAgIGJyZWFrOw0KKyAgICAgICAgICAgICAgIGNhc2UgUlRFX0lOVFJfSEFORExFX0FMQVJNOg0K KyAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNfcmVhZCA9IHNpemVvZihidWYudGltZXJmZF9u dW0pOw0KKyAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQorI2lmZGVmIFZGSU9fUFJFU0VO VA0KKyAgICAgICAgICAgICAgIGNhc2UgUlRFX0lOVFJfSEFORExFX1ZGSU9fTVNJWDoNCisgICAg ICAgICAgICAgICBjYXNlIFJURV9JTlRSX0hBTkRMRV9WRklPX01TSToNCisgICAgICAgICAgICAg ICBjYXNlIFJURV9JTlRSX0hBTkRMRV9WRklPX0xFR0FDWToNCisgICAgICAgICAgICAgICAgICAg ICAgIGJ5dGVzX3JlYWQgPSBzaXplb2YoYnVmLnZmaW9faW50cl9jb3VudCk7DQorICAgICAgICAg ICAgICAgICAgICAgICBicmVhazsNCisjZW5kaWYNCisgICAgICAgICAgICAgICBkZWZhdWx0Og0K KyAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNfcmVhZCA9IDE7DQorICAgICAgICAgICAgICAg ICAgICAgICBicmVhazsNCisgICAgICAgICAgICAgICB9DQorDQorICAgICAgICAgICAgICAgLyoq DQorICAgICAgICAgICAgICAgKiByZWFkIG91dCB0byBjbGVhciB0aGUgcmVhZHktdG8tYmUtcmVh ZCBmbGFnDQorICAgICAgICAgICAgICAgKiBmb3IgZXBvbGxfd2FpdC4NCisgICAgICAgICAgICAg ICAqLw0KKyAgICAgICAgICAgICAgIHZlY1tpXSA9IGV2ZW50c1tpXS5kYXRhLnUzMjsNCisgICAg ICAgICAgICAgICBhc3NlcnQodmVjW2ldIDwgVkZJT19NQVhfUlhUWF9JTlRSX0lEKTsNCisNCisg ICAgICAgICAgICAgICBmZCA9IGludHJfaGFuZGxlLT5lZmRzW3ZlY1tpXV07DQorICAgICAgICAg ICAgICAgYnl0ZXNfcmVhZCA9IHJlYWQoZmQsICZidWYsIGJ5dGVzX3JlYWQpOw0KKyAgICAgICAg ICAgICAgIGlmIChieXRlc19yZWFkIDwgMCkNCisgICAgICAgICAgICAgICAgICAgICAgIFJURV9M T0coRVJSLCBFQUwsICJFcnJvciByZWFkaW5nIGZyb20gZmlsZSAiDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICJkZXNjcmlwdG9yICVkOiAlc1xuIiwgZmQsIHN0cmVycm9yKGVycm5v KSk7DQorICAgICAgICAgICAgICAgZWxzZSBpZiAoYnl0ZXNfcmVhZCA9PSAwKQ0KKyAgICAgICAg ICAgICAgICAgICAgICAgUlRFX0xPRyhFUlIsIEVBTCwgIlJlYWQgbm90aGluZyBmcm9tIGZpbGUg Ig0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGVzY3JpcHRvciAlZFxuIiwgZmQp Ow0KKyAgICAgICB9DQorfQ0KDQpXaHkgdW5jb25kaXRpb25uYWxseSByZWFkID8NCllvdSBhcmUg YWJzb3JiaW5nIGV2ZW50cyBmcm9tIHRoZSBhcHBsaWNhdGlvbiBpZiB0aGUgYXBwbGljYXRpb24g Z2F2ZSB5b3UgYW4gZXh0ZXJuYWwgZXBmZCBhbmQgcG9wdWxhdGVkIGl0IHdpdGggaXRzIG93biBm ZHMuDQpbTGlhbmcsIEN1bm1pbmddIFRoZSB2ZWN0b3IgbnVtYmVyIHdhcyBjaGVja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rigJhydGVfaW50cl93YWl04oCZIGxvb2tzIGxpa2UgdG9vIGdlbmVyaWMs IOKAmHJ0ZV9pbnRyX2VwZmRfd2FpdOKAmSBsb29rcyBub3QgYWJzdHJhY3Qgd2l0aCBic2QuDQpB cyB0aGUgZnVuY3Rpb24gb25seSBzZXJ2ZXMgZm9yIHJ4dHggdmVjdG9yLCBzbyB1c2luZyB0aGUg cnggcHJlZml4LiBXaGljaCBuYW1lIGRvIHlvdSBwcmVmZXIgPw0KDQoNCisjZGVmaW5lIE1BWF9F VkVOVFMgICAgICA4DQorICAgICAgIHN0cnVjdCBlcG9sbF9ldmVudCBldmVudHNbTUFYX0VWRU5U U107DQorICAgICAgIGludCByZXQsIG5mZHMgPSAwOw0KKw0KKyAgICAgICBpZiAoIWludHJfaGFu ZGxlIHx8ICF2ZWMpIHsNCisgICAgICAgICAgICAgICBSVEVfTE9HKEVSUiwgRUFMLCAiaW52YWxp ZCBpbnB1dCBwYXJhbWV0ZXJcbiIpOw0KKyAgICAgICAgICAgICAgIHJldHVybiAtMTsNCisgICAg ICAgfQ0KKw0KKyAgICAgICBpZiAoaW50cl9oYW5kbGUtPnR5cGUgIT0gUlRFX0lOVFJfSEFORExF X1ZGSU9fTVNJWCkgew0KKyAgICAgICAgICAgICAgIFJURV9MT0coRVJSLCBFQUwsICJpbnRyIHR5 cGUgc2hvdWxkIGJlIFZGSU9fTVNJWFxuIik7DQorICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0K KyAgICAgICB9DQorDQorICAgICAgIGlmIChlcGZkID09IFJURV9FUE9MTF9GRF9BTlkpIHsNCisg ICAgICAgICAgICAgICAvKiB1c2luZyBwZXIgdGhyZWFkIGVwb2xsIGZkICovDQorICAgICAgICAg ICAgICAgaWYgKHVubGlrZWx5KFJURV9QRVJfTENPUkUoX2VwZmQpID09IC0xKSkNCisgICAgICAg ICAgICAgICAgICAgICAgIFJURV9QRVJfTENPUkUoX2VwZmQpID0gaW5pdF90bHNfZXBmZCgpOw0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b25lZC4NCg0KKw0K KyAgICAgICBkbyB7DQorICAgICAgICAgICAgICAgcmV0ID0gZXBvbGxfd2FpdChlcGZkLCBldmVu dHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSVEVfTUlOKG51bSwgTUFYX0VW RU5UUyksDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFQUxfSU5UUl9FUE9MTF9X QUlUX0ZPUkVWRVIpOw0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkgew0K KyAgICAgICAgICAgICAgICAgICAgICAgLyogZXBvbGxfd2FpdCBmYWlsICovDQorICAgICAgICAg ICAgICAgICAgICAgICBSVEVfTE9HKEVSUiwgRUFMLCAiZXBvbGxfd2FpdCByZXR1cm5zIHdpdGgg ZmFpbFxuIik7DQorICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQorICAgICAgICAg ICAgICAgfSBlbHNlIGlmIChyZXQgPiAwKSB7DQorICAgICAgICAgICAgICAgICAgICAgICAvKiBl cG9sbF93YWl0IGhhcyBhdCBsZWFzdCBvbmUgZmQgcmVhZHkgdG8gcmVhZCAqLw0KKyAgICAgICAg ICAgICAgICAgICAgICAgZWFsX2ludHJfcHJvY2Vzc19yeHR4X2ludGVycnVwdHMoaW50cl9oYW5k bGUsIGV2ZW50cywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHZlYywgcmV0KTsNCisgICAgICAgICAgICAgICAgICAgICAgIG51bSAtPSBy ZXQ7DQorICAgICAgICAgICAgICAgICAgICAgICB2ZWMgKz0gcmV0Ow0KKyAgICAgICAgICAgICAg ICAgICAgICAgbmZkcyArPSByZXQ7DQorICAgICAgICAgICAgICAgfSBlbHNlIGlmIChuZmRzID4g MCkNCisgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KKyAgICAgICB9IHdoaWxlIChudW0g PiAwKTsNCisNCisgICAgICAgcmV0dXJu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9FVkVO VF9BREQ6DQorICAgICAgICAgICAgICAgb3AgPSBFUE9MTF9DVExfQUREOw0KKyAgICAgICAgICAg ICAgIGJyZWFrOw0KKyAgICAgICBjYXNlIFJURV9JTlRSX0VWRU5UX0RFTDoNCisgICAgICAgICAg ICAgICBvcCA9IEVQT0xMX0NUTF9ERUw7DQorICAgICAgICAgICAgICAgYnJlYWs7DQorICAgICAg IGRlZmF1bHQ6DQorICAgICAgICAgICAgICAgUlRFX0xPRyhFUlIsIEVBTCwgImV2ZW50IG9wIHR5 cGUgbWlzbWF0Y2hcbiIpOw0KKyAgICAgICAgICAgICAgIHJldHVybiAtMTsNCisgICAgICAgfQ0K Kw0KKyAgICAgICBpZiAoZXBmZCA9PSBSVEVfRVBPTExfRkRfQU5ZKSB7DQorICAgICAgICAgICAg ICAgLyogdXNpbmcgcGVyIHRocmVhZCBlcG9sbCBmZCAqLw0KKyAgICAgICAgICAgICAgIGlmIChS VEVfUEVSX0xDT1JFKF9lcGZkKSA9PSAtMSkNCisgICAgICAgICAgICAgICAgICAgICAgIFJURV9Q RVJfTENPUkUoX2VwZmQpID0gaW5pdF90bHNfZXBmZCgpOw0KKyAgICAgICAgICAgICAgIGVwZmQg PSBSVEVfUEVSX0xDT1JFKF9lcGZkKTsNCisgICAgICAgfQ0KKw0KKyAgICAgICBldi5kYXRhLnUz MiA9IHZlYzsNCisgICAgICAgZXYuZXZlbnRzID0gRVBPTExJTiB8IEVQT0xMUFJJOw0KKyAgICAg ICBpZiAoZXBvbGxfY3RsKGVwZmQsIG9wLCBpbnRyX2hhbmRsZS0+ZWZkc1t2ZWNdLCAmZXYpIDwg MCkgew0KKyAgICAgICAgICAgICAgIFJURV9MT0coRVJSLCBFQUwsICJFcnJvciBvcCAlZCBmZCAl ZCBlcG9sbF9jdGwsICVzXG4iLA0KKyAgICAgICAgICAgICAgICAgICAgICAgb3AsIGludHJfaGFu ZGxlLT5lZmRzW3ZlY10sIHN0cmVycm9yKGVycm5vKSk7DQorICAg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CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImVycm9yICVpICglcylcbiIsIGVy cm5vLCBzdHJlcnJvcihlcnJubykpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0x Ow0KICAgICAgICAgICAgICAgIH0NCg0KR2FyYmFnZSwgdGhpcyBoYXMgbm90aGluZyB0byBkbyB3 aXRoIHRoZSBwYXRjaC4NCltMaWFuZywgQ3VubWluZ10gSXTigJlzIGZvciBsaW5lIG51bWJlciBl eGNlZWQgODAgbWFyZ2luIGNvbXBsYWluLg0KDQoNCiAgICAgICAgICAgICAgICAvKiBpZiB0aGlz IHZlY3RvciBjYW5ub3QgYmUgdXNlZCB3aXRoIGV2ZW50ZmQsIGZhaWwgaWYgd2UgZXhwbGljaXRs eQ0KICAgICAgICAgICAgICAgICAqIHNwZWNpZmllZCBpbnRlcnJ1cHQgdHlwZSwgb3RoZXJ3aXNl IGNvbnRpbnVlICovDQogICAgICAgICAgICAgICAgaWYgKChpcnEuZmxhZ3MgJiBWRklPX0lSUV9J TkZPX0VWRU5URkQpID09IDApIHsNCi0gICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnRlcm5h bF9jb25maWcudmZpb19pbnRyX21vZGUgIT0gUlRFX0lOVFJfTU9ERV9OT05FKSB7DQorICAgICAg ICAgICAgICAgICAgICAgICBpZiAoaW50ZXJuYWxfY29uZmlnLnZmaW9faW50cl9tb2RlICE9DQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgUlRFX0lOVFJfTU9ERV9OT05FKSB7DQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFJURV9MT0coRVJSLCBFQUwsDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICBpbnRlcnJ1cHQgdmVjdG9yIGRv ZXMgbm90IHN1cHBvcnQgZXZlbnRmZCFcbiIpOw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICIgIGludGVycnVwdCB2ZWN0b3IgIg0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICJkb2VzIG5vdCBzdXBwb3J0IGV2ZW50ZmQhXG4iKTsNCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KICAgICAgICAgICAgICAgICAg ICAgICAgfSBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0K DQpJZGVtLg0KW0xpYW5nLCBDdW5taW5nXSBUaGUgc2FtZS4NCg0KDQpAQCAtMjkzLDE3ICsyOTYs MjcgQEAgcGNpX3ZmaW9fc2V0dXBfaW50ZXJydXB0cyhzdHJ1Y3QgcnRlX3BjaV9kZXZpY2UgKmRl diwgaW50IHZmaW9fZGV2X2ZkKQ0KICAgICAgICAgICAgICAgIGZkID0gZXZlbnRmZCgwLCAwKTsN CiAgICAgICAgICAgICAgICBpZiAoZmQgPCAwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBS VEVfTE9HKEVSUiwgRUFMLCAiICBjYW5ub3Qgc2V0IHVwIGV2ZW50ZmQsICINCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZXJyb3IgJWkgKCVzKVxuIiwgZXJybm8sIHN0 cmVycm9yKGVycm5vKSk7DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJlcnJvciAl aSAoJXMpXG4iLCBlcnJubywgc3RyZXJyb3IoZXJybm8pKTsNCg0KSWRlbS4NCltMaWFuZywgQ3Vu bWluZ10gVGhlIHNhbWUuDQoNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0K ICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIGRldi0+aW50cl9oYW5kbGUuZmQg PSBmZDsNCiAgICAgICAgICAgICAgICBkZXYtPmludHJfaGFuZGxlLnZmaW9fZGV2X2ZkID0gdmZp b19kZXZfZmQ7DQotDQoNCklkZW0uDQpbTGlhbmcsIEN1bm1pbmddIEFjY2VwdC4NCg0KICAgICAg ICAgICAgICAgIHN3aXRjaCAoaSkgew0KICAgICAgICAgICAgICAgIGNhc2UgVkZJT19QQ0lfTVNJ WF9JUlFfSU5ERVg6DQogICAgICAgICAgICAgICAgICAgICAgICBpbnRlcm5hbF9jb25maWcudmZp b19pbnRyX21vZGUgPSBSVEVfSU5UUl9NT0RFX01TSVg7DQogICAgICAgICAgICAgICAgICAgICAg ICBkZXYtPmludHJfaGFuZGxlLnR5cGUgPSBSVEVfSU5UUl9IQU5ETEVfVkZJT19NU0lYOw0KKyAg ICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IFZGSU9fTUFYX1JYVFhfSU5UUl9J RDsgaSsrKSB7DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZkID0gZXZlbnRmZCgw LCAwKTsNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZkIDwgMCkgew0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJURV9MT0coRVJSLCBFQUwsDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY2Fubm90IHNl dHVwIGV2ZW50ZmQsIg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgImVycm9yICVpICglcylcbiIsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBlcnJubywgc3RyZXJyb3IoZXJybm8pKTsNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIH0NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2LT5pbnRy X2hhbmRsZS5lZmRzW2ldID0gZmQ7DQorICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAg ICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICBjYXNlIFZGSU9fUENJX01T SV9JUlFfSU5ERVg6DQogICAgICAgICAgICAgICAgICAgICAgICBpbnRlcm5hbF9jb25maWcudmZp b19pbnRyX21vZGUgPSBSVEVfSU5UUl9NT0RFX01TSTsNCmRpZmYgLS1naXQgYS9saWIvbGlicnRl X2VhbC9saW51eGFwcC9lYWwvcnRlX2VhbF92ZXJzaW9uLm1hcCBiL2xpYi9saWJydGVfZWFsL2xp bnV4YXBwL2VhbC9ydGVfZWFsX3ZlcnNpb24ubWFwDQppbmRleCA1ZjE4NTdkLi44OTJhNDUyIDEw MDY0NA0KLS0tIGEvbGliL2xpYnJ0ZV9lYWwvbGludXhhcHAvZWFsL3J0ZV9lYWxfdmVyc2lvbi5t YXANCisrKyBiL2xpYi9saWJydGVfZWFsL2xpbnV4YXBwL2VhbC9ydGVfZWFsX3ZlcnNpb24ubWFw DQpAQCAtNjQsNiArNjQsOCBAQCBEUERLXzIuMCB7DQogICAgICAgIHJ0ZV9pbnRyX2NhbGxiYWNr X3VucmVnaXN0ZXI7DQogICAgICAgIHJ0ZV9pbnRyX2Rpc2FibGU7DQogICAgICAgIHJ0ZV9pbnRy X2VuYWJsZTsNCisgICAgICAgcnRlX2ludHJfcnhfc2V0Ow0KKyAgICAgICBydGVfaW50cl9yeF93 YWl0Ow0KICAgICAgICBydGVfbG9nOw0KICAgICAgICBydGVfbG9nX2FkZF9pbl9oaXN0b3J5Ow0K ICAgICAgICBydGVfbG9nX2N1cl9tc2dfbG9nbGV2ZWw7DQotLQ0KMS44LjEuNA0KDQoNCg0KDQot LQ0KRGF2aWQgTWFyY2hhbmQNCg0K