Skip to content

Commit

Permalink
gro: Restore correct value to gso_size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Apr 14, 2009
1 parent ce8632b commit fc59f9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2328,8 +2328,10 @@ static int napi_gro_complete(struct sk_buff *skb)
struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
int err = -ENOENT;

if (NAPI_GRO_CB(skb)->count == 1)
if (NAPI_GRO_CB(skb)->count == 1) {
skb_shinfo(skb)->gso_size = 0;
goto out;
}

rcu_read_lock();
list_for_each_entry_rcu(ptype, head, list) {
Expand All @@ -2348,7 +2350,6 @@ static int napi_gro_complete(struct sk_buff *skb)
}

out:
skb_shinfo(skb)->gso_size = 0;
return netif_receive_skb(skb);
}

Expand Down

0 comments on commit fc59f9a

Please sign in to comment.