ar71xx: fix unaligned access hacks for tcp timestamps
authorGabor Juhos <juhosg@openwrt.org>
Tue, 18 Feb 2014 17:34:17 +0000 (17:34 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 18 Feb 2014 17:34:17 +0000 (17:34 +0000)
This missing bit of the hack saves hugely on instruction traps
on tcp connections to ar71xx based routers.

Patch-by: Dave Taht <dave.taht@bufferbloat.net>
Patchwork: http://patchwork.openwrt.org/patch/4905/
[juhosg: adjust subject, refresh kernel patch]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39626

target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch

index a0b58248505f29bd8641480f5046c3d0e9d7ecd8..20f5f1c0e2f986c4c94ae2343a874a10932743b6 100644 (file)
 -              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