mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
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>
This commit is contained in:
parent
d78ad8cbfe
commit
f2bde73286
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue