diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2013-03-17 18:34:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-18 13:02:36 -0400 |
commit | 9a18dd15e2ec934d8265009d3882955dcc059a49 (patch) | |
tree | a610318527776f3d736580c70a53df2a77a57d62 /drivers/net/ethernet/neterion/s2io.c | |
parent | 1a2c6181c4a1922021b4d7df373bba612c3e5f04 (diff) |
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/s2io.c')
-rw-r--r-- | drivers/net/ethernet/neterion/s2io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index bfd887382e19..3371ff41bb34 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -80,6 +80,7 @@ | |||
80 | #include <linux/slab.h> | 80 | #include <linux/slab.h> |
81 | #include <linux/prefetch.h> | 81 | #include <linux/prefetch.h> |
82 | #include <net/tcp.h> | 82 | #include <net/tcp.h> |
83 | #include <net/checksum.h> | ||
83 | 84 | ||
84 | #include <asm/div64.h> | 85 | #include <asm/div64.h> |
85 | #include <asm/irq.h> | 86 | #include <asm/irq.h> |
@@ -8337,16 +8338,13 @@ static void update_L3L4_header(struct s2io_nic *sp, struct lro *lro) | |||
8337 | { | 8338 | { |
8338 | struct iphdr *ip = lro->iph; | 8339 | struct iphdr *ip = lro->iph; |
8339 | struct tcphdr *tcp = lro->tcph; | 8340 | struct tcphdr *tcp = lro->tcph; |
8340 | __sum16 nchk; | ||
8341 | struct swStat *swstats = &sp->mac_control.stats_info->sw_stat; | 8341 | struct swStat *swstats = &sp->mac_control.stats_info->sw_stat; |
8342 | 8342 | ||
8343 | DBG_PRINT(INFO_DBG, "%s: Been here...\n", __func__); | 8343 | DBG_PRINT(INFO_DBG, "%s: Been here...\n", __func__); |
8344 | 8344 | ||
8345 | /* Update L3 header */ | 8345 | /* Update L3 header */ |
8346 | csum_replace2(&ip->check, ip->tot_len, htons(lro->total_len)); | ||
8346 | ip->tot_len = htons(lro->total_len); | 8347 | ip->tot_len = htons(lro->total_len); |
8347 | ip->check = 0; | ||
8348 | nchk = ip_fast_csum((u8 *)lro->iph, ip->ihl); | ||
8349 | ip->check = nchk; | ||
8350 | 8348 | ||
8351 | /* Update L4 header */ | 8349 | /* Update L4 header */ |
8352 | tcp->ack_seq = lro->tcp_ack; | 8350 | tcp->ack_seq = lro->tcp_ack; |