lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Timers & Low Level Tick


From: Bill Auerbach
Subject: RE: [lwip-users] Timers & Low Level Tick
Date: Mon, 17 Mar 2008 11:36:55 -0400

Rick, you and I are using lwIP in a similar fashion.  I saw the same thing you did.  To significantly improve the performance, I changed ethernetif_input to return an int.  It returns 1 if it processed a packet (if low_level_input returned non NULL) and 0 if it didn’t.  When I process packets, I use:

 

while( ethernetif_input() )

    ;

 

to ensure I process all received packets.

 

I don’t believe you can reliably call ethernetif_input from an ISR.  I thought of doing the same thing on a “received a packet” interrupt, but this could interrupts tcp_fasttmr which I thought would be a bad thing.

 

Bill

 


From: address@hidden [mailto:address@hidden On Behalf Of Rick Culver
Sent: Monday, March 17, 2008 10:46 AM
To: address@hidden
Subject: [lwip-users] Timers & Low Level Tick

 

I am using the callback API with the LWIP stack.  Currently I have a function that calls the timers (etharp_tmr, tcp_slowtmr, tcp_fasttmr, etc.) and the processing of received packets.  I call this function in the main non-IRQ loop.  However, I am finding that in some cases I can not call this function frequently enough to keep up with the packets and/or timers.  I was thinking of setting up a low priority IRQ to simply call this function about every 100ms or so to process the timers and received packets.  My question is this, if I am also trying to set up calls to tcp_write at the non-IRQ level will cause problems for the stack to run my processing function at the low level IRQ interrupt?  Can this be done and/or can it be done with certain precautions in doing so?  Please advise.

Rick

 


reply via email to

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