From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0061.outbound.protection.outlook.com [104.47.38.61]) by dpdk.org (Postfix) with ESMTP id 101142BBE for ; Mon, 20 Aug 2018 00:19:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H7dCNWFTqroLX9NSH/DMJdukQzNr2RMGAK4rQS5A1zQ=; b=NnRyr7rxUzB2Cm7eX8Kqk/DMszx8v0QouX69cTWzCNRoZd2fxBVq8ArLvJ9tE1wZ971SnVQUWc3DLEECPlmf5HYCUzCz1xzIVpuK210QHIRvMN2iNUHj22EoVQsav7NYu2wMcYNZrvqHseixB0Fwahs4b7BjQ4k08Jl0Mm3FTzI= Received: from CO2PR05MB2487.namprd05.prod.outlook.com (10.166.95.145) by CO2PR05MB731.namprd05.prod.outlook.com (10.141.228.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.19; Sun, 19 Aug 2018 22:19:45 +0000 Received: from CO2PR05MB2487.namprd05.prod.outlook.com ([fe80::2c5b:dd33:28f5:ef71]) by CO2PR05MB2487.namprd05.prod.outlook.com ([fe80::2c5b:dd33:28f5:ef71%9]) with mapi id 15.20.1080.010; Sun, 19 Aug 2018 22:19:45 +0000 From: Jia Yu To: Chas Williams <3chas3@gmail.com> CC: "dev@dpdk.org" , Declan Doherty , Chas Williams Thread-Topic: [dpdk-dev] [PATCH] net/bonding: fix buf corruption in merging un-transmitted packets Thread-Index: AQHUN04ybD2MQrOpNkSePdOSj3dVd6THMYEA Date: Sun, 19 Aug 2018 22:19:45 +0000 Message-ID: <29C69F93-9D89-4528-A645-78E6C34E8CB5@vmware.com> References: <1534551009-16550-1-git-send-email-jyu@vmware.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/10.f.0.180709 authentication-results: spf=none (sender IP is ) smtp.mailfrom=jyu@vmware.com; x-originating-ip: [2601:646:8600:100:98f1:4025:743e:a88c] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CO2PR05MB731; 20:9/hC+x7UJzJrYlkGkPmVoHhK+8GgAHJsG7Cm4HdHTd+QP6lxayBS9gbQOHL/i8cvnPbCzAgzvhFdLxBCHFEetDL6ZnLyozt2we+iZCVb4nPR/XC3rwhp9gLxfC3cBlwjsLN+RaotdlDF9QF2UDqz18iEURGlpJ5YYYl3BLinFoA= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 0ab7c4de-c224-44b3-88bf-08d60621de4f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:CO2PR05MB731; x-ms-traffictypediagnostic: CO2PR05MB731: bcl: 0 x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(61668805478150)(85827821059158)(97927398514766)(21748063052155)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:CO2PR05MB731; BCL:0; PCL:0; RULEID:; SRVR:CO2PR05MB731; x-forefront-prvs: 07697999E6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(136003)(346002)(376002)(396003)(189003)(199004)(1411001)(14444005)(2900100001)(97736004)(256004)(6916009)(53546011)(6506007)(6436002)(53936002)(5660300001)(6306002)(5250100002)(25786009)(2906002)(9326002)(6246003)(83716003)(82746002)(39060400002)(68736007)(54896002)(6512007)(4326008)(236005)(54906003)(8936002)(86362001)(58126008)(316002)(106356001)(105586002)(6116002)(790700001)(99286004)(76176011)(33656002)(2616005)(11346002)(81166006)(8676002)(81156014)(46003)(446003)(36756003)(7736002)(229853002)(6486002)(14454004)(486006)(186003)(476003)(102836004)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR05MB731; H:CO2PR05MB2487.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: A5nsxFF48d4jdKfg44OrDhTl2ZQR/PkFOuyfV/LPPNWiYcHS1LLKljaZjYL2txAnAjXKnnQETV0jCXA2c67mzhSvsYmtaLSbxb1NtbpFAjUIY2Qhb76Imrs9tp2+Ne1w4jeTTEyyM490Uw/DF9Ag1B/lHNs0kJMYHkAtrkhBfofeEcwYMgFrb/DNFkbWrWIx8PZll9mCS4WAKzZgMMnn720oBKXq30wkaO+nku0qh7aBlQCW2Ylu5+GnaB17UUFqIT7B+mrqlRfNT7U5SYnlojRJKbGe/cCeYUkdgmAuxCSaOlJ/CpQ1wkxQ1afYkXs1pbR1TSP9XCvUnZjlv6BjdTXpFDUHR+Xg5LfN78UNZmo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ab7c4de-c224-44b3-88bf-08d60621de4f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2018 22:19:45.0758 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR05MB731 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix buf corruption in merging un-transmitted packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2018 22:19:50 -0000 SGkgQ2hhcywNCg0KVGhhbmtzIGZvciByZXZpZXdpbmcgdGhlIGNoYW5nZS4NCg0KT3VyIGFwcGxp Y2F0aW9uIGNyYXNoZWQgYWZ0ZXIgdXBncmFkaW5nIHRvIERQREsgMTguMDIsIHdoZW4gcGFja2V0 IHJhdGUgaXMgaGlnaCBhbmQgYm9uZCBpcyBjb25maWd1cmVkLiBJdCBoYXBwZW5lZCBiZWNhdXNl IHR4cSBjb250YWlucyBpbnZhbGlkIG1idWYgYWRkcmVzc2VzIGFmdGVyIHJ0ZV9ldGhfdHhfYnVy c3QgY2FsbCAoZm9yIGV4YW1wbGUsIDB4MTAwMDAwMDAwIHJlcGVhdGVkIDEzIHRpbWVzIGluIG9u ZSBjb3JlIGR1bXApLiBJdCBzZWVtcyB0aGF0IHRoZSBpbnZhbGlkIGFkZHJlc3NlcyBjYW1lIGZy b20gYnVmIHNoaWZ0IGNvZGUgYmVsb3csIHNvIEkgY2hhbmdlZCB0aGlzIHBhcnQgb2YgY29kZSB0 byBlYXJsaWVyIHZlcnNpb24uIFdlIGRvbuKAmXQgc2VlIGNyYXNoIGFmdGVyIHRoZSBmaXguIFBs ZWFzZSBsZXQgdXMga25vdyBpZiB0aGUgZml4IGlzIHJlYXNvbmFibGUuDQoNCm1fdGFibGUgPSB7 MHg3ZmRmMjNhNjhlYzAsIDB4N2ZkZjIzYTY4NDAwLCAweDdmZGYyM2E2NmU4MCwgMHg3ZmRmMjNh NjU5MDAsDQogICAgMHg3ZmRmMjM5NjBlMDAsIDB4MTAwMDAwMDAwIDxyZX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LmMgYi9kcml2ZXJzL25ldC9ib25kaW5nL3J0ZV9ldGhfYm9uZF9wbWQu Yw0KaW5kZXggNThmNzM3Ny4uY2NlOTczYSAxMDA2NDQNCi0tLSBhL2RyaXZlcnMvbmV0L2JvbmRp bmcvcnRlX2V0aF9ib25kX3BtZC5jDQorKysgYi9kcml2ZXJzL25ldC9ib25kaW5nL3J0ZV9ldGhf Ym9uZF9wbWQuYw0KQEAgLTMwMyw3ICszMDMsNyBAQCBib25kX2V0aGRldl90eF9idXJzdF84MDIz YWRfZmFzdF9xdWV1ZSh2b2lkICpxdWV1ZSwgc3RydWN0IHJ0ZV9tYnVmICoqYnVmcywNCiAgICAg ICAgdWludDE2X3Qgc2xhdmVfdHhfY291bnQsIHNsYXZlX3R4X2ZhaWxfY291bnRbUlRFX01BWF9F VEhQT1JUU10gPSB7IDAgfTsNCiAgICAgICAgdWludDE2X3QgdG90YWxfdHhfY291bnQgPSAwLCB0 b3RhbF90eF9mYWlsX2NvdW50ID0gMDsNCg0KLSAgICAgICB1aW50MTZfdCBpLCBqOw0KKyAgICAg ICB1aW50MTZfdCBpOw0KDQogICAgICAgIGlmICh1bmxpa2VseShuYl9idWZzID09IDApKQ0KICAg ICAgICAgICAgICAgIHJldHVybiAwOw0KQEAgLTM2MSwzMSArMzYxLDkgQEAgYm9uZF9ldGhkZXZf dHhfYnVyc3RfODAyM2FkX2Zhc3RfcXVldWUodm9pZCAqcXVldWUsIHN0cnVjdCBydGVfbWJ1ZiAq KmJ1ZnMsDQogICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV90eF9mYWlsX2NvdW50W2ldID0g c2xhdmVfbmJfYnVmc1tpXSAtDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2xhdmVfdHhfY291bnQ7DQogICAgICAgICAgICAgICAgICAgICAgICB0b3RhbF90eF9mYWls X2NvdW50ICs9IHNsYXZlX3R4X2ZhaWxfY291bnRbaV07DQotDQotICAgICAgICAgICAgICAgICAg ICAgICAvKg0KLSAgICAgICAgICAgICAgICAgICAgICAgICogU2hpZnQgYnVmcyB0byBiZWdpbm5p bmcgb2YgYXJyYXkgdG8gYWxsb3cgcmVvcmRlcmluZw0KLSAgICAgICAgICAgICAgICAgICAgICAg ICogbGF0ZXINCi0gICAgICAgICAgICAgICAgICAgICAgICAqLw0KLSAgICAgICAgICAgICAgICAg ICAgICAgZm9yIChqID0gMDsgaiA8IHNsYXZlX3R4X2ZhaWxfY291bnRbaV07IGorKykgew0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV9idWZzW2ldW2pdID0NCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV9idWZzW2ldWyhzbGF2ZV90eF9j b3VudCAtIDEpICsgal07DQotICAgICAgICAgICAgICAgICAgICAgICB9DQotICAgICAgICAgICAg ICAgfQ0KLSAgICAgICB9DQotDQotICAgICAgIC8qDQotICAgICAgICAqIElmIHRoZXJlIGFyZSB0 eCBidXJzdCBmYWlsdXJlcyB3ZSBtb3ZlIHBhY2tldHMgdG8gZW5kIG9mIGJ1ZnMgdG8NCi0gICAg ICAgICogcHJlc2VydmUgZXhwZWN0ZWQgUE1EIGJlaGF2aW91ciBvZiBhbGwgZmFpbGVkIHRyYW5z bWl0dGVkIGJlaW5nDQotICAgICAgICAqIGF0IHRoZSBlbmQgb2YgdGhlIGlucHV0IG1idWYgYXJy YXkNCi0gICAgICAgICovDQotICAgICAgIGlmICh1bmxpa2VseSh0b3RhbF90eF9mYWlsX2NvdW50 ID4gMCkpIHsNCi0gICAgICAgICAgICAgICBpbnQgYnVmc19pZHggPSBuYl9idWZzIC0gdG90YWxf dHhfZmFpbF9jb3VudCAtIDE7DQotDQotICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHNs YXZlX2NvdW50OyBpKyspIHsNCi0gICAgICAgICAgICAgICAgICAgICAgIGlmIChzbGF2ZV90eF9m YWlsX2NvdW50W2ldID4gMCkgew0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3Ig KGogPSAwOyBqIDwgc2xhdmVfdHhfZmFpbF9jb3VudFtpXTsgaisrKQ0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZnNbYnVmc19pZHgrK10gPSBzbGF2ZV9idWZzW2ld W2pdOw0KLSAgICAgICAgICAgICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgICAgICAgICAgICAg bWVtY3B5KCZidWZzW25iX2J1ZnMgLSB0b3RhbF90eF9mYWlsX2NvdW50XSwNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmc2xhdmVfYnVmc1tpXVtzbGF2ZV90eF9jb3VudF0sDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfdHhfZmFpbF9jb3VudFtpXSAqIHNpemVv ZihidWZzWzBdKSk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICB9DQoNCkBAIC03MTUsOCAr NjkzLDggQEAgYm9uZF9ldGhkZXZfdHhfYnVyc3Rfcm91bmRfcm9iaW4odm9pZCAqcXVldWUsIHN0 cnVjdCBydGVfbWJ1ZiAqKmJ1ZnMsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR4 X2ZhaWxfdG90YWwgKz0gdHhfZmFpbF9zbGF2ZTsNCg0KICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBtZW1jcHkoJmJ1ZnNbbmJfcGt0cyAtIHR4X2ZhaWxfdG90YWxdLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNsYXZlX2J1ZnNbaV1bbnVt X3R4X3NsYXZlXSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHR4X2ZhaWxfc2xhdmUgKiBzaXplb2YoYnVmc1swXSkpOw0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJnNsYXZlX2J1ZnNbaV1bbnVtX3R4X3NsYXZlXSwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR4X2ZhaWxfc2xhdmUgKiBzaXplb2Yo YnVmc1swXSkpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAg ICAgICAgbnVtX3R4X3RvdGFsICs9IG51bV90eF9zbGF2ZTsNCiAgICAgICAgICAgICAgICB9DQpA QCAtMTIyNCw3ICsxMjAyLDcgQEAgYm9uZF9ldGhkZXZfdHhfYnVyc3RfYmFsYW5jZSh2b2lkICpx dWV1ZSwgc3RydWN0IHJ0ZV9tYnVmICoqYnVmcywNCiAgICAgICAgdWludDE2X3Qgc2xhdmVfdHhf Y291bnQsIHNsYXZlX3R4X2ZhaWxfY291bnRbUlRFX01BWF9FVEhQT1JUU10gPSB7IDAgfTsNCiAg ICAgICAgdWludDE2X3QgdG90YWxfdHhfY291bnQgPSAwLCB0b3RhbF90eF9mYWlsX2NvdW50ID0g MDsNCg0KLSAgICAgICB1aW50MTZfdCBpLCBqOw0KKyAgICAgICB1aW50MTZfdCBpOw0KDQogICAg ICAgIGlmICh1bmxpa2VseShuYl9idWZzID09IDApKQ0KICAgICAgICAgICAgICAgIHJldHVybiAw Ow0KQEAgLTEyNjgsMzEgKzEyNDYsOSBAQCBib25kX2V0aGRldl90eF9idXJzdF9iYWxhbmNlKHZv aWQgKnF1ZXVlLCBzdHJ1Y3QgcnRlX21idWYgKipidWZzLA0KICAgICAgICAgICAgICAgICAgICAg ICAgc2xhdmVfdHhfZmFpbF9jb3VudFtpXSA9IHNsYXZlX25iX2J1ZnNbaV0gLQ0KICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsYXZlX3R4X2NvdW50Ow0KICAgICAgICAg ICAgICAgICAgICAgICAgdG90YWxfdHhfZmFpbF9jb3VudCArPSBzbGF2ZV90eF9mYWlsX2NvdW50 W2ldOw0KLQ0KLSAgICAgICAgICAgICAgICAgICAgICAgLyoNCi0gICAgICAgICAgICAgICAgICAg ICAgICAqIFNoaWZ0IGJ1ZnMgdG8gYmVnaW5uaW5nIG9mIGFycmF5IHRvIGFsbG93IHJlb3JkZXJp bmcNCi0gICAgICAgICAgICAgICAgICAgICAgICAqIGxhdGVyDQotICAgICAgICAgICAgICAgICAg ICAgICAgKi8NCi0gICAgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBzbGF2ZV90 eF9mYWlsX2NvdW50W2ldOyBqKyspIHsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c2xhdmVfYnVmc1tpXVtqXSA9DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2xhdmVfYnVmc1tpXVsoc2xhdmVfdHhfY291bnQgLSAxKSArIGpdOw0KLSAgICAgICAgICAg ICAgICAgICAgICAgfQ0KLSAgICAgICAgICAgICAgIH0NCi0gICAgICAgfQ0KLQ0KLSAgICAgICAv Kg0KLSAgICAgICAgKiBJZiB0aGVyZSBhcmUgdHggYnVyc3QgZmFpbHVyZXMgd2UgbW92ZSBwYWNr ZXRzIHRvIGVuZCBvZiBidWZzIHRvDQotICAgICAgICAqIHByZXNlcnZlIGV4cGVjdGVkIFBNRCBi ZWhhdmlvdXIgb2YgYWxsIGZhaWxlZCB0cmFuc21pdHRlZCBiZWluZw0KLSAgICAgICAgKiBhdCB0 aGUgZW5kIG9mIHRoZSBpbnB1dCBtYnVmIGFycmF5DQotICAgICAgICAqLw0KLSAgICAgICBpZiAo dW5saWtlbHkodG90YWxfdHhfZmFpbF9jb3VudCA+IDApKSB7DQotICAgICAgICAgICAgICAgaW50 IGJ1ZnNfaWR4ID0gbmJfYnVmcyAtIHRvdGFsX3R4X2ZhaWxfY291bnQgLSAxOw0KLQ0KLSAgICAg ICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBzbGF2ZV9jb3VudDsgaSsrKSB7DQotICAgICAgICAg ICAgICAgICAgICAgICBpZiAoc2xhdmVfdHhfZmFpbF9jb3VudFtpXSA+IDApIHsNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHNsYXZlX3R4X2ZhaWxfY291 bnRbaV07IGorKykNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZz W2J1ZnNfaWR4KytdID0gc2xhdmVfYnVmc1tpXVtqXTsNCi0gICAgICAgICAgICAgICAgICAgICAg IH0NCisgICAgICAgICAgICAgICAgICAgICAgIG1lbWNweSgmYnVmc1tuYl9idWZzIC0gdG90YWxf dHhfZmFpbF9jb3VudF0sDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNsYXZlX2J1 ZnNbaV1bc2xhdmVfdHhfY291bnRdLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNs YXZlX3R4X2ZhaWxfY291bnRbaV0gKiBzaXplb2YoYnVmc1swXSkpOw0KICAgICAgICAgICAgICAg IH0NCiAgICAgICAgfQ0KDQpAQCAtMTMyMiw3ICsxMjc4LDcgQEAgYm9uZF9ldGhkZXZfdHhfYnVy c3RfODAyM2FkKHZvaWQgKnF1ZXVlLCBzdHJ1Y3QgcnRlX21idWYgKipidWZzLA0KICAgICAgICB1 aW50MTZfdCBzbGF2ZV90eF9jb3VudCwgc2xhdmVfdHhfZmFpbF9jb3VudFtSVEVfTUFYX0VUSFBP UlRTXSA9IHsgMCB9Ow0KICAgICAgICB1aW50MTZfdCB0b3RhbF90eF9jb3VudCA9IDAsIHRvdGFs X3R4X2ZhaWxfY291bnQgPSAwOw0KDQotICAgICAgIHVpbnQxNl90IGksIGo7DQorICAgICAgIHVp bnQxNl90IGk7DQoNCiAgICAgICAgaWYgKHVubGlrZWx5KG5iX2J1ZnMgPT0gMCkpDQogICAgICAg ICAgICAgICAgcmV0dXJuIDA7DQpAQCAtMTM4NCwzNSArMTM0MCw5IEBAIGJvbmRfZXRoZGV2X3R4 X2J1cnN0XzgwMjNhZCh2b2lkICpxdWV1ZSwgc3RydWN0IHJ0ZV9tYnVmICoqYnVmcywNCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsYXZlX3R4X2NvdW50 Ow0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3RhbF90eF9mYWlsX2NvdW50ICs9 IHNsYXZlX3R4X2ZhaWxfY291bnRbaV07DQoNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLyoNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogU2hpZnQgYnVmcyB0byBi ZWdpbm5pbmcgb2YgYXJyYXkgdG8gYWxsb3cNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICogcmVvcmRlcmluZyBsYXRlcg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Ki8NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHNsYXZl X3R4X2ZhaWxfY291bnRbaV07IGorKykNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzbGF2ZV9idWZzW2ldW2pdID0NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHNsYXZlX2J1ZnNbaV0NCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWyhzbGF2ZV90eF9jb3VudCAtIDEpDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsg al07DQotICAgICAgICAgICAgICAgICAgICAgICB9DQotICAgICAgICAgICAgICAgfQ0KLQ0KLSAg ICAgICAgICAgICAgIC8qDQotICAgICAgICAgICAgICAgICogSWYgdGhlcmUgYXJlIHR4IGJ1cnN0 IGZhaWx1cmVzIHdlIG1vdmUgcGFja2V0cyB0byBlbmQgb2YNCi0gICAgICAgICAgICAgICAgKiBi dWZzIHRvIHByZXNlcnZlIGV4cGVjdGVkIFBNRCBiZWhhdmlvdXIgb2YgYWxsIGZhaWxlZA0KLSAg ICAgICAgICAgICAgICAqIHRyYW5zbWl0dGVkIGJlaW5nIGF0IHRoZSBlbmQgb2YgdGhlIGlucHV0 IG1idWYgYXJyYXkNCi0gICAgICAgICAgICAgICAgKi8NCi0gICAgICAgICAgICAgICBpZiAodW5s aWtlbHkodG90YWxfdHhfZmFpbF9jb3VudCA+IDApKSB7DQotICAgICAgICAgICAgICAgICAgICAg ICBpbnQgYnVmc19pZHggPSBuYl9idWZzIC0gdG90YWxfdHhfZmFpbF9jb3VudCAtIDE7DQotDQot ICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgc2xhdmVfY291bnQ7IGkrKykg ew0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2xhdmVfdHhfZmFpbF9jb3Vu dFtpXSA+IDApIHsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3Ig KGogPSAwOw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aiA8IHNsYXZlX3R4X2ZhaWxfY291bnRbaV07DQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBqKyspIHsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGJ1ZnNbYnVmc19pZHgrK10gPQ0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV9idWZzW2ldW2pdOw0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZW1j cHkoJmJ1ZnNbbmJfYnVmcyAtIHRvdGFsX3R4X2ZhaWxfY291bnRdLA0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJnNsYXZlX2J1ZnNbaV1bc2xhdmVfdHhfY291bnRdLA0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfdHhfZmFpbF9jb3Vu dFtpXSAqIHNpemVvZihidWZzWzBdKSk7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAg ICAgICAgICAgICAgfQ0KICAgICAgICB9DQotLQ0KMi43LjQNCg==