Date: Mon, 1 Sep 2003 01:01:42 -0500 (CDT) From: Mike Silbersack <silby@silby.com> To: src-committers@FreeBSD.org Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c src/sys/netinetip_output.c src/sys/sys mbuf.h Message-ID: <20030901005712.X667@odysseus.silby.com> In-Reply-To: <200309010555.h815tbYK021677@repoman.freebsd.org> References: <200309010555.h815tbYK021677@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 31 Aug 2003, Mike Silbersack wrote: > - Fragmentation is handled by the function m_fragment, which can > be called from whereever fragmentation is needed. Note that this > function is wrapped in #ifdef MBUF_STRESS_TEST to discourage non-testing > use. Note that I #ifdef'd the function, but I left the definition in mbuf.h without any #ifdefs around it, because that seemed evil. If there's a more correct way of handling this, please tell me. > - Add two modes of random fragmentation. Chains with fragments all of > the same random length and chains with fragments that are each uniquely > random in length may now be requested. While testing this feature, I came to the conclusion that arc4random must be somewhat statistically random, as I was using arc4random & 255, and chain lengths seemed to be coming up about 11 frags in length. (256 / 2) = 128 * 11 = 1408, which is pretty close to the length of an ethernet packet. Not very scientific, but interesting. (I was watching via a ppsratelimited check on the chainlength, and didn't write down exact results either, so it's actually totally unscientific.) Mike "Silby" Silbersack
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030901005712.X667>