This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MFREE(m,n) from the DSR context


manu shetty <shetty_m@yahoo.com> writes:

> Hi,
>      Can I call MFREE(m,n) from the DSR context to
> free the mbuf ?.

No.  Ethernet drivers do all IO in a thread context and are passed
scatter/gather lists for data. While these lists are often derived
from an mbuf chain, the driver never gets access to the actual
mbufs. IO is done from a thread context since it is necessary to have
the network stack locked during the call. Any attempt to manipulate
mbufs or any other network stack data structures outside the lock
would result in data corruption. If you are writing drivers for some
other device, you should follow the model established by the ethernet
drivers.


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]