Subject: kern/20363: vlan with bge is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 02/16/2003 04:28:56
>Number:         20363
>Category:       kern
>Synopsis:       Using vlan devices with bge as the parent does not work
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 15 20:29:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Scott Ellis
>Release:        NetBSD 1.6N
>Organization:
   //////////////////////////////////////////////////////////////////////
  //    Scott Ellis     //             scotte@warped.com              //
 //////////////////////////////////////////////////////////////////////
// WARNING: This signature warps  time and space in its vicinity    //
>Environment:
	
	
System: NetBSD intrepid 1.6N NetBSD 1.6N (INTREPID.APM) #1: Sat Feb 15 20:18:14 PST 2003 scotte@intrepid:/usr/src/sys/arch/i386/compile/INTREPID.APM i386
Architecture: i386
Machine: i386
>Description:
	
Using the following configuration:

bge0 at pci0 dev 15 function 0: Broadcom BCM5700 Gigabit Ethernet
bge0: interrupting at irq 11
bge0: ASIC BCM5700 B1, Ethernet address 00:04:76:3b:1a:df
brgphy0 at bge0 phy 1: BCM5401 1000BASE-T media interface, rev. 3
brgphy0: using BCM5401 DSP patch
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FD
X, auto

bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1518
        capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
        enabled=0
        address: 00:04:76:3b:1a:df
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33220
        inet 127.0.0.1 netmask 0xff000000
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1518
        vlan: 2 parent: bge0
        address: 00:04:76:3b:1a:df
        inet 24.161.186.28 netmask 0xfffff000 broadcast 255.255.255.255
vlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1518
        vlan: 1 parent: bge0
        address: 00:04:76:3b:1a:df
        inet 192.168.1.1 netmask 0xfffffff0 broadcast 192.168.1.15

(MTU of bge0 is set to 1518, vlan*'s are unspecified, and left as the default)

In the above configuration, traffic sent out vlan0 is sent untagged.  It is
unknown what traffic sent out vlan1 really looks like (lack of a sniffer on
that network).  Needless to say, this prevents a lot of things from working. ;-)

Disabling the HWTAGGING in if_bge.c works around this problem, so appearently
it's something broken there.

This configuration worked perfectly in an early Jan kernel (and userland).

>How-To-Repeat:
	
On a machine with a bge, create two vlans.  Notice that one of the vlan's sends
untagged packets (oops!).
>Fix:
	
Removing ETHERCAP_VLAN_HWTAGGING from if_bge.c works around the problem,
but obviously reduces the capability of the bge card.
>Release-Note:
>Audit-Trail:
>Unformatted: