kernel: bump to 3.14.35, 3.18.9, 3.19.1 and 4.0-rc4
[openwrt/staging/mkresin.git] / target / linux / generic / patches-3.19 / 680-net-skip-gro-for-otherhost-packets.patch
1 Subject: NET: skip GRO for otherhost packets
2
3 For network drivers using napi_gro_receive, packets are run through GRO,
4 even when the destination MAC address does not match, and they're supposed
5 to be delivered to another host behind a different bridge port.
6
7 This can be very expensive, because for drivers without TSO or scatter-
8 gather, this can only be undone by copying the skb and checksumming it
9 again.
10
11 Fix this by leaving skbs with PACKET_OTHERHOST untouched.
12
13 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14
15 --- a/net/core/dev.c
16 +++ b/net/core/dev.c
17 @@ -3967,6 +3967,9 @@ static enum gro_result dev_gro_receive(s
18 enum gro_result ret;
19 int grow;
20
21 + if (skb->pkt_type == PACKET_OTHERHOST)
22 + goto normal;
23 +
24 if (!(skb->dev->features & NETIF_F_GRO))
25 goto normal;
26