Subject: Re: Q630 and EtherWaveLC
To: None <port-mac68k@NetBSD.ORG>
From: Yanagisawa Takeshi <yanagisw@aa.ap.titech.ac.jp>
List: port-mac68k
Date: 12/12/1996 18:35:03
On Wed, 11 Dec 1996, yama@radical.biotech.okayama-u.ac.jp (Mamoru  
Yamanishi) wrote:
> However, the following error messages are shown:
> /netbsd: ae0: warning -reciever ring buffer overrun
> /netbsd: ae0: device timeout, recovered
>
> I also see NIC memory errors.  This error message is appears on
> IIci and EtherWave Nubus.
>
> For these errors, the performance of this card is very bad.

I'm working on internal ethernet driver for PB550c which kernel is  
based on Mr. Hamada's and ethernet driver is based on if_sn.c from  
OpenBSD,
Though machine is different from Yamanishi's, I encountered quite  
similar problem on my machine.
(the MPUs are same... is there any relation?)

So, let me explain what is happening on my machine.

I tested several 'ping' sessions from PB550c.
Results are as follows (somewhat long, sorry).

In the following examples,
"host1" is my NetBSD/mac68k machine (PB550c) which sends ping packets.
"host2" is other machine which recieves and replies ping packets.
"snintr" is the main interrupt routine of the ethernet driver of host1.
(0x600 indicates the status 'received (0x400)' and 'xmitted(0x200)')
Lines begin with "xmit" "rcvd" are debugging messages of
transmit/receive interrupt routines.

[Example 1 (sending 2 packets)]
====================================================================
host1$ ping -c 2 host2
PING host2 (ppp.qqq.rrr.sss): 56 data bytes

xmit status=0x1 len=98 type=0x800 from host1 (to host2)
rcvd 0xdb0be status=0x2041, len=84 type=0x800 from host2 (to host1)
snintr: 0x600.
xmit status=0x1 len=98 type=0x800 from host1 (to host2)
rcvd 0xdb6ae status=0x2041, len=84 type=0x800 from host2 (to host1)

--- host2 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
===================================================================

It seems that the low level ethernet interface actually transmitted
and received all packets during ping session,
but kernel didn't process these packets in higher layer and causes no  
responce from host2.


[Example 2 (sending 4 packets)]
===================================================================
host1$ ping -c 4 host2
PING host2 (ppp.qqq.rrr.sss): 56 data bytes

snintr: 0x600.
xmit status=0x1 len=98 type=0x800 from host1 (to host2)
rcvd 0xdf7fe status=0x2041, len=84 type=0x800 from host2 (to host1)
snintr: 0x600.
xmit status=0x1 len=98 type=0x800 from host1 (to host1)
rcvd 0xdfdee status=0x2041, len=84 type=0x800 from host2 (to host1)
snintr: 0x600.
xmit status=0x1 len=98 type=0x800 from host1 (to host2)
rcvd 0xe03de status=0x2041, len=84 type=0x800 from host2 (to host1)
64 bytes from host1: icmp_seq=0 ttl=255 time=2270.530 ms
snintr: 0x600.
xmit status=0x1 len=98 type=0x800 from host1 (to host2)
rcvd 0xe09ce status=0x2041, len=84 type=0x800 from host2 (to host1)
64 bytes from host1: icmp_seq=1 ttl=255 time=2302.000 ms

--- host2 ping statistics ---
4 packets transmitted, 2 packets received, 50% packet loss
round-trip min/avg/max = 2270.530/2286.265/2302.000 ms
==================================================================

In this case, the situation is slightly different.
The interface xmitted and received all packets, as same as
first example.
The interesting thing is that kernel began to treat 1st reply packets
at 3rd ping, and 2nd packet at 4th ping.

In other network services, similar things happen and cause slow  
responce.

It seems that the communication between low level network layer and the  
higher one is not good... It can work, but timeout occurs sometimes as  
Mr. Yamanishi experienced.

Does anyone have any idea to check and fix them?

---
Yanagisawa Takeshi <yanagisw@aa.ap.titech.ac.jp>

Dept. of Applied Physics, Tokyo Institute of Technology,
Oh-okayama 2-12-10, Meguro-ku, Tokyo 152, Japan