diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-07 06:42:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-07 06:42:02 +0000 |
commit | 8b8be5b45391c1abe678bead92ddb2933c32c8a5 (patch) | |
tree | 80b7402f95ab4001b6cf1928df61152e84c0fb43 /main/linux-grsec | |
parent | fb7b4af02ac09658116e5d3a0686b68d384fa3a8 (diff) | |
download | aports-8b8be5b45391c1abe678bead92ddb2933c32c8a5.tar.bz2 aports-8b8be5b45391c1abe678bead92ddb2933c32c8a5.tar.xz |
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
Diffstat (limited to 'main/linux-grsec')
-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 pkgname=linux-${_flavor} pkgver=2.6.32.21 _kernver=2.6.32 -pkgrel=2 +pkgrel=3 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net depends="mkinitfs linux-firmware" @@ -36,6 +36,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 xfrm-fix-policy-unreferencing-on-larval-drop.patch r8169-fix-random-mdio_write-failures.patch r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch + r8169-fix-rx-checksum-offload.patch x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch r8169-add-gro-support.patch hv-grsec.patch @@ -172,6 +173,7 @@ b39bccb5a1124f5a3f2f209edb21aba5 0021-xfrm-do-not-assume-that-template-resolvin c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch +0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch 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 @@ +From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet <eric.dumazet@gmail.com> +Date: Sun, 5 Sep 2010 20:04:05 -0700 +Subject: [PATCH] r8169: fix rx checksum offload + +While porting GRO to r8169, I found this driver has a bug in its rx +path. + +All skbs given to network stack had their ip_summed set to +CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums. + +The reason is driver sets skb->ip_summed on the original skb before the +copy eventually done by copybreak. The fresh skb gets the ip_summed = +CHECKSUM_NONE value, forcing network stack to recompute checksum, and +preventing my GRO patch to work. + +Fix is to make the ip_summed setting after skb copy. + +Note : rx_copybreak current value is 16383, so all frames are copied... + +Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> +Acked-by: Francois Romieu <romieu@fr.zoreil.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/r8169.c | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c +index 07b3fb5..56a11e2 100644 +--- a/drivers/net/r8169.c ++++ b/drivers/net/r8169.c +@@ -4450,9 +4450,8 @@ static inline int rtl8169_fragmented_frame(u32 status) + return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag); + } + +-static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc) ++static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1) + { +- u32 opts1 = le32_to_cpu(desc->opts1); + u32 status = opts1 & RxProtoMask; + + if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || +@@ -4546,8 +4545,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev, + continue; + } + +- rtl8169_rx_csum(skb, desc); +- + if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) { + pci_dma_sync_single_for_device(pdev, addr, + pkt_size, PCI_DMA_FROMDEVICE); +@@ -4558,6 +4555,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev, + tp->Rx_skbuff[entry] = NULL; + } + ++ rtl8169_rx_csum(skb, status); + skb_put(skb, pkt_size); + skb->protocol = eth_type_trans(skb, dev); + +-- +1.7.2.3 + |