[ECOS] network problem

Andrea Acquaviva aacquaviva@deis.unibo.it
Fri Jan 11 09:04:00 GMT 2002


Andrew Lunn wrote:

> On Fri, Jan 11, 2002 at 05:27:33PM +0100, Andrea Acquaviva wrote:
> > Hi,
> >
> > I found a problem while using the CF ethernet interface on assabet
> > board.
> > After the network initialization made by init_all_network_interfaces(),
> > I put the program in an idle state (while(1)) and I try to ping the
> > interface. The interface reply to the ping request for a certain amount
> > of time and then blocks.
> > The strange thing is that this amount of time increase if I add some
> > debugging output when the packet are received.
> >
> > Someone can suggest me an explanation?
>
> Remember that eCos is an RTOS. A high priority thread which is
> runnable will always be run instead of a low priority thread. The
> network stack is implemented as threads as well. So if your endless
> loop is running at a higher priority then the network stack, don't
> expect the network stack to work.

I used the endless loop for debugging. I encountered this problem by using a
client (ecos)-server(linux) application. The application fails after a
certain number of correct transfers.

>
>
> Now the strange thing. You say it works for a while. That i don't
> understand. It should work, or it should not work. What are you
> actually pinging. The application stack or the redboot stack? The
> redboot stack may keep working under these conditions since its not
> thread based. The debug output would also help since it gives redboot
> more time to actually process network traffic for it.

I don't use redboot, I use gdb as a rom monitor.

>
>
> Also, some network drivers have a low priority tickle thread. This
> thread is used to recover from hardware errors in some ethernet
> devices. They lockup under some conditions and the tickle thread will
> bring them back to life. Maybe your endless loop is stopping this
> tickle thread and so you are seeing the hardware error.
>
>        Andrew

I attached the client, which is very simple.
Thanks a lot for your help!

Andrea.

--
Ing. Andrea Acquaviva
D.E.I.S. - Universita' di Bologna
V.le Risorgimento, 2    40136 BOLOGNA (ITALY)
Tel: (+39) 051 20 93787 Fax: (+39) 051 2093786


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ECOS_client.c
Type: image/x-xbitmap
Size: 2729 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20020111/9e9e8ff8/attachment.xbm>


More information about the Ecos-discuss mailing list