Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2004 08:50:41 -0700
From:      Sam Leffler <sam@errno.com>
To:        Sam <sah@softcardsystems.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: mbuf w/o pkthdr?
Message-ID:  <416BFD51.2080805@errno.com>
In-Reply-To: <Pine.LNX.4.60.0410121115430.30953@athena>
References:  <Pine.LNX.4.60.0410121115430.30953@athena>

next in thread | previous in thread | raw e-mail | index | archive | help
Sam wrote:
> Hello -
> 
> src/sys/i386/i386/busdma_machdep.c:/^bus_dmamap_load_mbuf/
> prohibits loading an mbuf that does not contain a packet
> header.  Some drivers use this (xl), some don't (fxp).
> 
> Are all packets supposed to have the M_PKTHDR flag?  Why?

M_PKTHDR indicates an m_pkthdr structure is present in the mbuf. 
bus_dmamap_load_mbuf requires this as it gets the packet length from it 
(instead of walking the mbuf chain or taking it as an argument).  Most 
packets typically have this information (can't think of any interesting 
cases where it is not be there).

	Sam



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