aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-09-07 06:42:02 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-09-23 07:33:07 +0000
commitd2f5376ff1481312d348d405e1c43e2c1667f10a (patch)
tree480d2aa354f810d89ebcba3187c113373ae7ca46
parentedd99824bedc50c77a189089ab64df68b5a7ad38 (diff)
downloadalpine_aports-d2f5376ff1481312d348d405e1c43e2c1667f10a.tar.bz2
alpine_aports-d2f5376ff1481312d348d405e1c43e2c1667f10a.tar.xz
alpine_aports-d2f5376ff1481312d348d405e1c43e2c1667f10a.zip
main/linux-grsec: r8169-fix-rx-checksum-offload
from http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=adea1ac7effbddbe60a9de6d63462bfe79289e59 (cherry picked from commit 8b8be5b45391c1abe678bead92ddb2933c32c8a5)
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/r8169-fix-rx-checksum-offload.patch62
2 files changed, 65 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 0abffbba22..cfac0e8a0d 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=2.6.32.21 5pkgver=2.6.32.21
6_kernver=2.6.32 6_kernver=2.6.32
7pkgrel=2 7pkgrel=3
8pkgdesc="Linux kernel with grsecurity" 8pkgdesc="Linux kernel with grsecurity"
9url=http://grsecurity.net 9url=http://grsecurity.net
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -36,6 +36,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
36 xfrm-fix-policy-unreferencing-on-larval-drop.patch 36 xfrm-fix-policy-unreferencing-on-larval-drop.patch
37 r8169-fix-random-mdio_write-failures.patch 37 r8169-fix-random-mdio_write-failures.patch
38 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch 38 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
39 r8169-fix-rx-checksum-offload.patch
39 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 40 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
40 r8169-add-gro-support.patch 41 r8169-add-gro-support.patch
41 hv-grsec.patch 42 hv-grsec.patch
@@ -172,6 +173,7 @@ b39bccb5a1124f5a3f2f209edb21aba5 0021-xfrm-do-not-assume-that-template-resolvin
172c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch 173c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch
173ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch 174ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
174b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch 175b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
1760ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
175a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 177a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
176139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch 178139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
177bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch 179bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch
diff --git a/main/linux-grsec/r8169-fix-rx-checksum-offload.patch b/main/linux-grsec/r8169-fix-rx-checksum-offload.patch
new file mode 100644
index 0000000000..d979caac63
--- /dev/null
+++ b/main/linux-grsec/r8169-fix-rx-checksum-offload.patch
@@ -0,0 +1,62 @@
1From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Sun, 5 Sep 2010 20:04:05 -0700
4Subject: [PATCH] r8169: fix rx checksum offload
5
6While porting GRO to r8169, I found this driver has a bug in its rx
7path.
8
9All skbs given to network stack had their ip_summed set to
10CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.
11
12The reason is driver sets skb->ip_summed on the original skb before the
13copy eventually done by copybreak. The fresh skb gets the ip_summed =
14CHECKSUM_NONE value, forcing network stack to recompute checksum, and
15preventing my GRO patch to work.
16
17Fix is to make the ip_summed setting after skb copy.
18
19Note : rx_copybreak current value is 16383, so all frames are copied...
20
21Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
22Acked-by: Francois Romieu <romieu@fr.zoreil.com>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24---
25 drivers/net/r8169.c | 6 ++----
26 1 files changed, 2 insertions(+), 4 deletions(-)
27
28diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
29index 07b3fb5..56a11e2 100644
30--- a/drivers/net/r8169.c
31+++ b/drivers/net/r8169.c
32@@ -4450,9 +4450,8 @@ static inline int rtl8169_fragmented_frame(u32 status)
33 return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
34 }
35
36-static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
37+static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
38 {
39- u32 opts1 = le32_to_cpu(desc->opts1);
40 u32 status = opts1 & RxProtoMask;
41
42 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
43@@ -4546,8 +4545,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
44 continue;
45 }
46
47- rtl8169_rx_csum(skb, desc);
48-
49 if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
50 pci_dma_sync_single_for_device(pdev, addr,
51 pkt_size, PCI_DMA_FROMDEVICE);
52@@ -4558,6 +4555,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
53 tp->Rx_skbuff[entry] = NULL;
54 }
55
56+ rtl8169_rx_csum(skb, status);
57 skb_put(skb, pkt_size);
58 skb->protocol = eth_type_trans(skb, dev);
59
60--
611.7.2.3
62