lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Help with LwIP Modem


From: Sylvain Rochet
Subject: Re: [lwip-users] Help with LwIP Modem
Date: Fri, 8 Jul 2016 10:04:47 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Jaime,

On Thu, Jul 07, 2016 at 07:00:11PM -0500, Jaime Fernandez Hoffiz wrote:
> Hi Sylvain,
> 
> I think I actually use tcpip_input but please correct me if I'm doing
> something wrong
> 
> this is how I add the netif:
> 
> Inside my callback if I change from ethernet_input to tcpip_input I can't
> not longer ping the target. This is the callback, called by the emac rx
> interrupt.

You can't call tcpip_input() from an interrupt, this is a blocking 
message passing, it can block. You have to create a rx threads. This is 
what you should do:


MAC IRQ                  |          RX THREAD              |         LWIP
                         |                                 |
input pkt -> sem_give ---|--> sem_take -> tcpip_input() ---|--> message box
   |                     |                  |              |
   |                     v                pbuf             v
   |                 semaphore              |       message passing
   |                                        |
   '-->--->--->---- DMA RING --->--->--->---'  


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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