From: Tom Herbert <therbert@google.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net-next 4/7] net: Use more bit fields in napi_gro_cb
Date: Tue, 10 Feb 2015 16:30:30 -0800 [thread overview]
Message-ID: <1423614633-25042-5-git-send-email-therbert@google.com> (raw)
In-Reply-To: <1423614633-25042-1-git-send-email-therbert@google.com>
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>
---
include/linux/netdevice.h | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9e9be22..43fd0a4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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;
@@ -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;
--
2.2.0.rc0.207.ga3a616c
next prev parent reply other threads:[~2015-02-11 0:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 0:30 [PATCH net-next 0/7] net: Fixes to remote checksum offload and CHECKSUM_PARTIAL Tom Herbert
2015-02-11 0:30 ` [PATCH net-next 1/7] net: Fix remcsum in GRO path to not change packet Tom Herbert
2015-02-11 0:30 ` [PATCH net-next 2/7] net: Clarify meaning of CHECKSUM_PARTIAL for receive path Tom Herbert
2015-02-11 0:30 ` [PATCH net-next 3/7] udp: Set SKB_GSO_UDP_TUNNEL* in UDP GRO path Tom Herbert
2015-02-11 0:30 ` Tom Herbert [this message]
2015-02-11 0:30 ` [PATCH net-next 5/7] net: Infrastructure for CHECKSUM_PARTIAL with remote checsum offload Tom Herbert
2015-02-11 0:30 ` [PATCH net-next 6/7] vxlan: Use checksum partial with remote checksum offload Tom Herbert
2015-02-11 0:30 ` [PATCH net-next 7/7] gue: " Tom Herbert
2015-02-11 4:04 ` [PATCH net-next 0/7] net: Fixes to remote checksum offload and CHECKSUM_PARTIAL Or Gerlitz
2015-02-11 23:18 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423614633-25042-5-git-send-email-therbert@google.com \
--to=therbert@google.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).