Bug 27742

Summary: if_xl.c drops 802.1q vlan packets
Product: Base System Reporter: reinier.kleipool <reinier.kleipool>
Component: kernAssignee: Bill Paul <wpaul>
Status: Closed FIXED    
Severity: Affects Only Me CC: joop.feenstra
Priority: Normal    
Version: 4.3-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff none

Description reinier.kleipool 2001-05-29 16:50:01 UTC
The 3C905X driver (/sys/pci/if_xl.c) does not allow reception of ethernet frames larger than 1518 bytes.
When the xl interface is used as a 802.1q trunk line it looses packets.
This patch configures the NIC to receive XL_PACKETS_SIZE (defined in /sys/pci/if_reg.h). Defaults to 1540.

Fix: Patch if_xl.c to write the value of XL_PACKET_SIZE to the MaxPktSize register so
the NIC will accept frames up to that size.
Patch if_xlreg.h to change to XL_PACKETS_SIZE to 1540 and
add a #define for the MaxPktSize register of the nic.
See following two diffs:

r4-ams> diff -crN /sys/pci/if_xl.c /sys/pci/if_xl.c.orig
r4-ams> diff -crN /sys/pci/if_xlreg.h /sys/pci/if_xlreg.h.orig
How-To-Repeat: Connect a xl0 interface of FreeBSD to a Cisco Catalyst.
Configure the Catalyst port to trunking mode.
Configure a FreeBSD kernel with "pseudo-device vlan 4".
Configure a vlan interface with a parent i/f of xl0.
Try pinging something on the Catalyst VLAN with a packet size of 1500.
Both the Cat and FreeBSD will add 802.1q ethernetheader fields to the frames.
The incoming frames will be dropped by the driver.
Comment 1 Yar Tikhiy freebsd_committer freebsd_triage 2001-05-31 08:25:53 UTC
Responsible Changed
From-To: freebsd-bugs->wpaul

Over to the maintainer.
Comment 2 Bill Paul freebsd_committer freebsd_triage 2001-05-31 23:10:44 UTC
State Changed
From-To: open->closed

Patch applied to both -current and -stable. There is a way to make this 
work for the pre-cyclone cards as well, but it's not as clean and direct 
as your approach. For now, this will do. 

-Bill