From owner-freebsd-net@FreeBSD.ORG Wed May 2 11:51:27 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607FC16A400 for ; Wed, 2 May 2007 11:51:27 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id B150A13C469 for ; Wed, 2 May 2007 11:51:26 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l42BpJxU064621 for ; Wed, 2 May 2007 15:51:19 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l42BpISZ064616 for freebsd-net@freebsd.org; Wed, 2 May 2007 15:51:18 +0400 (MSD) (envelope-from yar) Date: Wed, 2 May 2007 15:51:18 +0400 From: Yar Tikhiy To: freebsd-net@freebsd.org Message-ID: <20070502115118.GG51428@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: Anybody running VLANs over tl(4) or nve(4)? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 11:51:27 -0000 Hi folks, There two network interface drivers that have uncertain VLAN_MTU support status, namely nve(4) and tl(4). The nve(4) driver has a sign of unfinished VLAN_MTU support in it as it forgets to set the respective bit in if_capenable; and tl(4) was told to support long frames, but its driver doesn't indicate that capability at all. Therefore I'd appreciate reports of successfully running VLANs over nve(4) or tl(4) with an MTU of 1500 bytes on the vlan(4) interfaces. Attached are trivial patches that add correct and complete indication of VLAN_MTU support to the two drivers. With those patches applied, vlan(4) interfaces attached to tl(4) or nve(4) will automatically get the full MTU of 1500 bytes. What needs testing is the ability of the NICs to handle overlong frames resulting from VLAN encapsulation of full-sized frames. The simplest test is ping using 1500-byte IP packets with Don't Fragment bit set: # ping -D -s1472 A.B.C.D where A.B.C.D is the name or IP of a host reachable via the vlan. Doing FTP or SSH transfers of files larger than the MTU over the vlan link can exercise the capability, too. Thanks in advance! -- Yar Index: pci/if_tl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_tl.c,v retrieving revision 1.110 diff -u -p -r1.110 if_tl.c --- pci/if_tl.c 23 Feb 2007 12:19:03 -0000 1.110 +++ pci/if_tl.c 2 May 2007 11:19:42 -0000 @@ -1267,6 +1267,8 @@ tl_attach(dev) ifp->if_init = tl_init; ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_maxlen = TL_TX_LIST_CNT - 1; + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable |= IFCAP_VLAN_MTU; callout_init_mtx(&sc->tl_stat_callout, &sc->tl_mtx, 0); /* Reset the adapter again. */ Index: dev/nve/if_nve.c =================================================================== RCS file: /home/ncvs/src/sys/dev/nve/if_nve.c,v retrieving revision 1.25 diff -u -p -r1.25 if_nve.c --- dev/nve/if_nve.c 23 Feb 2007 12:18:48 -0000 1.25 +++ dev/nve/if_nve.c 2 May 2007 11:19:42 -0000 @@ -530,6 +530,7 @@ nve_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = TX_RING_SIZE - 1; IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable |= IFCAP_VLAN_MTU; /* Attach to OS's managers. */ ether_ifattach(ifp, eaddr);