Date: Wed, 14 Feb 2007 22:18:49 +0000 From: Bruce M Simpson <bms@incunabulum.net> To: freebsd-net@freebsd.org Subject: [PATCH] Updated 802.1p/q patch Message-ID: <45D38AC9.50107@incunabulum.net>
next in thread | raw e-mail | index | archive | help
Hi, I have tested my 802.1p input patch with vlans configured. So far so good. It is now available from: http://people.FreeBSD.org/~bms/dump/latest-8021p.diff This updated patch moves the 802.1q encapsulation into if_ethersubr.c, allowing M_VLANTAG to be passed up and down the stack for 802.1p priority. I would greatly appreciate wider testing before it is committed. I've noticed that vlan(4) will not put a parent interface into PROMISC if the vlanhwtag capability exists but is disabled. If the main non-vlan input path receives datagrams destined for a layer 3 address configured on a vlan interface, the netinet stack will quite reasonably try to reply on the vlan interface unless net.inet.ip.check_interface is set to 1; something to be aware of. If vlan(4) gets an mbuf which has already been tagged with M_VLANTAG from higher up in the stack, it *should* ignore the vlan id by overwriting it, and using the priority field already assigned to it, so that ALTQ or PF can do its magic. This new patch should do this. The Ethernet code will not use 802.1p by default unless it came from higher up (by way of M_VLANTAG passed to a driver); we should insert the 802.1p tag in the situation where we got an M_VLANTAG from further up without a vlan(4) instance being involved. The new patch should do this. We should also make sure the CFI bit is always cleared in bridging situations as it has special meaning for token ring and FDDI. What has not been tested or considered is the situation where we have nested VLANs. At least one individual has asked about this feature. At the moment, I'd suggest that only Netgraph potentially deals with this rather than the main network stack. Regards, BMS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45D38AC9.50107>