[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1401951572-6538-3-git-send-email-b38611@freescale.com>
Date: Thu, 5 Jun 2014 14:59:28 +0800
From: Fugang Duan <b38611@...escale.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <shawn.guo@...aro.org>,
<b38611@...escale.com>, <R49496@...escale.com>,
<ezequiel.garcia@...e-electrons.com>, <bhutchings@...arflare.com>,
<stephen@...workplumber.org>, <b20596@...escale.com>,
<David.Laight@...LAB.COM>, <eric.dumazet@...il.com>
Subject: [PATCH v3 2/6] net: fec: Enable IP header hardware checksum
IP header checksum is calcalated by network layer in default.
To support software TSO, it is better to use HW calculate the
IP header checksum.
FEC hw checksum feature request the checksum field in frame
is zero, otherwise the calculative CRC is not correct.
For segmentated TCP packet, HW calculate the IP header checksum again,
it doesn't bring any impact. For SW TSO, HW calculated checksum bring
better performance.
Signed-off-by: Fugang Duan <B38611@...escale.com>
---
drivers/net/ethernet/freescale/fec_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 32c2276..299f7f5 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -327,6 +327,7 @@ fec_enet_clear_csum(struct sk_buff *skb, struct net_device *ndev)
if (unlikely(skb_cow_head(skb, 0)))
return -1;
+ ip_hdr(skb)->check = 0;
*(__sum16 *)(skb->head + skb->csum_start + skb->csum_offset) = 0;
return 0;
@@ -408,7 +409,7 @@ static int txq_submit_skb(struct sk_buff *skb, struct net_device *ndev)
* are done by the kernel
*/
if (skb->ip_summed == CHECKSUM_PARTIAL)
- ebdp->cbd_esc |= BD_ENET_TX_PINS;
+ ebdp->cbd_esc |= BD_ENET_TX_PINS | BD_ENET_TX_IINS;
}
}
--
1.7.8
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists