Skip to content

Commit

Permalink
bnx2x: fix tunneling CSUM calculation
Browse files Browse the repository at this point in the history
Since commit c957d09
"bnx2x: Remove sparse and coccinelle warnings"
driver provided wrong partial csum for HW in tunneing
scenarios.

Reported-by: Eric Dumazet <[email protected]>
CC: Alexander Duyck <[email protected]>
CC: Pravin Shelar <[email protected]>
CC: Cong Wang <[email protected]>
Signed-off-by: Dmitry Kravkov <[email protected]>
Tested-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dmitry Kravkov authored and davem330 committed Jul 11, 2013
1 parent a8798a5 commit 1b4fc0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3543,9 +3543,9 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb,
/* outer IP header info */
if (xmit_type & XMIT_CSUM_V4) {
struct iphdr *iph = ip_hdr(skb);
u16 csum = (__force u16)(~iph->check) -
(__force u16)iph->tot_len -
(__force u16)iph->frag_off;
u32 csum = (__force u32)(~iph->check) -
(__force u32)iph->tot_len -
(__force u32)iph->frag_off;

pbd2->fw_ip_csum_wo_len_flags_frag =
bswab16(csum_fold((__force __wsum)csum));
Expand Down

0 comments on commit 1b4fc0e

Please sign in to comment.