From: Stephen Hemminger Date: Wed, 1 Apr 2009 11:20:20 +0000 (+0000) Subject: net: allow multiple dev per napi with GRO X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2bde7328633269ee935d9ed96535ade15cc348f;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 52fea5b28ca..91d792d17e0 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) return GRO_NORMAL; for (p = napi->gro_list; p; p = p->next) { - NAPI_GRO_CB(p)->same_flow = !compare_ether_header( - skb_mac_header(p), skb_gro_mac_header(skb)); + NAPI_GRO_CB(p)->same_flow = (p->dev == skb->dev) + && !compare_ether_header(skb_mac_header(p), + skb_gro_mac_header(skb)); NAPI_GRO_CB(p)->flush = 0; }