diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-04-01 07:20:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-02 04:07:37 -0400 |
commit | f2bde7328633269ee935d9ed96535ade15cc348f (patch) | |
tree | 5691cd6965cc7dae9d29b79fd9facfdc4c18199e /net/core/dev.c | |
parent | d78ad8cbfe73ad568de38814a75e9c92ad0a907c (diff) |
net: allow multiple dev per napi with GRO
GRO assumes that there is a one-to-one relationship between NAPI
structure and network device. Some devices like sky2 share multiple
devices on a single interrupt so only have one NAPI handler. Rather than
split GRO from NAPI, just have GRO assume if device changes that
it is a different flow.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 52fea5b28ca6..91d792d17e09 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2472,8 +2472,9 @@ static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) | |||
2472 | return GRO_NORMAL; | 2472 | return GRO_NORMAL; |
2473 | 2473 | ||
2474 | for (p = napi->gro_list; p; p = p->next) { | 2474 | for (p = napi->gro_list; p; p = p->next) { |
2475 | NAPI_GRO_CB(p)->same_flow = !compare_ether_header( | 2475 | NAPI_GRO_CB(p)->same_flow = (p->dev == skb->dev) |
2476 | skb_mac_header(p), skb_gro_mac_header(skb)); | 2476 | && !compare_ether_header(skb_mac_header(p), |
2477 | skb_gro_mac_header(skb)); | ||
2477 | NAPI_GRO_CB(p)->flush = 0; | 2478 | NAPI_GRO_CB(p)->flush = 0; |
2478 | } | 2479 | } |
2479 | 2480 | ||