diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2013-03-14 22:50:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-15 09:12:24 -0400 |
commit | 1bcac3b08e2f13c31f798ac46897e33f08cfbd53 (patch) | |
tree | 18faf40ea66e17d850acd456f56430dc3b86448b /drivers/net/ethernet/qlogic/netxen | |
parent | b66c66dc5cc8f8f8d68ea1177b9672f91e1e7a19 (diff) | |
download | op-kernel-dev-1bcac3b08e2f13c31f798ac46897e33f08cfbd53.zip op-kernel-dev-1bcac3b08e2f13c31f798ac46897e33f08cfbd53.tar.gz |
driver/qlogic: 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/qlogic/netxen')
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c index 4782dcf..7692dfd 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c @@ -27,6 +27,7 @@ #include <linux/delay.h> #include <linux/slab.h> #include <linux/if_vlan.h> +#include <net/checksum.h> #include "netxen_nic.h" #include "netxen_nic_hw.h" @@ -1641,9 +1642,8 @@ netxen_process_lro(struct netxen_adapter *adapter, th = (struct tcphdr *)((skb->data + vhdr_len) + (iph->ihl << 2)); length = (iph->ihl << 2) + (th->doff << 2) + lro_length; + csum_replace2(&iph->check, iph->tot_len, htons(length)); iph->tot_len = htons(length); - iph->check = 0; - iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); th->psh = push; th->seq = htonl(seq_number); |