[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
network freeze
- Date: Mon, 7 Oct 2002 12:32:12 +0100
- From: Mario.Vieira at itlog.edinfor.pt (Mario Vieira)
- Subject: network freeze
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?
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);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rtems.rtems.org/pipermail/rtems-users/attachments/20021007/dcc1f554/attachment.html