From: Gabor Juhos Date: Tue, 18 Feb 2014 17:34:17 +0000 (+0000) Subject: ar71xx: fix unaligned access hacks for tcp timestamps X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2470b1685274f5a2db2095f7a302fee168e84592;p=openwrt%2Fsvn-archive%2Farchive.git ar71xx: fix unaligned access hacks for tcp timestamps This missing bit of the hack saves hugely on instruction traps on tcp connections to ar71xx based routers. Patch-by: Dave Taht Patchwork: http://patchwork.openwrt.org/patch/4905/ [juhosg: adjust subject, refresh kernel patch] Signed-off-by: Gabor Juhos SVN-Revision: 39626 --- diff --git a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch index a0b5824850..20f5f1c0e2 100644 --- a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch @@ -900,8 +900,9 @@ - tp->rx_opt.rcv_tsval = ntohl(*ptr); + tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr); ++ptr; - if (*ptr) +- if (*ptr) - tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset; ++ if (net_hdr_word(ptr)) + tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) - + tp->tsoffset; else