This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: network problem
- From: Andrea Acquaviva <aacquaviva at deis dot unibo dot it>
- To: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Cc: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 11 Jan 2002 18:01:00 +0100
- Subject: Re: [ECOS] network problem
- Organization: DEIS
- References: <3C3F1275.D1CA436B@deis.unibo.it> <20020111174018.C22918@biferten.ma.tech.ascom.ch>
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