Skip to content

Commit

Permalink
net: Use more bit fields in napi_gro_cb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Herbert authored and David S. Miller committed Feb 11, 2015
1 parent 6db93ea commit baa32ff
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1923,20 +1923,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;

Expand All @@ -1946,9 +1941,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;

Expand Down

0 comments on commit baa32ff

Please sign in to comment.