aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-09-07 06:26:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-09-23 07:33:06 +0000
commitedd99824bedc50c77a189089ab64df68b5a7ad38 (patch)
tree4f96097741c896a25fa74bb94185faca7acda088
parent960e61928f1e590a4c39df8b92176acf1080ac08 (diff)
downloadalpine_aports-edd99824bedc50c77a189089ab64df68b5a7ad38.tar.bz2
alpine_aports-edd99824bedc50c77a189089ab64df68b5a7ad38.tar.xz
alpine_aports-edd99824bedc50c77a189089ab64df68b5a7ad38.zip
main/linux-grsec: add gro support for r8169
(cherry picked from commit fb7b4af02ac09658116e5d3a0686b68d384fa3a8)
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/r8169-add-gro-support.patch52
2 files changed, 55 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 34cbe39f6b..0abffbba22 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=1 7pkgrel=2
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"
@@ -37,6 +37,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
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 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 39 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
40 r8169-add-gro-support.patch
40 hv-grsec.patch 41 hv-grsec.patch
41 kernelconfig.x86 42 kernelconfig.x86
42 " 43 "
@@ -172,5 +173,6 @@ c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.p
172ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch 173ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
173b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch 174b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
174a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 175a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
176139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
175bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch 177bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch
176ca9c63def600e77ca3cb7e822c239083 kernelconfig.x86" 178ca9c63def600e77ca3cb7e822c239083 kernelconfig.x86"
diff --git a/main/linux-grsec/r8169-add-gro-support.patch b/main/linux-grsec/r8169-add-gro-support.patch
new file mode 100644
index 0000000000..d8ca8d3ad6
--- /dev/null
+++ b/main/linux-grsec/r8169-add-gro-support.patch
@@ -0,0 +1,52 @@
1- Use napi_gro_receive() and vlan_gro_receive()
2- Enable GRO by default
3
4Tested on a RTL8111/8168 adapter
5
6Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
7CC: Francois Romieu <romieu@fr.zoreil.com>
8---
9 drivers/net/r8169.c | 10 ++++++++--
10 1 file changed, 8 insertions(+), 2 deletions(-)
11
12diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
13index 56a11e2..ddff42b 100644
14--- a/drivers/net/r8169.c
15+++ b/drivers/net/r8169.c
16@@ -1076,7 +1076,12 @@ static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
17 int ret;
18
19 if (vlgrp && (opts2 & RxVlanTag)) {
20- __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling);
21+ u16 vtag = swab16(opts2 & 0xffff);
22+
23+ if (polling)
24+ vlan_gro_receive(&tp->napi, vlgrp, vtag, skb);
25+ else
26+ __vlan_hwaccel_rx(skb, vlgrp, vtag, polling);
27 ret = 0;
28 } else
29 ret = -1;
30@@ -3186,6 +3191,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
31 #ifdef CONFIG_R8169_VLAN
32 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
33 #endif
34+ dev->features |= NETIF_F_GRO;
35
36 tp->intr_mask = 0xffff;
37 tp->align = cfg->align;
38@@ -4561,7 +4567,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
39
40 if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) {
41 if (likely(polling))
42- netif_receive_skb(skb);
43+ napi_gro_receive(&tp->napi, skb);
44 else
45 netif_rx(skb);
46 }
47
48
49--
50To unsubscribe from this list: send the line "unsubscribe netdev" in
51the body of a message to majordomo@vger.kernel.org
52More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file