[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RE: [lwip-users] tcp_write() errors on snd_queuelen
From: |
Simon Goldschmidt |
Subject: |
Re: RE: [lwip-users] tcp_write() errors on snd_queuelen |
Date: |
Wed, 16 Mar 2011 15:25:46 +0100 |
Tim Lambrix <address@hidden> wrote:
> I am using the latest TI library code that they have. I asked if they
> were working on a port of version 1.4.0 but they said no. Maybe they are
> waiting for it to be released first.
That's got nothing to do with 1.4.0, lwIP threading hasn't been changed since a
long time, and the bug I think they had was calling ARP in the wrong thread, I
think (which was fixed in our example driver in 1.3.0, I think).
> I do have a couple questions relating to the lwIP processing. First,
> tcp_write is almost always going to be called from the application code
> outside
> of the interrupts.
That's OK.
> So when a Ethernet hardware receive ISR goes off, how
> is it normally prevented from interrupting the tcp_write function? Or,
> should the interrupt service routine be allowed to go off but know that a
> tcp_write function call is in progress?
The lwIP way is to put the packet on a list in the ISR and process that list in
the main application ("main loop") somewhere, the same thing goes for timers:
the timer functions should be called from the main loop when a time-check says
that it's time to call them.
Overall, the strict rule which has to be followed is that it's not allowed to
call the core code of lwIP from more than one context (i.e. thread or ISR) at
once.
> What should I be asking TI at this point to solve this problem?
I can't answer you that without knowing their code (or the code you are using).
Unfortunately, I'm a little short of time for lwIP support at the moment. I'll
see if I find the time to look into their lwIP download package to see if
there's something wrong there.
Simon
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
- RE: [lwip-users] tcp_write() errors on snd_queuelen, (continued)
- Re: [lwip-users] tcp_write() errors on snd_queuelen, Simon Goldschmidt, 2011/03/16
- RE: [lwip-users] tcp_write() errors on snd_queuelen, Mullanix, Todd, 2011/03/16
- RE: [lwip-users] tcp_write() errors on snd_queuelen, Tim Lambrix, 2011/03/16
- Re: [lwip-users] tcp_write() errors on snd_queuelen, Simon Goldschmidt, 2011/03/16
RE: [lwip-users] tcp_write() errors on snd_queuelen, Simon Goldschmidt, 2011/03/16