On Wed, 28 Jun 2000, Lehigh, Keith E wrote:

>       I hope this is the right list.  I am a linux novice and trying to

The Linux-realtek mailing lists are described on the support page,
    http://www.scyld.com/network/rtl8139.html
    [EMAIL PROTECTED]

> build a firewall.  I am using redhat 6.0.  I have two nics, one is a mx
> chipset which linux detects and uses a tulip driver, the other is an
> RTL8139B chipset which linux finds just fine.  At bootup the mx nic is
> brought up as eth0 and works fine.  this is the nic connected to the
> internet.  My problem occurs when I attempt to bring up eth1 using ifconfig.
> When I do this I get the following error message: "eth1 Couldn't allocate a
> 65536 byte receive ring.  SIOCSIFFLAGS: Cannot allocate memory."  This

The rtl8139 receives into a single contiguous region in main memory, wrapped
to form a ring.  This region may be configured as 8KB, 16KB, 32KB, or 64KB
in size(*1).

The message is reporting that no contiguous memory region of that size could
be allocated.

The work-around is to change the following line in the "compile-time
settings" section of the driver:
/* Size of the in-memory receive ring. */
#define RX_BUF_LEN_IDX  2               /* 0==8K, 1==16K, 2==32K, 3==64K */

Your driver version must be somewhat old, as I switched the size to 32KB to
reduce this problem.  If you know that your system doesn't have latency
problems you could even drop the Rx ring size to 8KB.
(8KB gives you approximately 1 msec. of latency tolerence with full-rate
100baseTx.)


*1) This is slightly misleading: the memory needed is actually 2^N + 16
   bytes.  This is an unfortunate size.   Linux memory management, both for
   allocating contiguous pages and with kmalloc() works with a binary buddy
   system.  That means if we need a 64KB + 1 byte region, we end up
   allocating 128KB.  Recently the driver has been changed to group all of
   its memory allocations in one request to minimize this dead region, but
   most of it is still wasted.

Donald Becker                           [EMAIL PROTECTED]
Scyld Computing Corporation             http://www.scyld.com
410 Severn Ave. Suite 210               Beowulf Clusters / Linux Installations
Annapolis MD 21403


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to