From owner-p4-projects@FreeBSD.ORG Mon Mar 3 18:52:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F2D01065672; Mon, 3 Mar 2008 18:52:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EE111065670 for ; Mon, 3 Mar 2008 18:52:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2708FC1E for ; Mon, 3 Mar 2008 18:52:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m23IqIo1073887 for ; Mon, 3 Mar 2008 18:52:18 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m23IqIaF073885 for perforce@freebsd.org; Mon, 3 Mar 2008 18:52:18 GMT (envelope-from sam@freebsd.org) Date: Mon, 3 Mar 2008 18:52:18 GMT Message-Id: <200803031852.m23IqIaF073885@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 136760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 18:52:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=136760 Change 136760 by sam@sam_ebb on 2008/03/03 18:52:08 o add M_PROTO[678] so net80211 doesn't allocate private bits that are possibly clobbered and so they are propagated in mbuf pkthdr copies w/o special handling o while here cleanup mbuf flag definitions: use 8-digit defs so bit location are clear, and sort Affected files ... .. //depot/projects/vap/sys/sys/mbuf.h#9 edit Differences ... ==== //depot/projects/vap/sys/sys/mbuf.h#9 (text+ko) ==== @@ -170,30 +170,30 @@ /* * mbuf flags. */ -#define M_EXT 0x0001 /* has associated external storage */ -#define M_PKTHDR 0x0002 /* start of record */ -#define M_EOR 0x0004 /* end of record */ -#define M_RDONLY 0x0008 /* associated data is marked read-only */ -#define M_PROTO1 0x0010 /* protocol-specific */ -#define M_PROTO2 0x0020 /* protocol-specific */ -#define M_PROTO3 0x0040 /* protocol-specific */ -#define M_PROTO4 0x0080 /* protocol-specific */ -#define M_PROTO5 0x0100 /* protocol-specific */ -#define M_NOTIFICATION M_PROTO5/* SCTP notification */ -#define M_SKIP_FIREWALL 0x4000 /* skip firewall processing */ -#define M_FREELIST 0x8000 /* mbuf is on the free list */ +#define M_EXT 0x00000001 /* has associated external storage */ +#define M_PKTHDR 0x00000002 /* start of record */ +#define M_EOR 0x00000004 /* end of record */ +#define M_RDONLY 0x00000008 /* associated data is marked read-only */ +#define M_PROTO1 0x00000010 /* protocol-specific */ +#define M_PROTO2 0x00000020 /* protocol-specific */ +#define M_PROTO3 0x00000040 /* protocol-specific */ +#define M_PROTO4 0x00000080 /* protocol-specific */ +#define M_PROTO5 0x00000100 /* protocol-specific */ +#define M_BCAST 0x00000200 /* send/received as link-level broadcast */ +#define M_MCAST 0x00000400 /* send/received as link-level multicast */ +#define M_FRAG 0x00000800 /* packet is a fragment of a larger packet */ +#define M_FIRSTFRAG 0x00001000 /* packet is first fragment */ +#define M_LASTFRAG 0x00002000 /* packet is last fragment */ +#define M_SKIP_FIREWALL 0x00004000 /* skip firewall processing */ +#define M_FREELIST 0x00008000 /* mbuf is on the free list */ +#define M_VLANTAG 0x00010000 /* ether_vtag is valid */ +#define M_PROMISC 0x00020000 /* packet was not for us */ +#define M_NOFREE 0x00040000 /* do not free mbuf, embedded in cluster */ +#define M_PROTO6 0x00080000 /* protocol-specific */ +#define M_PROTO7 0x00100000 /* protocol-specific */ +#define M_PROTO8 0x00200000 /* protocol-specific */ -/* - * mbuf pkthdr flags (also stored in m_flags). - */ -#define M_BCAST 0x0200 /* send/received as link-level broadcast */ -#define M_MCAST 0x0400 /* send/received as link-level multicast */ -#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 /* ether_vtag is valid */ -#define M_PROMISC 0x20000 /* packet was not for us */ -#define M_NOFREE 0x40000 /* do not free mbuf - it is embedded in the cluster */ +#define M_NOTIFICATION M_PROTO5 /* SCTP notification */ /* * External buffer types: identify ext_buf type. @@ -211,17 +211,17 @@ #define EXT_EXTREF 400 /* has externally maintained ref_cnt ptr */ /* - * Flags copied when copying m_pkthdr. + * Flags to purge when crossing layers. */ -#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_VLANTAG|M_PROMISC) +#define M_PROTOFLAGS \ + (M_PROTO1|M_PROTO2|M_PROTO3|M_PROTO4|M_PROTO5|M_PROTO6|M_PROTO7|M_PROTO8) /* - * Flags to purge when crossing layers. + * Flags copied when copying m_pkthdr. */ -#define M_PROTOFLAGS (M_PROTO1|M_PROTO2|M_PROTO3|M_PROTO4|M_PROTO5) +#define M_COPYFLAGS \ + (M_PKTHDR|M_EOR|M_RDONLY|M_PROTOFLAGS|M_SKIP_FIREWALL|M_BCAST|\ + M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|M_VLANTAG|M_PROMISC) /* * Flags indicating hw checksum support and sw checksum requirements. This