diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2013-07-11 08:48:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-11 14:48:06 -0400 |
commit | 1b4fc0e249d61916b8a525b0e7b3c028232457c9 (patch) | |
tree | 41c74eca2e6cd7d3bf8033de7f1d0406679fd596 | |
parent | a8798a5c77c9981e88caef1373a3310bf8aed219 (diff) |
bnx2x: fix tunneling CSUM calculation
Since commit c957d09ffda417f6c8e3d1f10e2b05228607d6d7
"bnx2x: Remove sparse and coccinelle warnings"
driver provided wrong partial csum for HW in tunneing
scenarios.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Pravin Shelar <pshelar@nicira.com>
CC: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Tested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 3353efe79194..ee350bde1818 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -3543,9 +3543,9 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb, | |||
3543 | /* outer IP header info */ | 3543 | /* outer IP header info */ |
3544 | if (xmit_type & XMIT_CSUM_V4) { | 3544 | if (xmit_type & XMIT_CSUM_V4) { |
3545 | struct iphdr *iph = ip_hdr(skb); | 3545 | struct iphdr *iph = ip_hdr(skb); |
3546 | u16 csum = (__force u16)(~iph->check) - | 3546 | u32 csum = (__force u32)(~iph->check) - |
3547 | (__force u16)iph->tot_len - | 3547 | (__force u32)iph->tot_len - |
3548 | (__force u16)iph->frag_off; | 3548 | (__force u32)iph->frag_off; |
3549 | 3549 | ||
3550 | pbd2->fw_ip_csum_wo_len_flags_frag = | 3550 | pbd2->fw_ip_csum_wo_len_flags_frag = |
3551 | bswab16(csum_fold((__force __wsum)csum)); | 3551 | bswab16(csum_fold((__force __wsum)csum)); |