diff options
author | Tom Herbert <therbert@google.com> | 2015-02-10 19:30:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-11 18:12:11 -0500 |
commit | baa32ff42871f2d4aca9c08c9403d0e497325564 (patch) | |
tree | 3dc1edaf2234ca4316b44247c1a698ecdfb8b436 /include/linux/netdevice.h | |
parent | 6db93ea13b7937c0523ea1f977b322f1347a5633 (diff) |
net: Use more bit fields in napi_gro_cb
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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9e9be221e4bf..43fd0a4dcd04 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1923,20 +1923,15 @@ struct napi_gro_cb { | |||
1923 | /* Number of segments aggregated. */ | 1923 | /* Number of segments aggregated. */ |
1924 | u16 count; | 1924 | u16 count; |
1925 | 1925 | ||
1926 | /* This is non-zero if the packet may be of the same flow. */ | ||
1927 | u8 same_flow; | ||
1928 | |||
1929 | /* Free the skb? */ | ||
1930 | u8 free; | ||
1931 | #define NAPI_GRO_FREE 1 | ||
1932 | #define NAPI_GRO_FREE_STOLEN_HEAD 2 | ||
1933 | |||
1934 | /* jiffies when first packet was created/queued */ | 1926 | /* jiffies when first packet was created/queued */ |
1935 | unsigned long age; | 1927 | unsigned long age; |
1936 | 1928 | ||
1937 | /* Used in ipv6_gro_receive() and foo-over-udp */ | 1929 | /* Used in ipv6_gro_receive() and foo-over-udp */ |
1938 | u16 proto; | 1930 | u16 proto; |
1939 | 1931 | ||
1932 | /* This is non-zero if the packet may be of the same flow. */ | ||
1933 | u8 same_flow:1; | ||
1934 | |||
1940 | /* Used in udp_gro_receive */ | 1935 | /* Used in udp_gro_receive */ |
1941 | u8 udp_mark:1; | 1936 | u8 udp_mark:1; |
1942 | 1937 | ||
@@ -1946,9 +1941,16 @@ struct napi_gro_cb { | |||
1946 | /* Number of checksums via CHECKSUM_UNNECESSARY */ | 1941 | /* Number of checksums via CHECKSUM_UNNECESSARY */ |
1947 | u8 csum_cnt:3; | 1942 | u8 csum_cnt:3; |
1948 | 1943 | ||
1944 | /* Free the skb? */ | ||
1945 | u8 free:2; | ||
1946 | #define NAPI_GRO_FREE 1 | ||
1947 | #define NAPI_GRO_FREE_STOLEN_HEAD 2 | ||
1948 | |||
1949 | /* Used in foo-over-udp, set in udp[46]_gro_receive */ | 1949 | /* Used in foo-over-udp, set in udp[46]_gro_receive */ |
1950 | u8 is_ipv6:1; | 1950 | u8 is_ipv6:1; |
1951 | 1951 | ||
1952 | /* 7 bit hole */ | ||
1953 | |||
1952 | /* used to support CHECKSUM_COMPLETE for tunneling protocols */ | 1954 | /* used to support CHECKSUM_COMPLETE for tunneling protocols */ |
1953 | __wsum csum; | 1955 | __wsum csum; |
1954 | 1956 | ||