[En-Nut-Discussion] TCP stops working after some time

Bernd Walter ticso at cicely12.cicely.de
Sun Nov 28 12:11:26 CET 2004


On Sun, Nov 28, 2004 at 11:18:55AM +0100, Harald Kipp wrote:
> Hello Bernd,
> 
> At 22:54 27.11.2004 +0100, you wrote:
> >I have an application using 3.9-1 that does a lot of connects and
> >disconnects.
> >After some time the Boards doesn't respond to TCP Packets anymore,
> >but I can still ping it.
> 
> I assume, you're running out of memory. The state
> machine discards incoming packets when less than
> 4k is left.

Don't think that's the reason - there's about 20k left.
In the mean time I've found out what triggered this problem.
It was that I had receive timeout set to 100ms and directly closed
the connection on timeout.
I asume with granularity and rounding it ended up with 0-63ms.
Now I'm using 500ms and everything looks fine now.

> >While searching inside Ethernut code I failed to see how all the
> >NutEventPostAsync() calls inside the TCP code are protected from
> >interrupts.
> 
> Inside interrupt routines interrupts are disabled
> by the CPU and re-enabled when returning.

I know, but which TCP part is run by interrupt?
Isn't it that TCP routines are only run by application, tcpsm and
rxi5 threads.

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd at bwct.de                                  info at bwct.de




More information about the En-Nut-Discussion mailing list