Subject: Ethernet driver problem
To: None <tech-kern@netbsd.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: tech-kern
Date: 11/27/1999 02:59:56
Hi,

I wrote driver for Focus' NuBus Ethernet card with SMC91C92.
It kinda works so far.  I can telnet or ftp to/from my Mac
IIci with this card.  The problem is that the driver don't
handle fragmented packet properly.  What am I missing here?

The diffs to -current source is at:

http://www05.u-page.so-net.ne.jp/ba2/kei_sun/NetBSD/hack/if_sm.diff

To describe the problem, 192.168.0.4 is NFS server and
192.168.0.10 is target Mac IIci which is NFS client. it
mounts server's /a to local /a.

Running 'find /a &', tcpdump shows the diagnosis below.

Any comments/suggestions are welcome.

# tcpdump -n -N -p host 192.168.0.10
tcpdump: listening on ne0
02:41:24.877888 192.168.0.10.3947216908 > 192.168.0.4.2049: 96 getattr [|nfs]
02:41:24.878326 192.168.0.4.2049 > 192.168.0.10.3947216908: reply ok 112 getattr [|nfs]
02:41:24.981896 192.168.0.10.3947216909 > 192.168.0.4.2049: 100 access [|nfs]
02:41:24.982127 192.168.0.4.2049 > 192.168.0.10.3947216909: reply ok 120 access [|nfs]
02:41:24.986793 192.168.0.10.3947216910 > 192.168.0.4.2049: 96 getattr [|nfs]
02:41:24.986994 192.168.0.4.2049 > 192.168.0.10.3947216910: reply ok 112 getattr [|nfs]
02:41:24.996246 192.168.0.10.3947216911 > 192.168.0.4.2049: 92 fsstat [|nfs]
02:41:24.996474 192.168.0.4.2049 > 192.168.0.10.3947216911: reply ok 168 fsstat [|nfs]
02:41:25.013849 192.168.0.10.3947216912 > 192.168.0.4.2049: 100 access [|nfs]
02:41:25.014060 192.168.0.4.2049 > 192.168.0.10.3947216912: reply ok 120 access [|nfs]

(snip)

02:41:31.980231 192.168.0.10.3947217198 > 192.168.0.4.2049: 92 fsstat [|nfs]
02:41:31.980448 192.168.0.4.2049 > 192.168.0.10.3947217198: reply ok 168 fsstat [|nfs]
02:41:31.985814 192.168.0.10.3947217199 > 192.168.0.4.2049: 116 readdir [|nfs]
02:41:31.997298 192.168.0.4.2049 > 192.168.0.10.3947217199: reply ok 1472 readdir [|nfs] (frag 34351:1480@0+)
02:41:31.997490 192.168.0.4 > 192.168.0.10: (frag 34351:1480@1480+)
02:41:31.998728 192.168.0.4 > 192.168.0.10: (frag 34351:1480@2960+)
02:41:31.999960 192.168.0.4 > 192.168.0.10: (frag 34351:1480@4440+)
02:41:32.001191 192.168.0.4 > 192.168.0.10: (frag 34351:1480@5920+)
02:41:32.002423 192.168.0.4 > 192.168.0.10: (frag 34351:912@7400)
02:41:33.137174 192.168.0.10.3947217199 > 192.168.0.4.2049: 116 readdir [|nfs]
02:41:33.138205 192.168.0.4.2049 > 192.168.0.10.3947217199: reply ok 1472 readdir [|nfs] (frag 34352:1480@0+)
02:41:33.138397 192.168.0.4 > 192.168.0.10: (frag 34352:1480@1480+)
02:41:33.139632 192.168.0.4 > 192.168.0.10: (frag 34352:1480@2960+)
02:41:33.140863 192.168.0.4 > 192.168.0.10: (frag 34352:1480@4440+)
02:41:33.142095 192.168.0.4 > 192.168.0.10: (frag 34352:1480@5920+)
02:41:33.143342 192.168.0.4 > 192.168.0.10: (frag 34352:912@7400)
02:41:35.454030 192.168.0.10.3947217199 > 192.168.0.4.2049: 116 readdir [|nfs]
02:41:35.455057 192.168.0.4.2049 > 192.168.0.10.3947217199: reply ok 1472 readdir [|nfs] (frag 34353:1480@0+)
02:41:35.455249 192.168.0.4 > 192.168.0.10: (frag 34353:1480@1480+)
02:41:35.456484 192.168.0.4 > 192.168.0.10: (frag 34353:1480@2960+)
02:41:35.457715 192.168.0.4 > 192.168.0.10: (frag 34353:1480@4440+)
02:41:35.458947 192.168.0.4 > 192.168.0.10: (frag 34353:1480@5920+)
02:41:35.460179 192.168.0.4 > 192.168.0.10: (frag 34353:912@7400)
02:41:40.070986 192.168.0.10.3947217199 > 192.168.0.4.2049: 116 readdir [|nfs]
02:41:40.072038 192.168.0.4.2049 > 192.168.0.10.3947217199: reply ok 1472 readdir [|nfs] (frag 34354:1480@0+)

(snip)

02:41:49.339485 192.168.0.4 > 192.168.0.10: (frag 34355:1480@1480+)
02:41:49.340721 192.168.0.4 > 192.168.0.10: (frag 34355:1480@2960+)
02:41:49.341952 192.168.0.4 > 192.168.0.10: (frag 34355:1480@4440+)
02:41:49.343184 192.168.0.4 > 192.168.0.10: (frag 34355:1480@5920+)
02:41:49.344415 192.168.0.4 > 192.168.0.10: (frag 34355:912@7400)
^C
617 packets received by filter
0 packets dropped by kernel
# 

--
SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
Hack on NetBSD, and your code runs on over 20 architectures!