From: David Miller <davem@davemloft.net>
To: netdev@vger.kernel.org
Subject: [PATCH 2/25] net: Remove unnecessary padding in struct flowi
Date: Sat, 12 Mar 2011 15:25:08 -0800 (PST) [thread overview]
Message-ID: <20110312.152508.183050114.davem@davemloft.net> (raw)
Move tos, scope, proto, and flags to the beginning of
the structure.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/net/flow.h | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/net/flow.h b/include/net/flow.h
index fd04138..a661fd6 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -14,13 +14,19 @@ struct flowi {
int oif;
int iif;
__u32 mark;
+ __u8 tos;
+ __u8 scope;
+ __u8 proto;
+ __u8 flags;
+#define FLOWI_FLAG_ANYSRC 0x01
+#define FLOWI_FLAG_PRECOW_METRICS 0x02
+#define FLOWI_FLAG_CAN_SLEEP 0x04
+ __u32 secid;
union {
struct {
__be32 daddr;
__be32 saddr;
- __u8 tos;
- __u8 scope;
} ip4_u;
struct {
@@ -43,14 +49,9 @@ struct flowi {
#define fl6_flowlabel nl_u.ip6_u.flowlabel
#define fl4_dst nl_u.ip4_u.daddr
#define fl4_src nl_u.ip4_u.saddr
-#define fl4_tos nl_u.ip4_u.tos
-#define fl4_scope nl_u.ip4_u.scope
+#define fl4_tos tos
+#define fl4_scope scope
- __u8 proto;
- __u8 flags;
-#define FLOWI_FLAG_ANYSRC 0x01
-#define FLOWI_FLAG_PRECOW_METRICS 0x02
-#define FLOWI_FLAG_CAN_SLEEP 0x04
union {
struct {
__be16 sport;
@@ -81,7 +82,6 @@ struct flowi {
#define fl_ipsec_spi uli_u.spi
#define fl_mh_type uli_u.mht.type
#define fl_gre_key uli_u.gre_key
- __u32 secid; /* used by xfrm; see secid.txt */
} __attribute__((__aligned__(BITS_PER_LONG/8)));
#define FLOW_DIR_IN 0
--
1.7.4.1
reply other threads:[~2011-03-12 23:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110312.152508.183050114.davem@davemloft.net \
--to=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).