diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 115dee1d985d..6ca32f6b3105 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3500,14 +3500,20 @@ static inline gro_result_t | |||
3500 | __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) | 3500 | __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) |
3501 | { | 3501 | { |
3502 | struct sk_buff *p; | 3502 | struct sk_buff *p; |
3503 | unsigned int maclen = skb->dev->hard_header_len; | ||
3503 | 3504 | ||
3504 | for (p = napi->gro_list; p; p = p->next) { | 3505 | for (p = napi->gro_list; p; p = p->next) { |
3505 | unsigned long diffs; | 3506 | unsigned long diffs; |
3506 | 3507 | ||
3507 | diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; | 3508 | diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; |
3508 | diffs |= p->vlan_tci ^ skb->vlan_tci; | 3509 | diffs |= p->vlan_tci ^ skb->vlan_tci; |
3509 | diffs |= compare_ether_header(skb_mac_header(p), | 3510 | if (maclen == ETH_HLEN) |
3510 | skb_gro_mac_header(skb)); | 3511 | diffs |= compare_ether_header(skb_mac_header(p), |
3512 | skb_gro_mac_header(skb)); | ||
3513 | else if (!diffs) | ||
3514 | diffs = memcmp(skb_mac_header(p), | ||
3515 | skb_gro_mac_header(skb), | ||
3516 | maclen); | ||
3511 | NAPI_GRO_CB(p)->same_flow = !diffs; | 3517 | NAPI_GRO_CB(p)->same_flow = !diffs; |
3512 | NAPI_GRO_CB(p)->flush = 0; | 3518 | NAPI_GRO_CB(p)->flush = 0; |
3513 | } | 3519 | } |