NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/44243: Enable ETHERCAP_VLAN_MTU in vr(4)



>Number:         44243
>Category:       kern
>Synopsis:       Enable ETHERCAP_VLAN_MTU in vr(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 16 15:15:00 +0000 2010
>Originator:     river%ilythia.tcx.org.uk@localhost
>Release:        NetBSD 5.1.0_PATCH
>Organization:
>Environment:
System: NetBSD adslgate.tcx.org.uk 5.1.0_PATCH NetBSD 5.1.0_PATCH (ADSLGATE) 
#1: Wed Dec 15 14:58:38 GMT 2010  
river%ilythia.tcx.org.uk@localhost:/data/usr/river/netbsd-5-1/sys/arch/i386/compile/obj/ADSLGATE
 i386
Architecture: i386
Machine: i386
>Description:
When vr(4) interfaces are used with vlan(4), MTU on the vlan interface is 
reduced to 1496, because vr(4) doesn't list the ETHERCAP_VLAN_MTU flag.  
However, equivalent functionality is available in FreeBSD for the vr(4) driver, 
and NetBSD's vr(4) appears to work fine when it's enabled in NetBSD.

Tested with:
vr0 at pci0 dev 9 function 0: VIA VT6105M (Rhine III) 10/100 Ethernet

Note: while this patch seems to work fine for me, I haven't done extensive
testing.

>How-To-Repeat:
# ifconfig vlan0 create
# ifconfig vlan0 vlan 1 vlanif vr0
# ifconfig vlan0
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
>Fix:

Index: if_vr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.95.4.2
diff -u -r1.95.4.2 if_vr.c
--- if_vr.c     3 Oct 2009 21:53:36 -0000       1.95.4.2
+++ if_vr.c     16 Dec 2010 15:00:54 -0000
@@ -1674,6 +1674,8 @@
                VR_DSRX(sc, i)->ds_mbuf = NULL;
        }
 
+       sc->vr_ec.ec_capabilities |= ETHERCAP_VLAN_MTU;
+
        ifp = &sc->vr_ec.ec_if;
        ifp->if_softc = sc;
        ifp->if_mtu = ETHERMTU;



Home | Main Index | Thread Index | Old Index