Date: Tue, 5 Sep 2006 15:23:18 -0700 From: "Jack Vogel" <jfvogel@gmail.com> To: "Andre Oppermann" <andre@freebsd.org> Cc: freebsd-net <freebsd-net@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: RFC: TSO patch for current Message-ID: <2a41acea0609051523w55939cdeu71ee9857f40d1294@mail.gmail.com> In-Reply-To: <44FDECB6.2040304@freebsd.org> References: <2a41acea0609011551v40338539u4eef48d091dd12ab@mail.gmail.com> <44F9384C.9070902@freebsd.org> <2a41acea0609021741y481a04c0r42902166eaba78d7@mail.gmail.com> <20060905162542.GA63869@hub.freebsd.org> <44FDAF08.20407@freebsd.org> <20060905182313.GA85389@hub.freebsd.org> <44FDD65C.6070109@freebsd.org> <2a41acea0609051410i7d968b88ocf240514ff410452@mail.gmail.com> <44FDECB6.2040304@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_70789_13758717.1157494998466 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/5/06, Andre Oppermann <andre@freebsd.org> wrote: > Jack Vogel wrote: > > On 9/5/06, Andre Oppermann <andre@freebsd.org> wrote: > >> Prafulla Deuskar wrote: > >> > Your patch looks good and is the way to go. > >> > > >> > So after Jack confirms that your patch works with the em driver > >> > would you commit to to -current? > >> > >> Absolutely. :-) > >> > >> > The driver related changes can follow.. > >> > > >> > Later we also need to fix ifconfig so that user can enable/disable > >> TSO on the interface. > >> > >> I'll do that together with the TSO code. > > > > OK, I've built and done some touch testing of this. I like it, the > > driver has > > some counters of the number of TSO bursts it does, and I think I see more > > per netperf test with your patch than mine. > > > > Hard to do real performance testing with all that WITNESS stuff in, but > > I will be making a 6.1 version of your patch to test with since I have my > > driver running on that anyway. > > You can disable WITNESS and INVARIANTS pretty easily in -current and > get the full performance with it. Last time I tried that I think the kernel wouldnt build, but that was like 6 months ago, so I just kicked off a build with this stuff off, and we'll see how it looks :) > > If you do the ifconfig changes there will need to be a small amount of > > code added to em_ioctl() but it should be trivial. > > > > You want me to reissue a driver patch with changes for your code? > > Yes, please do so. I've got a dual-em card which I can test with myself. OK, attached new patch, this one even has the ioctl change so when you get the ifconfig change in it will be ready. Cheers, Jack ------=_Part_70789_13758717.1157494998466 Content-Type: text/x-patch; name="em-current-tso.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="em-current-tso.patch" X-Attachment-Id: f_err9p7yd ZGlmZiAtTmF1ciAvdXNyL3NyYy9zeXMuZGlzdC9kZXYvZW0vaWZfZW0uYyAvdXNyL3NyYy9zeXMv ZGV2L2VtL2lmX2VtLmMKLS0tIC91c3Ivc3JjL3N5cy5kaXN0L2Rldi9lbS9pZl9lbS5jCUZyaSBB dWcgIDQgMDA6NTY6MzMgMjAwNgorKysgL3Vzci9zcmMvc3lzL2Rldi9lbS9pZl9lbS5jCVR1ZSBT ZXAgIDUgMTU6NTg6NDIgMjAwNgpAQCAtNzIsNiArNzIsOCBAQAogI2luY2x1ZGUgPG5ldGluZXQv dGNwLmg+CiAjaW5jbHVkZSA8bmV0aW5ldC91ZHAuaD4KIAorI2luY2x1ZGUgPG1hY2hpbmUvaW5f Y2tzdW0uaD4KKwogI2luY2x1ZGUgPGRldi9wY2kvcGNpdmFyLmg+CiAjaW5jbHVkZSA8ZGV2L3Bj aS9wY2lyZWcuaD4KICNpbmNsdWRlIDxkZXYvZW0vaWZfZW1faHcuaD4KQEAgLTIyOSw2ICsyMzEs MTAgQEAKIAkJICAgIHN0cnVjdCBtYnVmICopOwogc3RhdGljIHZvaWQJZW1fdHJhbnNtaXRfY2hl Y2tzdW1fc2V0dXAoc3RydWN0IGFkYXB0ZXIgKiwgc3RydWN0IG1idWYgKiwKIAkJICAgIHVpbnQz Ml90ICosIHVpbnQzMl90ICopOworI2lmZGVmIEVNX1RTTworc3RhdGljIGJvb2xlYW5fdCBlbV90 c29fc2V0dXAoc3RydWN0IGFkYXB0ZXIgKiwgc3RydWN0IG1idWYgKiwgdV9pb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9uZywgYW5kCisgICAgICAgICAqIGl0IGZvbGxvd3MgYSBUU08gYnVyc3Qs IHRoZW4gd2UgbmVlZCB0byBhZGQgYQorICAgICAgICAgKiBzZW50aW5lbCBkZXNjcmlwdG9yIHRv IHByZXZlbnQgcHJlbWF0dXJlIHdyaXRlYmFjay4KKyAgICAgICAgICovCisgICAgICAgIGlmICgo ZG9fdHNvID09IDApICYmIChhZGFwdGVyLT50eF90c28gPT0gVFJVRSkpIHsKKyAgICAgICAgICAg ICAgICBpZiAobnNlZ3MgPT0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHRzb19kZXNjID0g VFJVRTsKKyAgICAgICAgICAgICAgICBhZGFwdGVyLT50eF90c28gPSBGQUxTRTsKKyAgICAgICAg fQorCisJaWYgKG5zZWdzID4gYWRhcHRlci0+bnVtX3R4X2Rlc2NfYXZhaWwgLSAyKSB7CiAJCWFk YXB0ZXItPm5vX3R4X2Rlc2NfYXZhaWwyKys7CiAJCWVycm9yID0gRU5PQlVGUzsKIAkJZ290byBl bmNhcF9mYWlsOwogCX0KIAotCWlmIChpZnAtPmlmX2h3YXNzaXN0ID4gMCkKLQkJZW1fdHJhbnNt aXRfY2hlY2tzdW1fc2V0dXAoYWRhcHRlciwgIG1faGVhZCwgJnR4ZF91cHBlciwgJnR4ZF9sb3dl cik7Ci0JZWxzZQotCQl0eGRfdXBwZXIgPSB0eGRfbG93ZXIgPSAwOworICAgICAgICAvKiBEbyBo YXJkd2FyZSBhc3Npc3RzICovCisgICAgICAgIGlmICggaWZwLT5pZl9od2Fzc2lzdCA+IDApIHsK KyNpZmRlZiBFTV9UU08KKyAgICAgICAgICAgICAgICBpZiAoZW1fdHNvX3NldHVwKGFkYXB0ZXIs IG1faGVhZCwgJnR4ZF91cHBlciwgJnR4ZF9sb3dlcikpIHsKKyAgICAgICAgICAgICAgICAgICAg ICAgIC8qIHdlIG5lZWQgdG8gbWFrZSBhIGZpbmFsIHNlbnRpbmVsIHRyYW5zbWl0IGRlc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HRlci0+dHhkX2NtZCB8IHR4ZF9sb3dlciB8IHNlZ3Nbal0u ZHNfbGVuKTsKLQkJCWN1cnJlbnRfdHhfZGVzYy0+dXBwZXIuZGF0YSA9IGh0b2xlMzIodHhkX3Vw cGVyKTsKLQotCQkJaWYgKCsraSA9PSBhZGFwdGVyLT5udW1fdHhfZGVzYykKLQkJCQlpID0gMDsK LQotCQkJdHhfYnVmZmVyLT5tX2hlYWQgPSBOVUxMOworICAgICAgICAgICAgICAgICAgICAgICB0 eF9idWZmZXIgPSAmYWRhcHRlci0+dHhfYnVmZmVyX2FyZWFbaV07CisgICAgICAgICAgICAgICAg ICAgICAgICBjdXJyZW50X3R4X2Rlc2MgPSAmYWRhcHRlci0+dHhfZGVzY19iYXNlW2ldOworICAg ICAgICAgICAgICAgICAgICAgICAgc2VnX2FkZHIgPSBodG9sZTY0KHNlZ3Nbal0uZHNfYWRkcik7 CisgICAgICAgICAgICAgICAgICAgICAgICBzZWdfbGVuICA9IHNlZ3Nbal0uZHNfbGVuOworICAg ICAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICAgICoqIFRTTyBX b3JrYXJvdW5kOgorICAgICAgICAgICAgICAgICAgICAgICAgKiogSWYgdGhpcyBpcyB0aGUgbGFz dCBkZXNjcmlwdG9yLCB3ZSB3YW50IHRvCisgICAgICAgICAgICAgICAgICAgICAgICAqKiBzcGxp dCBpdCBzbyB3ZSBoYXZlIGEgc21hbGwgZmluYWwgc2VudGluZWwKKyAgICAgICAgICAgICAgICAg ICAgICAgICovCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHNvX2Rlc2MgJiYgKGogPT0g KG5zZWdzIC0xKSkgJiYgKHNlZ19sZW4gPiA4KSkgeworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzZWdfbGVuIC09IDQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1 cnJlbnRfdHhfZGVzYy0+YnVmZmVyX2FkZHIgPSBzZWdfYWRkcjsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY3VycmVudF90eF9kZXNjLT5sb3dlci5kYXRhID0gaHRvbGUzMigKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRhcHRlci0+dHhkX2NtZCB8IHR4ZF9sb3dl ciB8IHNlZ19sZW4pOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3R4 X2Rlc2MtPnVwcGVyLmRhdGEgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aHRvbGUzMih0eGRfdXBwZXIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAo KytpID09IGFkYXB0ZXItPm51bV90eF9kZXNjKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGkgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBO b3cgbWFrZSB0aGUgc2VudGluZWwgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Kyt0eGRfdXNlZDsgLyogdXNpbmcgYW4gZXh0cmEgdHhkICovCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGN1cnJlbnRfdHhfZGVzYyA9ICZhZGFwdGVyLT50eF9kZXNjX2Jhc2VbaV07 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR4X2J1ZmZlciA9ICZhZGFwdGVyLT50 eF9idWZmZXJfYXJlYVtpXTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVu dF90eF9kZXNjLT5idWZmZXJfYWRkciA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBzZWdfYWRkciArIHNlZ19sZW47CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGN1cnJlbnRfdHhfZGVzYy0+bG93ZXIuZGF0YSA9IGh0b2xlMzIoCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGFkYXB0ZXItPnR4ZF9jbWQgfCB0eGRfbG93ZXIgfCA0KTsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF90eF9kZXNjLT51cHBlci5kYXRhID0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0b2xlMzIodHhkX3VwcGVyKTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCsraSA9PSBhZGFwdGVyLT5udW1f dHhfZGVzYykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gMDsK KyAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGN1cnJlbnRfdHhfZGVzYy0+YnVmZmVyX2FkZHIgPSBzZWdfYWRkcjsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF90eF9kZXNjLT5sb3dlci5kYXRhID0g aHRvbGUzMigKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRhcHRlci0+dHhkX2Nt ZCB8IHR4ZF9sb3dlciB8IHNlZ19sZW4pOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJyZW50X3R4X2Rlc2MtPnVwcGVyLmRhdGEgPQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaHRvbGUzMih0eGRfdXBwZXIpOworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBpZiAoKytpID09IGFkYXB0ZXItPm51bV90eF9kZXNjKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgICAgICAgdHhfYnVmZmVyLT5tX2hlYWQgPSBOVUxMOwogCQl9 CiAJfQogCiAJYWRhcHRlci0+bmV4dF9hdmFpbF90eF9kZXNjID0gaTsKIAlpZiAoYWRhcHRlci0+ cGNpe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RFUiwJCS8q IG5zZWdtZW50cyAqLwotCQkJCXNpemUsCQkJLyogbWF4c2Vnc2l6ZSAqLworCQkJCXNlZ3NpemUs CQkvKiBtYXhzZWdzaXplICovCiAJCQkJMCwJCQkvKiBmbGFncyAqLwogCQkJCU5VTEwsCQkvKiBs b2NrZnVuYyAqLwogCQkJCU5VTEwsCQkvKiBsb2NrYXJnICovCkBAIC0yNzEzLDYgKzI4MTYsODcg QEAKIAlhZGFwdGVyLT5uZXh0X2F2YWlsX3R4X2Rlc2MgPSBjdXJyX3R4ZDsKIH0KIAorI2lmZGVm IEVNX1RTTworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiAgU2V0dXAgd29yayBmb3IgaGFyZHdhcmUg c2VnbWVudGF0aW9uIG9mZmxvYWQgKFRTTykKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBi b29sZWFuX3QKK2VtX3Rzb19zZXR1cChzdHJ1Y3QgYWRhcHRlciAqYWRhcHRlciwKKyAgICAgICAg ICAgICBzdHJ1Y3QgbWJ1ZiAqbXAsCisgICAgICAgICAgICAgdV9pbnQzMl90ICp0eGRfdXBwZXIs CisgICAgICAgICAgICAgdV9pbnQzMl90ICp0eGRfbG93ZXIpCit7CisgICAgICAgIHN0cnVjdCBl bV9jb250ZXh0X2Rlc2MgKlRYRDsKKyAgICAgICAgc3RydWN0IGVtX2J1ZmZlciAqdHhfYnVmZmVy OworICAgICAgICBzdHJ1Y3QgaXAgKmlwOworICAgICAgICBzdHJ1Y3QgdGNwaGRyICp0aDsKKyAg ICAgICAgaW50IGN1cnJfdHhkLCBoZHJfbGVuLCBpcF9obGVuLCB0Y3BfaGxlbjsKKworICAgICAg ICBpZiAoKChtcC0+bV9wa3RoZHIuY3N1bV9mbGFncyAmIENTVU1fVFNPKSA9PSAwKSB8fAorICAg ICAgICAgICAgKG1wLT5tX3BrdGhkci5sZW4gPD0gRTEwMDBfVFhfQlVGRkVSX1NJWkUpKSB7Cisg ICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICB9CisKKyAgICAgICAgKnR4ZF9s b3dlciA9IChFMTAwMF9UWERfQ01EX0RFWFQgfAorICAgICAgICAgICAgICAgICAgICAgIEUxMDAw X1RYRF9EVFlQX0QgfAorICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX1RYRF9DTURfVFNFKTsK KworICAgICAgICAqdHhkX3VwcGVyID0gKEUxMDAwX1RYRF9QT1BUU19JWFNNIHwKKyAgICAgICAg ICAgICAgICAgICAgICBFMTAwMF9UWERfUE9QVFNfVFhTTSkgPDwgODsKKworICAgICAgICBjdXJy X3R4ZCA9IGFkYXB0ZXItPm5leHRfYXZhaWxfdHhfZGVzYzsKKyAgICAgICAgdHhfYnVmZmVyID0g JmFkYXB0ZXItPnR4X2J1ZmZlcl9hcmVhW2N1cnJfdHhkXTsKKyAgICAgICAgVFhEID0gKHN0cnVj dCBlbV9jb250ZXh0X2Rlc2MgKikgJmFkYXB0ZXItPnR4X2Rlc2NfYmFzZVtjdXJyX3R4ZF07CisK KyAgICAgICAgbXAtPm1fZGF0YSArPSBzaXplb2Yoc3RydWN0IGV0aGVyX2hlYWRlcik7CisgICAg ICAgIGlwID0gbXRvZChtcCwgc3RydWN0IGlwICopOworICAgICAgICBpcC0+aXBfbGVuID0gMDsK KyAgICAgICAgaXAtPmlwX3N1bSA9IDA7CisgICAgICAgIGlwX2hsZW4gPSBpcC0+aXBfaGwgPDwg MiA7CisgICAgICAgIHRoID0gKHN0cnVjdCB0Y3BoZHIgKikoKGNhZGRyX3QpaXAgKyBpcF9obGVu KTsKKyAgICAgICAgdGNwX2hsZW4gPSB0aC0+dGhfb2ZmIDw8IDI7CisKKyAgICAgICAgaGRyX2xl biA9IEVUSEVSX0hEUl9MRU4gKyBpcF9obGVuICsgdGNwX2hsZW47CisgICAgICAgIHRoLT50aF9z dW0gPSBpbl9wc2V1ZG8oaXAtPmlwX3NyYy5zX2FkZHIsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGlwLT5pcF9kc3Quc19hZGRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBodG9ucyhJUFBST1RPX1RDUCkpOworCisgICAgICAgIG1wLT5tX2RhdGEgLT0gc2l6ZW9m KHN0cnVjdCBldGhlcl9oZWFkZXIpOworICAgICAgICBUWEQtPmxvd2VyX3NldHVwLmlwX2ZpZWxk cy5pcGNzcyA9IEVUSEVSX0hEUl9MRU47CisgICAgICAgIFRYRC0+bG93ZXJfc2V0dXAuaXBfZmll bGRzLmlwY3NvID0KKyAgICAgICAgICAgICAgICBFVEhFUl9IRFJfTEVOICsgb2Zmc2V0b2Yoc3Ry dWN0IGlwLCBpcF9zdW0pOworICAgICAgICBUWEQtPmxvd2VyX3NldHVwLmlwX2ZpZWxkcy5pcGNz ZSA9CisgICAgICAgICAgICAgICAgaHRvbGUxNihFVEhFUl9IRFJfTEVOICsgaXBfaGxlbiAtIDEp OworCisgICAgICAgIFRYRC0+dXBwZXJfc2V0dXAudGNwX2ZpZWxkcy50dWNzcyA9CisgICAgICAg ICAgICAgICAgRVRIRVJfSERSX0xFTiArIGlwX2hsZW47CisgICAgICAgIFRYRC0+dXBwZXJfc2V0 dXAudGNwX2ZpZWxkcy50dWNzZSA9IDA7CisgICAgICAgIFRYRC0+dXBwZXJfc2V0dXAudGNwX2Zp ZWxkcy50dWNzbyA9CisgICAgICAgICAgICAgICAgRVRIRVJfSERSX0xFTiArIGlwX2hsZW4gKwor ICAgICAgICAgICAgICAgIG9mZnNldG9mKHN0cnVjdCB0Y3BoZHIsIHRoX3N1bSk7CisgICAgICAg IFRYRC0+dGNwX3NlZ19zZXR1cC5maWVsZHMubXNzID0gaHRvbGUxNihtcC0+bV9wa3RoZHIudHNv X3NlZ3N6KTsKKyAgICAgICAgVFhELT50Y3Bfc2VnX3NldHVwLmZpZWxkcy5oZHJfbGVuID0gaGRy X2xlbjsKKyAgICAgICAgVFhELT5jbWRfYW5kX2xlbmd0aCA9IGh0b2xlMzIoYWRhcHRlci0+dHhk X2NtZCB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX1RYRF9DTURfREVY VCB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX1RYRF9DTURfVFNFIHwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRTEwMDBfVFhEX0NNRF9JUCB8IEUxMDAw X1RYRF9DTURfVENQIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1wLT5tX3Br dGhkci5sZW4gLSAoaGRyX2xlbikpKTsKKworICAgICAgICB0eF9idWZmZXItPm1faGVhZCA9IE5V TEw7CisKKyAgICAgICAgaWYgKCsrY3Vycl90eGQgPT0gYWRhcHRlci0+bnVtX3R4X2Rlc2MpCisg ICAgICAgICAgICAgICAgY3Vycl90eGQgPSAwOworCisgICAgICAgIGFkYXB0ZXItPm51bV90eF9k ZXNjX2F2YWlsLS07CisgICAgICAgIGFkYXB0ZXItPm5leHRfYXZhaWxfdHhfZGVzYyA9IGN1cnJf dHhkOworICAgICAgICBhZGFwdGVyLT50eF90c28gPSBUUlVFOworCisgICAgICAgIHJldHVybiBU UlVFOworfQorI2VuZGlmIC8qIEVNX1RTTyAqLworCiAvKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqICBF eGFtaW5lIGVhY2ggdHhfYnVmZmVyIGluIHRoZSB1c2VkIHF1ZXVlLiBJZiB0aGUgaGFyZHdhcmUg aXMgZG9uZQpAQCAtMzYzOSw2ICszODIzLDEyIEBACiAJICAgIChsb25nIGxvbmcpYWRhcHRlci0+ c3RhdHMuZ3ByYyk7CiAJZGV2aWNlX3ByaW50Zih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mZmxvYWQgY2FwYWJp bGl0aWVzLgorICovCisjZGVmaW5lIEVNX1RDUFNFR19GRUFUVVJFUwkJQ1NVTV9UU08KKworLyoK ICAqIFRoaXMgcGFyYW1ldGVyIGNvbnRyb2xzIHRoZSBkdXJhdGlvbiBvZiB0cmFuc21pdCB3YXRj aGRvZyB0aW1lci4KICAqLwogI2RlZmluZSBFTV9UWF9USU1FT1VUICAgICAgICAgICAgICAgICAg IDUgICAgLyogc2V0IHRvIDUgc2Vjb25kcyAqLwpAQCAtMjI1LDYgKzIzMyw3IEBACiAjZGVmaW5l IEVNX1JYQlVGRkVSXzE2Mzg0ICAgICAgMTYzODQKIAogI2RlZmluZSBFTV9NQVhfU0NBVFRFUiAg ICAgICAgICAgIDY0CisjZGVmaW5lIEVNX1RTT19TSVpFCQk2NTUzNQogCiB0eXBlZGVmIGVudW0g X1hTVU1fQ09OVEVYVF9UIHsKIAlPRkZMT0FEX05PTkUsCkBAIC0zMDcsNiArMzE2LDcgQEAKICAg ICAgICAgdWludDMyX3QJCXR4ZF9jbWQ7CiAJc3RydWN0IGVtX2J1ZmZlcgkqdHhfYnVmZmVyX2Fy ZWE7CiAJYnVzX2RtYV90YWdfdAkJdHh0YWc7CQkvKiBkbWEgdGFnIGZvciB0eCAqLworCXVpbnQz Ml90CQl0eF90c287CQkvKiBsYXN0IHR4IHdhcyB0c28gKi8KIAogCS8qIAogCSAqIFJlY2VpdmUg ZGVmaW5pdGlvbnMK ------=_Part_70789_13758717.1157494998466--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a41acea0609051523w55939cdeu71ee9857f40d1294>