67929ef895acd4b0f2ef3bde30a2e5ffcf877369
[openwrt.git] / target / linux / cns3xxx / patches-3.3 / 420-ethernet_optimize_rx_offload.patch
1 --- a/drivers/net/ethernet/cavium/cns3xxx_eth.c
2 +++ b/drivers/net/ethernet/cavium/cns3xxx_eth.c
3 @@ -653,17 +653,17 @@ static int eth_poll(struct napi_struct *
4                                 case 6:
5                                 case 13:
6                                 case 14:
7 -                                       if (desc->l4f)
8 +                                       if (!desc->l4f) {
9 +                                               skb->ip_summed = CHECKSUM_UNNECESSARY;
10 +                                               napi_gro_receive(napi, skb);
11                                                 break;
12 -
13 -                                       skb->ip_summed = CHECKSUM_UNNECESSARY;
14 -                                       break;
15 +                                       }
16 +                                       /* fall through */
17                                 default:
18 -                               break;
19 +                                       netif_receive_skb(skb);
20 +                                       break;
21                         }
22  
23 -                       napi_gro_receive(napi, skb);
24 -
25                         sw->frag_first = NULL;
26                         sw->frag_last = NULL;
27                 }