Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2003 13:12:25 -0600 (CST)
From:      Mike Silbersack <silby@silby.com>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf options src/sys/netinet ip_output.c
Message-ID:  <20030326130903.G2075@odysseus.silby.com>
In-Reply-To: <20030326183351.GJ57674@elvis.mu.org>
References:  <200303260452.h2Q4quap015364@www.ambrisko.com>    <20030326183351.GJ57674@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 26 Mar 2003, Maxime Henrion wrote:

> Nice work!  This will really be very useful to have for the network
> interface drivers.  I have a few comments :
>
> - You removed the m_getcl() optimization that has been added in if_xl.c
> recently.  You should use m_getcl() if len is > MHLEN, because m_getcl()
> grabs both a header and a cluster.  If len is <= MHLEN, you can just use
> m_gethdr().  I guess you did this because you have been hitting the
> KASSERT() in m_dup_pkthdr(), and I think this KASSERT() is a bit bogus.
> It seems to me there should be a way to do it without having to delay
> the cluster allocation.  Maybe Sam or Robert could comment on this?

You hit the nail on the head.

Sam says that Bosko may enhance m_dup_pkthdr() to handle the M_EXT case
soon; if and when that occurs, I'll fix up m_defrag to use it.  Until
then, I'll stick with what I have so as to avoid getting sidetracked.

> - I believe an mbuf chain passed to a network driver should always have
> a packet header.

Perhaps true, but I want this routine to not blow up if it's used
elsewhere.  (I may use it in the IP reassembly code, and it could end up
elsewhere.)

> - Minor style(9) nits: you should test pointers against NULL and not using them
> as booleans.  Also, there's a trailing newline in the m_defragment()
> function.
>
> Thanks for doing this work!
>
> Cheers,
> Maxime

Ok, I'll make those changes in a future revision.  Sam had some comments
as well, I hope to be able to get around to putting out pass3 later today.

Thanks for the comments,

Mike "Silby" Silbersack



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