From 3ef070f1cca0487e3751b75799caf4f6650dcd7b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 21 Sep 2012 00:13:12 +0000 Subject: [PATCH] cns3xxx: add a small optimization for rx offload SVN-Revision: 33500 --- .../420-ethernet_optimize_rx_offload.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 target/linux/cns3xxx/patches-3.3/420-ethernet_optimize_rx_offload.patch diff --git a/target/linux/cns3xxx/patches-3.3/420-ethernet_optimize_rx_offload.patch b/target/linux/cns3xxx/patches-3.3/420-ethernet_optimize_rx_offload.patch new file mode 100644 index 0000000000..67929ef895 --- /dev/null +++ b/target/linux/cns3xxx/patches-3.3/420-ethernet_optimize_rx_offload.patch @@ -0,0 +1,27 @@ +--- a/drivers/net/ethernet/cavium/cns3xxx_eth.c ++++ b/drivers/net/ethernet/cavium/cns3xxx_eth.c +@@ -653,17 +653,17 @@ static int eth_poll(struct napi_struct * + case 6: + case 13: + case 14: +- if (desc->l4f) ++ if (!desc->l4f) { ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ napi_gro_receive(napi, skb); + break; +- +- skb->ip_summed = CHECKSUM_UNNECESSARY; +- break; ++ } ++ /* fall through */ + default: +- break; ++ netif_receive_skb(skb); ++ break; + } + +- napi_gro_receive(napi, skb); +- + sw->frag_first = NULL; + sw->frag_last = NULL; + } -- 2.30.2