Strange Length Packets

modified: Wed Jan 14 1998


From: aswNS@hamp.hampshire.edu (Al Woodhull)
Subject: Strange length packets
Date: 14 Jan 98 16:32:19 GMT

I have had correspondence recently with several people who reported
seeing a "strange length packet received" message while trying to set
up Minix networking over ethernet. I had seen that message in the
past, but never had been quite sure of its cause.

Today I did some experiments and confirmed that one thing that can
cause the message is having an incorrect shared memory parameter for a
WD/SMC-type ethernet card. The system where I did the experiments
normally uses 0xd0000 (the default) for this value. When I changed
this to various values in the 0xc0000 range I saw the "strange length"
messages, and of, course, the ethernet did not function.

What happens is that when a packet arrives an ethernet adapter with an
incorrect memory setting tries to copy the packet data into ROM or
into an area of RAM that doesn't work right due to more than one set
of chips handling that address range. The ethernet card then causes an
interrupt, which wakes up the driver.  When the driver attempts to
read the packet it finds meaningless or garbled data in the
packet. One parameter of a packet is the length of the data field,
which must be between 46 and 1500 bytes. Because a 16 bit number is
allowed for the length field there is a high probablity that a random
number here will correspond to an illegal value. So the message
"strange length packet" can be interpreted as "garbled packet".
 
Disk controllers, video cards, and other devices may have ROM in the
0xc0000 area, and if shadowing is enabled there can be conflicts of
system RAM with the RAM on the ethernet card.  A region in the 0xd0000
region usually won't have conflicts with ROM, but there can still be
RAM conflicts if shadowing is enabled.

I am not sure that incorrect memory assignment is the only thing that
can cause this error, but it is at least one cause, and it is easy to
try tweaking the value in the DPETH0 boot parameter. Obviously this
explanation only holds for cards which use shared memory to
communicate, and if this error is seen with an NE-type card there must
be another explanation. I'd like to hear from anyone who has seen the
"strange length" message, especially if you think there are other
possible causes.

Al 
--
+----------------------------------+
| Albert S. Woodhull               |
| Hampshire College, Amherst, MA   |
| awoodhull@hampshire.edu          |
| http://minix1.hampshire.edu/asw/ |
+----------------------------------+