Skip to content

Commit baa32ff

Browse files
Tom Herbertdavem330
authored andcommitted
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>
1 parent 6db93ea commit baa32ff

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

include/linux/netdevice.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,20 +1923,15 @@ struct napi_gro_cb {
19231923
/* Number of segments aggregated. */
19241924
u16 count;
19251925

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-
19341926
/* jiffies when first packet was created/queued */
19351927
unsigned long age;
19361928

19371929
/* Used in ipv6_gro_receive() and foo-over-udp */
19381930
u16 proto;
19391931

1932+
/* This is non-zero if the packet may be of the same flow. */
1933+
u8 same_flow:1;
1934+
19401935
/* Used in udp_gro_receive */
19411936
u8 udp_mark:1;
19421937

@@ -1946,9 +1941,16 @@ struct napi_gro_cb {
19461941
/* Number of checksums via CHECKSUM_UNNECESSARY */
19471942
u8 csum_cnt:3;
19481943

1944+
/* Free the skb? */
1945+
u8 free:2;
1946+
#define NAPI_GRO_FREE 1
1947+
#define NAPI_GRO_FREE_STOLEN_HEAD 2
1948+
19491949
/* Used in foo-over-udp, set in udp[46]_gro_receive */
19501950
u8 is_ipv6:1;
19511951

1952+
/* 7 bit hole */
1953+
19521954
/* used to support CHECKSUM_COMPLETE for tunneling protocols */
19531955
__wsum csum;
19541956

0 commit comments

Comments
 (0)