em driver issues
Matthew Dillon
dillon at apollo.backplane.com
Thu Feb 3 19:02:35 PST 2005
:>
:> I am breaking out of the loop immediately. The MCL allocation will
:> fail and EM should drop the packet.
:
:For the em(4) usage, that's fine. But what about MB_WAITOK allocations?
:
:Joerg
mbuf's MB_WAIT has slightly different semantics from malloc's M_WAITOK.
All mbuf code should (must!) handle the case where an MB_WAIT allocation
fails. i.e. we don't just continue allocating memory to the network
until the system falls over. There's a limit defined by the malloc
type (see vmstat -m).
m_mballoc() utilizes M_NOWAIT first and then if MB_WAIT is specified
it tries again with M_WAITOK|M_NULLOK. Thus, an MB_WAIT allocation can
still fail (without panicing the system) if the malloc bucket fills up.
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Users
mailing list