summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/neterion
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2013-03-17 22:34:48 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-18 13:02:36 -0400
commit9a18dd15e2ec934d8265009d3882955dcc059a49 (patch)
treea610318527776f3d736580c70a53df2a77a57d62 /drivers/net/ethernet/neterion
parent1a2c6181c4a1922021b4d7df373bba612c3e5f04 (diff)
downloadop-kernel-dev-9a18dd15e2ec934d8265009d3882955dcc059a49.zip
op-kernel-dev-9a18dd15e2ec934d8265009d3882955dcc059a49.tar.gz
net: neterion: replace ip_fast_csum with csum_replace2
replace ip_fast_csum with csum_replace2 to save cpu cycles Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/neterion')
-rw-r--r--drivers/net/ethernet/neterion/s2io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index bfd8873..3371ff4 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -80,6 +80,7 @@
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <net/tcp.h>
+#include <net/checksum.h>
#include <asm/div64.h>
#include <asm/irq.h>
@@ -8337,16 +8338,13 @@ static void update_L3L4_header(struct s2io_nic *sp, struct lro *lro)
{
struct iphdr *ip = lro->iph;
struct tcphdr *tcp = lro->tcph;
- __sum16 nchk;
struct swStat *swstats = &sp->mac_control.stats_info->sw_stat;
DBG_PRINT(INFO_DBG, "%s: Been here...\n", __func__);
/* Update L3 header */
+ csum_replace2(&ip->check, ip->tot_len, htons(lro->total_len));
ip->tot_len = htons(lro->total_len);
- ip->check = 0;
- nchk = ip_fast_csum((u8 *)lro->iph, ip->ihl);
- ip->check = nchk;
/* Update L4 header */
tcp->ack_seq = lro->tcp_ack;
OpenPOWER on IntegriCloud