This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Is it possible to do polling for the Ethernetdriverusing a stack ?
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: "Cusson, Pascal" <pascal dot cusson at analog dot com>
- Cc: David Webster <dwebster at lanergy dot com>,eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 31 Oct 2002 13:03:37 -0700
- Subject: RE: [ECOS] Is it possible to do polling for the Ethernetdriverusing a stack ?
- References: <8FDC0F9BE1F91D44BE964AA54AAA67B6D62CA0@wilmexm3.ad.analog.com>
On Thu, 2002-10-31 at 12:53, Cusson, Pascal wrote:
> Just to let you know, I use priority 3 for my foreground task and
> priority 5 for my background task. Do you know what the priority of the
> network tasks are ?
>
Read the CDL :-)
The network threads by default run a priority 6 & 7, so if your threads
never block (give up the CPU), the network will be stopped.
> Pascal
>
> -----Original Message-----
> From: Gary Thomas [mailto:gthomas@ecoscentric.com]
> Sent: Thursday, October 31, 2002 2:46 PM
> To: Cusson, Pascal
> Cc: David Webster; eCos Discussion
> Subject: RE: [ECOS] Is it possible to do polling for the Ethernet
> driverusing a stack ?
>
>
> On Thu, 2002-10-31 at 12:32, Cusson, Pascal wrote:
> > Hi David,
> > Thank you very much for the email! I had no idea where to take the
> > next step. I will indeed implement your first suggestion, the one
> > without interrupts. I already created a thread as you suggested which
> > carries the sc pointer.
> >
> > So far, when there is a flag raised in FCCE, I call the eth_int(sc)
> > function with the proper sc parameter. This function takes car or
> > resetting the flags. Before it does so, it calls the eth_receive
> > function with the following call: (sc->funs>eth_drv->recv)(sc,
> > RxDB->dl). RxDB->dl contains the length of my buffer.
> >
> > Following, the eth_receive function gets called. In that function, I
> > transfer the data into a pre-made memory allocation called sg_list.
> >
> > All of this seems to be working fine. However, my receive buffer don't
> > get cleared (the status is not reset). From all the examples I looked
> > at, the status is never reset anywhere. I therefore presume it is done
> > by the stack. Could you please explain me some more on this subject.
> My
> > buffers get filled up but they don't ever get reset. I am missing
> > something little here.
> >
>
> This most likely means that the network threads (there are a number
> of them) are not getting to run. Those threads do the actual stack
> processing. If they don't run, the buffers will just queue up and
> wait.
>
> --
> ------------------------------------------------------------
> Gary Thomas |
> eCosCentric, Ltd. |
> +1 (970) 229-1963 | eCos & RedBoot experts
> gthomas@ecoscentric.com |
> http://www.ecoscentric.com/ |
> ------------------------------------------------------------
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss