From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68040A00C2; Sat, 12 Mar 2022 14:03:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF1AB4068A; Sat, 12 Mar 2022 14:03:10 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2123.outbound.protection.outlook.com [40.107.20.123]) by mails.dpdk.org (Postfix) with ESMTP id 5984140040; Sat, 12 Mar 2022 14:03:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nT/sqDbk4MG9B5E+iOkZuKK1KSp6g4WG9wUGBIsG4S1/JQE0BtqQ7lhkUwPDbhfEPDm58Ij82I3FUNvDBVQ35X51iJGdr4oaSI1eGYtgVNJ3PV42B6R+LZSadRtztqQU1KUUHuYHNUXNmSLfg1+KgF1F6BAyeyfGMeIy0Q0YwrBDrQ5lCbuxDxGwfI2raLI1Cswb4IIkTZm6PBwFx3qO5C2BLzYNGdJa2JIG9MA0LT4op69tO97D7hqR6AYn8aEHQUAX7wyELXtu0lOvng0R7VKoIZOwAvFt4CjRWeef+nD+F74PjkOLjjP17m8Er3vurtv9X+6NMnn5qOORLPwq8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CqJkW7wWDzLNsqh5PTiuw6p+Q3GYQ2WvGc1xLgi1lwc=; b=D7OtyjCq1BZk7PQUMES1kUg8uwFiLE69hJZByqRiKcUw7sBn4pZnGf7zAiyAiWhdsTzzcMn9EbmaE+r1BNk4GYeKNlirYkidJscMQjevbynweT+yWuqauYSVTkGAG/sIHkzaduxyssfDssSHhe6rYZu3TdaKq0gZa813K7docuUWRImLvBOhVK2IZIJ2j/uTf3+6rHPNTZ0uArkfFdxViBDUZ6W6v0157OzHA2K8HTldn2vkILkq7DD9vwIY0O2CVWpXDwUu37CRPOLHrE4Q+/NW8hTwx7LW7ULVA4NuMjOxNGdSjpjAhiSaQBPYkDCwk0Q7N6LqdAbvQs3LmNDjHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silicom-usa.com; dmarc=pass action=none header.from=silicom-usa.com; dkim=pass header.d=silicom-usa.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SILICOMLTD.onmicrosoft.com; s=selector2-SILICOMLTD-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CqJkW7wWDzLNsqh5PTiuw6p+Q3GYQ2WvGc1xLgi1lwc=; b=FyKU2+s6PdAS9oAyHX7jww0zVNAPL8P/lJ5MM+8TFPekYkroX23bFdUwpvZ6T7U8RyJ1C3FYaOBdW604ilq2Y5MtbetjX7OLeFi0r5QYTwjL8rzyC3vqc3G3EfZDYSfyJ4gQBsGInmhdo9ZnPE0gMuhIVihfPLZcIkBRbjwPHIk= Received: from AM0PR0402MB3506.eurprd04.prod.outlook.com (2603:10a6:208:17::29) by AS8PR04MB8417.eurprd04.prod.outlook.com (2603:10a6:20b:3f9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.25; Sat, 12 Mar 2022 13:03:07 +0000 Received: from AM0PR0402MB3506.eurprd04.prod.outlook.com ([fe80::503d:b44a:c913:f15]) by AM0PR0402MB3506.eurprd04.prod.outlook.com ([fe80::503d:b44a:c913:f15%3]) with mapi id 15.20.5061.025; Sat, 12 Mar 2022 13:03:07 +0000 From: Jeff Daly To: Jeff Daly , "dev@dpdk.org" CC: "stable@dpdk.org" , Stephen Douthit , Haiyue Wang Subject: RE: [PATCH v4 3/3] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Topic: [PATCH v4 3/3] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Index: AQHYLLgQHGEvn3dVkkaDeyaiVdu9F6y7yFzw Date: Sat, 12 Mar 2022 13:03:07 +0000 Message-ID: References: <20211206221922.644187-1-stephend@silicom-usa.com> <20220228152937.21247-1-jeffd@silicom-usa.com> <20220228152937.21247-4-jeffd@silicom-usa.com> In-Reply-To: <20220228152937.21247-4-jeffd@silicom-usa.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0f78b54e-f6e5-4579-2755-08da0428a73e x-ms-traffictypediagnostic: AS8PR04MB8417:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZQbEMviBU0m9A9PQ2O7lIwM3QKu9/3BssXYowDZM1lUG+57cyXe2jGs9tg2VRulwUnYCrQoLR3e5lohUEllFRisy6pNH93gwRzm2M7us4SwRW86C+Ewn0J84ABw5R6bLXqrY1SdfYODeXclJ01aogpzsZogh9bRX9jf1JQjk4i50uZBRPoHC6Caq/QFmDXoVL/S9XUiKsT81BmghDkFCbL7vRcoM1fw+3v2Nb9gxsuKp+XrXqQHT+nMkEeRNZc8GN5399ARLV97ZK63vFO8BoLcWcQmU2YWL+kr4bxBYJbNLryb2mOoGYs0TH5tuLTN3cl6bGMS3GQbfsZocDAS7jy4OK8gxVOdOKLDa6bsg2Kmr49oIOo3P04B0queac5mt/tneM46eYwOJwMN4L62452NT0ynLulsU1e1s2iDoHMdJqO2LrleRcO0iA7S/SuUl2JNHZGqe3DFLKCELpu+UFZIRcsarn10N44Y05TdJS6LrU4awsVPSGzfFBA42Jm2CrGkDUp6qBQv/zfx1RHgQKh4Len1J7OdMfpGj3YMSvl5DHYtvvuJLOLLnEVaWMsqDf1GqsOsbiG4JfbNO3Cz+utGgCEGPJYVwGWrpngLvj52tLVbnu5Lxw5FGmKonOdT2fRwfGB2qI47TT2mj3NG2T7bZH/xP8+eRmM8OGtfpajXOivd3wJQvBYxgmfvHWbhzr/T1YusdirX6XV6qrB7gdw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0402MB3506.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(33656002)(2906002)(38070700005)(508600001)(30864003)(5660300002)(8936002)(52536014)(26005)(186003)(86362001)(83380400001)(53546011)(7696005)(6506007)(71200400001)(9686003)(55016003)(110136005)(4326008)(122000001)(54906003)(76116006)(66446008)(38100700002)(8676002)(66476007)(66556008)(64756008)(316002)(66946007)(579004)(559001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?allSaFNzRTVJNmV3KzFhL3p5UThIeTZ6M0kwUjZkSUc0TFBHNDF1SkE0bUZh?= =?utf-8?B?K3h3R0F2NHNhZS9tc1EzaG1EKysvYVJNSUROdHRyMmtSYkh0UGJyN0dTeGtJ?= =?utf-8?B?NTUrY3dSa0VPQjA0NGhPMzZKWkVCakRQREJJMTFtTmU4WFRpZVR1MXFRdStt?= =?utf-8?B?S1RqNy9WMklrcDhQS2FTdlpFNG5yU1ZBZ2o5eXVvMVF6Qk1xZVRVYXl0L0pi?= =?utf-8?B?alpHcHpGck1XaXEvQzRJQjhDZC94dlJzQndoR3E1NkdDZjhEOUpHSWk5RjhE?= =?utf-8?B?NlFzd1oxMmdiQkpCbldxOFVXd0ZMSG5LWllUZ1o1OGxGbW9pL1FVckt6dlY4?= =?utf-8?B?VUZJRXMvN0YyLzE1STlQVV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NDakpiU0JkaGE1V2JaZ2JmM3BVWHhQN3lRbDRmVUpjaWF1cXhaKzU1?= =?utf-8?B?dEptOUNNK0lPeHVMODhEZFMrVzQxeG93K0VBNHFhSTZRSEVidjVHQmVVWlRz?= =?utf-8?B?d3QrYmNuaFcyVktUSUI4a0VzS3JFRWI4SklEZktpUW1zNTlKN3IzZGEyaWxm?= =?utf-8?B?WlZaNStkdVpIZXJEVUdQbFdUbHBLN1Vwb3VUeGlGUEtoQVZ5RGEyZ3IyaktU?= =?utf-8?B?K0FFd3B1REhrTTErdEhvNFB0S2JBeXc3Z2FYVmxRRElyMWJ6ayt5QjVtMDVR?= =?utf-8?B?Vjh6dExNRjJTNU13bXZ1aSs2WGw2MXdwM0kzUWpwa2NsZHowWEhMMjF6N0NN?= =?utf-8?B?NXVjZEdqeDMwTEZIdFNRNGZSUHVNM2xKK2hFNlpWTEhKVlZVQlZ0OWxlM0tO?= =?utf-8?B?ZGJJYTdSMDViUTRIREhoRXV6YmppeWdydXFrcjZ3bFRpblRBK3F2eGhEOGZk?= =?utf-8?B?aGozY0FUbWt1bXptVjBXUElQU2MvSkhLTDdyMFhsOUlnL1I2LzJkWFVRRFlv?= =?utf-8?B?Tm5Vc2w2Q043V1Qwb0lGbmRaNjI5YklIQ1NkMmNqOWMzdU5wRDBKRHdaZlRP?= =?utf-8?B?NUVONkU4WXNmNXFvcmN4SitvdURGZGVpU0NKOWJ6bnY1Qnphb29oaHRFMTQv?= =?utf-8?Q?Qd0h4k+Z6qaxUiiX1djHgfh7S1f3gKKq?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR0402MB3506.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f78b54e-f6e5-4579-2755-08da0428a73e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2022 13:03:07.6324 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c9e326d8-ce47-4930-8612-cc99d3c87ad1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yTmQUuHUDHHMUf/Ghvkm7CxH5VbZbt4j7KwfCV+ujPrwAEvTpLQcZPJhDzWUYHLR2tsVMkmTA0avSm4VPoDcmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8417 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSmVmZiBEYWx5IDxqZWZm ZEBzaWxpY29tLXVzYS5jb20+DQo+IFNlbnQ6IE1vbmRheSwgRmVicnVhcnkgMjgsIDIwMjIgMTA6 MzAgQU0NCj4gVG86IGRldkBkcGRrLm9yZw0KPiBDYzogc3RhYmxlQGRwZGsub3JnOyBTdGVwaGVu IERvdXRoaXQgPHN0ZXBoZW5kQHNpbGljb20tdXNhLmNvbT47IEhhaXl1ZQ0KPiBXYW5nIDxoYWl5 dWUud2FuZ0BpbnRlbC5jb20+DQo+IFN1YmplY3Q6IFtQQVRDSCB2NCAzLzNdIG5ldC9peGdiZTog Rml4IFNGUCBkZXRlY3Rpb24gYW5kIGxpbmtpbmcgb24gaG90cGx1Zw0KPiANCj4gQ2F1dGlvbjog VGhpcyBpcyBhbiBleHRlcm5hbCBlbWFpbC4gUGxlYXNlIHRha2UgY2FyZSB3aGVuIGNsaWNraW5n IGxpbmtzIG9yDQo+IG9wZW5pbmcgYXR0YWNobWVudHMuDQo+IA0KPiANCj4gQ3VycmVudGx5IHRo ZSBpeGdiZSBkcml2ZXIgZG9lcyBub3QgSUQgYW55IFNGUCBleGNlcHQg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X2ZpYmVyOg0KPiArICAgICAgIGNhc2UgaXhnYmVfbWVkaWFfdHlwZV9maWJlcl9x c2ZwOg0KPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsgICAgICAgZGVmYXVsdDoNCj4gKyAg ICAgICAgICAgICAgIHJldHVybiBJWEdCRV9TRlBfQ0FHRV9OT0NBR0U7DQo+ICsgICAgICAgfQ0K PiArDQo+ICsgICAgICAgc3dpdGNoIChody0+bWFjLnR5cGUpIHsNCj4gKyAgICAgICBjYXNlIGl4 Z2JlX21hY184MjU5OUVCOg0KPiArICAgICAgICAgICAgICAgc2ZwX2NhZ2Vfc3RhdHVzID0gISEo SVhHQkVfUkVBRF9SRUcoaHcsIElYR0JFX0VTRFApICYNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBJWEdCRV9FU0RQX1NEUDIpOw0KPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsg ICAgICAgY2FzZSBpeGdiZV9tYWNfWDU1MEVNX3g6DQo+ICsgICAgICAgY2FzZSBpeGdiZV9tYWNf WDU1MEVNX2E6DQo+ICsgICAgICAgICAgICAgICAvKiBTRFAwIGlzIHRoZSBhY3RpdmUgbG93IHNp Z25hbCBQUlNOVCMsIHNvIGludmVydCB0aGlzICovDQo+ICsgICAgICAgICAgICAgICBzZnBfY2Fn ZV9zdGF0dXMgPSAhKElYR0JFX1JFQURfUkVHKGh3LCBJWEdCRV9FU0RQKSAmDQo+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBJWEdCRV9FU0RQX1NEUDApOw0KPiArICAgICAgICAg ICAgICAgYnJlYWs7DQo+ICsgICAgICAgZGVmYXVsdDoNCj4gKyAgICAgICAgICAgICAgIC8qIERv bid0IGtub3cgaG93IHRvIGNoZWNrIHRoaXMgZGV2aWNlIHR5cGUgeWV0ICovDQo+ICsgICAgICAg ICAgICAgICBzZnBfY2FnZV9zdGF0dXMgPSBJWEdCRV9TRlBfQ0FHRV9VTktOT1dOOw0K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lIHsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgUE1EX0RSVl9MT0co REVCVUcsICJTRlAgSUQgcmVhZCBBQ0tlZCIpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBz ZnBfY2FnZV9zdGF0dXMgPSBJWEdCRV9TRlBfQ0FHRV9GVUxMOw0KPiArICAgICAgICAgICAgICAg fQ0KPiArICAgICAgIH0NCj4gKw0KPiArICAgICAgIGlmIChzZnBfY2FnZV9zdGF0dXMgPT0gSVhH QkVfU0ZQX0NBR0VfRU1QVFkpIHsNCj4gKyAgICAgICAgICAgICAgIFBNRF9EUlZfTE9HKERFQlVH LCAiU0ZQIGFic2VudCwgY2FnZV9zdGF0dXMgJWRcbiIsDQo+IHNmcF9jYWdlX3N0YXR1cyk7DQo+ ICsgICAgICAgICAgICAgICByZXR1cm47DQo+ICsgICAgICAgfQ0KPiArDQo+ICsgICAgICAgLyog Tm8gc2V0dXAgcmVxdWVzdGVkPyAgTm90aGluZyB0byBkbyAqLw0KPiArICAgICAgIGlmICghKGlu dHItPmZsYWdzICYgSVhHQkVfRkxBR19ORUVEX1NGUF9TRVRVUCkpDQo+ICsgICAgICAgICAgICAg ICByZXR1cm47DQo+ICsNCj4gKyAgICAgICBlcnIgPSBpeGdiZV9zZnBfaWRfYW5kX3NldHVwKGRl dik7DQo+ICsgICAgICAgaWYgKGVycikgew0KPiArICAgICAgICAgICAgICAgUE1EX0RSVl9MT0co REVCVUcsICJmYWlsZWQgdG8gSUQgJiBzZXR1cCBTRlAgJWQiLCBlcnIpOw0KPiArICAgICAgICAg ICAgICAgcmV0dXJuOw0KPiArICAgICAgIH0NCj4gKw0KPiArICAgICAgIC8qIFNldHVwIGlzIGRv bmUsIGNsZWFyIHRoZSBmbGFnLCBidXQgbWFrZSBzdXJlIGxpbmsgY29uZmlnIHJ1bnMgZm9yIG5l dyBTRlANCj4gKi8NCj4gKyAgICAgICBpbnRyLT5mbGFncyAmPSB+SVhHQkVfRkxBR19ORUVEX1N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kxBR19ORUVEX0xJTktfQ09ORklHDQo+ICsgICAgICAgICogd2lsbCBuZXZlciBiZSBzZXQgaW4g dGhlIGludGVycnVwdCBoYW5kbGVyDQo+ICsgICAgICAgICovDQo+ICsjaWZuZGVmIFJURV9FWEVD X0VOVl9GUkVFQlNEDQo+ICsgICAgICAgc3RydWN0IHJ0ZV9wY2lfZGV2aWNlICpwY2lfZGV2ID0g UlRFX0VUSF9ERVZfVE9fUENJKGRldik7DQo+ICsgICAgICAgc3RydWN0IHJ0ZV9pbnRyX2hhbmRs ZSAqaW50cl9oYW5kbGUgPSBwY2lfZGV2LT5pbnRyX2hhbmRsZTsNCj4gKyAgICAgICBpZiAocnRl X2ludHJfYWxsb3dfb3RoZXJzKGludHJfaGFuZGxlKSkgew0KPiArICAgICAgICAgICAgICAgLyog Y2hlY2sgaWYgbHNjIGludGVycnVwdCBpcyBlbmFibGVkICovDQo+ICsgICAgICAgICAgICAgICBp ZiAoZGV2LT5kYXRhLT5kZXZfY29uZi5pbnRyX2NvbmYubHNjKQ0KPiArICAgICAgICAgICAgICAg ICAgICAgICBoYXZlX2ludCA9IHRydWU7DQo+ICsgICAgICAgfQ0KPiArI2VuZGlmIC8qICNpZmRl ZiBSVEVfRVhFQ19FTlZfRlJFRUJTRCAqLw0KPiArDQo+ICsgICAgICAgLyogU2tpcCBpZiB3ZSBz dGlsbCBuZWVkIHRvIHNldHVwIGFuIFNGUCwgb3IgaWYgbm8gbGluayBjb25maWcgcmVxdWVzdGVk DQo+ICsgICAgICAgICovDQo+ICsgICAgICAgaWYgKChpbnRyLT5mbGFncyAmIElYR0JFX0ZMQUdf TkVFRF9TRlBfU0VUVVApIHx8DQo+ICsgICAgICAgICAgICghKGludHItPmZsYWdzICYgSVhHQkVf RkxBR19ORUVEX0xJTktfQ09ORklHKSAmJiBoYXZlX2ludCkpDQo+ICsgICAgICAgICAgICAgICBy ZXR1cm47DQo+ICsNCj4gKyAgICAgICBpZiAoIWhhdmVfaW50ICYmICEoaW50ci0+ZmxhZ3MgJiBJ WEdCRV9GTEFHX05FRURfTElOS19DT05GSUcpKSB7DQo+ICsgICAgICAgICAgICAgICBlcnIgPSBp eGdiZV9jaGVja19saW5rKGh3LCAmc3BlZWQsICZsaW5rX3VwLCAwKTsNCj4gKyAgICAgICAgICAg ICAgIGlmICghZXJyICYmICFsaW5rX3VwKSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIGlu dHItPmZsYWdzIHw9IElYR0JFX0ZMQUdfTkVFRF9MSU5LX0NPTkZJRzsNCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgUE1EX0RSVl9MT0coREVCVUcsICJMaW5rIGRvd24sIG5vIExTQywgc2V0DQo+ IE5FRURfTElOS19DT05GSUdcbiIpOw0KPiArICAgICAgICAgICAgICAgfSBlbHNlIHsNCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOw0KPiArICAgICAgICAgICAgICAgfQ0KPiArICAg ICAgIH0NCj4gKw0KPiArICAgICAgIHNwZWVkID0gaHctPnBoeS5hdXRvbmVnX2FkdmVydGlzZWQ7 DQo+ICsgICAgICAgaWYgKCFzcGVlZCkNCj4gKyAgICAgICAgICAgICAgIGl4Z2JlX2dldF9saW5r X2NhcGFiaWxpdGllcyhodywgJnNwZWVkLCAmYXV0b25lZyk7DQo+ICsNCj4gKyAgICAgICBlcnIg PSBpeGdiZV9zZXR1cF9saW5rKGh3LCBzcGVlZCwgdHJ1ZSk7DQo+ICsgICAgICAgaWYgKGVycikg ew0KPiArICAgICAgICAgICAgICAgUE1EX0RSVl9MT0coRVJSLCAiaXhnYmVfc2V0dXBfbGluayBm YWlsZWQgJWQiLCBlcnIpOw0KPiArICAgICAgICAgICAgICAgcmV0dXJuOw0KPiArICAgICAgIH0N Cj4gKw0KPiArICAgICAgIGludHItPmZsYWdzICY9IH5JWEdCRV9GTEFHX05FRURfTElOS19DT05G SUc7IH0NCj4gKw0KPiArc3RhdGljIHZvaWQNCj4gK2l4Z2JlX2xpb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YpOw0KPiArICAgICAg ICAgICAgICAgaXhnYmVfbGlua19zZXJ2aWNlKGRldik7DQo+ICsgICAgICAgICAgICAgICBpeGdi ZV9saW5rX3VwZGF0ZV9zZXJ2aWNlKGRldik7DQo+ICsNCj4gKyAgICAgICAgICAgICAgIC8qIFJ1 biB0aGUgc2VydmljZSB0aHJlYWQgaGFuZGxlciBtb3JlIGZyZXF1ZW50bHkgd2hlbiBsaW5rIGlz DQo+ICsgICAgICAgICAgICAgICAgKiBkb3duIHRvIHJlZHVjZSBsaW5rIHVwIGxhdGVuY3kgKGV2 ZXJ5IDIwMG1zIHZzIDFzKQ0KPiArICAgICAgICAgICAgICAgICoNCj4gKyAgICAgICAgICAgICAg ICAqIFVzZSBhIG51bWJlciBvZiBzbWFsbGVyIHNsZWVwcyB0byBkZWNyZWFzZSBleGl0IGxhdGVu Y3kgd2hlbg0KPiArICAgICAgICAgICAgICAgICogaXhnYmVfZGV2X3N0b3AoKSB3YW50cyB0aGlz IHRocmVhZCB0byBqb2luDQo+ICsgICAgICAgICAgICAgICAgKi8NCj4gKyAgICAgICAgICAgICAg IGVyciA9IGl4Z2JlX2NoZWNrX2xpbmsoaHcsICZzcGVlZCwgJmxpbmtfdXAsIDApOw0KPiArICAg ICAgICAgICAgICAgaWYgKGVyciA9PSBJWEdCRV9TVUNDRVNTICYmIGxpbmtfdXApDQo+ICsgICAg ICAgICAgICAgICAgICAgICAgIHNlcnZpY2VfbXMgPSAyMDAwOw0KPiArICAgICAgICAgICAgICAg ZWxzZQ0KPiArICAgICAgICAgICAgICAgICAgICAgICBzZXJ2aWNlX21zID0gMTAwOw0KPiArDQo+ ICsgICAgICAgICAgICAgICAvKiBDYWxsIG1zZWNfZGVsYXkgaW4gYSBsb29wIHdpdGggc2V2ZXJh bCBzbWFsbGVyIHNsZWVwcyB0bw0KPiArICAgICAgICAgICAgICAgICogcHJvdmlkZSBwZXJpb2Rp YyB0aHJlYWQgY2FuY2VsbGF0aW9uIHBvaW50cw0KPiArICAgICAgICAgICAgICAgICovDQo+ICsg ICAgICAgICAgICAgICBzdGFydCA9IHJ0ZV9nZXRfdGltZXJfY3ljbGVzKCk7DQo+ICsgICAgICAg ICAgICAgICB0aWNrcyA9ICh1aW50NjRfdClzZXJ2aWNlX21zICogcnRlX2dldF90aW1lcl9oeigp IC8gMUUzOw0KPiArICAgICAgICAgICAgICAgd2hpbGUgKChydGVfZ2V0X3RpbWVyX2N5Y2xlcygp IC0gc3RhcnQpIDwgdGlja3MpDQo+ICsgICAgICAgICAgICAgICAgICAgICAgIG1zZWNfZGVsYXko MTAwKTsNCj4gKyAgICAgICB9DQo+ICsNCj4gKyAgICAgICAvKiBOZXZlciByZXR1cm4gKi8NCj4g KyAgICAgICByZXR1cm4gTlVMTDsNCj4gK30NCj4gKw0KPiArc3RhdGljIHMzMg0KPiArZXRoX2l4 Z2JlX2NoZWNrX21hY19saW5rX2dlbmVyaWMoc3RydWN0IGl4Z2JlX2h3ICpodywgaXhnYmVfbGlu a19zcGVlZA0KPiAqc3BlZWQsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJv b2wgKmxpbmtfdXAsIGJvb2wNCj4gK2xpbmtfdXBfd2FpdF90b19jb21wbGV0ZSkgew0KPiArICAg ICAgIGlmIChpeGdiZV9uZWVkX2Nyb3NzdGFsa19maXgoaHcpKSB7DQo+ICsgICAgICAgICAgICAg ICBlbnVtIGl4Z2JlX3NmcF9jYWdlX3N0YXR1cyBzZnBfY2FnZV9zdGF0dXM7DQo+ICsNCj4gKyAg ICAgICAgICAgICAgIHNmcF9jYWdlX3N0YXR1cyA9IGl4Z2JlX2NoZWNrX3NmcF9jYWdlKGh3KTsN Cj4gKyAgICAgICAgICAgICAgIGlmIChzZnBfY2FnZV9zdGF0dXMgIT0gSVhHQkVfU0ZQX0NBR0Vf RlVMTCkgew0KPiArICAgICAgICAgICAgICAgICAgICAgICAqbGlua191cCA9IGZhbHNlOw0KPiAr ICAgICAgICAgICAgICAgICAg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GhfZGV2ICpkZXYpDQo+ICAgICAgICAgaXhnYmVfbDJfdHVubmVsX2NvbmYoZGV2 KTsNCj4gICAgICAgICBpeGdiZV9maWx0ZXJfcmVzdG9yZShkZXYpOw0KPiANCj4gKyAgICAgICAv KiBTcGF3biBzZXJ2aWNlIHRocmVhZCAqLw0KPiArICAgICAgIGlmIChpeGdiZV9pc19zZnAoaHcp KSB7DQo+ICsgICAgICAgICAgICAgICBpbnRyLT5mbGFncyB8PSBJWEdCRV9GTEFHX05FRURfU0ZQ X1NFVFVQOw0KPiArICAgICAgICAgICAgICAgZXJyID0gcnRlX2N0cmxfdGhyZWFkX2NyZWF0ZSgm YWQtPnNlcnZpY2VfdGhyZWFkX3RpZCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIml4Z2JlLXNlcnZpY2UtdGhyZWFkIiwNCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaXhnYmVfZGV2X3NlcnZpY2VfdGhyZWFkX2hhbmRs ZXIsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldik7 DQo+ICsgICAgICAgICAgICAgICBpZiAoZXJyKSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAg IFBNRF9EUlZfTE9HKEVSUiwgInNlcnZpY2VfdGhyZWFkIGVyciIpOw0KPiArICAgICAgICAgICAg ICAgICAgICAgICBnb3RvIGVycm9yOw0KPiArICAgICAgICAgICAgICAgfQ0KPiArICAgICAgIH0N Cj4gKw0KPiAgICAgICAgIGlmICh0bV9jb25mLT5yb290ICYmICF0bV9jb25mLT5jb21taXR0ZWQp DQo+ICAgICAgICAgICAgICAgICBQTURfRFJWX0xPRyhXQVJOSU5HLA0KPiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgInBsZWFzZSB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JuIHVudGlsIGxpbmsgY29tcGxldGUuDQo+IC0gKiBJdCByZXR1 cm5zIDEgb24gY29tcGxldGUsIHJldHVybiAwIG9uIHRpbWVvdXQuDQo+IC0gKi8NCj4gLXN0YXRp YyBpbnQNCj4gLWl4Z2JlX2Rldl93YWl0X3NldHVwX2xpbmtfY29tcGxldGUoc3RydWN0IHJ0ZV9l dGhfZGV2ICpkZXYsIHVpbnQzMl90DQo+IHRpbWVvdXRfbXMpIC17DQo+IC0jZGVmaW5lIFdBUk5J TkdfVElNRU9VVCAgICA5MDAwIC8qIDlzICBpbiB0b3RhbCAqLw0KPiAtICAgICAgIHN0cnVjdCBp eGdiZV9hZGFwdGVyICphZCA9IGRldi0+ZGF0YS0+ZGV2X3ByaXZhdGU7DQo+IC0gICAgICAgdWlu dDMyX3QgdGltZW91dCA9IHRpbWVvdXRfbXMgPyB0aW1lb3V0X21zIDogV0FSTklOR19USU1FT1VU Ow0KPiAtDQo+IC0gICAgICAgd2hpbGUgKHJ0ZV9hdG9taWMzMl9yZWFkKCZhZC0+bGlua190aHJl YWRfcnVubmluZykpIHsNCj4gLSAgICAgICAgICAgICAgIG1zZWNfZGVsYXkoMSk7DQo+IC0gICAg ICAgICAgICAgICB0aW1lb3V0LS07DQo+IC0NCj4gLSAgICAgICAgICAgICAgIGlmICh0aW1lb3V0 X21zKSB7DQo+IC0gICAgICAgICAgICAgICAgICAgICAgIGlmICghdGltZW91dCkNCj4gLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsNCj4gLSAgICAgICAgICAgICAgIH0g ZWxzZSBpZiAoIXRpbWVvdXQpIHsNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgLyogSXQgd2ls bCBub3QgcmV0dXJuIHVudGlsIGxpbmsgY29tcGxldGUgKi8NCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgdGltZW91dCA9IFdBUk5JTkdfVElNRU9VVDsNCj4gLSAgICAgICAgICAgICAgICAgICAg ICAgUE1E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c3Bl ZWQgPSBSVEVfRVRIX1NQRUVEX05VTV8xMDBNOw0KPiAgICAgICAgICAgICAgICAgbGluay5saW5r X2R1cGxleCA9IFJURV9FVEhfTElOS19GVUxMX0RVUExFWDsNCj4gICAgICAgICAgICAgICAgIHJl dHVybiBydGVfZXRoX2xpbmtzdGF0dXNfc2V0KGRldiwgJmxpbmspOyBAQCAtNDI2NywzMiArNDU2 Niw2IEBADQo+IGl4Z2JlX2Rldl9saW5rX3VwZGF0ZV9zaGFyZShzdHJ1Y3QgcnRlX2V0aF9kZXYg KmRldiwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgbGlua191cCA9IDA7DQo+ICAgICAgICAg fQ0KPiANCj4gLSAgICAgICBpZiAobGlua191cCA9PSAwKSB7DQo+IC0gICAgICAgICAgICAgICBp ZiAoaXhnYmVfZ2V0X21lZGlhX3R5cGUoaHcpID09IGl4Z2JlX21lZGlhX3R5cGVfZmliZXIpIHsN Cj4gLSAgICAgICAgICAgICAgICAgICAgICAgaXhnYmVfZGV2X3dhaXRfc2V0dXBfbGlua19jb21w bGV0ZShkZXYsIDApOw0KPiAtICAgICAgICAgICAgICAgICAgICAgICBpZiAocnRlX2F0b21pYzMy X3Rlc3RfYW5kX3NldCgmYWQtPmxpbmtfdGhyZWFkX3J1bm5pbmcpKSB7DQo+IC0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLyogVG8gYXZvaWQgcmFjZSBjb25kaXRpb24gYmV0d2VlbiB0 aHJlYWRzLCBzZXQNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiB0aGUgSVhH QkVfRkxBR19ORUVEX0xJTktfQ09ORklHIGZsYWcgb25seQ0KPiAtICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAqIHdoZW4gdGhlcmUgaXMgbm8gbGluayB0aHJlYWQgcnVubmluZy4NCj4g LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8NCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpbnRyLT5mbGFncyB8PSBJWEdCRV9GTEFHX05FRURfTElOS19DT05GSUc7 DQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ0ZV9jdHJsX3RocmVhZF9j cmVhdGUoJmFkLT5saW5rX3RocmVhZF90aWQsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAiaXhnYmUtbGluay1oYW5kbGVyIiwNCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpeGdiZV9kZXZfc2V0dXBfbGlua190aHJlYWRfaGFuZGxlciwNCj4gLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldikgPCAwKSB7DQo+IC0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQTURfRFJWX0xPRyhFUlIsDQo+IC0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJDcmVhdGUgbGlu ayB0aHJlYWQgZmFpbGVkISIpOw0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgcnRlX2F0b21pYzMyX2NsZWFyKCZhZC0+bGlua190aHJlYWRfcnVubmluZyk7DQo+IC0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiAtICAgICAgICAgICAgICAgICAgICAg ICB9IGVsc2Ugew0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBNRF9EUlZfTE9H KEVSUiwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJPdGhlciBs aW5rIHRocmVhZCBpcyBydW5uaW5nIG5vdyEiKTsNCj4gLSAgICAgICAgICAgICAgICAgICAgICAg fQ0KPiAtICAgICAgICAgICAgICAgfQ0KPiAtICAgICAgICAgICAgICAgcmV0dXJu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ICAgSVhHQkVfREVWX1BSSVZBVEVfVE9fSFcoZGV2LT5kYXRhLT5kZXZfcHJpdmF0ZSk7 DQo+ICsgICAgICAgaW50NjRfdCB0aW1lb3V0Ow0KPiANCj4gICAgICAgICBQTURfRFJWX0xPRyhE RUJVRywgImludHIgYWN0aW9uIHR5cGUgJWQiLCBpbnRyLT5mbGFncyk7DQo+IA0KPiBAQCAtNDYw NSwxNiArNDg4NiwxNCBAQCBpeGdiZV9kZXZfaW50ZXJydXB0X2FjdGlvbihzdHJ1Y3QgcnRlX2V0 aF9kZXYNCj4gKmRldikNCj4gICAgICAgICAgICAgICAgIGlmIChydGVfZWFsX2FsYXJtX3NldCh0 aW1lb3V0ICogMTAwMCwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBp eGdiZV9kZXZfaW50ZXJydXB0X2RlbGF5ZWRfaGFuZGxlciwgKHZvaWQgKilkZXYpIDwgMCkNCj4g ICAgICAgICAgICAgICAgICAgICAgICAgUE1EX0RSVl9MT0coRVJSLCAiRXJyb3Igc2V0dGluZyBh bGFybSIpOw0KPiAtICAgICAgICAgICAgICAgZWxzZSB7DQo+IC0gICAgICAgICAgICAgICAgICAg ICAgIC8qIHJlbWVtYmVyIG9yaWdpbmFsIG1hc2sgKi8NCj4gLSAgICAgICAgICAgICAgICAgICAg ICAgaW50ci0+bWFza19vcmlnaW5hbCA9IGludHItPm1hc2s7DQo+ICsgICAgICAgICAgICAgICBl bHNlDQo+ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9ubHkgZGlzYWJsZSBsc2MgaW50ZXJy dXB0ICovDQo+ICAgICAgICAgICAgICAgICAgICAgICAgIGludHItPm1hc2sgJj0gfklYR0JFX0VJ TVNfTFNDOw0KPiAtICAgICAgICAgICAgICAgfQ0KPiAgICAgICAgIH0NCj4gDQo+ICAgICAgICAg UE1EX0RSVl9MT0coREVCVUcsICJlbmFibGUgaW50ciBpbW1lZGlhdGVseSIpOw0KPiAgICAgICAg I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