problem with rtl8139

Donald Becker becker@cesdis1.gsfc.nasa.gov
Tue Oct 5 09:04:24 1999


On Tue, 5 Oct 1999, Christian Schaffer wrote:

> rtl8139.c:v1.08a 7/5/99
...
> eth2: RealTek RTL8139 Fast Ethernet at 0xf800, IRQ 10, 00:00:e8:8d:0e:done
> Setting up network device eth2
> eth2: Couldn't allocate a 65536 byte receive ring.
> SIOCSIFFLAGS: Cannot allocate memory.

The problem is exactly what the message reports: the driver couldn't
allocate memory for a 65KB receive ring.
The request is done at GFP_KERNEL level, and thus should not fail unless no
memory at all is available.

You can reduce the size of the in-memory receive ring by editing the
documented constant at the top of the driver:

/* Size of the in-memory receive ring. */
#define RX_BUF_LEN_IDX	 3	       	/* 0==8K, 1==16K, 2==32K, 3==64K */
#define RX_BUF_LEN (8192 << RX_BUF_LEN_IDX)

A 32KB buffer gives you 30 msec. of receive buffer before overflowing, which
should be fine in modern machines.  I wouldn't recommend 16KB, and 8KB is
almost certain to cause dropped packets.

Hmmm,  I'll change the default setting for updated drivers to 32KB.


Donald Becker					  becker@cesdis.gsfc.nasa.gov
USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882	     http://cesdis.gsfc.nasa.gov/people/becker/whoiam.html

 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.