Question on mbufs

John Baldwin jhb at freebsd.org
Tue Oct 20 18:32:36 UTC 2015


On Friday, October 16, 2015 05:56:33 PM David Somayajulu wrote:
> Hi All,
> When indicating a chain of mbufs to the network via ifp->if_input(), what are the repercussions of setting M_PKTHDR bit in all the mbufs in the chain, instead of just the first mbuf ?
> Thanks
> David S.

Right now the various input routines do not expect a chain of packets and
probably assume that the chain is a single packet.  I assume you mean that
the chain here represents a single mbuf still and they are chained via m_next
and not m_nextpkt?  I suspect that this is probably fine and that most things
will only check for M_PKTHDR and look for the fields in the first mbuf in
the chain.

-- 
John Baldwin


More information about the freebsd-net mailing list