From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0069.outbound.protection.outlook.com [104.47.36.69]) by dpdk.org (Postfix) with ESMTP id 333A22BCD for ; Mon, 20 Aug 2018 09:13:11 +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=gGbo61PfUmnQv7ASTnHy/MD8ygN+H121lOmlzdKrrcA=; b=BxFPuoYJkijrIs44i05POTDzAH6g64TWJbeyJaVEO1z13AyEZhjm2YuPRI76SFphYyIlxKzjMz7oXDcpfPmck0yHQYbjlcwxHqgqjeYZ19h5fRT8RPmIPCZUT1nwq1DLadgx5giKLX7pd5t9vgqlgUlyhz48VAZzJwhUr5/mNWs= Received: from CO2PR05MB2487.namprd05.prod.outlook.com (10.166.95.145) by CO2PR05MB2742.namprd05.prod.outlook.com (10.166.200.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.11; Mon, 20 Aug 2018 07:02: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; Mon, 20 Aug 2018 07:02: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: AQHUN04ybD2MQrOpNkSePdOSj3dVd6THMYEAgACTgYD///6dgA== Date: Mon, 20 Aug 2018 07:02:44 +0000 Message-ID: <840D57E3-E0E2-45B0-B449-91DFCD63C837@vmware.com> References: <1534551009-16550-1-git-send-email-jyu@vmware.com> <29C69F93-9D89-4528-A645-78E6C34E8CB5@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:989e:edca:bafe:4ea3] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CO2PR05MB2742; 20:dhQNZ2HIt+oXU6czDC8fUGg/EzKJt0EYi2cewwLpDt46zW6CbqsrBj06DeD5os1EaM0Ckk2fMt1tDPuqzBFBzJsOY9CAWy4hqIeBSX3ln2mnF9a3rTvsKy2j3gKx5k/xgeyIRXGiupRm8+no5CYqpHVkRj/jFT1OwYiymZ9pLas= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 4f4f0c51-2280-464e-ddda-08d6066aee1e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:CO2PR05MB2742; x-ms-traffictypediagnostic: CO2PR05MB2742: 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699016); SRVR:CO2PR05MB2742; BCL:0; PCL:0; RULEID:; SRVR:CO2PR05MB2742; x-forefront-prvs: 0770F75EA9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(136003)(376002)(346002)(189003)(199004)(97736004)(86362001)(46003)(186003)(5250100002)(6486002)(2900100001)(316002)(58126008)(1411001)(76176011)(236005)(2906002)(102836004)(256004)(54906003)(68736007)(6436002)(14444005)(105586002)(446003)(6512007)(99286004)(11346002)(53546011)(6506007)(53946003)(6306002)(54896002)(36756003)(106356001)(33656002)(6916009)(5660300001)(53936002)(478600001)(82746002)(2616005)(790700001)(6116002)(25786009)(81156014)(476003)(8936002)(93886005)(9326002)(4326008)(8676002)(81166006)(39060400002)(14454004)(6246003)(229853002)(486006)(7736002)(83716003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR05MB2742; 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: qiBHbE92ScUoT4IACZyz8BQHaHdvuGFzL09+XBf20W7AcIOjFCc0vVkFa4dWM+zFY/yNm6dXzLGlA6zekJ1FyI+3X3g6IwuoRj4VYLJXTfYCG1g7Brbp2fdgVwEL11SZT47xuSTqOxom+0SvTWJQDXSJDdYZkhRPYroBdRfh5/l5d13CScy6lVA5NNCoFDrxtIlJ0z52E4XVxE1wKMb2bKOvwlNvjhGdoS7c5bG8zEg4rBf0ivAJ05KCAdWcZv94bx/ka262x3qGxrrHEjdJF6C4VfrCHFGI0EPMcFeKcF5/bVurVvOGwrnaHVN9P09kSyqVff4xCMlgo9yEwUtj5Y8yAOvxUde6TdPu8p15eKc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f4f0c51-2280-464e-ddda-08d6066aee1e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Aug 2018 07:02:44.8616 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR05MB2742 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: Mon, 20 Aug 2018 07:13:12 -0000 SGkgQ2hhcywNCg0KQ291bGQgeW91IGhlbHAgdG8gcmV2aWV3IHRoZSB2MiBvZiB0aGUgcGF0Y2g/ IEkgaGF2ZSBhZGRyZXNzZWQgdGhlIOKAnEZpeGVz4oCdIHJlcXVpcmVtZW50IGluIGNvbW1pdCBt ZXNzYWdlLCBhbmQgbW9kaWZpZWQgc2xhdmVfdHhfZmFpbF9jb3VudOKAmXMgZGVmaW5pdGlvbi4N Cg0KVGhhbmtzLA0KSmlhDQoNCkZyb206IENoYXMgV2lsbGlhbXMgPDNjaGFzM0BnbWFpbC5jb20+ DQpEYXRlOiBTdW5kYXksIEF1Z3VzdCAxOSwgMjAxOCBhdCA1OjA3IFBNDQpUbzogSmlhIFl1IDxq eXVAdm13YXJlLmNvbT4NCkNjOiAiZGV2QGRwZGsub3JnIiA8ZGV2QGRwZGsub3JnPiwgRGVjbGFu IERvaGVydHkgPGRlY2xhbi5kb2hlcnR5QGludGVsLmNvbT4sIENoYXMgV2lsbGlhbXMgPGNoYXMz QGF0dC5jb20+DQpTdWJqZWN0OiBSZTogW2RwZGstZGV2XSBbUEFUQ0hdIG5ldC9ib25kaW5nOiBm aXggYnVmIGNvcnJ1cHRpb24gaW4gbWVyZ2luZyB1bi10cmFuc21pdHRlZCBwYWNrZXRzDQoNCg0K DQpPbiBTdW4sIEF1ZyAxOSwgMjAxOCBhdCA2OjE5IFBNIEppYSBZdSA8anl1QHZtd2FyZS5jb208 bWFpbHRvOmp5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geyAwIH07DQogICAgICAgIHVpbnQxNl90IHRvdGFsX3R4X2NvdW50ID0gMCwgdG90 YWxfdHhfZmFpbF9jb3VudCA9IDA7DQoNCi0gICAgICAgdWludDE2X3QgaSwgajsNCisgICAgICAg dWludDE2X3QgaTsNCg0KICAgICAgICBpZiAodW5saWtlbHkobmJfYnVmcyA9PSAwKSkNCiAgICAg ICAgICAgICAgICByZXR1cm4gMDsNCkBAIC0zNjEsMzEgKzM2MSw5IEBAIGJvbmRfZXRoZGV2X3R4 X2J1cnN0XzgwMjNhZF9mYXN0X3F1ZXVlKHZvaWQgKnF1ZXVlLCBzdHJ1Y3QgcnRlX21idWYgKipi dWZzLA0KICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfdHhfZmFpbF9jb3VudFtpXSA9IHNs YXZlX25iX2J1ZnNbaV0gLQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHNsYXZlX3R4X2NvdW50Ow0KICAgICAgICAgICAgICAgICAgICAgICAgdG90YWxfdHhfZmFpbF9j b3VudCArPSBzbGF2ZV90eF9mYWlsX2NvdW50W2ldOw0KLQ0KLSAgICAgICAgICAgICAgICAgICAg ICAgLyoNCi0gICAgICAgICAgICAgICAgICAgICAgICAqIFNoaWZ0IGJ1ZnMgdG8gYmVnaW5uaW5n IG9mIGFycmF5IHRvIGFsbG93IHJlb3JkZXJpbmcNCi0gICAgICAgICAgICAgICAgICAgICAgICAq IGxhdGVyDQotICAgICAgICAgICAgICAgICAgICAgICAgKi8NCi0gICAgICAgICAgICAgICAgICAg ICAgIGZvciAoaiA9IDA7IGogPCBzbGF2ZV90eF9mYWlsX2NvdW50W2ldOyBqKyspIHsNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfYnVmc1tpXVtqXSA9DQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfYnVmc1tpXVsoc2xhdmVfdHhfY291 bnQgLSAxKSArIGpdOw0KLSAgICAgICAgICAgICAgICAgICAgICAgfQ0KLSAgICAgICAgICAgICAg IH0NCi0gICAgICAgfQ0KLQ0KLSAgICAgICAvKg0KLSAgICAgICAgKiBJZiB0aGVyZSBhcmUgdHgg YnVyc3QgZmFpbHVyZXMgd2UgbW92ZSBwYWNrZXRzIHRvIGVuZCBvZiBidWZzIHRvDQotICAgICAg ICAqIHByZXNlcnZlIGV4cGVjdGVkIFBNRCBiZWhhdmlvdXIgb2YgYWxsIGZhaWxlZCB0cmFuc21p dHRlZCBiZWluZw0KLSAgICAgICAgKiBhdCB0aGUgZW5kIG9mIHRoZSBpbnB1dCBtYnVmIGFycmF5 DQotICAgICAgICAqLw0KLSAgICAgICBpZiAodW5saWtlbHkodG90YWxfdHhfZmFpbF9jb3VudCA+ IDApKSB7DQotICAgICAgICAgICAgICAgaW50IGJ1ZnNfaWR4ID0gbmJfYnVmcyAtIHRvdGFsX3R4 X2ZhaWxfY291bnQgLSAxOw0KLQ0KLSAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBzbGF2 ZV9jb3VudDsgaSsrKSB7DQotICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2xhdmVfdHhfZmFp bF9jb3VudFtpXSA+IDApIHsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChq ID0gMDsgaiA8IHNsYXZlX3R4X2ZhaWxfY291bnRbaV07IGorKykNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBidWZzW2J1ZnNfaWR4KytdID0gc2xhdmVfYnVmc1tpXVtq XTsNCi0gICAgICAgICAgICAgICAgICAgICAgIH0NCisgICAgICAgICAgICAgICAgICAgICAgIG1l bWNweSgmYnVmc1tuYl9idWZzIC0gdG90YWxfdHhfZmFpbF9jb3VudF0sDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJnNsYXZlX2J1ZnNbaV1bc2xhdmVfdHhfY291bnRdLA0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNsYXZlX3R4X2ZhaWxfY291bnRbaV0gKiBzaXplb2Yo YnVmc1swXSkpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQpAQCAtNzE1LDggKzY5 Myw4IEBAIGJvbmRfZXRoZGV2X3R4X2J1cnN0X3JvdW5kX3JvYmluKHZvaWQgKnF1ZXVlLCBzdHJ1 Y3QgcnRlX21idWYgKipidWZzLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eF9m YWlsX3RvdGFsICs9IHR4X2ZhaWxfc2xhdmU7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbWVtY3B5KCZidWZzW25iX3BrdHMgLSB0eF9mYWlsX3RvdGFsXSwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzbGF2ZV9idWZzW2ldW251bV90 eF9zbGF2ZV0sDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0eF9mYWlsX3NsYXZlICogc2l6ZW9mKGJ1ZnNbMF0pKTsNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZzbGF2ZV9idWZzW2ldW251bV90eF9zbGF2ZV0sDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eF9mYWlsX3NsYXZlICogc2l6ZW9mKGJ1 ZnNbMF0pKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAg ICAgIG51bV90eF90b3RhbCArPSBudW1fdHhfc2xhdmU7DQogICAgICAgICAgICAgICAgfQ0KQEAg LTEyMjQsNyArMTIwMiw3IEBAIGJvbmRfZXRoZGV2X3R4X2J1cnN0X2JhbGFuY2Uodm9pZCAqcXVl dWUsIHN0cnVjdCBydGVfbWJ1ZiAqKmJ1ZnMsDQogICAgICAgIHVpbnQxNl90IHNsYXZlX3R4X2Nv dW50LCBzbGF2ZV90eF9mYWlsX2NvdW50W1JURV9NQVhfRVRIUE9SVFNdID0geyAwIH07DQogICAg ICAgIHVpbnQxNl90IHRvdGFsX3R4X2NvdW50ID0gMCwgdG90YWxfdHhfZmFpbF9jb3VudCA9IDA7 DQoNCi0gICAgICAgdWludDE2X3QgaSwgajsNCisgICAgICAgdWludDE2X3QgaTsNCg0KICAgICAg ICBpZiAodW5saWtlbHkobmJfYnVmcyA9PSAwKSkNCiAgICAgICAgICAgICAgICByZXR1cm4gMDsN CkBAIC0xMjY4LDMxICsxMjQ2LDkgQEAgYm9uZF9ldGhkZXZfdHhfYnVyc3RfYmFsYW5jZSh2b2lk ICpxdWV1ZSwgc3RydWN0IHJ0ZV9tYnVmICoqYnVmcywNCiAgICAgICAgICAgICAgICAgICAgICAg IHNsYXZlX3R4X2ZhaWxfY291bnRbaV0gPSBzbGF2ZV9uYl9idWZzW2ldIC0NCiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV90eF9jb3VudDsNCiAgICAgICAgICAg ICAgICAgICAgICAgIHRvdGFsX3R4X2ZhaWxfY291bnQgKz0gc2xhdmVfdHhfZmFpbF9jb3VudFtp XTsNCi0NCi0gICAgICAgICAgICAgICAgICAgICAgIC8qDQotICAgICAgICAgICAgICAgICAgICAg ICAgKiBTaGlmdCBidWZzIHRvIGJlZ2lubmluZyBvZiBhcnJheSB0byBhbGxvdyByZW9yZGVyaW5n DQotICAgICAgICAgICAgICAgICAgICAgICAgKiBsYXRlcg0KLSAgICAgICAgICAgICAgICAgICAg ICAgICovDQotICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgc2xhdmVfdHhf ZmFpbF9jb3VudFtpXTsgaisrKSB7DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNs YXZlX2J1ZnNbaV1bal0gPQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHNsYXZlX2J1ZnNbaV1bKHNsYXZlX3R4X2NvdW50IC0gMSkgKyBqXTsNCi0gICAgICAgICAgICAg ICAgICAgICAgIH0NCi0gICAgICAgICAgICAgICB9DQotICAgICAgIH0NCi0NCi0gICAgICAgLyoN Ci0gICAgICAgICogSWYgdGhlcmUgYXJlIHR4IGJ1cnN0IGZhaWx1cmVzIHdlIG1vdmUgcGFja2V0 cyB0byBlbmQgb2YgYnVmcyB0bw0KLSAgICAgICAgKiBwcmVzZXJ2ZSBleHBlY3RlZCBQTUQgYmVo YXZpb3VyIG9mIGFsbCBmYWlsZWQgdHJhbnNtaXR0ZWQgYmVpbmcNCi0gICAgICAgICogYXQgdGhl IGVuZCBvZiB0aGUgaW5wdXQgbWJ1ZiBhcnJheQ0KLSAgICAgICAgKi8NCi0gICAgICAgaWYgKHVu bGlrZWx5KHRvdGFsX3R4X2ZhaWxfY291bnQgPiAwKSkgew0KLSAgICAgICAgICAgICAgIGludCBi dWZzX2lkeCA9IG5iX2J1ZnMgLSB0b3RhbF90eF9mYWlsX2NvdW50IC0gMTsNCi0NCi0gICAgICAg ICAgICAgICBmb3IgKGkgPSAwOyBpIDwgc2xhdmVfY291bnQ7IGkrKykgew0KLSAgICAgICAgICAg ICAgICAgICAgICAgaWYgKHNsYXZlX3R4X2ZhaWxfY291bnRbaV0gPiAwKSB7DQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBzbGF2ZV90eF9mYWlsX2NvdW50 W2ldOyBqKyspDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmc1ti dWZzX2lkeCsrXSA9IHNsYXZlX2J1ZnNbaV1bal07DQotICAgICAgICAgICAgICAgICAgICAgICB9 DQorICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJmJ1ZnNbbmJfYnVmcyAtIHRvdGFsX3R4 X2ZhaWxfY291bnRdLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzbGF2ZV9idWZz W2ldW3NsYXZlX3R4X2NvdW50XSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2 ZV90eF9mYWlsX2NvdW50W2ldICogc2l6ZW9mKGJ1ZnNbMF0pKTsNCiAgICAgICAgICAgICAgICB9 DQogICAgICAgIH0NCg0KQEAgLTEzMjIsNyArMTI3OCw3IEBAIGJvbmRfZXRoZGV2X3R4X2J1cnN0 XzgwMjNhZCh2b2lkICpxdWV1ZSwgc3RydWN0IHJ0ZV9tYnVmICoqYnVmcywNCiAgICAgICAgdWlu dDE2X3Qgc2xhdmVfdHhfY291bnQsIHNsYXZlX3R4X2ZhaWxfY291bnRbUlRFX01BWF9FVEhQT1JU U10gPSB7IDAgfTsNCiAgICAgICAgdWludDE2X3QgdG90YWxfdHhfY291bnQgPSAwLCB0b3RhbF90 eF9mYWlsX2NvdW50ID0gMDsNCg0KLSAgICAgICB1aW50MTZfdCBpLCBqOw0KKyAgICAgICB1aW50 MTZfdCBpOw0KDQogICAgICAgIGlmICh1bmxpa2VseShuYl9idWZzID09IDApKQ0KICAgICAgICAg ICAgICAgIHJldHVybiAwOw0KQEAgLTEzODQsMzUgKzEzNDAsOSBAQCBib25kX2V0aGRldl90eF9i dXJzdF84MDIzYWQodm9pZCAqcXVldWUsIHN0cnVjdCBydGVfbWJ1ZiAqKmJ1ZnMsDQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGF2ZV90eF9jb3VudDsN CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG90YWxfdHhfZmFpbF9jb3VudCArPSBz bGF2ZV90eF9mYWlsX2NvdW50W2ldOw0KDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IC8qDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIFNoaWZ0IGJ1ZnMgdG8gYmVn aW5uaW5nIG9mIGFycmF5IHRvIGFsbG93DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAqIHJlb3JkZXJpbmcgbGF0ZXINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICov DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBzbGF2ZV90 eF9mYWlsX2NvdW50W2ldOyBqKyspDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc2xhdmVfYnVmc1tpXVtqXSA9DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBzbGF2ZV9idWZzW2ldDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsoc2xhdmVfdHhfY291bnQgLSAxKQ0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIGpd Ow0KLSAgICAgICAgICAgICAgICAgICAgICAgfQ0KLSAgICAgICAgICAgICAgIH0NCi0NCi0gICAg ICAgICAgICAgICAvKg0KLSAgICAgICAgICAgICAgICAqIElmIHRoZXJlIGFyZSB0eCBidXJzdCBm YWlsdXJlcyB3ZSBtb3ZlIHBhY2tldHMgdG8gZW5kIG9mDQotICAgICAgICAgICAgICAgICogYnVm cyB0byBwcmVzZXJ2ZSBleHBlY3RlZCBQTUQgYmVoYXZpb3VyIG9mIGFsbCBmYWlsZWQNCi0gICAg ICAgICAgICAgICAgKiB0cmFuc21pdHRlZCBiZWluZyBhdCB0aGUgZW5kIG9mIHRoZSBpbnB1dCBt YnVmIGFycmF5DQotICAgICAgICAgICAgICAgICovDQotICAgICAgICAgICAgICAgaWYgKHVubGlr ZWx5KHRvdGFsX3R4X2ZhaWxfY291bnQgPiAwKSkgew0KLSAgICAgICAgICAgICAgICAgICAgICAg aW50IGJ1ZnNfaWR4ID0gbmJfYnVmcyAtIHRvdGFsX3R4X2ZhaWxfY291bnQgLSAxOw0KLQ0KLSAg ICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHNsYXZlX2NvdW50OyBpKyspIHsN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNsYXZlX3R4X2ZhaWxfY291bnRb aV0gPiAwKSB7DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChq ID0gMDsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGog PCBzbGF2ZV90eF9mYWlsX2NvdW50W2ldOw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaisrKSB7DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBidWZzW2J1ZnNfaWR4KytdID0NCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xhdmVfYnVmc1tpXVtqXTsNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIH0NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5 KCZidWZzW25iX2J1ZnMgLSB0b3RhbF90eF9mYWlsX2NvdW50XSwNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICZzbGF2ZV9idWZzW2ldW3NsYXZlX3R4X2NvdW50XSwNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsYXZlX3R4X2ZhaWxfY291bnRb aV0gKiBzaXplb2YoYnVmc1swXSkpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAg ICAgICAgICAgIH0NCiAgICAgICAgfQ0KLS0NCjIuNy40DQo=