diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-11-30 14:00:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-01 13:28:54 -0500 |
commit | 84f9307c5da84a7c8513e7607dc8427d2cbd63e3 (patch) | |
tree | f34fb0525284d97e2b10870afd8e021cc45ef44c /include/net/flow.h | |
parent | 898f73585bbe4bdbb471636ecdede071f7473e51 (diff) |
ipv4: use a 64bit load/store in output path
gcc compiler is smart enough to use a single load/store if we
memcpy(dptr, sptr, 8) on x86_64, regardless of
CONFIG_CC_OPTIMIZE_FOR_SIZE
In IP header, daddr immediately follows saddr, this wont change in the
future. We only need to make sure our flowi4 (saddr,daddr) fields wont
break the rule.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow.h')
-rw-r--r-- | include/net/flow.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/flow.h b/include/net/flow.h index a09447749e2d..9192d690b562 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -59,8 +59,11 @@ struct flowi4 { | |||
59 | #define flowi4_proto __fl_common.flowic_proto | 59 | #define flowi4_proto __fl_common.flowic_proto |
60 | #define flowi4_flags __fl_common.flowic_flags | 60 | #define flowi4_flags __fl_common.flowic_flags |
61 | #define flowi4_secid __fl_common.flowic_secid | 61 | #define flowi4_secid __fl_common.flowic_secid |
62 | __be32 daddr; | 62 | |
63 | /* (saddr,daddr) must be grouped, same order as in IP header */ | ||
63 | __be32 saddr; | 64 | __be32 saddr; |
65 | __be32 daddr; | ||
66 | |||
64 | union flowi_uli uli; | 67 | union flowi_uli uli; |
65 | #define fl4_sport uli.ports.sport | 68 | #define fl4_sport uli.ports.sport |
66 | #define fl4_dport uli.ports.dport | 69 | #define fl4_dport uli.ports.dport |