[En-Nut-Discussion] TCP stops working after some time
Harald Kipp
harald.kipp at egnite.de
Mon Dec 20 10:07:14 CET 2004
Hello Bernd,
Long time ago since this had been reported. Last night
our long time test failed. Ethernut seems to be dead.
Despite similar situations reported by someone else,
there was even no ping response.
I also recognized, that several calls to NutEventPostAsync()
are unprotected from interrupts. Several had been used by
Oliver's last change to replace NutEventPost(). I do not
know right now, what's the reason behind this. But there
may be one. Oliver may have tried to avoid thread switching
when the socket is in an intermediate state.
In July 2003 Ralph Mason fixed a bug by replacing NutEventPost()
by NutEventPostAsync():
"When you accept using NutTcpAccept if the accepting thread priority
is higher than the TCP state machine thread you get a returned socket
that is not established."
I'll probably need some time to analyze this. Any additional
help is welcome.
Harald
At 12:11 28.11.2004 +0100, you wrote:
>On Sun, Nov 28, 2004 at 11:18:55AM +0100, Harald Kipp wrote:
> > Hello Bernd,
> >
> > At 22:54 27.11.2004 +0100, you wrote:
>
> > >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.
More information about the En-Nut-Discussion
mailing list