From owner-svn-src-head@FreeBSD.ORG Mon Aug 19 15:12:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA8A064D; Mon, 19 Aug 2013 15:12:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A7EEA24CC; Mon, 19 Aug 2013 15:12:44 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id j13so3549891wgh.26 for ; Mon, 19 Aug 2013 08:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=R/Dbo5dBY+GsgIMtEqjBOUt7KeLU4+TwhNB5Svvmb88=; b=SJP2fd8DFlD58Xm+DxOtxMYlmJEW/sGoILd99sC8pzJq+HuaECgFnMYBteWI37as9M O9qPB5TaNtHyrN/rNniV3yDeINpaO3QCmKoekc2q3hFpxHdnni6C631d6AsAlg1zDIqC iNy/5L/UdN0uEL+l8tykZiePVUINOTyFuOJ/hz4Zfu0zau69OXU8lQBUsc927QDoHlTO GBNmV/CkW+OpQ+KhG7IZAqAVuUV0O98r4z4AAWutDmMTTOUZTHUYJngfqodmQ1GnBG2F aQs4+4LhVde3FwaE2o/iGFvKttpTMtYa3SvDEW50F7NO48631tXOJ02lau4D8PJ1TNRk jvgg== MIME-Version: 1.0 X-Received: by 10.194.94.37 with SMTP id cz5mr1768346wjb.55.1376925162896; Mon, 19 Aug 2013 08:12:42 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Mon, 19 Aug 2013 08:12:42 -0700 (PDT) In-Reply-To: <201308191425.r7JEPCsT086845@svn.freebsd.org> References: <201308191425.r7JEPCsT086845@svn.freebsd.org> Date: Mon, 19 Aug 2013 08:12:42 -0700 X-Google-Sender-Auth: scrp7RcDQRJ-FdxWaQR3-h84ROk Message-ID: Subject: Re: svn commit: r254527 - in head/sys: net80211 netinet sys From: Adrian Chadd To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 15:12:45 -0000 Hi, Would you please bump FreeBSD_version ? I'd like to make the net80211 on -HEAD build on -9, and this is one of those changes that will break that. Thanks! -adrian On 19 August 2013 07:25, Andre Oppermann wrote: > Author: andre > Date: Mon Aug 19 14:25:11 2013 > New Revision: 254527 > URL: http://svnweb.freebsd.org/changeset/base/254527 > > Log: > Reorder the mbuf defines to make more sense and group related flags > together. > > Add M_FLAG_PRINTF for use with printf(9) %b indentifier. > > Use the generic mbuf flags print names in the net80211 code and adjust > the protocol specific bits for their new positions. > > Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field > they use internally to store some additional information. > > Discussed with: trociny, glebius > > Modified: > head/sys/net80211/ieee80211_freebsd.h > head/sys/netinet/sctp_os_bsd.h > head/sys/sys/mbuf.h > > Modified: head/sys/net80211/ieee80211_freebsd.h > > ============================================================================== > --- head/sys/net80211/ieee80211_freebsd.h Mon Aug 19 14:07:31 2013 > (r254526) > +++ head/sys/net80211/ieee80211_freebsd.h Mon Aug 19 14:25:11 2013 > (r254527) > @@ -250,16 +250,13 @@ struct mbuf *ieee80211_getmgtframe(uint8 > #define M_80211_RX (M_AMPDU|M_WEP|M_AMPDU_MPDU) > > #define IEEE80211_MBUF_TX_FLAG_BITS \ > - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_ENCAP\6M_WEP\7M_EAPOL" \ > - > "\10M_PWR_SAV\11M_MORE_DATA\12M_BCAST\13M_MCAST\14M_FRAG\15M_FIRSTFRAG" \ > - > "\16M_LASTFRAG\17M_SKIP_FIREWALL\20M_FREELIST\21M_VLANTAG\22M_PROMISC" \ > - "\23M_NOFREE\24M_FF\25M_TXCB\26M_AMPDU_MPDU\27M_FLOWID" > + M_FLAG_BITS \ > + "\15M_ENCAP\17M_EAPOL\20M_PWR_SAV\21M_MORE_DATA\22M_FF\23M_TXCB" \ > + "\24M_AMPDU_MPDU\25M_FRAG\26M_FIRSTFRAG\27M_LASTFRAG" > > #define IEEE80211_MBUF_RX_FLAG_BITS \ > - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_AMPDU\6M_WEP\7M_PROTO3" \ > - > "\10M_PROTO4\11M_PROTO5\12M_BCAST\13M_MCAST\14M_FRAG\15M_FIRSTFRAG" \ > - > "\16M_LASTFRAG\17M_SKIP_FIREWALL\20M_FREELIST\21M_VLANTAG\22M_PROMISC" \ > - "\23M_NOFREE\24M_PROTO6\25M_PROTO7\26M_AMPDU_MPDU\27M_FLOWID" > + M_FLAG_BITS \ > + "\15M_AMPDU\16M_WEP\24M_AMPDU_MPDU" > > /* > * Store WME access control bits in the vlan tag. > > Modified: head/sys/netinet/sctp_os_bsd.h > > ============================================================================== > --- head/sys/netinet/sctp_os_bsd.h Mon Aug 19 14:07:31 2013 > (r254526) > +++ head/sys/netinet/sctp_os_bsd.h Mon Aug 19 14:25:11 2013 > (r254527) > @@ -431,7 +431,7 @@ typedef struct rtentry sctp_rtentry_t; > /* > * SCTP protocol specific mbuf flags. > */ > -#define M_NOTIFICATION M_PROTO5 /* SCTP > notification */ > +#define M_NOTIFICATION M_PROTO1 /* SCTP > notification */ > > /* > * IP output routines > > Modified: head/sys/sys/mbuf.h > > ============================================================================== > --- head/sys/sys/mbuf.h Mon Aug 19 14:07:31 2013 (r254526) > +++ head/sys/sys/mbuf.h Mon Aug 19 14:25:11 2013 (r254527) > @@ -186,26 +186,25 @@ struct mbuf { > #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 */ > - /* 0x00000800 free */ > - /* 0x00001000 free */ > - /* 0x00002000 free */ > -#define M_PROTO9 0x00004000 /* protocol-specific */ > -#define M_PROTO10 0x00008000 /* protocol-specific */ > -#define M_VLANTAG 0x00010000 /* ether_vtag is valid */ > -#define M_PROMISC 0x00020000 /* packet was not for us */ > -#define M_PROTO11 0x00040000 /* protocol-specific */ > -#define M_PROTO6 0x00080000 /* protocol-specific */ > -#define M_PROTO7 0x00100000 /* protocol-specific */ > -#define M_PROTO8 0x00200000 /* protocol-specific */ > -#define M_FLOWID 0x00400000 /* deprecated: flowid is valid > */ > +#define M_BCAST 0x00000010 /* send/received as link-level > broadcast */ > +#define M_MCAST 0x00000020 /* send/received as link-level > multicast */ > +#define M_PROMISC 0x00000040 /* packet was not for us */ > +#define M_VLANTAG 0x00000080 /* ether_vtag is valid */ > +#define M_FLOWID 0x00000100 /* deprecated: flowid is valid > */ > + > +#define M_PROTO1 0x00001000 /* protocol-specific */ > +#define M_PROTO2 0x00002000 /* protocol-specific */ > +#define M_PROTO3 0x00004000 /* protocol-specific */ > +#define M_PROTO4 0x00008000 /* protocol-specific */ > +#define M_PROTO5 0x00010000 /* protocol-specific */ > +#define M_PROTO6 0x00020000 /* protocol-specific */ > +#define M_PROTO7 0x00040000 /* protocol-specific */ > +#define M_PROTO8 0x00080000 /* protocol-specific */ > +#define M_PROTO9 0x00100000 /* protocol-specific */ > +#define M_PROTO10 0x00200000 /* protocol-specific */ > +#define M_PROTO11 0x00400000 /* protocol-specific */ > #define M_PROTO12 0x00800000 /* protocol-specific */ > + > #define M_HASHTYPEBITS 0x0F000000 /* mask of bits holding flowid > hash type */ > > /* > @@ -216,6 +215,18 @@ struct mbuf { > M_PROTO9|M_PROTO10|M_PROTO11|M_PROTO12) > > /* > + * Mbuf flag description for use with printf(9) %b identifier. > + */ > +#define M_FLAG_BITS \ > + "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ > + "\7M_PROMISC\10M_VLANTAG\11M_FLOWID" > +#define M_FLAG_PROTOBITS \ > + "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ > + "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ > + "\27M_PROTO11\30M_PROTO12" > +#define M_FLAG_PRINTF (M_FLAG_BITS M_FLAG_PROTOBITS) > + > +/* > * Network interface cards are able to hash protocol fields (such as IPv4 > * addresses and TCP port numbers) classify packets into flows. These > flows > * can then be used to maintain ordering while delivering packets to the > OS > @@ -253,8 +264,8 @@ struct mbuf { > * Flags preserved when copying m_pkthdr. > */ > #define M_COPYFLAGS \ > - (M_PKTHDR|M_EOR|M_RDONLY|M_PROTOFLAGS|M_BCAST|M_MCAST|\ > - M_VLANTAG|M_PROMISC|M_HASHTYPEBITS) > + (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_VLANTAG|M_PROMISC| \ > + M_PROTOFLAGS|M_HASHTYPEBITS) > > /* > * External buffer types: identify ext_buf type. >