mbuf: Regroup fields, mainly to improve cache utilization
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Aug 2012 02:47:53 +0000 (10:47 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Aug 2012 02:54:40 +0000 (10:54 +0800)
sys/sys/mbuf.h

index 74c5ff8..95ef050 100644 (file)
@@ -168,18 +168,18 @@ struct pkthdr {
                                        /* valid if CSUM UDP|TCP|TSO */
        uint8_t csum_lhlen;             /* link header length */
 
+       uint16_t segsz;                 /* TSO segment size */
+       uint16_t ether_vlantag;         /* ethernet 802.1p+q vlan tag */
+
+       uint16_t hash;                  /* packet hash */
+       uint16_t wlan_seqno;            /* IEEE 802.11 seq no. */
+
        /* firewall flags */
        uint32_t fw_flags;              /* flags for PF */
 
        /* variables for PF processing */
        struct pkthdr_pf pf;            /* structure for PF */
        struct pkthdr_br br;            /* structure for bridging */
-
-       uint16_t ether_vlantag;         /* ethernet 802.1p+q vlan tag */
-       uint16_t hash;                  /* packet hash */
-
-       uint16_t wlan_seqno;            /* IEEE 802.11 seq no. */
-       uint16_t segsz;                 /* TSO segment size */
 };
 
 /*