Date: Mon, 13 May 1996 15:31:04 -0500 (CDT) From: Alex Nash <nash@mcs.net> To: Tony Ardolino <tony@netcon.com> Cc: bugs@FreeBSD.ORG, cam@solidsys.com Subject: Re: Freebsd, mbuf cluster size MINCLSIZE Message-ID: <Pine.BSI.3.91.960513152550.13992A-100000@Mercury.mcs.com> In-Reply-To: <31972068.4DCF@netcon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 May 1996, Tony Ardolino wrote: > We have just completed porting our NetCon product to FreeBSD this product > includes among other things; a NEW IPX/SPX protocol stack, and a NEW NetWare > compatible vfs file system (TFS). Both the protocol stack and file system use > the MBUF subsystem. > What we don't understand is why is MINCLSIZE being set to 208 bytes when it > should be 100 bytes. Is there something wrong here or is that we just > don't understatnd what going on. > > We see the following throughout the FreeBSD code: > > MGET(m, M_WAIT, MT_DATA); > or > MGETHDR(m, M_WAIT, MT_DATA); > if(len >= MINCLSIZE) > MCLGET(m, M_WAIT); > > in mbuf.h > #define MINCLSIZE (MHLEN + MLEN) > MINCLSIZE = 208 ((MLEN = MSIZE 128 - m_hdr 20) + (MHLEN = MLEN 108 - pkthdr > 8) > > should MINCLSIZE == 100 not 208, and if this is a bug how come TCP/IP works > so well. Our code crashes when we have packets > 100 and < 208. > Can anyone shed any light on this please? MINCLSIZE should indeed be 208. For an excellent discussion of this, see Wright/Stevens TCP/IP Illustrated Volume 2. Specifically, pages 31-33. Note that the text points out that clusters are used for buffers greater than *or equal* to 208 bytes, when in fact this should really be greater than 208 bytes. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.960513152550.13992A-100000>
