]> git.hungrycats.org Git - linux/commitdiff
net: Use more bit fields in napi_gro_cb
authorTom Herbert <therbert@google.com>
Wed, 11 Feb 2015 00:30:30 +0000 (16:30 -0800)
committerSasha Levin <alexander.levin@verizon.com>
Sun, 15 Jan 2017 14:49:53 +0000 (09:49 -0500)
[ Upstream commit baa32ff42871f2d4aca9c08c9403d0e497325564 ]

This patch moves the free and same_flow fields to be bit fields
(2 and 1 bit sized respectively). This frees up some space for u16's.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
include/linux/netdevice.h

index 70fde9c5c61d1d3b936eb4dd539916542f0349bc..db3ad1860c2edc12a31af2d4dc2e6b3f1674ba76 100644 (file)
@@ -1888,20 +1888,15 @@ struct napi_gro_cb {
        /* Number of segments aggregated. */
        u16     count;
 
-       /* This is non-zero if the packet may be of the same flow. */
-       u8      same_flow;
-
-       /* Free the skb? */
-       u8      free;
-#define NAPI_GRO_FREE            1
-#define NAPI_GRO_FREE_STOLEN_HEAD 2
-
        /* jiffies when first packet was created/queued */
        unsigned long age;
 
        /* Used in ipv6_gro_receive() and foo-over-udp */
        u16     proto;
 
+       /* This is non-zero if the packet may be of the same flow. */
+       u8      same_flow:1;
+
        /* Used in udp_gro_receive */
        u8      udp_mark:1;
 
@@ -1911,9 +1906,16 @@ struct napi_gro_cb {
        /* Number of checksums via CHECKSUM_UNNECESSARY */
        u8      csum_cnt:3;
 
+       /* Free the skb? */
+       u8      free:2;
+#define NAPI_GRO_FREE            1
+#define NAPI_GRO_FREE_STOLEN_HEAD 2
+
        /* Used in foo-over-udp, set in udp[46]_gro_receive */
        u8      is_ipv6:1;
 
+       /* 7 bit hole */
+
        /* used to support CHECKSUM_COMPLETE for tunneling protocols */
        __wsum  csum;