diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-11 15:55:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:43 -0500 |
commit | fbef0a40919a80eb8a02fe9d3b96dfdcdebf4317 (patch) | |
tree | b097fb14f85f74ef0b855cbf689933a701c65fe2 /include/net/flow.h | |
parent | 78fbfd8a653ca972afe479517a40661bfff6d8c3 (diff) |
net: Remove unnecessary padding in struct flowi
Move tos, scope, proto, and flags to the beginning of
the structure.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow.h')
-rw-r--r-- | 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 fd0413873b8e..a661fd6f76ba 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -14,13 +14,19 @@ struct flowi { | |||
14 | int oif; | 14 | int oif; |
15 | int iif; | 15 | int iif; |
16 | __u32 mark; | 16 | __u32 mark; |
17 | __u8 tos; | ||
18 | __u8 scope; | ||
19 | __u8 proto; | ||
20 | __u8 flags; | ||
21 | #define FLOWI_FLAG_ANYSRC 0x01 | ||
22 | #define FLOWI_FLAG_PRECOW_METRICS 0x02 | ||
23 | #define FLOWI_FLAG_CAN_SLEEP 0x04 | ||
24 | __u32 secid; | ||
17 | 25 | ||
18 | union { | 26 | union { |
19 | struct { | 27 | struct { |
20 | __be32 daddr; | 28 | __be32 daddr; |
21 | __be32 saddr; | 29 | __be32 saddr; |
22 | __u8 tos; | ||
23 | __u8 scope; | ||
24 | } ip4_u; | 30 | } ip4_u; |
25 | 31 | ||
26 | struct { | 32 | struct { |
@@ -43,14 +49,9 @@ struct flowi { | |||
43 | #define fl6_flowlabel nl_u.ip6_u.flowlabel | 49 | #define fl6_flowlabel nl_u.ip6_u.flowlabel |
44 | #define fl4_dst nl_u.ip4_u.daddr | 50 | #define fl4_dst nl_u.ip4_u.daddr |
45 | #define fl4_src nl_u.ip4_u.saddr | 51 | #define fl4_src nl_u.ip4_u.saddr |
46 | #define fl4_tos nl_u.ip4_u.tos | 52 | #define fl4_tos tos |
47 | #define fl4_scope nl_u.ip4_u.scope | 53 | #define fl4_scope scope |
48 | 54 | ||
49 | __u8 proto; | ||
50 | __u8 flags; | ||
51 | #define FLOWI_FLAG_ANYSRC 0x01 | ||
52 | #define FLOWI_FLAG_PRECOW_METRICS 0x02 | ||
53 | #define FLOWI_FLAG_CAN_SLEEP 0x04 | ||
54 | union { | 55 | union { |
55 | struct { | 56 | struct { |
56 | __be16 sport; | 57 | __be16 sport; |
@@ -81,7 +82,6 @@ struct flowi { | |||
81 | #define fl_ipsec_spi uli_u.spi | 82 | #define fl_ipsec_spi uli_u.spi |
82 | #define fl_mh_type uli_u.mht.type | 83 | #define fl_mh_type uli_u.mht.type |
83 | #define fl_gre_key uli_u.gre_key | 84 | #define fl_gre_key uli_u.gre_key |
84 | __u32 secid; /* used by xfrm; see secid.txt */ | ||
85 | } __attribute__((__aligned__(BITS_PER_LONG/8))); | 85 | } __attribute__((__aligned__(BITS_PER_LONG/8))); |
86 | 86 | ||
87 | #define FLOW_DIR_IN 0 | 87 | #define FLOW_DIR_IN 0 |