tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mbuf flags



In article <5298.1425184456%perseus.noi.kre.to@localhost>,
Robert Elz  <kre%munnari.OZ.AU@localhost> wrote:
>    Date:        Sun,  1 Mar 2015 00:16:51 +0000 (GMT)
>    From:        Robert Swindells <rjs%fdy2.co.uk@localhost>
>    Message-ID:  <20150301001651.D680E30285B%ren.fdy2.co.uk@localhost>
>
>  | Also, keeping everything aligned would require adding an extra hex digit
>  | to every one which would make it less clear what had really changed.
>
>Add the extra digits in a separate (change nothing) commit first,
>then your real change will be smooth, and still look nice.
>

I have this patch to add the extra link bits for FreeBSD compat needed
for net80122...

christos

Index: mbuf.h
===================================================================
RCS file: /cvsroot/src/sys/sys/mbuf.h,v
retrieving revision 1.156
diff -u -u -r1.156 mbuf.h
--- mbuf.h	5 Sep 2014 05:48:59 -0000	1.156
+++ mbuf.h	1 Mar 2015 14:18:52 -0000
@@ -322,29 +322,38 @@
 MBUF_DEFINE(mbuf, MHLEN, MLEN);
 
 /* mbuf flags */
-#define	M_EXT		0x00001	/* has associated external storage */
-#define	M_PKTHDR	0x00002	/* start of record */
-#define	M_EOR		0x00004	/* end of record */
-#define	M_PROTO1	0x00008	/* protocol-specific */
+#define	M_EXT		0x00000001	/* has associated external storage */
+#define	M_PKTHDR	0x00000002	/* start of record */
+#define	M_EOR		0x00000004	/* end of record */
+#define	M_PROTO1	0x00000008	/* protocol-specific */
 
 /* mbuf pkthdr flags, also in m_flags */
-#define M_AUTHIPHDR	0x00010	/* data origin authentication for IP header */
-#define M_DECRYPTED	0x00020	/* confidentiality */
-#define M_LOOP		0x00040	/* for Mbuf statistics */
-#define M_AUTHIPDGM     0x00080  /* data origin authentication */
-#define	M_BCAST		0x00100	/* send/received as link-level broadcast */
-#define	M_MCAST		0x00200	/* send/received as link-level multicast */
-#define	M_CANFASTFWD	0x00400	/* used by filters to indicate packet can
-				   be fast-forwarded */
-#define	M_ANYCAST6	0x00800	/* received as IPv6 anycast */
-#define	M_LINK0		0x01000	/* link layer specific flag */
-#define	M_LINK1		0x02000	/* link layer specific flag */
-#define	M_LINK2		0x04000	/* link layer specific flag */
-#define	M_LINK3		0x08000	/* link layer specific flag */
-#define	M_LINK4		0x10000	/* link layer specific flag */
-#define	M_LINK5		0x20000	/* link layer specific flag */
-#define	M_LINK6		0x40000	/* link layer specific flag */
-#define	M_LINK7		0x80000	/* link layer specific flag */
+#define	M_AUTHIPHDR	0x00000010	/* data origin authentication for
+					 * IP header */
+#define	M_DECRYPTED	0x00000020	/* confidentiality */
+#define	M_LOOP		0x00000040	/* for Mbuf statistics */
+#define	M_AUTHIPDGM     0x00000080	/* data origin authentication */
+#define	M_BCAST		0x00000100	/* send/received as link-level
+					 * broadcast */
+#define	M_MCAST		0x00000200	/* send/received as link-level
+					 * multicast */
+#define	M_CANFASTFWD	0x00000400	/* used by filters to indicate
+					 * packet can be fast-forwarded */
+#define	M_ANYCAST6	0x00000800	/* received as IPv6 anycast */
+
+#define	M_LINK0		0x00001000	/* link layer specific flag */
+#define	M_LINK1		0x00002000	/* link layer specific flag */
+#define	M_LINK2		0x00004000	/* link layer specific flag */
+
+#define	M_LINK3		0x00008000	/* link layer specific flag */
+#define	M_LINK4		0x00010000	/* link layer specific flag */
+#define	M_LINK5		0x00020000	/* link layer specific flag */
+#define	M_LINK6		0x00040000	/* link layer specific flag */
+#define	M_LINK7		0x00080000	/* link layer specific flag */
+#define	M_LINK8		0x00100000	/* link layer specific flag */
+#define	M_LINK9		0x00200000	/* link layer specific flag */
+#define	M_LINK10	0x00400000	/* link layer specific flag */
+#define	M_LINK11	0x00800000	/* link layer specific flag */
 
 /* additional flags for M_EXT mbufs */
 #define	M_EXT_FLAGS	0xff000000
@@ -359,7 +368,7 @@
 #define M_FLAGS_BITS \
     "\20\1EXT\2PKTHDR\3EOR\4PROTO1\5AUTHIPHDR\6DECRYPTED\7LOOP\10AUTHIPDGM" \
     "\11BCAST\12MCAST\13CANFASTFWD\14ANYCAST6\15LINK0\16LINK1\17LINK2\20LINK3" \
-    "\21LINK4\22LINK5\23LINK6\24LINK7" \
+    "\21LINK4\22LINK5\23LINK6\24LINK7\25LINK8\26LINK9\27LINK10\30LINK11" \
     "\31EXT_CLUSTER\32EXT_PAGES\33EXT_ROMAP\34EXT_RW"
 
 /* flags copied when copying m_pkthdr */



Home | Main Index | Thread Index | Old Index