From owner-freebsd-hackers Mon Aug 7 23:28:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with SMTP id D583137B565 for ; Mon, 7 Aug 2000 23:28:20 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115205>; Tue, 8 Aug 2000 16:27:56 +1000 Content-return: prohibited Date: Tue, 08 Aug 2000 16:27:52 +1000 From: Peter Jeremy Subject: VLAN Support in FreeBSD To: hackers@FreeBSD.ORG Cc: dgilbert@velocet.ca Message-Id: <00Aug8.162756est.115205@border.alcanet.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG About a month ago, David Gilbert started a thread in freebsd-stable about supporting a 1500MTU through a VLAN trunk (see Message-ID: <14689.22689.894466.908666@trooper.velocet.net>). Since this would be very useful to me, I did some digging into it and looked through the code (there being no other documentation). As far as I can tell from the code, the only thing restricting VLAN over ethernet devices to an MTU of 1496 is the code deleted in the following patch. Based on references to if_mtu, ifi_mtu, if_hdrlen and ifi_hdrlen, there is nothing in the system which will get upset if the MTU+hdrlen on the VLAN interface is more than the MTU+hdrlen on the trunk interface (the VLAN parent). When I try this in practise, I can send 1500 byte packets without problem, but when a 1500 byte packet is sent to me, it never arrives (at least at bpf_tap() on the trunk interface). Unfortunately, I can't tell (at this stage) whether this is a problem with the 3Com 3C905 NIC, or the switch. (There's no problem with shorter packets). Has anyone else played with VLAN's in FreeBSD? Does anyone know which (if any) NICs are likely to object to receiving VLAN trunk frames (1522 instead of 1518 bytes). Index: if_vlan.c =================================================================== RCS file: /home/CVSROOT/src/sys/net/if_vlan.c,v retrieving revision 1.18 diff -u -r1.18 if_vlan.c --- if_vlan.c 2000/07/13 22:54:30 1.18 +++ if_vlan.c 2000/08/08 06:11:02 @@ -356,11 +356,7 @@ if (ifv->ifv_p) return EBUSY; ifv->ifv_p = p; - if (p->if_data.ifi_hdrlen == sizeof(struct ether_vlan_header)) - ifv->ifv_if.if_mtu = p->if_mtu; - else - ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; - + ifv->ifv_if.if_mtu = p->if_mtu; /* * Preserve the state of the LINK0 flag for ourselves. */ Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message