network freeze

Mário Vieira mariovieira at netc.pt
Mon Oct 7 13:45:20 UTC 2002


Hi,

 

Thanks for your help.

 

My last experience with the network driver was made with interrups disabled. Nothing is received and

nothing is transmited. I wanted to test if there was something wrong with the estruture of the driver in the transmission process. I expected that when we run out of buffers some error 

message will come up.

 

 

Best regards,

Mário Vieira

 

 

	-----Mensagem original----- 
	De: Joel Sherrill [mailto:joel.sherrill at OARcorp.com] 
	Enviada: seg 07-10-2002 14:20 
	Para: Mario Vieira 
	Cc: rtems-users at OARcorp.com 
	Assunto: Re: network freeze
	
	



	Mario Vieira wrote:
	>
	> Hi,
	>
	> I'm trying to test the latest netdemo example downloaded from oarcorp
	> in rtems 4.5.0 also downloaded from oarcorp. I'm using the i960
	> processor.
	>
	> I run the netdemo program and the system freezes after sending 5 UDP
	> packets. I see with a packet sniffer that after those 5 packets an ARP
	> request is sent too.
	>
	> It seems that the network stack is wait for the answer to that ARP.
	> Shouldn't the stack give some error?
	
	This sounds distinctly like a network driver problem.  On many NICs,
	there is a set of buffers/descriptors on the chip itself that must
	be recovered.  If you don't do it properly, it will run a few packets
	(usually < 50) and fail.
	
	Another possibility is that you have gotten a different type of
	interrupt
	and are not handshaking it correctly.
	
	> Thanks in advance,
	> Mário Vieira.
	>
	> My network driver big picture (based in wd8003 driver from pc386 BSP)
	> without sending anything to the network board:
	>
	> void
	> wd_txDaemon (void *arg)
	> {
	>         struct wd_softc *sc = (struct wd_softc *)arg;
	>         struct ifnet *ifp = &sc->arpcom.ac_if;
	>         struct mbuf *m;
	>         rtems_event_set events;
	>
	>         for (;;) {
	>                 /*
	>                  * Wait for packet
	>                  */
	>                 rtems_bsdnet_event_receive (START_TRANSMIT_EVENT,
	> RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &events);
	>
	>                 /*
	>                  * Send packets till queue is empty
	>                  */
	>                 for (;;) {
	>                         /*
	>                          * Get the next mbuf chain to transmit.
	>                          */
	>                         IF_DEQUEUE(&ifp->if_snd, m);
	>                         if (!m)
	>                                 break;
	>                         sendpacket (ifp, m);
	>                 }
	>                 ifp->if_flags &= ~IFF_OACTIVE;
	>         }
	> }
	>
	> static void
	> sendpacket (struct ifnet *ifp, struct mbuf *m)
	> {
	>         struct wd_softc *dp = ifp->if_softc;
	>         struct mbuf *n;
	>         unsigned int len, tport;
	>         char *shp, txReady;
	>
	>   len = 0;
	>
	>   n = m;
	>
	>   for (;;){
	>     len += m->m_len;
	> /*    memcpy(shp, (char *)m->m_data, m->m_len); */
	>     shp += m->m_len ;
	>     if ((m = m->m_next) == NULL)
	>       break;
	>   }
	>
	>   m_freem(n);
	>
	> }
	
	--
	Joel Sherrill, Ph.D.             Director of Research & Development
	joel at OARcorp.com                 On-Line Applications Research
	Ask me about RTEMS: a free RTOS  Huntsville AL 35805
	   Support Available             (256) 722-9985
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20021007/d2a08fc6/attachment.html>


More information about the users mailing list