Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 May 2007 15:51:18 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        freebsd-net@freebsd.org
Subject:   Anybody running VLANs over tl(4) or nve(4)?
Message-ID:  <20070502115118.GG51428@comp.chem.msu.su>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070502115118.GG51428>