aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-04-14 18:11:06 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-14 18:11:06 -0400
commitfc59f9a3bf8096a1f68a8b78ada7a0e0ab9236b2 (patch)
treed713e3270eafb70bb6af27dd2bbdc84b1a2c8c79 /net/core
parentce8632ba6b3ed0bf2efa98672e2808de34250389 (diff)
gro: Restore correct value to gso_size
Since everybody has been focusing on baremetal GRO performance no one noticed when I added a bug that zapped gso_size for all GRO packets. This only gets picked up when you forward the skb out of an interface. Thanks to Mark Wagner for noticing this bug when testing kvm. Reported-by: Mark Wagner <mwagner@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ea8eb2214b09..343883f65ea7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2328,8 +2328,10 @@ static int napi_gro_complete(struct sk_buff *skb)
2328 struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; 2328 struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
2329 int err = -ENOENT; 2329 int err = -ENOENT;
2330 2330
2331 if (NAPI_GRO_CB(skb)->count == 1) 2331 if (NAPI_GRO_CB(skb)->count == 1) {
2332 skb_shinfo(skb)->gso_size = 0;
2332 goto out; 2333 goto out;
2334 }
2333 2335
2334 rcu_read_lock(); 2336 rcu_read_lock();
2335 list_for_each_entry_rcu(ptype, head, list) { 2337 list_for_each_entry_rcu(ptype, head, list) {
@@ -2348,7 +2350,6 @@ static int napi_gro_complete(struct sk_buff *skb)
2348 } 2350 }
2349 2351
2350out: 2352out:
2351 skb_shinfo(skb)->gso_size = 0;
2352 return netif_receive_skb(skb); 2353 return netif_receive_skb(skb);
2353} 2354}
2354 2355