Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2002 12:39:45 -0700 (PDT)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        Prafulla Deuskar <pdeuskar@FreeBSD.ORG>, freebsd-net@FreeBSD.ORG
Subject:   Re: Fwd: mbuf chain
Message-ID:  <200209251939.g8PJdjr10039@ambrisko.com>
In-Reply-To: <20020924212719.A42295@iguana.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo writes:
| On Tue, Sep 24, 2002 at 04:15:56PM -0700, Prafulla Deuskar wrote:
| > Sorry for the cross-posting.
| > ----------------------------
| >  
| > All,
| >  
| > Is there a pre-set limit on maximum number of fragments in a
| > mbuf chain ?
| > 
| > I see 64 fragments with jumboframes (mtu 9000) using nttcp.
| 
| aha... (this is related to the problem with the em driver and jumbo
| frames, right ?)
| 
| o limit that i know of. 
| And now i clearly see how the long chain might arise -- sosend puts
| each write in one ro more mbufs, then down in the call chain,  
| sbappend() is called which in turn calls sbcompress().  The problem
| is, for short writes on a TCP socket (say 128 bytes at a time) the
| data goes into regular mbufs, not clusters, so sbcompress does not
| have a chance to compress the chain because of lack of space in the
| mbufs.
| 
| A possible workaround would be to modify sbcompress to allocate
| clusters replacing existing mbufs when such a situation exists.

Various drivers have code to deal with this when the structure
it is putting the frags into runs out :-(  See a recent bug fix to
the ste(4) gleaned from the fxp(4).  This type of problem is probably
lurking in other drivers.  Unfortunately the ste(4) driver siliently
failed and sent out truncated packets before the fix.

When I instrumented the code while the system was hosting a CVS pserver
checkout I saw the frag count go up to 10.

Doug A.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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