blob: 292d02174a283e8fe26e4a31eb4cc22b46b0585c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Subject: NET: skip GRO for otherhost packets
For network drivers using napi_gro_receive, packets are run through GRO,
even when the destination MAC address does not match, and they're supposed
to be delivered to another host behind a different bridge port.
This can be very expensive, because for drivers without TSO or scatter-
gather, this can only be undone by copying the skb and checksumming it
again.
Fix this by leaving skbs with PACKET_OTHERHOST untouched.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
--- 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;
|