From 79c91b9063b488741efc68e2badefc608f4fb4d4 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 18 Feb 2005 22:31:19 +0000 Subject: Allocate the M_VLANTAG m_pkthdr flag, and use it to indicate that a packet has VLAN mbuf tag attached. This is faster to check than m_tag_locate(), and allows us to use the tags in non-vlan(4) VLAN producers. The first argument to VLAN_OUTPUT_TAG() is now unused but retained for backward compatibility. While here, embellish a fix in rev. 1.174 of if_ethersubr.c -- it now checks for packets with VLAN (mbuf) tags, and it should now be possible to bridge(4) on vlan(4)'s whose parent interfaces support VLAN decapsulation in hardware. Reviewed by: sam --- sys/sys/mbuf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/sys/mbuf.h') diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index d8e84a6..c954f92 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -178,6 +178,7 @@ struct mbuf { #define M_FRAG 0x0800 /* packet is a fragment of a larger packet */ #define M_FIRSTFRAG 0x1000 /* packet is first fragment */ #define M_LASTFRAG 0x2000 /* packet is last fragment */ +#define M_VLANTAG 0x10000 /* packet has VLAN tag attached */ /* * External buffer types: identify ext_buf type. @@ -195,7 +196,8 @@ struct mbuf { */ #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PROTO2|\ M_PROTO3|M_PROTO4|M_PROTO5|M_SKIP_FIREWALL|\ - M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG) + M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|\ + M_VLANTAG) /* * Flags indicating hw checksum support and sw checksum requirements. -- cgit v1.1