lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwip driver model


From: Jeff Barber
Subject: [lwip-users] lwip driver model
Date: Wed, 11 Mar 2009 15:22:57 -0400

I'm planning to port lwIP into a new system.  I want to use the raw
API with no OS.  I will need to write a new ethernet NIC driver and I
just want to make sure I completely understand the driver model (I
find the documentation available on this subject rather confusing).  I
would appreciate it if someone could confirm the assumptions here, or
explain where I'm off base.

1. The function ethernet_input should be called to introduce new
packets into the lwip stack.
   (Or, more specifically, it appears that my framework should specify
ethernet_input in the netif_add call as the input function; then the
driver should call netif->input.)

2. Interrupt handler *may* call pbuf_alloc or mem*_alloc in interrupt
context (with an appropriate definition of sys_arch_protect) but
should not call ethernet_input if there is any chance that other code
in the stack is already executing.

3. Hence, practically speaking, the interrupt handler will need to
defer actually introducing packets into the stack until the main
polling loop.

Thanks a lot,
Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]