mbuf w/o pkthdr?

Sam Leffler sam at errno.com
Tue Oct 12 08:50:21 PDT 2004


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


More information about the freebsd-arch mailing list