DragonFly BSD
DragonFly users List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: em driver issues

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Feb 2005 19:02:07 -0800 (PST)

:>     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?

    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.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]