Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2003 01:36:38 -0600 (CST)
From:      Mike Silbersack <silby@silby.com>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf options src/sys/netinet ip_output.c
Message-ID:  <20030327013224.P7674@odysseus.silby.com>
In-Reply-To: <20030326130903.G2075@odysseus.silby.com>
References:  <200303260452.h2Q4quap015364@www.ambrisko.com>    <20030326183351.GJ57674@elvis.mu.org> <20030326130903.G2075@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1494665756-1048750598=:7674
Content-Type: TEXT/PLAIN; charset=US-ASCII


Ok, I think I have m_defrag in a working state, please review.

Changes from last time:

- It supports infinitely long chains.
- It has a "goal" argument which is supposed to be a hint to tell m_defrag
how long the chain can be.  It is currently ignored; someone may want to
honor this later for optimization purposes.
- I fixed up the error case in if_xl, it only runs if needed now

At the top of the if_loop and if_xl patches are debugging code I used to
make it was working right, they're certainly not going in.

m_defrag should be totally free of debug code.

Dig in!

Mike "Silby" Silbersack
--0-1494665756-1048750598=:7674
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="m_defragment-pass4.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <20030327013638.B7674@odysseus.silby.com>
Content-Description: 
Content-Disposition: attachment; filename="m_defragment-pass4.patch"

ZGlmZiAtdSAtciAvdXNyL3NyYy9zeXMub2xkL2tlcm4vdWlwY19tYnVmLmMg
L3Vzci9zcmMvc3lzL2tlcm4vdWlwY19tYnVmLmMNCi0tLSAvdXNyL3NyYy9z
eXMub2xkL2tlcm4vdWlwY19tYnVmLmMJVHVlIE1hciAyNSAxOTo1MTo0NCAy
MDAzDQorKysgL3Vzci9zcmMvc3lzL2tlcm4vdWlwY19tYnVmLmMJVGh1IE1h
ciAyNyA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1yIC91c3Ivc3JjL3N5cy5vbGQv
c3lzL21idWYuaCAvdXNyL3NyYy9zeXMvc3lzL21idWYuaA0KLS0tIC91c3Iv
c3JjL3N5cy5vbGQvc3lzL21idWYuaAlUdWUgTWFyIDI1IDE5OjUwOjQ2IDIw
MDMNCisrKyAvdXNyL3NyYy9zeXMvc3lzL21idWYuaAlXZWQgTWFyIDI2IDE5
OjU5OjI2IDIwMDMNCkBAIC00MzAsNiArNDMwLDcgQEANCiBzdHJ1Y3QJbWJ1
ZgkqbV9jb3B5bShzdHJ1Y3QgbWJ1ZiAqLCBpbnQsIGludCwgaW50KTsNCiBz
dHJ1Y3QJbWJ1ZgkqbV9jb3B5cGFja2V0KHN0cnVjdCBtYnVmICosIGludCk7
DQogdm9pZAkJIG1fY29weV9wa3RoZHIoc3RydWN0IG1idWYgKiwgc3RydWN0
IG1idWYgKik7DQorc3RydWN0CW1idWYJKm1fZGVmcmFnKHN0cnVjdCBtYnVm
ICosIGludCwgaW50KTsNCiBzdHJ1Y3QJbWJ1ZgkqbV9kZXZnZXQoY2hhciAq
LCBpbnQsIGludCwgc3RydWN0IGlmbmV0ICosDQogCQkgICAgdm9pZCAoKiko
Y2hhciAqLCBjYWRkcl90LCB1X2ludCkpOw0KIHN0cnVjdAltYnVmCSptX2R1
cChzdHJ1Y3QgbWJ1ZiAqLCBpbnQpOw0K

--0-1494665756-1048750598=:7674--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030327013224.P7674>