RE: [uCsimm] CS8900 Chip Selection

From: Steffen Plotner (steffen@plotner.org)
Date: Wed Sep 06 2000 - 19:15:26 EDT


Hello,

Thank you for the patch below - it fixes the packet overflowing issue but
does not solve the following problem: the serial console is stuck during a
ping flood as well as doing an http session or telnet session, the
connections get opened but the associated processes never start. Perhaps
converting those into hard realtime tasks is the answer. What is actually
the reason for the above, with my regular unix system (i486/66) I don't have
that problem at all.

Steffen.

> -----Original Message-----
> From: Alex Holden [SMTP:alex@linuxhacker.org]
> Sent: Tuesday, September 05, 2000 6:29 AM
> To: Steffen Plotner
> Cc: 'ucsimm@uClinux.com'
> Subject: RE: [uCsimm] CS8900 Chip Selection
>
> On Mon, 4 Sep 2000, Steffen Plotner wrote:
> > I have to ask this question again. If someone uses the CS8900 chip on
> an
> > ISA PC card and a ping flood occurs then how can the system to anything
> but
> > receive packets? The CS8900 pdf file clearly states that once the
> > interrupts occurs all data must be read the matter what.
>
> What happens if you use this patch? It causes the driver to drop packets
> if they're arriving too fast for it to process them...
>
> --- uCcs8900.c.old Fri Aug 25 09:43:21 2000
> +++ uCcs8900.c Fri Aug 25 10:14:45 2000
> @@ -40,6 +40,14 @@
> #define NET_DEBUG 2
> #endif
>
> +/*
> + * Maximum number of receive packets to handle in interrupt handler
> before
> + * starting to drop them (to prevent lock-up under ping flood
> conditions).
> + */
> +#ifndef MAX_RX_WORK
> +#define MAX_RX_WORK 32
> +#endif
> +
> /* ======================= end of configuration =======================
> */
>
>
> @@ -610,7 +618,7 @@
> {
> struct device *dev = (struct device *)(irq2dev_map[/* FIXME
> */0]);
> struct net_local *lp;
> - int ioaddr, status;
> + int ioaddr, status, rx_pkts = 0;
>
> dev = irq2dev_map[0];
> if (dev == NULL) {
> @@ -636,7 +644,8 @@
> switch(status & ISQ_EVENT_MASK) {
> case ISQ_RECEIVER_EVENT:
> /* Got a packet(s). */
> - net_rx(dev);
> + if (++rx_pkts > MAX_RX_WORK) lp->rx_dropped++;
> + else net_rx(dev);
> break;
> case ISQ_TRANSMITTER_EVENT:
> lp->stats.tx_packets++;
>
> --
> --------------- Linux- the choice of a GNU generation. --------------
> : Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
> -------------------- http://www.linuxhacker.org/ --------------------

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:38 EST