diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-07 06:42:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-23 07:33:07 +0000 |
commit | d2f5376ff1481312d348d405e1c43e2c1667f10a (patch) | |
tree | 480d2aa354f810d89ebcba3187c113373ae7ca46 | |
parent | edd99824bedc50c77a189089ab64df68b5a7ad38 (diff) | |
download | alpine_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/APKBUILD | 4 | ||||
-rw-r--r-- | main/linux-grsec/r8169-fix-rx-checksum-offload.patch | 62 |
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 | |||
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=2.6.32.21 | 5 | pkgver=2.6.32.21 |
6 | _kernver=2.6.32 | 6 | _kernver=2.6.32 |
7 | pkgrel=2 | 7 | pkgrel=3 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
9 | url=http://grsecurity.net | 9 | url=http://grsecurity.net |
10 | depends="mkinitfs linux-firmware" | 10 | depends="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 | |||
172 | c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch | 173 | c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch |
173 | ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch | 174 | ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch |
174 | b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch | 175 | b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch |
176 | 0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch | ||
175 | a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch | 177 | a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch |
176 | 139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch | 178 | 139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch |
177 | bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch | 179 | bf14850a0036d14bc6177adbdec23a17 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 @@ | |||
1 | From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Sun, 5 Sep 2010 20:04:05 -0700 | ||
4 | Subject: [PATCH] r8169: fix rx checksum offload | ||
5 | |||
6 | While porting GRO to r8169, I found this driver has a bug in its rx | ||
7 | path. | ||
8 | |||
9 | All skbs given to network stack had their ip_summed set to | ||
10 | CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums. | ||
11 | |||
12 | The reason is driver sets skb->ip_summed on the original skb before the | ||
13 | copy eventually done by copybreak. The fresh skb gets the ip_summed = | ||
14 | CHECKSUM_NONE value, forcing network stack to recompute checksum, and | ||
15 | preventing my GRO patch to work. | ||
16 | |||
17 | Fix is to make the ip_summed setting after skb copy. | ||
18 | |||
19 | Note : rx_copybreak current value is 16383, so all frames are copied... | ||
20 | |||
21 | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
22 | Acked-by: Francois Romieu <romieu@fr.zoreil.com> | ||
23 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
24 | --- | ||
25 | drivers/net/r8169.c | 6 ++---- | ||
26 | 1 files changed, 2 insertions(+), 4 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c | ||
29 | index 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 | -- | ||
61 | 1.7.2.3 | ||
62 | |||