Skip to content

Commit

Permalink
net: allow multiple dev per napi with GRO
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Stephen Hemminger authored and davem330 committed Apr 2, 2009
1 parent d78ad8c commit f2bde73
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 @@ -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;
}

Expand Down

0 comments on commit f2bde73

Please sign in to comment.