Re: cvs commit: src/sys/conf options src/sys/netinet ip_output.c

From: Mike Silbersack <>
Date: Wed, 26 Mar 2003 11:49:14 -0600 (CST)
On Tue, 25 Mar 2003, Doug Ambrisko wrote:

> | I think that we'll end up being even better off by just making a
> | m_defragment function, thereby reducing code duplication even more.  I'll
> | make sure to test any such function more than I tested the MBUF_FRAG_TEST
> | code, however. :)
> Yes, I was thinking that as well.

Ok, here's my attempt at a m_defragment function.  It seems to work well
here, although I have only tested it with the if_xl driver.  Could you
guys give it a quick lookover to see if it has any bugs?  I'll add the
ability to copy mbuf chains longer than MCLBYTES once I know all the
packet header handling / etc is correct.

Also note that the patch contains my changes to if_xl, which are mostly
debugging code.  You can ignore most of that.  One change I _will_ make to
if_xl, however, is to walk the chain and find out its length _before_ we
do any busdma calls; this moves the defragmentation occur earlier, thereby
avoiding the need for a complex error recovery case.  I suspect we'll want
to do the same in the other network drivers.


Mike "Silby" Silbersack
Received on Wed Mar 26 2003 - 09:52:43 UTC