Subject: [netatalk-admins] AppleTalk crashes EEPro100 on a bonded etherchannel

From: Osma Ahvenlampi <[email-masked]>
Date: 24 Nov 1998 11:14:30 +0200

[This post is partially off-topic for both lists, sorry about
that. I'm still posting it to both because it's also partially
on-topic for both, and will probably be of interest to readers 
on both lists.. Please adjust reply addresses accordingly.]

Hardware: 350MHz P-II with two Intel EEPro100's, connected to a Cisco
Catalyst 2924XL on both ports.

Software: Linux 2.0.36 with Beowulf channel bonding patch, eepro100
driver versions 0.99B and 1.04 tested. Netatalk 1.4b2+asun2.1.0.

Problem:

With only one interface enabled and the switch in a standard 
configuration, the system works normally (after the
multicast_filter_limit=3 workaround for the eepro100 bug). 

Enable both interfaces by running 'ifenslave eth0 eth1' and
configuring the switch to use both ports connected to the machine as a 
port group. Tests with ftp indicate channel bonding is successful
(transfer speeds to an NT machine on the same switch jump from 4.8-5.0 
MB/s to 7.5MB/s, and concurrent transfers to two NT machines stay in
the 5 MB/s range).

Start Netatalk. nbprgstr fails to register an AppleTalk address/name
for the system until I add a line "eth0 -phase 2" into
/etc/atalk/atalkd.conf. After adding it, Netatalk starts
normally. This indicates that atalkd can't understand that eth1 is a
slave channel. This might have been acceptable, since with modern
MacOS, EtherTalk isn't used for more than address lookups (Chooser)
anyway.. afpd over TCP/IP probably wouldn't have been a problem on a
bonded channel. Still, it is a lacking in Netatalk.

However, I soon notice that the machine's entire ethernet layer starts
crashing. The error is familiar from the multicast debugging: "kernel:
eth0: Transmit timed out: status 0050 command 0000." All network
traffic stops for 10-20 seconds, Linux notices something is wrong,
resets the ethernet layer, and things work again for a minute or two
until the same repeats.

Last time this problem turned out to be (a still unresolved?) race
condition in the eepro100 driver when the hardware multicast filter
was set up for more than 3 addresses (requiring some kind of
continuation packet in the configuration). If any (multicast?) packets 
were received during the multicast configuration, the driver would
crash.

I've patched my driver on the source level (in case conf.modules
configuration options don't propagate correctly to multiple driver
instances) to work around the problem by limiting the use of the
hardware multicast filter to 3 addresses. With bonded channel, this
isn't enough, though.

Still, it sure sounds like a race condition. Perhaps some static
variable that should be protected by a semaphore or local to a driver
instance is getting clobbered when one card is being configured and
the other receives traffic?

-- 
Against boredom, even the gods themselves struggle in vain.
Osma Ahvenlampi <[email-masked]>

---

From: Erik Schwiebert <[email-masked]>
Date: Tue, 24 Nov 1998 09:06:09 -0800

>resets the ethernet layer, and things work again for a minute or two

I munched a bunch of text.  I'm seeing the same problem in my Linux box
with two EEPro 100's.  My configuration is slightly different:  I have an
ADSL coonection on eth0, and an home network on eth1, with IP masquerading
to give the home network access to the internet.  Every time i enable
atalkd, i get a slew of

kernel: eth1: Transmit timed out: status 0050 command 0000."

messages (sometimes the status is 0090).

My internal network is composed of 3 macs and a printer, and i'd like to
get the Linux box running netatalk so i can use it as a common file server
and temporary backup storage site, since its HD is several times bigger
than the HD's in my macs.

Schwieb

--
Erik Schwiebert                                       http://www.hokusai.com/

---

From: Albert Max Lai <[email-masked]>
Date: Tue, 24 Nov 1998 12:20:14 -0500 (EST)

On 24 Nov 1998, Osma Ahvenlampi wrote:
I have a similar config:
dual 350MHz P-II with 1 Intel EEPro100 onboard
kernel versions 2.0.35, 2.0.36, 2.0.128 
driver versions 1.06 and 0.99B.
Netatalk versions 1.4b2+asun2.1.0 and 1.4b2+asun2.0a18.2.

I have a similar problem. If I don't set the module option
multicast_filter_limit=0, I crash the local network here (router starts
resetting my port, I hog all the bandwidth, etc.). When I set that module
option under 2.0.35/2.0.36, when xntpd starts up, I get a Transmit timed
out and then the ethernet layer gets reset. After that, it works. My guess
is that there seems to be something still wrong with the multicast filter.
Other than that it seems to work great.

> resets the ethernet layer, and things work again for a minute or two

                                                 \\\|||///
                                                 |       |
                                                (  @   @  )
********************************************oooO****(_)****Oooo*********
* Albert Lai         SEAS Columbia University                          *
* Residential Computer Consultant                                      *
* e-mail: [email-masked]     http://www.columbia.edu/~aml61        *
*         [email-masked]     http://amlai3.ec.rhno.columbia.edu    *
* AOL:    [email-masked]                                            *
* 1018D East Campus                                                    *
* 411 W 116th St                                                       *
* New York, NY 10027                            .oooO                  *
* Ph: (212)853-4854                             (   ) Oooo.            *
*************************************************\ (  (   )*************
                                                  \_)  ) /
                                                      (_/

---

From: a sun <[email-masked]>
Date: Tue, 24 Nov 1998 10:58:52 -0800 (PST)

slave channel. 

i'll add in a check for that. just tack on "| IFF_SLAVE" to the places
that also have IFF_POINTOPOINT. 

in any case, i would like to collate some information on ethernet
cards with good multicast support. could people send me their ethernet
driver configurations? let me know the following:
      1) ethernet card, driver version, and os
      2) whether or not atalkd causes your computer to crash or not.
      3) whether or not you can see nbp info (via nbplkup).
      4) any workarounds you might have.

-a
[email-masked]

---

From: Dejan Ilic <[email-masked]>
Date: Wed, 25 Nov 1998 00:06:47 +0100 (MET)

Talking about multicast I've heard that:

(free from my memory, from a guy that works with video-on-demand
 stuff)

*) 3Com hardware support sucks. Multicasting is "1-bit" selected.
Either on or off, no hardware filtering at all. You receive ALL
multicasting trafic if you have it all.

*) Intel networking is better, something like it is able to separate a
couple multicasting-channels in hardware, something like "3-bit" I
think it was.

*) Their favorite is Digital Tulip-based cards (Dec-21something) that
can be found in cheap cards from DLINK for example. If I remember
correctly it is magnitude better in handling multicasting trafic
compared both to 3com and Intel.

All this is free from my memory, from talks I had with my friend about
it some time ago.

>       2) whether or not atalkd causes your computer to crash or not.

I've just upgraded my Sun Ultra-1 to Solaris-7 with 64-bit support.
When booting in 32-bit mode, atalk starts up, but with a warning. In
64-bit mode atalk crashes.

But that is code compiled under Solaris-2.6.

I will recompile it ASAP to see if it helps.

Also, I would like to see a separate program that can dump Atalk-ARP.
Is it do-able without too much work ?

Dejan
=====================================================================
Dejan Ilic, Tech Univ. of Linkoping, Sweden    Phone:+46-13-473 01 06
Email: [email-masked]   Web: http://www.lysator.liu.se/~svedja
=====================================================================
[finger -l [email-masked] for public PGP key]

---

From: Osma Ahvenlampi <[email-masked]>
Date: 25 Nov 1998 10:43:13 +0200

> multicasting trafic if you have it all.

Yep. All multicast filtering is done in software with all 3Com cards.

> couple multicasting-channels in hardware, something like "3-bit" I

EEPro100 has a 64-address hardware multicase filter. However, the
Linux driver still has a problem that it crashes if it receives
traffic while being configured for >3 multicast addresses (the first
three fit into the first configuration frame, while the rest need an
extension frame). Workaround:

options eepro100 multicast_filter_limit=3

into /etc/conf.modules (or if your driver is built into the kernel,
the same option to the kernel).

> compared both to 3com and Intel.

Other Tulip cards are SMC EtherPowers. Tulip has a 512-address
hardware multicast hash filter and 16-address perfect filter. I have
no personal experience with Tulip cards, so I can't say if the driver
works well.

Donald Becker's Linux Ethernet drivers page has good background
information for all cards Linux supports. See

<URL:http://cesdis1.gsfc.nasa.gov/linux/drivers/>

and in particular, 

<URL:http://cesdis.gsfc.nasa.gov/linux/misc/100mbps.html>

-- 
Pound for pound, the amoeba is the most vicious animal on the earth.
Osma Ahvenlampi <[email-masked]>

---

From: Magnus Stenman <[email-masked]>
Date: Wed, 25 Nov 1998 13:52:20 +0100

> no personal experience with Tulip cards, so I can't say if the driver

I use D-LINKs (DFE-500TX) with tulip chips;

tulip.c:v0.89H 5/23/98 [email-masked]
eth0: Digital DS21140 Tulip at 0x6c00, 00 80 c8 45 dc aa, IRQ 11.

And they work very good, both in 10 and 100Mbit

(but the Macs do not run very much faster with 100Mbit...)

/magnus

---

From: Chip Mefford <[email-masked]>
Date: Wed, 25 Nov 1998 08:50:50 -0500 (EST)

On Tue, 24 Nov 1998, a sun wrote:

>snip<

Sorry for my ignorance, but does this somehow mean that atalkd wont bond
to eth1, ignoring eth0 even if atalkd.conf only has a eth1 argument?

Reason I ask is this is how I have been trying to set netatalk up. I had
it working this way under 1.3, and for a little while under 1.4b2, but it 
was unsatisfactory due to my ignorance, I've been at it again, and thus
far have been unable to get it to run at all. 

atalkd.conf
#
#eth1 -phase 2 -net 0-65534 -addr 65280.158

eth1 -phase 2 

messages log

Nov 18 15:40:42 video1 atalkd[585]: restart (1.4b2+asun2.1.0)
Nov 18 15:40:43 video1 atalkd[585]: zip_getnetinfo for eth1
Nov 18 15:41:12 video1 atalkd[585]: config for no router
Nov 18 15:41:13 video1 atalkd[585]: ready 0/0/0
Nov 18 15:49:13 video1 atalkd[585]: done

???

thanx in advance for any insights

chipper

---

From: a sun <[email-masked]>
Date: Wed, 25 Nov 1998 11:35:53 -0800 (PST)

umm, everything pre-asun2.1.1-3 will attempt to use any ethernet
interface. if you have more than one, you'll need to specify things
explicitly as atalkd needs to be set up to route between the various
interfaces in those cases. if you don't want routing to be done, you
can just specify one interface. 

the little snippet i suggested just makes it so that atalkd will skip
slave interfaces. if you're doing ethernet bonding, you shouldn't be
running things on the slave interface anyway.

-a