Re: cvs commit: src/sys/conf options src/sys/netinet ip_output.c
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
> - 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()
> Thanks for doing this work!
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
Received on Wed Mar 26 2003 - 11:15:54 UTC