]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: use a 64bit load/store in output path
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 30 Nov 2011 19:00:53 +0000 (19:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 18:28:54 +0000 (13:28 -0500)
commit8ff80e46dd4066e6b9e921b451c1fc91c63232ed
treef34fb0525284d97e2b10870afd8e021cc45ef44c
parent2561df601e8423c53bd5dbe18d9668a376b0f482
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>
include/net/flow.h
net/ipv4/ip_output.c