aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-11-30 19:00:53 +0000
committerZiyann <jaraidaniel@gmail.com>2014-11-20 17:18:25 +0100
commit426ae89532eaba233c2a46795f5d480081934e97 (patch)
tree064458a1941aa134d5796e424b7f90a943cdc9b4 /include
parent5532d918d7beae46cc86a9003f91645224c7dc91 (diff)
downloadkernel_samsung_tuna-426ae89532eaba233c2a46795f5d480081934e97.zip
kernel_samsung_tuna-426ae89532eaba233c2a46795f5d480081934e97.tar.gz
kernel_samsung_tuna-426ae89532eaba233c2a46795f5d480081934e97.tar.bz2
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. Change-Id: Iad9c8fd9121ec84c2599b013badaebba92db7c39 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/flow.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index e37cfda..3a4e76e 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -59,8 +59,11 @@ struct flowi4 {
#define flowi4_proto __fl_common.flowic_proto
#define flowi4_flags __fl_common.flowic_flags
#define flowi4_secid __fl_common.flowic_secid
- __be32 daddr;
+
+ /* (saddr,daddr) must be grouped, same order as in IP header */
__be32 saddr;
+ __be32 daddr;
+
union flowi_uli uli;
#define fl4_sport uli.ports.sport
#define fl4_dport uli.ports.dport