Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 1996 07:43:36 -0400
From:      Tony Ardolino <tony@netcon.com>
To:        bugs@freebsd.org
Cc:        cam@solidsys.com
Subject:   Freebsd,  mbuf cluster size MINCLSIZE
Message-ID:  <31972068.4DCF@netcon.com>

next in thread | raw e-mail | index | archive | help
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?

Tony Ardolino



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