From 270bc6427b89c996ec7eb657dc66f20e4a3b297b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 15 Mar 2015 20:32:09 +0000 Subject: [PATCH] kernel: skip GRO for packets bridged to other hosts Eliminates excessive skb copying when bridging from LAN to WLAN on ramips. Signed-off-by: Felix Fietkau SVN-Revision: 44797 --- .../680-net-skip-gro-for-otherhost-packets.patch | 12 ++++++++++++ .../680-net-skip-gro-for-otherhost-packets.patch | 12 ++++++++++++ .../680-net-skip-gro-for-otherhost-packets.patch | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 target/linux/generic/patches-3.18/680-net-skip-gro-for-otherhost-packets.patch create mode 100644 target/linux/generic/patches-3.19/680-net-skip-gro-for-otherhost-packets.patch create mode 100644 target/linux/generic/patches-4.0/680-net-skip-gro-for-otherhost-packets.patch diff --git a/target/linux/generic/patches-3.18/680-net-skip-gro-for-otherhost-packets.patch b/target/linux/generic/patches-3.18/680-net-skip-gro-for-otherhost-packets.patch new file mode 100644 index 0000000000..3adc4e37bb --- /dev/null +++ b/target/linux/generic/patches-3.18/680-net-skip-gro-for-otherhost-packets.patch @@ -0,0 +1,12 @@ +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4003,6 +4003,9 @@ static enum gro_result dev_gro_receive(s + enum gro_result ret; + int grow; + ++ if (skb->pkt_type == PACKET_OTHERHOST) ++ goto normal; ++ + if (!(skb->dev->features & NETIF_F_GRO)) + goto normal; + diff --git a/target/linux/generic/patches-3.19/680-net-skip-gro-for-otherhost-packets.patch b/target/linux/generic/patches-3.19/680-net-skip-gro-for-otherhost-packets.patch new file mode 100644 index 0000000000..e3fa9172e2 --- /dev/null +++ b/target/linux/generic/patches-3.19/680-net-skip-gro-for-otherhost-packets.patch @@ -0,0 +1,12 @@ +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -3967,6 +3967,9 @@ static enum gro_result dev_gro_receive(s + enum gro_result ret; + int grow; + ++ if (skb->pkt_type == PACKET_OTHERHOST) ++ goto normal; ++ + if (!(skb->dev->features & NETIF_F_GRO)) + goto normal; + diff --git a/target/linux/generic/patches-4.0/680-net-skip-gro-for-otherhost-packets.patch b/target/linux/generic/patches-4.0/680-net-skip-gro-for-otherhost-packets.patch new file mode 100644 index 0000000000..fc3625848b --- /dev/null +++ b/target/linux/generic/patches-4.0/680-net-skip-gro-for-otherhost-packets.patch @@ -0,0 +1,12 @@ +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4005,6 +4005,9 @@ static enum gro_result dev_gro_receive(s + enum gro_result ret; + int grow; + ++ if (skb->pkt_type == PACKET_OTHERHOST) ++ goto normal; ++ + if (!(skb->dev->features & NETIF_F_GRO)) + goto normal; + -- 2.30.2