diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-01-14 17:36:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-14 17:36:12 -0500 |
commit | f17f5c91ae3bfeb5cfc37fa132a5fdfceb8927be (patch) | |
tree | ba4c4b7c9d71bf15d9e2ceaeebbea8823bb5f120 /net | |
parent | 483a2b3a3182abcb7fcea986d7ea13e793bb00b1 (diff) |
gro: Check for GSO packets and packets with frag_list
As GRO cannot be applied to packets with frag_list we need to
make sure that we reject such packets if they are fed to us,
e.g., through a tunnel device.
Also there is no point in applying GRO on GSO packets so they
too should be rejected. This allows GRO to be used in virtio-net
which may produce GSO packets directly but may still benefit
from GRO if the other end of it doesn't support GSO.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b715a55cccc4..7dec715293b1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2392,6 +2392,9 @@ int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) | |||
2392 | if (!(skb->dev->features & NETIF_F_GRO)) | 2392 | if (!(skb->dev->features & NETIF_F_GRO)) |
2393 | goto normal; | 2393 | goto normal; |
2394 | 2394 | ||
2395 | if (skb_is_gso(skb) || skb_shinfo(skb)->frag_list) | ||
2396 | goto normal; | ||
2397 | |||
2395 | rcu_read_lock(); | 2398 | rcu_read_lock(); |
2396 | list_for_each_entry_rcu(ptype, head, list) { | 2399 | list_for_each_entry_rcu(ptype, head, list) { |
2397 | struct sk_buff *p; | 2400 | struct sk_buff *p; |